/* ============================================================
   LejlaTimer landing site — layout & components
   Calm, quiet, warm. Flat token surfaces only, soft motion.
   ============================================================ */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
  color: var(--text-body);
  background: var(--bg-app);
  transition: background var(--duration-soft) var(--ease-gentle),
              color var(--duration-soft) var(--ease-gentle);
}

::selection { background: var(--accent-tint-strong); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
  border-radius: var(--radius-sm);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ---------- shared type ---------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: var(--weight-medium); margin: 0; }

.micro-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted);
}

.section-heading { font-size: var(--text-2xl); line-height: var(--leading-tight); margin-top: var(--space-2); }
.section-lead { color: var(--text-muted); max-width: 560px; margin: var(--space-4) 0 0; }

.icon { display: inline-flex; flex: none; }
.icon svg { display: block; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-h-lg);
  padding: 0 var(--space-8);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: background var(--duration-quick) var(--ease-gentle),
              color var(--duration-quick) var(--ease-gentle),
              transform var(--duration-quick) var(--ease-gentle);
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }

.btn-secondary {
  background: var(--surface-card);
  color: var(--text-body);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-sunken); color: var(--text-body); }

.btn-sm { height: var(--control-h-md); padding: 0 var(--space-6); font-size: var(--text-sm); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--duration-soft) var(--ease-gentle);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: 68px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--weight-medium);
  color: var(--text-body);
}
.wordmark:hover { color: var(--text-body); }

.site-nav { display: flex; gap: var(--space-5); margin-left: auto; }
.site-nav a { color: var(--text-muted); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.site-nav a:hover { color: var(--text-body); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.theme-toggle {
  width: var(--control-h-md);
  height: var(--control-h-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--duration-quick) var(--ease-gentle);
}
.theme-toggle:hover { background: var(--surface-sunken); }
.theme-toggle:active { transform: scale(0.98); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline-flex; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- sections ---------- */

.section { padding: var(--space-16) 0; }
.section + .section { border-top: 1px solid var(--border-subtle); }

/* ---------- hero ---------- */

.hero { padding: var(--space-16) 0; }

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: var(--space-12);
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 48px);
  line-height: var(--leading-tight);
  margin-top: var(--space-3);
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 480px;
  margin: var(--space-5) 0 0;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

.hero-note { font-size: var(--text-sm); color: var(--text-faint); margin: var(--space-4) 0 0; }

/* ---------- phone mock ---------- */

.phone {
  width: 300px;
  border-radius: 44px;
  padding: 14px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-raised);
}

.phone-screen {
  border-radius: 32px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  padding: var(--space-5);
  overflow: hidden;
}

.phone-greeting { font-family: var(--font-display); font-size: var(--text-xl); }
.phone-date { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }

.phone-card {
  margin-top: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
  text-align: center;
}

.phone-card .micro-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--sleep);
}

.breathing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sleep);
  animation: breathe 2.6s var(--ease-gentle) infinite;
}

.phone-timer {
  font-family: var(--font-mono);
  font-size: var(--text-timer);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-top: var(--space-2);
  animation: breathe 2.6s var(--ease-gentle) infinite;
}
.phone-timer .timer-seconds { font-size: 26px; color: var(--text-faint); }

.phone-since { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-1); }

.phone-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-5);
}

.activity-circle { text-align: center; }
.activity-circle .circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.activity-circle span { display: block; font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-2); }
.activity-circle.sleep .circle { background: var(--sleep-tint-strong); color: var(--sleep); }
.activity-circle.awake .circle { background: var(--awake-tint-strong); color: var(--awake); }
.activity-circle.feed .circle { background: var(--feed-tint-strong); color: var(--feed); }

.phone-log { margin-top: var(--space-5); }
.log-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}
.log-row .icon { color: var(--text-muted); }
.log-row.sleep .icon { color: var(--sleep); }
.log-row.awake .icon { color: var(--awake); }
.log-row.feed .icon { color: var(--feed); }
.log-row .log-main { flex: 1; }
.log-row .log-sub { color: var(--text-faint); font-size: var(--text-xs); }
.log-row .log-time { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-xs); }

/* ---------- device mock ---------- */

/* A physical object — its shell and e-ink paper don't follow the site theme. */
.device {
  width: 280px;
  background: oklch(0.93 0.014 295);
  border-radius: 44px;
  padding: 24px 24px 20px;
  box-shadow: var(--shadow-raised), inset 0 1px 0 oklch(1 0 0 / 0.6);
}

.eink {
  --ink: #2b2a2e;
  --paper: #dcdad3;
  background: var(--paper);
  border-radius: 14px;
  padding: 18px 18px 14px;
  color: var(--ink);
  box-shadow: inset 0 2px 6px oklch(0.2 0.02 300 / 0.18);
  font-family: var(--font-mono);
}

