/* Landing page. Shares tokens, logo and price styles with style.css. */
body.landing { font-size: 17px; line-height: 1.55; }
.lp-wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

.lp-nav { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid #e3e5ec; }
.lp-nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
/* The header button is a touch smaller than page buttons, so it sits with even room above and below. */
.lp-nav .lp-btn { padding: 12px 20px; }
.lp-nav .logo { line-height: 1; }
.lp-nav-links { display: flex; align-items: center; gap: 8px; }
.lp-nav-link { padding: 10px 12px; font-weight: 700; font-size: 16px; color: var(--navy); text-decoration: none; }
.lp-nav-link:hover, .lp-nav-link[aria-current="page"] { color: var(--red); }
.lp-nav-link:focus-visible { outline: 3px dashed var(--red); outline-offset: 3px; }

.lp-btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  padding: 14px 22px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.lp-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.lp-btn:focus-visible { outline: 3px dashed var(--red); outline-offset: 3px; }
.lp-btn-ghost { background: transparent; color: var(--navy); padding: 10px 16px; }
.lp-btn-ghost:hover { color: #fff; }

/* Hero */
.lp-hero { padding: 88px 0 72px; border-bottom: 1px solid #e3e5ec; }
.lp-kicker { margin: 0 0 12px; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.lp-hero h1 { margin: 0; max-width: 18ch; font-size: clamp(36px, 6vw, 68px); line-height: 1.05; letter-spacing: -0.02em; color: var(--navy); }

.lp-search { max-width: 760px; }
.lp-hero .lp-search { margin-top: 28px; }
.lp-search-row { display: flex; gap: 10px; }
.lp-search-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 19px; padding: 14px 16px;
  border: 2px solid var(--navy); border-radius: 8px; background: #fff; color: var(--ink);
}
.lp-search-row input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px #fbd9de; }
.lp-search-btn { display: inline-flex; align-items: center; justify-content: center; padding-left: 20px; padding-right: 20px; }

.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.lp-chips a {
  padding: 6px 12px; border-radius: 999px; background: #eef0f6; color: var(--navy);
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.lp-chips a:hover { background: var(--navy); color: #fff; }
.lp-fine { margin: 16px 0 0; font-size: 15px; color: var(--ink-soft); }

/* Stats */
.lp-stats { background: var(--navy); color: #fff; }
.lp-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.lp-stats b { display: block; font-size: 36px; line-height: 1.1; }
.lp-stats span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.35; color: #c9cfe6; }

/* Sections */
.lp-section { padding: 72px 0; border-bottom: 1px solid #e3e5ec; }
.lp-section h2 { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; color: var(--navy); }
.lp-lede { max-width: 62ch; margin: 0 0 32px; color: var(--ink-soft); }
/* Cost note: one short line, then a two-line Low/High key. */
.lp-lede-short { margin-bottom: 10px; }
.lp-key { display: grid; gap: 4px; margin: 0 0 32px; color: var(--ink-soft); }
.lp-key div { display: flex; gap: 12px; align-items: baseline; }
.lp-key dt { min-width: 3em; font-weight: 700; color: var(--ink); }
.lp-key dt.ink-light { color: var(--ink-light); }
.lp-key dd { margin: 0; }
/* The cost key sits under the school lists. */
.lp-lede.lp-key-note { margin-top: 36px; }
.lp-key-note + .lp-key { margin-bottom: 0; }

.lp-schools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-school {
  display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1.5px solid #e3e5ec; border-radius: 12px;
  background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s;
}
.lp-school:hover { border-color: var(--navy); transform: translateY(-2px); }
.lp-school:focus-visible { outline: 3px dashed var(--red); outline-offset: 3px; }
.lp-school b { font-size: 20px; line-height: 1.2; color: var(--navy); }
.lp-school-type { font-size: 13px; color: var(--ink-soft); }
.lp-school-pitch { font-size: 15px; flex: 1; }
.lp-school-price { font-size: 20px; }
.lp-school-count { font-size: 14px; font-weight: 700; color: var(--red); }

.lp-how { background: #f6f7fb; }
.lp-sentence { font-size: clamp(22px, 3vw, 32px); font-weight: 600; color: var(--navy); margin: 8px 0 28px; }
a.lp-sentence { display: block; text-decoration: none; }
a.lp-sentence:hover u { color: var(--red); }
.lp-sentence u {
  position: relative; display: inline-block; height: 1.3em; vertical-align: -0.32em; overflow: hidden;
  text-decoration: none; border-bottom: 3px solid var(--red); color: var(--ink);
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
}
/* Words stack inside the underline: the old one slides up and out, the new one up from below. */
.sw-word { position: absolute; left: 0; top: 0; line-height: 1.3em; white-space: nowrap; transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .5s; }
.sw-word.sw-in { transform: translateY(100%); opacity: 0; }
.sw-word.sw-out { transform: translateY(-100%); opacity: 0; }

.lp-deals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-deal { display: block; padding: 22px; border-left: 4px solid var(--red); background: #fff; border-radius: 0 12px 12px 0; box-shadow: 0 1px 0 #e3e5ec; color: var(--ink); text-decoration: none; }
.lp-deal:hover b { color: var(--red); }
.lp-deal b { display: block; margin-bottom: 6px; font-size: 18px; color: var(--navy); }
.lp-deal span { font-size: 15px; color: var(--ink-soft); }
/* A last card alone on its row spans the whole row instead of leaving gaps. */
.lp-deal:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.lp-more { margin: 20px 0 0; font-weight: 700; }
.lp-more a { text-decoration: none; }
.lp-more a::after { content: " →"; }

.lp-foot { padding: 32px 0 48px; font-size: 14px; color: var(--ink-soft); }
.lp-foot .lp-wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.logo-sm { font-size: 22px; line-height: 1; }

@media (max-width: 900px) {
  .lp-schools, .lp-deals { grid-template-columns: 1fr 1fr; }
  .lp-deal:last-child:nth-child(3n+1) { grid-column: auto; }
  .lp-deal:last-child:nth-child(2n+1) { grid-column: 1 / -1; }
  .lp-stats-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  /* Side padding only, so sections that set their own top and bottom padding keep it. */
  .lp-wrap { padding-left: 16px; padding-right: 16px; }
  .lp-hero { padding: 48px 0 40px; }
  .lp-search-row input { font-size: 16px; padding: 12px 12px; }
  .lp-schools, .lp-deals { grid-template-columns: 1fr; }
  .lp-section { padding: 48px 0; }
  .lp-stats b { font-size: 28px; }
  .lp-stats-row { gap: 20px 16px; padding-top: 28px; padding-bottom: 28px; }
  .lp-nav .logo { font-size: 24px; }
  .lp-btn-ghost { padding: 8px 12px; font-size: 14px; white-space: nowrap; }
  .lp-nav-link { padding: 8px 6px; font-size: 14px; }
}
/* Narrow phones: keep the logo, About and Explore on one line. */
@media (max-width: 420px) {
  /* Room for the Share icon next to About and Get started. */
  .lp-nav-inner { gap: 8px; }
  .lp-nav-links { gap: 2px; }
  .lp-nav-link { padding: 8px 4px; }
  .lp-nav .lp-btn { white-space: nowrap; padding: 11px 12px; font-size: 14px; }
  .lp-nav .logo { font-size: 21px; }
  /* Pages with the Share icon drop the header About link (it stays in the footer) so the button fits. */
  .lp-nav-inner:has(.share-btn) .lp-nav-link[href="/about"] { display: none; }
}
@media (max-width: 400px) { .lp-nav .logo { font-size: 18px; } .lp-nav-inner { gap: 4px; } .lp-nav-link { padding: 8px 2px; } }
.lp-sentence .nw { white-space: nowrap; }
/* Reduced motion: fade the words in place, no sliding. */
.sw-fade .sw-word.sw-in, .sw-fade .sw-word.sw-out { transform: none; }
.sw-fade .sw-word { transition: opacity .4s; }
/* The sentence box eases to its new height when a swapped word changes the line wrap. */
a.lp-sentence { overflow: hidden; transition: height .5s cubic-bezier(.2, .8, .2, 1); }

/* Scroll reveal (only when JS adds .rv-on, so content shows without it). */
.rv-on .rv { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); }
.rv-on .rv.rv-in { opacity: 1; transform: none; }
.rv-on .lp-school.rv.rv-in:hover { transform: translateY(-2px); }
.rv-fade .rv { transform: none; transition: opacity .6s; }
.lp-copy { margin: 0; flex-basis: 100%; }
.lp-foot-links { margin: 0; }
.lp-foot-links a { color: var(--navy); font-weight: 600; }
/* Schools grouped by state. */
.lp-state + .lp-state { margin-top: 36px; }
/* "Study in Connecticut" / "Study in New York": a full-width photo card that opens each state's grid,
   with the brand's red underline under the state name a short summary and a link to every college's cost page. */
.lp-state-card { grid-column: 1 / -1; min-height: 300px; border-radius: 12px; }
.lp-state-card img { position: absolute; inset: 0; }
.lp-state-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 22, 52, .92), rgba(14, 22, 52, .86) 62%, rgba(14, 22, 52, .5) 82%, rgba(14, 22, 52, .3)); }
.lp-state-body { position: relative; z-index: 1; padding: 34px 40px 44px; color: #fff; }
.lp-state-kicker { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .9); }
.lp-section .lp-state-body h2 { margin: 0 0 22px; color: #fff; }
.lp-state-name { padding-bottom: 2px; border-bottom: 4px solid var(--red); }
.lp-state-blurb { max-width: 720px; margin: 0; font-size: 18px; line-height: 1.6; color: #fff; }
.lp-state-blurb span { font-weight: 700; color: #fff; }
.lp-state-link { display: inline-block; margin-top: 18px; font-weight: 700; color: #fff; text-decoration: underline 3px var(--red); text-underline-offset: 7px; }
.lp-state-link::after { content: " \2192"; }
.lp-state-link:hover { color: #fff; text-decoration-color: #fff; }
.lp-state-link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Narrower screens: the text runs across the photo, so the shade does too. */
@media (max-width: 1100px) { .lp-state-card::after { background: rgba(14, 22, 52, .86); } }
@media (max-width: 600px) {
  .lp-state-card { min-height: 0; }
  .lp-state-body { padding: 24px 20px 38px; }
  .lp-state-blurb { font-size: 16px; }
}
/* The smallest phones: About stays in the footer. */
@media (max-width: 340px) { .lp-nav-link[href="/about"] { display: none; } .lp-nav .lp-btn { padding-left: 8px; padding-right: 8px; } }

/* Photos: free Unsplash photos loaded from images.unsplash.com, each credited at the bottom right. */
.lp-photo { position: relative; margin: 0; overflow: hidden; border-radius: 16px; background: #e3e5ec; }
.lp-photo picture { display: contents; }
.lp-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lp-credit { position: absolute; right: 8px; bottom: 8px; z-index: 2; max-width: calc(100% - 16px); padding: 2px 7px; border-radius: 5px; background: rgba(0, 0, 0, .28); color: rgba(255, 255, 255, .75); font-size: 11px; line-height: 1.4; }
.lp-credit a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); }
.lp-credit a:hover { color: #fff; text-decoration: none; }
.lp-credit a:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* Hero: text on the left, the photo on the right. */
.lp-hero { padding: 56px 0; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.lp-hero h1 { font-size: clamp(36px, 4.6vw, 60px); }
.lp-hero-photo { aspect-ratio: 4 / 5; max-height: 640px; }
/* On laptop and desktop screens the hero and the stats strip fill the first screen exactly,
   so the strip sits on the fold: the photo shrinks to fit short windows. */
@media (min-width: 1000px) {
  .lp-hero { box-sizing: border-box; min-height: calc(100vh - var(--lp-header, 73px) - var(--lp-stats)); min-height: calc(100svh - var(--lp-header, 73px) - var(--lp-stats)); display: flex; align-items: center; padding: 24px 0; }
  .lp-hero > .lp-wrap { width: 100%; }
  .lp-hero h1 { max-width: none; font-size: clamp(34px, min(4.4vw, 5.5vh), 60px); }
  :root { --lp-stats-pad: clamp(26px, calc(6.4vh - 14px), 56px); --lp-stats: calc(64px + 2 * var(--lp-stats-pad)); }
  .lp-stats-row { padding-top: var(--lp-stats-pad); padding-bottom: var(--lp-stats-pad); }
  .lp-hero-photo { max-height: max(360px, calc(100svh - var(--lp-header, 73px) - var(--lp-stats) - 48px)); justify-self: end; }
}

/* Wide photo bands with one short line over them. */
.lp-band { aspect-ratio: 12 / 5; }
.lp-band-short { aspect-ratio: 3 / 1; margin: 0 0 28px; }
.lp-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 22, 52, .72), rgba(14, 22, 52, .15) 60%, transparent); }
.lp-band .lp-band-text { position: absolute; left: 40px; top: 50%; z-index: 1; max-width: 22ch; margin: 0; transform: translateY(-50%); color: #fff; font-size: clamp(22px, 3vw, 36px); font-weight: 800; line-height: 1.15; }

/* A section's heading and text beside a photo. */
.lp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-bottom: 32px; }
.lp-trust .lp-split { margin-bottom: 0; }
.lp-how .lp-split { margin-bottom: 0; }
.lp-how-btn { margin-top: 28px; }
.lp-split-photo { aspect-ratio: 4 / 3; }
/* The "Answer one sentence" photo changes with the sentence: each new photo fades in over the last. */
#lp-sentence-photo img { position: absolute; inset: 0; transition: opacity .6s ease; }
#lp-sentence-photo img.ph-in { opacity: 0; }

@media (max-width: 999px) {
  .lp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  /* On phones and tablets the photo leads, in a wide crop. */
  .lp-hero-photo { order: -1; aspect-ratio: 3 / 2; max-height: none; }
}
@media (max-width: 899px) {
  .lp-split { grid-template-columns: 1fr; gap: 24px; }
  .lp-how .lp-split-photo { order: -1; }
}
@media (max-width: 600px) {
  .lp-hero { padding: 24px 0 40px; }
  .lp-band, .lp-band-short { aspect-ratio: 4 / 3; }
  .lp-band::after { background: linear-gradient(180deg, rgba(14, 22, 52, .75), rgba(14, 22, 52, .1) 65%, transparent); }
  .lp-band .lp-band-text { left: 20px; right: 20px; top: 20px; transform: none; }
}

/* Phones: the header links fold behind a menu button (added by js/menu.js) into a panel under the header. */
.lp-menu-btn { display: none; }
@media (max-width: 640px) {
  .lp-nav.has-menu .lp-menu-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -8px;
    padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--navy); cursor: pointer;
  }
  .lp-menu-btn:focus-visible { outline: 3px dashed var(--red); outline-offset: 2px; }
  .lp-menu-btn .lp-menu-x, .lp-nav.menu-open .lp-menu-btn .lp-menu-bars { display: none; }
  .lp-nav.menu-open .lp-menu-btn .lp-menu-x { display: inline; }
  .lp-nav.has-menu .lp-nav-links { display: none; }
  .lp-nav.has-menu.menu-open .lp-nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0; padding: 12px 16px 20px;
    background: var(--paper); border-bottom: 1px solid #e3e5ec; box-shadow: 0 12px 24px rgba(27, 42, 92, .08);
  }
  .lp-nav.has-menu .lp-nav-links .lp-nav-link { display: block; padding: 12px 4px; font-size: 17px; }
  .lp-nav.has-menu .lp-nav-links .share-btn { justify-content: flex-start; min-height: 44px; padding: 10px 4px; border-color: transparent; font-size: 17px; gap: 10px; }
  .lp-nav.has-menu .lp-nav-links .share-btn .share-label { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
  .lp-nav.has-menu .lp-nav-links .lp-btn { margin-top: 8px; padding: 14px 20px; font-size: 17px; text-align: center; }
  .lp-nav.has-menu .logo { font-size: 24px; }
}
