:root {
  color-scheme: light;
  --bg: #f8faf7;
  --bg-strong: #eef7e7;
  --surface: #ffffff;
  --surface-soft: #f1f7ee;
  --surface-elevated: rgba(255, 255, 255, 0.86);
  --text: #142015;
  --muted: #5e6d61;
  --border: rgba(20, 32, 21, 0.12);
  --accent: #84cc16;
  --accent-strong: #4d7c0f;
  --orange: #ff9500;
  --green: #34c759;
  --blue: #007aff;
  --purple: #af52de;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 22px 60px rgba(31, 52, 22, 0.14);
  --shadow-soft: 0 10px 30px rgba(31, 52, 22, 0.09);
  --radius: 8px;
  --max: 1160px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071108;
  --bg-strong: #101d12;
  --surface: #111a12;
  --surface-soft: #172417;
  --surface-elevated: rgba(17, 26, 18, 0.88);
  --text: #f3f8ef;
  --muted: #afbaaa;
  --border: rgba(243, 248, 239, 0.13);
  --accent: #9be31f;
  --accent-strong: #c7f85f;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 28rem),
    linear-gradient(180deg, var(--bg-strong), var(--bg) 28rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body.docs-page {
  background: linear-gradient(180deg, var(--bg-strong), var(--bg) 18rem);
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--text);
  color: var(--bg);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 72px;
  padding: 0 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #34c759);
  color: #102006;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 35%, transparent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.94rem;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.icon-button,
.language-toggle,
.button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button {
  width: 40px;
}

.language-toggle,
.button {
  padding: 0 0.9rem;
  font-weight: 750;
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--green));
  color: #102006;
  box-shadow: 0 16px 32px color-mix(in srgb, var(--accent) 32%, transparent);
}

.button.secondary {
  background: transparent;
}

.button:hover,
.icon-button:hover,
.language-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.hero,
.section,
.docs-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 1.4rem;
  padding-right: 1.4rem;
}

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-top: 3.6rem;
  padding-bottom: 4.5rem;
  overflow: visible;
}

.hero-copy {
  flex: 1;
  width: 100%;
}

.hero-copy h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.25rem, 8vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.price-line {
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2.25rem;
  max-width: 36rem;
}

.proof-item {
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}

.proof-item strong {
  display: block;
  font-size: 1.4rem;
}

.proof-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-mockup {
  position: relative;
  width: 100%;
  max-width: 550px;
  display: inline-block;
  flex: 1.5;
}

.hero-mockup img {
  display: block;
  max-width: 100%;
  height: auto;
  background: transparent;
}

/* iPad — base layer, fills container */
.hero-ipad {
  width: 100%;
  display: block;
  z-index: 1;
  border-radius: 10px;
}

/* iPhone — overlaps bottom-right of iPad, ~32% width */
.hero-iphone {
  position: absolute;
  width: 32%;
  right: -4%;
  bottom: 0;
  z-index: 2;
  border-radius: 16px;
}

/* Apple Watch — smaller, sits to the left of iPhone, bottom-aligned */
.hero-watch {
  position: absolute;
  width: 16%;
  right: 6%;
  bottom: 0;
  z-index: 3;
  border-radius: 14px;
}

.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-header {
  max-width: 680px;
  margin-bottom: 2.2rem;
}

.section-header h2,
.docs-shell h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-header p,
.docs-shell .lead {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.timeline-item,
.privacy-item,
.support-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-soft);
}

.feature-card {
  padding: 1.25rem;
}

.feature-card svg,
.support-card svg {
  color: var(--accent-strong);
}

.feature-card h3,
.timeline-item h3,
.privacy-item h3,
.support-card h2 {
  margin: 1rem 0 0.45rem;
  font-size: 1.1rem;
  line-height: 1.2;
}

.feature-card p,
.timeline-item p,
.privacy-item p,
.support-card p,
.support-card li {
  color: var(--muted);
  margin: 0;
}

.device-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.watch-widget {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  align-items: center;
}

.watch {
  aspect-ratio: 0.82;
  border-radius: 42px;
  padding: 13px;
  background: #111712;
  box-shadow: var(--shadow-soft);
}

.watch-screen {
  height: 100%;
  border-radius: 32px;
  background: #111a12;
  color: #f3f8ef;
  padding: 1.1rem 0.9rem;
}

.watch-screen strong {
  display: block;
  font-size: 1.05rem;
}

.watch-row {
  margin-top: 0.7rem;
  padding: 0.6rem;
  border-radius: 16px;
  background: rgba(155, 227, 31, 0.14);
  color: #dfffa1;
  font-size: 0.82rem;
}

.widget-stack {
  display: grid;
  gap: 0.85rem;
}

.home-widget,
.lock-widget {
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  border-radius: 22px;
  padding: 1rem;
}

.home-widget {
  min-height: 142px;
}

.lock-widget {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.6rem;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.timeline-item {
  padding: 1.15rem;
}

.timeline-item .number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
  color: var(--accent-strong);
  font-weight: 850;
}

.privacy-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.privacy-item {
  padding: 1rem;
}

.download-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border-radius: var(--radius);
  background: #142015;
  color: #f7fff0;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  box-shadow: var(--shadow);
}

.download-band p {
  color: #c7d7be;
  margin: 0.65rem 0 0;
  max-width: 42rem;
}

.download-band h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.4rem;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.docs-shell {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.docs-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  max-width: 820px;
}

.support-card {
  padding: 1.4rem;
}

.support-card ul {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
}

.support-card li + li {
  margin-top: 0.4rem;
}

.doc-meta {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-mockup {
    animation: lift 5s ease-in-out infinite;
  }
}

@keyframes lift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 900px) {
  .nav {
    min-height: auto;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .feature-grid,
  .timeline,
  .privacy-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .device-band,
  .download-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .brand span {
    display: none;
  }

  .hero,
  .section,
  .docs-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-copy h1 {
    max-width: 9ch;
  }

  .hero-proof,
  .feature-grid,
  .timeline,
  .privacy-strip,
  .watch-widget {
    grid-template-columns: 1fr;
  }

  .device-band {
    padding: 1rem;
  }

  .download-band .hero-actions {
    margin-top: 0.5rem;
  }
}

/* Hero mockup responsive composition */
@media (min-width: 768px) {
  .hero {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }

  .hero-copy {
    flex: 1;
  }

  .hero-mockup {
    max-width: 700px;
    flex: 1.5;
  }

  .hero-iphone {
    width: 30%;
    right: -3%;
  }

  .hero-watch {
    width: 15%;
    right: 25%;
  }
}

@media (min-width: 1024px) {
  .hero-mockup {
    max-width: 800px;
    flex: 1.6;
  }

  .hero-iphone {
    width: 28%;
    right: -2%;
  }

  .hero-watch {
    width: 14%;
    right: 24%;
  }
}
