/* =========================================================
   Startsida — landningssida
   Samma designsystem som appen: Inter, stone-paletten, snabba
   övergångar. Personligheten kommer från viktkontrasten
   (200 mot 600) och från demon som bygger sig själv.
   ========================================================= */

:root {
  --bg: #fafaf9;
  --bg-surface: #ffffff;
  --bg-sunken: #f5f5f4;
  --text: #1c1917;
  --text-muted: #57534e;
  --text-subtle: #a8a29e;
  --border-subtle: #f5f5f4;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --hover: #f5f5f4;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04), 0 0 0 1px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 16px rgba(28, 25, 23, 0.06), 0 1px 4px rgba(28, 25, 23, 0.04), 0 0 0 1px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 24px 60px rgba(28, 25, 23, 0.10), 0 4px 12px rgba(28, 25, 23, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 140ms cubic-bezier(0.2, 0, 0, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --page: 1120px;
  --ok: #16a34a;
  --danger: #ef4444;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --bg-surface: #1c1917;
    --bg-sunken: #171412;
    --text: #fafaf9;
    --text-muted: #a8a29e;
    --text-subtle: #78716c;
    --border-subtle: #1c1917;
    --border: #292524;
    --border-strong: #44403c;
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.16);
    --hover: #292524;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
    --ok: #4ade80;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "ss03";
}

h1, h2, h3 { margin: 0; letter-spacing: -0.03em; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { left: 12px; }

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 16px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.nav-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--bg);
}
.nav-links {
  display: flex;
  gap: 24px;
  margin-right: auto;
  font-size: 14px;
  color: var(--text-muted);
}
.nav-links a { transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.nav-login {
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-login:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav { gap: 16px; padding: 12px 16px; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
}

/* =========================================================
   Knappar
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
}
.btn:hover { background: var(--hover); }
.btn-primary {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}
.btn-primary:hover { background: var(--accent); opacity: 0.9; }
.btn-primary:disabled { opacity: 0.55; cursor: default; }
.btn-block { width: 100%; padding: 11px 16px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}
.link-arrow span { transition: transform var(--transition); }
.link-arrow:hover span { transform: translateX(3px); }

/* =========================================================
   Hero
   ========================================================= */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: 48px 24px 24px;
}
.hero-copy { max-width: 640px; }
.hero h1 {
  margin: 18px 0 0;
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
/* Andra raden i rubriken bär vikten — kontrasten 200/600 är sidans
   typografiska signatur, samma grepp som klockan i appen. */
.h1-strong { font-weight: 600; }
.lead {
  max-width: 52ch;
  margin-top: 20px;
  font-size: 17px;
  color: var(--text-muted);
}

.signup[hidden] { display: none; }
.signup {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  max-width: 460px;
}
.signup-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.signup-input::placeholder { color: var(--text-subtle); }
.signup-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.signup-input[aria-invalid="true"] { border-color: var(--danger); }
.signup-note {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-subtle);
}
.signup-note a { color: var(--accent); }
.signup-note a:hover { text-decoration: underline; }
.signup-note.is-ok { color: var(--ok); }
.signup-note.is-error { color: var(--danger); }

/* =========================================================
   Demo-ramen (signaturen)
   ========================================================= */
.hero-demo { margin-top: 56px; }

.frame {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
/* Rutnätet bakom: "den tomma duken" */
.frame::before {
  content: "";
  position: absolute;
  inset: 33px 0 0;
  background-image:
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 30%, transparent 78%);
  pointer-events: none;
}
.frame-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 14px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}
.frame-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}
.frame-url {
  margin-left: 12px;
  font-size: 11.5px;
  color: var(--text-subtle);
  letter-spacing: -0.01em;
}
.frame-body {
  position: relative;
  min-height: 466px;
  padding: 28px 24px 32px;
}

