/* StudyMate website — mobile first; desktop rules in min-width queries.
   Tokens follow the app's Sumi theme (lib/core/theme/sm_tokens.dart). */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/fonts/Inter-400.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/fonts/Inter-500.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/fonts/Inter-600.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/fonts/Inter-700.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(/fonts/Nunito-700.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(/fonts/Nunito-800.woff2) format('woff2'); }

:root {
  --bg: #FFF8F1;
  --paper: #FFFDF9;
  --ink: #3A3330;
  --ink-2: #6B625C;
  --ink-3: #8F857D;
  --brand: #4D78A8;
  --brand-dark: #3B6290;
  --brand-soft: #E4EDF7;
  --gold: #F2D38E;
  --gold-soft: #FBF0D8;
  --gold-ink: #5A4210;
  --rose-soft: #FBE5DD;
  --sage-soft: #E5EFE4;
  --line: #EDE3D8;
  --shadow-sm: 0 1px 2px rgba(58, 51, 48, .06), 0 2px 8px rgba(58, 51, 48, .05);
  --shadow-md: 0 8px 24px rgba(58, 51, 48, .08), 0 2px 6px rgba(58, 51, 48, .05);
  --shadow-lg: 0 24px 60px rgba(42, 52, 80, .16), 0 6px 16px rgba(42, 52, 80, .08);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --display: Nunito, 'Trebuchet MS', system-ui, sans-serif;
  --text: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 248, 241, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(237, 227, 216, .7);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 20px/1 var(--display); }
.brand img { border-radius: 10px; }
.menu-toggle { display: inline-flex; padding: 10px; margin-right: -10px; border: 0; background: none; color: var(--ink); border-radius: 12px; cursor: pointer; }
.site-nav { display: none; }
.site-nav.open {
  display: flex; flex-direction: column; gap: 4px;
  position: absolute; left: 0; right: 0; top: 64px;
  padding: 12px 20px 20px; background: var(--paper);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.site-nav a { padding: 12px 8px; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: 10px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.site-nav .pill { margin-top: 8px; align-self: flex-start; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font: 600 14px/1.2 var(--text); white-space: nowrap; }
.pill-soon { background: var(--ink); color: #fff; }
.pill-soon::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.pill-pro { background: var(--gold); color: var(--gold-ink); padding: 4px 10px; font-size: 12px; letter-spacing: .04em; }
.pill-free { background: var(--sage-soft); color: #2F5D3A; padding: 4px 10px; font-size: 12px; letter-spacing: .04em; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 600 16px/1.2 var(--text); text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(77, 120, 168, .32); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: #DCCFC1; }

/* ----------------------------------------------------------------- hero */
.hero { padding: 36px 0 56px; overflow: hidden; }
.hero-grid { display: grid; gap: 36px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark); }
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--gold); border-radius: 2px; }
.hero h1 { margin-top: 16px; font-size: 42px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 34em; }
.hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-actions .pill-soon { min-height: 48px; padding: 12px 20px; font-size: 15px; }
.trust { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--ink-2); font-size: 14px; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ''; width: 18px; height: 18px; border-radius: 50%; background: var(--sage-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%232F5D3A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.hero-art { position: relative; padding-bottom: 48px; }
.room-frame { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 3 / 2; background: var(--gold-soft); }
.room-frame img { width: 100%; height: 100%; object-fit: cover; }
.phone {
  position: absolute; right: 6%; bottom: 0; width: 34%; max-width: 200px;
  border-radius: 30px; padding: 7px; background: #1F1B19;
  box-shadow: var(--shadow-lg);
}
.phone img { border-radius: 24px; aspect-ratio: 9 / 16; object-fit: cover; width: 100%; }
.caption-chip {
  position: absolute; left: 4%; bottom: 14px; display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-md);
  font-size: 13px; color: var(--ink-2); max-width: 58%;
}
.caption-chip strong { color: var(--ink); display: block; font-size: 14px; }
.caption-chip img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }

