/* StudyBot marketing site styles.
   Plain CSS, mobile-first. Built to look intentional at 360px wide, then
   scale up. One disciplined blue accent; everything else is a warm-tinted
   neutral. Tokens come from the app's DESIGN.md, expressed in OKLCH so the
   neutrals lean very slightly warm instead of going dead grey. */

/* ----- Design tokens ----- */
:root {
  /* Neutrals, faintly warmed so the page feels like paper, not a screen. */
  --bg: oklch(96.5% 0.004 80); /* soft near-white page background */
  --bg-sink: oklch(94% 0.005 80); /* slightly deeper bands behind sections */
  --card-bg: oklch(99.5% 0.002 80); /* white-ish card surface */
  --fg: oklch(24% 0.01 80); /* primary text, off-black */
  --fg-soft: oklch(38% 0.01 80); /* slightly lifted body text */
  --muted: oklch(54% 0.012 80); /* captions, secondary text */
  --border: oklch(89% 0.006 80); /* hairline borders */

  /* One accent. A calm, confident blue (the app's #2563eb), plus tints. */
  --accent: oklch(55% 0.2 264);
  --accent-strong: oklch(49% 0.2 264); /* hover / pressed */
  --accent-fg: oklch(99% 0 0); /* text on accent */
  --accent-wash: oklch(95% 0.03 264); /* faint accent tint for icon chips */
  --accent-ring: oklch(62% 0.18 264); /* focus ring */

  /* A single muted-green positive note, used sparingly. */
  --good: oklch(52% 0.1 150);
  --good-wash: oklch(95% 0.03 150);

  /* Type scale. Editorial: a big jump to the hero, then calm steps down. */
  --font:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-caption: 0.875rem;
  --text-body: 1.0625rem;
  --text-lead: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-section: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  --text-display: clamp(2.4rem, 1.6rem + 3.6vw, 4rem);

  /* Spacing scale (rem). Variety in these creates rhythm. */
  --space-2xs: 0.375rem;
  --space-xs: 0.625rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: clamp(4rem, 2rem + 9vw, 7.5rem);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --shadow-soft: 0 1px 2px oklch(24% 0.01 80 / 0.04), 0 8px 24px oklch(24% 0.01 80 / 0.06);
  --shadow-lift: 0 2px 6px oklch(24% 0.01 80 / 0.06), 0 16px 40px oklch(24% 0.01 80 / 0.09);

  --measure: 62ch;
}

/* ----- Reset / base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 650;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

/* Keyboard focus is always clearly visible, in the accent color. */
:focus-visible {
  outline: 2.5px solid var(--accent-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link for keyboard + screen-reader users. */
.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 8px;
  font-weight: 600;
  transition: top 160ms ease;
}
.skip-link:focus {
  top: var(--space-sm);
}

/* ----- Shared layout container ----- */
.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--space-sm);
}
@media (min-width: 720px) {
  .wrap {
    padding-inline: var(--space-lg);
  }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px; /* comfortable touch target */
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: var(--text-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 140ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}
.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 1px 2px oklch(49% 0.2 264 / 0.25);
}
.btn--primary:hover {
  background: var(--accent-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--muted);
  background: var(--card-bg);
}

.btn--lg {
  min-height: 52px;
  padding: 0.85rem 1.75rem;
  font-size: 1.0625rem;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: oklch(96.5% 0.004 80 / 0.85);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 200ms ease,
    background-color 200ms ease;
}
.site-header[data-scrolled="true"] {
  border-bottom-color: var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 64px;
  padding-block: 0.625rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}
.wordmark__mark {
  font-size: 1.3rem;
  line-height: 1;
}
.wordmark:hover .wordmark__name {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-actions .btn {
  min-height: 40px;
  padding-inline: 0.95rem;
  font-size: 0.95rem;
}
/* On the narrowest phones, the text Login link can hide to save room;
   Sign up stays as the one clear action. */
@media (max-width: 359px) {
  .nav-actions__login {
    display: none;
  }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  overflow: hidden;
}
/* Two very faint accent light-spots, fixed behind the hero for quiet depth. */
.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(40rem 28rem at 78% -10%, oklch(70% 0.16 264 / 0.1), transparent 60%),
    radial-gradient(34rem 26rem at 8% 110%, oklch(70% 0.12 200 / 0.08), transparent 60%);
}
.hero__inner {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.5rem;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-caption);
  font-weight: 550;
  box-shadow: var(--shadow-soft);
}
.eyebrow__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--good);
}

.hero__title {
  margin-top: var(--space-md);
  font-size: var(--text-display);
  max-width: 16ch;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}