/* Tomt läge */
.mock-empty[hidden] { display: none; }
.mock-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  transition: opacity 220ms ease;
}
.mock-empty.is-leaving { opacity: 0; }
.mock-clock {
  font-size: clamp(48px, 9vw, 76px);
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mock-date {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.mock-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(460px, 100%);
  margin-top: 36px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 14.5px;
}
.mock-prompt-icon { color: var(--accent); }
.mock-prompt-text { color: var(--text); }
.mock-caret {
  width: 1.5px;
  height: 17px;
  background: var(--accent);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Fyllt läge */
.mock-filled[hidden] { display: none; }
.mock-topline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.mock-topline-time {
  font-size: 19px;
  font-weight: 300;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.mock-topline-date { font-size: 12.5px; color: var(--text-muted); }
.mock-search {
  padding: 9px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-subtle);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.mock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
.mock-col { display: flex; flex-direction: column; gap: 16px; }
.mock-widget {
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(6px);
}
.mock-widget.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 260ms ease, transform 260ms cubic-bezier(0.2, 0, 0, 1);
}
.mock-widget-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mock-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 0;
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mock-link i {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 3px;
  font-style: normal;
  font-size: 9px;
  font-weight: 600;
  color: hsl(var(--h, 220), 60%, 38%);
  background: hsl(var(--h, 220), 80%, 93%);
}
@media (prefers-color-scheme: dark) {
  .mock-link i {
    color: hsl(var(--h, 220), 70%, 80%);
    background: hsl(var(--h, 220), 35%, 18%);
  }
}
.mock-link.is-text { padding-left: 1px; }
.mock-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.mock-todo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.mock-box {
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
}
.mock-box.is-done {
  background: var(--accent);
  border-color: var(--accent);
}
.mock-todo:has(.is-done) {
  color: var(--text-subtle);
  text-decoration: line-through;
}
.mock-weather { display: flex; align-items: baseline; gap: 10px; }
.mock-temp {
  font-size: 28px;
  font-weight: 200;
  letter-spacing: -0.03em;
}
.mock-weather-sub { font-size: 12px; color: var(--text-subtle); }

.demo-caption {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-subtle);
}

@media (max-width: 720px) {
  .frame-body { padding: 20px 14px 24px; min-height: 340px; }
  .mock-grid { grid-template-columns: 1fr; }
  .mock-col:last-child { display: none; }
}

/* =========================================================
   Sektioner
   ========================================================= */
.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: 88px 24px 0;
}
.section-head { max-width: 620px; }
.section-head h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 40px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feature {
  padding: 26px 24px 30px;
  background: var(--bg);
  transition: background var(--transition);
}
.feature:hover { background: var(--bg-surface); }
.feature h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.feature p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Stegen — numren finns för att ordningen faktiskt betyder något */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.step-num {
  display: block;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.step h3 {
  margin-top: 10px;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.step p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 20px; } }

/* =========================================================
   Pris
   ========================================================= */
.pricing {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
  margin-top: 40px;
}
.price-card {
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.price {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.price-amount {
  font-size: 76px;
  font-weight: 200;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.price-unit {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.25;
  color: var(--text-muted);
}
.price-sub {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}
.price-list {
  margin: 20px 0 24px;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.price-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.price-list li::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.price-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-subtle);
  text-align: center;
}
.price-aside { padding-top: 8px; }
.price-aside h3 {
  font-size: 16px;
  letter-spacing: -0.02em;
}
.price-aside p {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
}
.price-aside .link-arrow { margin-top: 16px; }
@media (max-width: 860px) { .pricing { grid-template-columns: 1fr; } }

/* =========================================================
   Anmälan
   ========================================================= */
.cta-section { padding-top: 88px; }
.cta {
  padding: 48px 32px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.cta h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 300;
  letter-spacing: -0.035em;
}
.cta > p {
  max-width: 46ch;
  margin: 12px auto 0;
  font-size: 15px;
  color: var(--text-muted);
}
.signup-lg {
  margin: 24px auto 0;
  max-width: 440px;
}
.cta .signup-note { text-align: center; }

/* =========================================================
   Frågor
   ========================================================= */
.faq {
  margin-top: 32px;
  border-top: 1px solid var(--border);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
  transition: color var(--transition);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 300;
  color: var(--text-subtle);
  transition: transform var(--transition);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p {
  max-width: 68ch;
  padding: 0 4px 20px;
  font-size: 14.5px;
  color: var(--text-muted);
}

/* =========================================================
   Sidfot
   ========================================================= */
.footer {
  margin-top: 96px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--page);
  margin: 0 auto;
  padding: 28px 24px 40px;
  font-size: 13.5px;
  color: var(--text-subtle);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.footer-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.footer-links a { transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }
@media (max-width: 640px) {
  .footer-links { margin-left: 0; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .mock-widget, .mock-widget.is-in, .mock-empty { transition: none; }
  .mock-caret { animation: none; }
}
