@import url("https://fonts.googleapis.com/css?family=Montserrat:400|Inconsolata:400");
*,
::after,
::before {
  box-sizing: border-box;
}
:root {
  /* COLORS  */
  /* primary */
  --primary-0: #f0efff;
  --primary-50: #d8d6ff;
  --primary-100: #c1beff;
  --primary-200: #aaa5ff;
  --primary-300: #938dff;
  --primary-400: #7b74ff;
  /* main */
  --primary-500: #645cff;
  --primary-600: #554ed9;
  --primary-700: #4640b3;
  --primary-800: #37338c;
  --primary-900: #282566;
  --primary-1000: #191740;
  --primary-1100: #0a0919;
  /* grey */
  --grey-0: #fafbfc;
  --grey-50: #f2f4f8;
  --grey-100: #eaedf3;
  --grey-200: #e2e7ef;
  --grey-300: #dbe0ea;
  --grey-400: #d3dae6;
  --grey-500: #cbd3e1;
  --grey-600: #adb3bf;
  --grey-700: #8e949e;
  --grey-800: #70747c;
  --grey-900: #51545a;
  --grey-1000: #333538;
  --grey-1100: #141516;

  /* rest */
  --black: #222;
  --white: #fff;
  --red-light: #f8d7da;
  --red-dark: #842029;
  --green-light: #d1e7dd;
  --green-dark: #0f5132;
  /* box shadows */
  --shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  /* typography */
  --defaultFontSize: 87.5%;
  --headingFont: "Inconsolata", monospace;
  --bodyFont: "Arial", sans-serif;
  --smallText: 0.8em;
  /* rest */
  --backgroundColor: var(--grey-50);
  --textColor: var(--grey-1000);
  --borderRadius: 0.25rem;
  --letterSpacing: 2px;
  --transition: 0.2s ease-in-out all;
  --max-width: 1170px;
  --fixed-width: 600px;
}

body {
  background: var(--backgroundColor);
  color: var(--textColor);
  font-family: var(--bodyFont);
  font-weight: 400;
  line-height: 1.75;
}

nav {
  height: 4rem;
  background: var(--primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-center {
  color: var(--white);
  display: flex;

  width: 64%;
  /* max-width: 600px; */
  align-items: center;
  text-align: center;
  justify-content: space-between;
  padding: 0 1em;
  text-transform: capitalize;
}

.nav-center a {
  color: var(--white);
  font-size: 1.35rem;
  padding: 5px;
  text-decoration: none;
}

.nav-menu a {
  color: var(--white);
  font-size: 1rem;
  padding: 5px 7px;
  text-decoration: none;
}

#search_bar {
  width: 70%;
  max-width: 600px;
  background: var(--white);
  border-radius: var(--borderRadius);
  box-shadow: var(--shadow-2);
  padding: 1rem 1rem;

  margin: 0 auto;
  margin-top: 1rem;
}

label {
  display: inline;
  font-size: var(--smallText);
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

input {
  width: 60%;
  padding: 0.4rem 0.4rem;
  border-radius: var(--borderRadius);
  background: var(--grey-50);
  border-color: transparent;
  border: 1px solid var(--grey-300);
}

input::placeholder {
  color: var(--grey-600);
}

button {
  cursor: pointer;
  color: var(--white);
  background: var(--primary-500);
  border: none;
  border-radius: var(--borderRadius);
  letter-spacing: var(--letterSpacing);
  padding: 0.375rem 0.75rem;
  transition: var(--transition);
  text-transform: capitalize;
}
button:hover {
  color: var(--white);
  background: var(--primary-700);
}

.grid-container {
  width: 90%;
  background: var(--white);
  border-radius: var(--borderRadius);
  box-shadow: var(--shadow-2);
  padding: 1rem 1rem;

  margin: 0 auto;
  margin-top: 2rem;
  height: fit-content;

  display: grid;
  grid-template-columns: auto auto;
  grid-column-gap: 10px;
  grid-row-gap: 10px;
}

.grid-item {
  color: black;
  background: var(--backgroundColor);
  border-radius: var(--borderRadius);
  box-shadow: var(--shadow-2);
  text-align: left;
  padding: 1em;

  line-height: 20px;
  margin: 20px;
}

.vocab {
  font-size: 1.8em;
}

.entries {
  color: black;
  font-size: 1em;
}

@media (max-width: 768px) {
  .nav-center {
    width: 95%;
    flex-wrap: wrap;
  }

  .nav-menu {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
    justify-content: center;
    margin-top: 0.5em;
  }

  .nav-menu a {
    font-size: 0.9rem;
    padding: 3px 6px;
  }

  #search_bar {
    width: 95%;
    padding: 0.8rem;
  }

  input {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
  }

  button {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }

  .grid-container {
    width: 95%;
    grid-template-columns: 1fr;
    grid-column-gap: 0;
    grid-row-gap: 15px;
    padding: 0.8rem;
  }

  .grid-item {
    margin: 10px 0;
    padding: 0.8rem;
  }

  .vocab {
    font-size: 1.5em;
  }
}

@media (max-width: 480px) {
  nav {
    height: auto;
    padding: 0.5rem 0;
  }

  .nav-center {
    flex-direction: column;
    gap: 0.5em;
  }

  .nav-center a {
    font-size: 1.2rem;
  }

  .nav-menu {
    gap: 0.2em;
  }

  .nav-menu a {
    font-size: 0.85rem;
  }

  #search_bar {
    margin-top: 0.5rem;
  }

  button {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    min-height: 44px;
  }

  label {
    font-size: 0.75rem;
  }

  .vocab {
    font-size: 1.3em;
  }
}