/* -------------------------------------------------------------- sections */
.section { padding: 64px 0; }
.section-flush { padding-top: 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-top: 12px; font-size: 32px; font-weight: 800; }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 17px; }

.feature { display: grid; gap: 28px; align-items: center; padding: 28px 0; }
.feature + .feature { border-top: 1px dashed var(--line); }
.feature-copy h3 { font-size: 26px; font-weight: 800; }
.feature-copy > p { margin-top: 12px; color: var(--ink-2); }
.ticks { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%233B6290' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat; }
.feature-shot { display: flex; justify-content: center; position: relative; }
.feature-shot::before { content: ''; position: absolute; inset: 8% 4%; border-radius: var(--r-xl); background: var(--tint, var(--brand-soft)); }
.feature-shot .phone { position: relative; right: auto; bottom: auto; width: 230px; max-width: 64%; }
.tint-gold { --tint: var(--gold-soft); }
.tint-rose { --tint: var(--rose-soft); }
.tint-sage { --tint: var(--sage-soft); }

/* ------------------------------------------------------------ companions */
.companions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.companion {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 10px 10px 16px; box-shadow: var(--shadow-sm);
}
.companion img { border-radius: 18px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.companion h3 { margin-top: 12px; font-size: 19px; font-weight: 800; padding: 0 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.companion p { margin-top: 4px; padding: 0 4px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.note {
  margin-top: 24px; display: flex; gap: 12px; align-items: flex-start;
  background: var(--brand-soft); color: #2C4A6E; border-radius: var(--r-md); padding: 16px 18px; font-size: 15px;
}
.note svg { flex: none; margin-top: 2px; }

/* ------------------------------------------------------- companion moments */
.seasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.season { position: relative; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 3 / 2; }
.season img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.season:hover img { transform: scale(1.03); }
.season span { position: absolute; left: 10px; bottom: 10px; background: rgba(255, 253, 249, .92); color: var(--ink); font: 700 13px/1 var(--text); padding: 7px 11px; border-radius: 999px; }
.celebrations { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.celebration { background: linear-gradient(180deg, var(--gold-soft), var(--paper)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 12px 16px; text-align: center; }
.celebration img { height: 200px; width: auto; margin: 0 auto; }
.celebration h3 { margin-top: 10px; font-size: 16px; font-weight: 800; }
.celebration p { margin-top: 2px; font-size: 13px; color: var(--ink-2); }

/* ------------------------------------------------------------ free vs pro */
.plans { display: grid; gap: 16px; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 22px; box-shadow: var(--shadow-sm); }
.plan h3 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.plan .price { margin-top: 8px; color: var(--ink-2); }
.plan .price strong { font: 800 28px/1 var(--display); color: var(--ink); }
.plan-pro { border: 2px solid var(--brand); background: linear-gradient(180deg, #F4F8FC, var(--paper) 40%); position: relative; }
.plan-pro .badge { position: absolute; top: -13px; right: 20px; }
.price-row { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.price-row div { background: var(--brand-soft); border-radius: 14px; padding: 10px 8px; text-align: center; font-size: 13px; color: #2C4A6E; }
.price-row strong { display: block; font: 800 18px/1.2 var(--display); color: var(--ink); }
.fine { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* --------------------------------------------------------------- privacy */
.privacy-band { display: grid; gap: 22px; align-items: center; background: #2E3E55; color: #EEF3FA; border-radius: var(--r-xl); padding: 34px 24px; }
.privacy-band h2 { color: #fff; font-size: 28px; font-weight: 800; }
.privacy-band p { color: #C9D6E6; margin-top: 10px; }
.privacy-band ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.privacy-band li { background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 12px 14px; font-size: 15px; }
.privacy-band li strong { display: block; color: #fff; }
.privacy-band a { color: var(--gold); }

/* ------------------------------------------------------------------- FAQ */
.faq { display: grid; gap: 10px; max-width: 780px; margin: 0 auto; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 18px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 28px 18px 0; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 18px; color: var(--ink-2); }

/* ------------------------------------------------------------- final CTA */
.cta { text-align: center; background: var(--gold-soft); border-radius: var(--r-xl); padding: 40px 24px; position: relative; overflow: hidden; }
.cta h2 { font-size: 30px; font-weight: 800; }
.cta p { margin: 12px auto 0; max-width: 520px; color: var(--ink-2); }
.cta .pill-soon { margin-top: 22px; min-height: 48px; padding: 12px 22px; font-size: 15px; }

/* ----------------------------------------------------------- inner pages */
.page-hero { padding: 44px 0 20px; }
.page-hero h1 { font-size: 36px; font-weight: 800; margin-top: 12px; }
.page-hero p { margin-top: 12px; color: var(--ink-2); max-width: 640px; font-size: 17px; }
.prose { max-width: 760px; padding-bottom: 72px; }
.prose h2 { font-size: 24px; font-weight: 800; margin: 40px 0 12px; }
.prose h3 { font-size: 18px; font-weight: 800; margin: 26px 0 8px; }
.prose p, .prose li { color: #4A423E; }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0; }
.prose li + li { margin-top: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; background: var(--paper); border-radius: var(--r-sm); overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--brand-soft); color: #2C4A6E; font-weight: 600; }
.meta-line { font-size: 14px; color: var(--ink-3); margin-top: 8px; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; margin: 8px 0 8px; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; columns: 1; }
.callout { background: var(--gold-soft); border-radius: var(--r-md); padding: 16px 18px; margin: 18px 0; color: #4A3A10; }
.cards { display: grid; gap: 14px; margin: 18px 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { color: var(--ink-2); font-size: 15px; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; min-height: 32px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font: 700 14px/30px var(--text); text-align: center; }
.not-found { text-align: center; padding: 72px 0 96px; }
.not-found img { margin: 0 auto; width: 160px; }
.not-found h1 { font-size: 40px; font-weight: 800; margin-top: 18px; }
.not-found p { margin: 12px auto 26px; color: var(--ink-2); max-width: 420px; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: #F6EDE3; border-top: 1px solid var(--line); padding: 44px 0 28px; margin-top: 24px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin-top: 12px; color: var(--ink-2); font-size: 14px; max-width: 320px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-col h2 { font: 700 13px/1 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.footer-col a { color: var(--ink); text-decoration: none; word-break: break-word; }
.footer-col a:hover { color: var(--brand-dark); text-decoration: underline; }
.footer-base { margin-top: 32px; padding-top: 18px; border-top: 1px solid #E7DACB; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; font-size: 13px; color: var(--ink-3); }

/* ------------------------------------------------------------- tablet up */
@media (min-width: 640px) {
  .companions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seasons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .celebrations { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: auto; }
}

/* ------------------------------------------------------------ desktop up */
@media (min-width: 960px) {
  .wrap { padding: 0 32px; }
  .menu-toggle { display: none; }
  .site-nav, .site-nav.open { display: flex; position: static; flex-direction: row; align-items: center; gap: 4px; padding: 0; background: none; border: 0; box-shadow: none; }
  .site-nav a { padding: 8px 12px; font-size: 15px; }
  .site-nav .pill { margin: 0 0 0 10px; }
  .header-row { height: 72px; }
  html { scroll-padding-top: 92px; }

  .hero { padding: 64px 0 88px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
  .hero h1 { font-size: 60px; }
  .hero .lede { font-size: 19px; }
  .phone { width: 31%; right: -3%; }

  .section { padding: 96px 0; }
  .section-head h2 { font-size: 42px; }
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; padding: 44px 0; }
  .feature.reverse .feature-copy { order: 2; }
  .feature-copy h3 { font-size: 32px; }
  .companions { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
  .celebration img { height: 240px; }
  .plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: stretch; }
  .plan { padding: 34px 32px; }
  .privacy-band { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 52px 56px; gap: 48px; }
  .privacy-band h2 { font-size: 34px; }
  .cta { padding: 64px 40px; }
  .cta h2 { font-size: 40px; }
  .page-hero { padding: 72px 0 28px; }
  .page-hero h1 { font-size: 48px; }
  .toc ol { columns: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