.eink-status {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.eink-main { text-align: center; padding: 14px 0 10px; }
.eink-state { font-size: 11px; letter-spacing: 0.12em; font-weight: var(--weight-semibold); }
.eink-timer { font-size: 56px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.eink-since { font-size: 12px; margin-top: 4px; }

.eink-footer {
  border-top: 1.5px solid var(--ink);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.device-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.device-btn {
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.device-btn.sleep { background: var(--lavender-150); color: var(--lavender-600); box-shadow: 0 2px 0 oklch(0.75 0.04 295); }
.device-btn.awake { background: var(--dawn-150); color: var(--dawn-600); box-shadow: 0 2px 0 oklch(0.75 0.05 78); }
.device-btn.feed { background: var(--clay-150); color: var(--clay-600); box-shadow: 0 2px 0 oklch(0.75 0.04 30); }

.device-nav { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.device-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: oklch(0.88 0.012 295);
  box-shadow: 0 1.5px 0 oklch(0.72 0.02 295);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dusk-700);
  font-size: 11px;
}

/* ---------- hero visual arrangement ---------- */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-6) 0;
}
.hero-visual .device {
  width: 220px;
  padding: 19px 19px 16px;
  border-radius: 36px;
  margin-top: var(--space-12);
}
.hero-visual .eink-timer { font-size: 44px; }
.hero-visual .phone { margin-left: -48px; position: relative; z-index: 1; }

/* ---------- how it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-10);
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.step-icon.sleep { background: var(--sleep-tint); color: var(--sleep); }
.step-icon.awake { background: var(--awake-tint); color: var(--awake); }
.step-icon.feed { background: var(--feed-tint); color: var(--feed); }
.step-icon.accent { background: var(--accent-tint); color: var(--accent); }

.card h3 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: var(--weight-semibold); }
.card p { color: var(--text-muted); font-size: var(--text-sm); margin: var(--space-2) 0 0; }

/* ---------- app & device split sections ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12);
  align-items: center;
  margin-top: var(--space-10);
}

.split-visual { display: flex; justify-content: center; }

.feature-list { list-style: none; margin: var(--space-6) 0 0; padding: 0; }
.feature-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) 0;
}
.feature-list .icon { color: var(--accent); margin-top: 2px; }
.feature-list strong { font-weight: var(--weight-semibold); }
.feature-list .feature-note { color: var(--text-muted); }

.store-buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.placeholder-caption { font-size: var(--text-sm); color: var(--text-faint); margin: var(--space-3) 0 0; }

/* ---------- device specs & buy card ---------- */

.spec-list {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.spec-list li {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  font-size: var(--text-sm);
}
.spec-list .spec-term {
  flex: none;
  width: 96px;
  font-weight: var(--weight-semibold);
}
.spec-list .spec-desc { color: var(--text-muted); }

.buy-card { margin-top: var(--space-8); }
.buy-card .price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.buy-card .price {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-variant-numeric: tabular-nums;
}
.buy-card .price-note { color: var(--text-muted); font-size: var(--text-sm); }

.waitlist-form {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}
.waitlist-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  height: var(--control-h-lg);
  padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-app);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--text-md);
}
.waitlist-form input[type="email"]::placeholder { color: var(--text-faint); }
.waitlist-form input[type="email"]:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); }

.waitlist-message {
  display: none;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  color: var(--text-body);
  font-size: var(--text-sm);
}
.waitlist-message.is-visible { display: block; }

/* ---------- better together band ---------- */

.together { text-align: center; }
.together .section-heading { max-width: 560px; margin-left: auto; margin-right: auto; }
.together .section-lead { margin-left: auto; margin-right: auto; }
.together .hero-ctas { justify-content: center; }

/* ---------- FAQ ---------- */

.faq-list { margin-top: var(--space-10); display: grid; gap: var(--space-3); max-width: 720px; }

details.faq-item {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 0 var(--space-6);
}
details.faq-item summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--control-h-lg);
  padding: var(--space-3) 0;
  cursor: pointer;
  list-style: none;
  font-weight: var(--weight-semibold);
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary .icon {
  margin-left: auto;
  color: var(--text-faint);
  transition: transform var(--duration-quick) var(--ease-gentle);
}
details.faq-item[open] summary .icon { transform: rotate(90deg); }
details.faq-item p { color: var(--text-muted); font-size: var(--text-sm); margin: 0 0 var(--space-5); max-width: 620px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-12) 0 var(--space-10);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
}

.footer-tagline { margin: var(--space-3) 0 0; max-width: 260px; color: var(--text-muted); }

.footer-col .micro-label { display: block; margin-bottom: var(--space-3); color: var(--text-faint); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--text-body); }

.footer-bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-faint);
  font-size: var(--text-xs);
}

/* ---------- text pages (privacy, support) ---------- */

.page-hero { padding: var(--space-16) 0 var(--space-6); }
.page-hero h1 {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  margin-top: var(--space-2);
}
.page-meta { color: var(--text-faint); font-size: var(--text-sm); margin: var(--space-3) 0 0; }

.prose { max-width: 720px; padding-bottom: var(--space-16); }
.prose h2 {
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  margin: var(--space-12) 0 0;
}
.prose p { margin: var(--space-4) 0 0; }
.prose ul { margin: var(--space-4) 0 0; padding-left: var(--space-6); }
.prose li + li { margin-top: var(--space-2); }
.prose strong { font-weight: var(--weight-semibold); }
/* Links inside running text are underlined so they don't rely on colour alone. */
.prose p a, .prose li a, details.faq-item p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.summary-card { margin-top: var(--space-6); }
/* The checklist is a .feature-list, not running text: undo the .prose list indent. */
.summary-card .feature-list { margin-top: var(--space-2); padding-left: 0; }
.summary-card .feature-list li + li { margin-top: 0; }
.summary-card .feature-list li { padding: var(--space-2) 0; }

.contact-card {
  margin-top: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.contact-card .contact-text { flex: 1; min-width: 240px; }
.contact-card .contact-text p { font-size: var(--text-md); }
.contact-card .contact-address { font-weight: var(--weight-semibold); color: var(--text-body); }

.prose .faq-list { margin-top: var(--space-5); }
.footer-col a[aria-current="page"] { color: var(--text-body); }

/* ---------- motion ---------- */

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--duration-soft) var(--ease-gentle),
              transform var(--duration-soft) var(--ease-gentle);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .breathing-dot, .phone-timer { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .steps { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
}

@media (max-width: 540px) {
  /* Too narrow for the overlap — the phone carries the hero alone;
     the device face still stars in its own section below. */
  .hero-visual .device { display: none; }
  .hero-visual .phone { margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