/* ────────────────────────────────────────────────────────────────────────
   Landing page (index.html)
   Everything above this line predates the marketing home page and is kept
   for the older search-on-home layout.
   ──────────────────────────────────────────────────────────────────────── */

.hidden { display: none !important; }

html { scroll-behavior: smooth; }

.nav-menu { display: flex; align-items: center; gap: 0.15em; }
.nav-app-links, .nav-guest-links { display: inline-flex; align-items: center; gap: 0.15em; }
/* nav.js injects its own <style> after this sheet, so matching the nav's
   font size needs the extra specificity to win */
.nav-user .nav-user-name { font-size: 1rem; padding: 5px 9px; }
.nav-user .nav-user-menu a { font-size: 0.95rem; }
.nav-menu a.nav-cta {
  background: var(--white);
  color: var(--primary-700);
  border-radius: var(--borderRadius);
  padding: 0.3em 0.8em;
  margin-left: 0.4em;
  font-weight: bold;
  white-space: nowrap;
}
.nav-menu a.nav-cta:hover { background: var(--primary-0); }

/* shared bits ---------------------------------------------------------- */
.wrap { width: 90%; max-width: var(--max-width); margin: 0 auto; }
.wrap-narrow { max-width: 780px; }

.section { padding: 5rem 0; }
.section-alt { background: var(--white); }

.section h2 {
  font-family: var(--headingFont);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.25;
  margin: 0 0 0.6rem;
  color: var(--grey-1100);
}
.section-sub {
  max-width: 62ch;
  margin: 0 0 2.5rem;
  color: var(--grey-900);
  font-size: 1.05rem;
}

.btn {
  display: inline-block;
  border-radius: var(--borderRadius);
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: 2px solid transparent;
}
.btn-primary { background: var(--primary-500); color: var(--white); }
.btn-primary:hover { background: var(--primary-700); }
.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.45); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-lg { padding: 0.9rem 2.2rem; font-size: 1.05rem; }

/* hero ----------------------------------------------------------------- */
/* The gradient lives on .hero-band, not on .hero. On .hero it spanned the video
   too, and the full-bleed video covered its light head — so the only part left
   showing was the near-black tail, reading much darker than the nav bar right
   above it. On the band it starts where it is actually seen. */
.hero { color: var(--white); }
.hero-band {
  /* opens on the nav's own indigo, so the video is bracketed by the same colour
     top and bottom, then settles two steps deeper for the copy: white and
     grey-300 both need the darker end to stay legible */
  background: linear-gradient(180deg, var(--primary-500) 0%, var(--primary-700) 30%, var(--primary-800) 100%);
  padding: 1.6rem 0 5rem;
}
.hero-inner {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: var(--letterSpacing);
  font-size: 0.78rem;
  color: var(--primary-100);
  margin: 0 0 0.8rem;
}
.hero h1 {
  font-family: var(--headingFont);
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 1.1rem;
  letter-spacing: -0.5px;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--grey-300);
  margin: 0 auto 2rem;
  max-width: 34em;
}
.hero-sub em { color: var(--primary-100); font-style: normal; font-weight: bold; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.hero-note {
  margin: 1.4rem 0 0;
  font-size: var(--smallText);
  color: var(--grey-600);
}

/* hero video ------------------------------------------------------------ */
/* Runs the full width of the page, edge to edge. The fake browser chrome that
   used to wrap it is gone: that dressing framed a small inset card, and full
   bleed under the real nav bar just read as a second toolbar. */
.hero-video { display: block; }
.video-player { position: relative; background: #000; line-height: 0; }
/* the fixed ratio matches the 1280x720 export, so nothing reflows on load */
.hero-video-el { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* the "this is a video" cue — the native controls are easy to miss on a still
   frame, and on a full-width hero a small one would be lost */
.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(4.5rem, 8vw, 7.5rem);
  aspect-ratio: 1;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: var(--transition);
}
.play-badge svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.5)); }
.play-badge circle { fill: rgba(0, 0, 0, 0.45); stroke: var(--white); stroke-width: 4; }
.play-badge path { fill: var(--white); }
/* background stays off on hover too — the global button:hover further up wins
   on specificity otherwise, and paints a slab behind the circle */