.hero__lead {
  margin-top: var(--space-md);
  max-width: 46ch;
  font-size: var(--text-lead);
  line-height: 1.5;
  color: var(--fg-soft);
}
.hero__actions {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.hero__reassure {
  margin-top: var(--space-md);
  font-size: var(--text-caption);
  color: var(--muted);
}

/* Phone mockup: a tiny WhatsApp-style nudge, built in pure HTML/CSS. */
.hero__demo {
  margin-top: var(--space-xl);
}
.chat {
  max-width: 23rem;
  margin-inline: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}
.chat__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-wash);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.chat__who {
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.chat__status {
  font-size: 0.8rem;
  color: var(--good);
  font-weight: 550;
}
.bubble {
  max-width: 85%;
  padding: 0.625rem 0.875rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.bubble--bot {
  align-self: flex-start;
  background: var(--bg-sink);
  border-bottom-left-radius: 5px;
  color: var(--fg);
}
.bubble--me {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-fg);
  border-bottom-right-radius: 5px;
}
.bubble strong {
  font-weight: 650;
}
.bubble time {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  opacity: 0.7;
}

@media (min-width: 920px) {
  .hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: var(--space-xl);
  }
  .hero__demo {
    margin-top: 0;
  }
  .chat {
    margin-inline: 0;
    margin-left: auto;
  }
}

/* ----- Generic section scaffolding ----- */
.section {
  padding-block: var(--space-2xl);
}
.section--sink {
  background: var(--bg-sink);
  border-block: 1px solid var(--border);
}
.section__head {
  max-width: var(--measure);
  margin-bottom: var(--space-lg);
}
.section__kicker {
  display: block;
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}
.section__title {
  font-size: var(--text-section);
  max-width: 18ch;
}
.section__intro {
  margin-top: var(--space-sm);
  color: var(--muted);
  max-width: 52ch;
}

/* ----- Features ----- */
/* A bento-ish grid: the first card spans wide so the row isn't a monotonous
   four-up. Each card is icon chip + heading + one plain-English line. */
.features {
  display: grid;
  gap: var(--space-sm);
}
@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature:first-child {
    grid-column: 1 / -1;
  }
}
@media (min-width: 980px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
  .feature:first-child {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.feature {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow-soft);
  transition:
    transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 200ms ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-sm);
}
.feature__icon svg {
  width: 22px;
  height: 22px;
}
.feature__title {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}
.feature__text {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 42ch;
}
.feature:first-child .feature__title {
  font-size: 1.45rem;
}

/* ----- How it works ----- */
/* Three numbered steps. Numbers carry the order, so no bullets or stripes. */
.steps {
  display: grid;
  gap: var(--space-lg);
  counter-reset: step;
}
@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }
}
.step {
  position: relative;
  padding-top: var(--space-sm);
}
.step__num {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--accent-strong);
  margin-bottom: var(--space-sm);
}
.step__title {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}
.step__text {
  color: var(--muted);
  max-width: 34ch;
}

/* ----- Closing CTA band ----- */
.cta-band {
  text-align: center;
}
.cta-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-md);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.cta-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(28rem 18rem at 50% -30%, oklch(70% 0.16 264 / 0.1), transparent 65%);
}
.cta-card > * {
  position: relative;
}
.cta-card__title {
  font-size: var(--text-section);
  max-width: 20ch;
  margin-inline: auto;
}
.cta-card__text {
  margin-top: var(--space-sm);
  color: var(--muted);
  max-width: 44ch;
  margin-inline: auto;
}
.cta-card__actions {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ----- Footer ----- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-lg);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.site-footer__tagline {
  color: var(--muted);
  font-size: var(--text-caption);
  max-width: 32ch;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
}
.footer-links a:hover {
  color: var(--accent);
}
.site-footer__fine {
  color: var(--muted);
  font-size: 0.85rem;
}
@media (min-width: 720px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* ----- Scroll-reveal animation -----
   Elements lift in gently the first time they enter view. JS adds
   .is-in; CSS does the transition. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Anyone who prefers less motion gets none of it: no smooth scroll, no
   reveal offset, no hover lift. Content is shown immediately. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ----- About page extras ----- */
.prose {
  max-width: var(--measure);
}
.prose p + p {
  margin-top: var(--space-sm);
}
.prose .lead {
  font-size: var(--text-lead);
  color: var(--fg-soft);
  line-height: 1.5;
}
.values {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
@media (min-width: 720px) {
  .values {
    grid-template-columns: repeat(2, 1fr);
  }
}
.value {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  padding: var(--space-md);
  box-shadow: var(--shadow-soft);
}
.value__title {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}
.value__text {
  color: var(--muted);
  font-size: 0.98rem;
}