.play-badge:hover { background: none; transform: translate(-50%, -50%) scale(1.06); }
.play-badge:hover circle { fill: var(--primary-500); }
/* once it is running the badge is only in the way; the native controls take over */
.video-player.is-playing .play-badge { opacity: 0; pointer-events: none; }

/* sits on the bright head of the band, where the old grey-600 — and any of the
   tinted near-whites — fall under 4.5:1 at this size. Plain white clears it. */
.hero-caption { margin: 0 0 2.6rem; font-size: var(--smallText); color: var(--white); text-align: center; }

/* cards ----------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-1);
  padding: 1.8rem 1.6rem;
}
.card-icon { font-size: 1.8rem; line-height: 1; margin-bottom: 0.7rem; }
.card h3, .feature h3, .step h3 {
  font-family: var(--headingFont);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--grey-1100);
}
.card p, .feature p, .step p { margin: 0; color: var(--grey-900); }

/* steps ----------------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.step {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  column-gap: 1.4rem;
  row-gap: 0.4rem;
  align-items: start;
  max-width: 55em;
}
/* the number occupies column 1; the heading and body both stack in column 2 */
.step-n { grid-column: 1; grid-row: 1 / span 2; }
.step > h3, .step > p { grid-column: 2; }
.step-n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--primary-500);
  color: var(--white);
  font-family: var(--headingFont);
  font-size: 1.4rem;
  font-weight: bold;
}
.step code, .feature code {
  background: var(--grey-100);
  border-radius: 3px;
  padding: 0.05em 0.35em;
  font-family: var(--headingFont);
  font-size: 0.92em;
}

/* spaced repetition ----------------------------------------------------- */
.srs { background: var(--white); border: 1px solid var(--grey-200); border-radius: 0.5rem; padding: 1.8rem; box-shadow: var(--shadow-1); }
.srs-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.srs-row:last-child { margin-bottom: 0; }
.srs-label { min-width: 9.5em; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--grey-900); }
.srs-bars { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; min-width: 14rem; }
.srs-bar {
  width: var(--w);
  min-width: 2.2rem;
  background: var(--primary-500);
  color: var(--white);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-family: var(--headingFont);
}
.srs-bar-miss { background: var(--red-dark); }
.srs-note { margin-top: 1.2rem; color: var(--grey-900); }

/* features -------------------------------------------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem 1.8rem; }
.feature { border-top: 3px solid var(--primary-200); padding-top: 0.9rem; }

/* faq ------------------------------------------------------------------- */
#faq details {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--borderRadius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.7rem;
}
#faq summary { cursor: pointer; font-weight: bold; font-size: 1rem; color: var(--grey-1100); }
#faq details[open] summary { margin-bottom: 0.6rem; }
#faq details p { margin: 0; color: var(--grey-900); }

/* cta + footer ---------------------------------------------------------- */
.cta-band {
  background: var(--primary-500);
  color: var(--white);
  text-align: center;
  padding: 4.5rem 0;
}
.cta-band h2 { font-family: var(--headingFont); font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 0 0 0.6rem; }
.cta-band p { margin: 0 0 1.8rem; color: var(--primary-50); }
.cta-band .btn-primary { background: var(--white); color: var(--primary-700); }
.cta-band .btn-primary:hover { background: var(--primary-0); }
.cta-alt { margin: 1.2rem 0 0 !important; font-size: var(--smallText); }
.cta-alt a { color: var(--white); }

.footer { background: var(--grey-1100); color: var(--grey-600); padding: 2rem 0; font-size: var(--smallText); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem; }
.footer-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer a { color: var(--grey-500); text-decoration: none; }
.footer a:hover { color: var(--white); }

/* responsive ------------------------------------------------------------ */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .hero-band { padding: 1.2rem 0 3.5rem; }
  .step { grid-template-columns: 2.6rem 1fr; gap: 1rem; }
  .step-n { width: 2.6rem; height: 2.6rem; font-size: 1.15rem; }
  .btn { display: block; text-align: center; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .cta-band .btn { display: inline-block; }
}
@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .footer .wrap { flex-direction: column; text-align: center; }
}

/* the name, unpacked: VocGuru -> Vocabulary Guru -> VocGuru. The middle span
   collapses to zero width, so the resting state is the wordmark itself. */
.wordmark-unpack {
  font-family: var(--headingFont);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--primary-50);
  margin: 0 0 0.9rem;
  line-height: 1.2;
}
.unpack {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: pre;
  vertical-align: bottom;
  transition: max-width 0.75s cubic-bezier(0.65, 0, 0.35, 1);
}
.wordmark-unpack.is-open .unpack { max-width: 7em; }

.footer-brand { color: var(--grey-400); }
.footer-gloss { color: var(--grey-800); }

@media (prefers-reduced-motion: reduce) {
  .unpack { transition: none; }
  html { scroll-behavior: auto; }
}
