/* Inter, hosted on this site (course rule: all content on the Stanford server). */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../assets/fonts/Inter/static/Inter_24pt-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../assets/fonts/Inter/static/Inter_24pt-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../assets/fonts/Inter/static/Inter_24pt-SemiBold.ttf") format("truetype"); }

/* Spark team site. Tokens come from the Spark brand kit (six colors only). */
:root {
  --sunken: var(--surface-sunken);
  --gradient: linear-gradient(135deg, var(--sky), var(--mint));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

h1, h2, h3 { font-weight: 600; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 56px); line-height: 1.07; letter-spacing: -0.03em; }
h2 { font-size: 28px; line-height: 34px; letter-spacing: -0.02em; }
h3 { font-size: 22px; line-height: 28px; letter-spacing: -0.015em; }
p { margin: 0; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.label {
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted);
}
.lead { font-size: 18px; line-height: 28px; color: var(--text-muted); max-width: 56ch; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav img { height: 44px; width: auto; }
.nav ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav li a {
  display: inline-block; padding: 8px 14px; border-radius: var(--radius-pill);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px;
}
.nav li a:hover { background: var(--sunken); }

/* Hero */
/* Sections */
section { padding: 72px 0; }
.section-head { display: grid; gap: 12px; margin-bottom: 40px; }

/* How it works */
.steps { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-soft);
  display: grid; gap: 12px; align-content: start;
}
.step-num {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  display: grid; place-items: center; font-weight: 600;
  background: var(--mint); color: var(--ink); border: 1px solid var(--line);
}
.card:nth-child(2) .step-num { background: var(--sky); border: 0; }
.card:nth-child(3) .step-num { background: var(--spark); border: 0; }

.band { background: var(--sunken); }
.pull { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; max-width: 28ch; }

/* Milestones */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.milestone { display: grid; gap: 16px; grid-template-columns: 56px 1fr; }
.milestone .dot {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  background: var(--white); border: 2px solid var(--line-strong);
  display: grid; place-items: center; font-weight: 600; font-size: 12px;
}
.milestone.done .dot { background: var(--mint); border-color: var(--ink); }
.milestone.now .dot { background: var(--spark); border-color: var(--ink); }
.milestone .card { gap: 10px; }
.milestone-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between; }
.badge {
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--sunken); color: var(--ink);
}
.badge.done { background: var(--mint); }
.badge.now { background: var(--spark); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--royal);
  box-shadow: inset 0 0 0 1.5px var(--royal);
}
.chip:hover { background: var(--royal); color: var(--white); }
.chip.soon { color: var(--text-muted); box-shadow: inset 0 0 0 1.5px var(--line); pointer-events: none; }

/* Team */
.team { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.person { text-align: left; }
.avatar {
  width: 72px; height: 72px; aspect-ratio: 1; justify-self: start;
  border-radius: var(--radius-pill);
  background: var(--gradient); display: grid; place-items: center;
  font-size: 24px; font-weight: 600; border: 1px solid var(--line);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.role { color: var(--text-muted); font-size: 15px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--text-muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
footer img { height: 64px; width: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
@media (max-width: 720px) {
  .nav ul { display: none; }
  .milestone { grid-template-columns: 40px 1fr; gap: 12px; }
  section { padding: 56px 0; }
}

/* ---------- Hero ---------- */
.hero { background: var(--gradient); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.78));
}
.hero-grid {
  position: relative; z-index: 1; padding: 80px 0; display: grid; gap: 40px;
  grid-template-columns: 1.1fr 1fr; align-items: center;
}
.hero-copy { display: grid; gap: 24px; justify-items: start; }
.hero h1 { max-width: 14ch; }
.hero .lead { color: rgba(20, 20, 20, 0.78); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-logo-card {
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--line);
  padding: 40px 32px; display: grid; place-items: center;
}
.hero-logo-card img { width: min(100%, 420px); height: auto; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; padding: 48px 0 56px; }
  .hero-logo-card { order: -1; padding: 28px 20px; }
}

/* decorative sparkles: the logo's four-point shape, small, popping in and fading */
.spk { position: absolute; z-index: 1; width: 28px; height: 28px; fill: var(--white); opacity: 0; pointer-events: none; }
.spk.s1 { left: 6%;  top: 18%; animation: pop 6s ease-out 0.4s infinite; }
.spk.s2 { left: 46%; top: 10%; width: 20px; height: 20px; animation: pop 6s ease-out 2.2s infinite; }
.spk.s3 { right: 7%; top: 14%; width: 36px; height: 36px; animation: pop 6s ease-out 1.3s infinite; }
.spk.s4 { right: 12%; bottom: 14%; width: 22px; height: 22px; animation: pop 6s ease-out 3.4s infinite; }
@keyframes pop {
  0%   { opacity: 0; transform: scale(0.3) rotate(0deg); }
  12%  { opacity: 0.95; transform: scale(1.12) rotate(14deg); }
  22%  { opacity: 0.9; transform: scale(1) rotate(14deg); }
  45%, 100% { opacity: 0; transform: scale(0.8) rotate(24deg); }
}

/* hero entrance: gentle and bouncy (ease-out with a small overshoot) */
.js .hero-copy > * { animation: rise 0.4s cubic-bezier(.34,1.56,.64,1) both; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
.js .hero-logo-card { animation: card-in 0.5s cubic-bezier(.34,1.56,.64,1) 0.1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }

/* ---------- Logo band ---------- */
.logo-band { padding: 96px 0; text-align: center; border-block: 1px solid var(--line); }
.logo-band .wrap { display: grid; gap: 24px; justify-items: center; }
.logo-band img { width: min(100%, 440px); height: auto; }
.logo-band .pull { max-width: 22ch; }

/* ---------- Scroll reveal and hover (content is always visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.35s ease-out, transform 0.35s cubic-bezier(.34,1.56,.64,1);
  transition-delay: var(--d, 0ms);
}
.card { transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease-out; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.milestone.now .dot { animation: ring 2.8s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255, 214, 46, 0.7); } 70%, 100% { box-shadow: 0 0 0 14px rgba(255, 214, 46, 0); } }
.nav { transition: box-shadow 0.2s ease-out; }
.nav.scrolled { box-shadow: var(--shadow-soft); }

@media (prefers-reduced-motion: reduce) {
  .spk { animation: none; opacity: 0; }
  .js .hero-copy > *, .js .hero-logo-card { animation: none; }
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; transition: none; }
  .card, .card:hover { transition: none; transform: none; }
  .milestone.now .dot { animation: none; }
}

/* ---------- App components on the site ----------
   These mirror the component designs in the app (buttons, interest tiles, place card).
   Colors still come only from the brand tokens; hover and pressed shades are mixed from them. */

/* Buttons: default, hover (a touch lighter), pressed (a touch darker), focus (ink ring), disabled (gray) */
.sp-btn { text-decoration: none; }
.sp-btn:hover { background: color-mix(in srgb, var(--primary) 88%, var(--white)); }
.sp-btn:active { background: color-mix(in srgb, var(--primary) 82%, var(--ink)); background-image: none; }
.sp-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }

.sp-btn--accept:hover { background: color-mix(in srgb, var(--spark) 88%, var(--white)); }
.sp-btn--accept:active { background: color-mix(in srgb, var(--spark) 80%, var(--ink)); }

/* Tertiary: white pill with a gray outline, ink label */
.sp-btn--tertiary {
  background: var(--white); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.sp-btn--tertiary:hover { background: color-mix(in srgb, var(--white) 95%, var(--ink)); }
.sp-btn--tertiary:active { background: color-mix(in srgb, var(--white) 89%, var(--ink)); }
.sp-btn--tertiary:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }

/* Nav links act like the app tab bar: the section you are in is picked out in royal */
.nav li a[aria-current="true"] {
  color: var(--royal);
  background: color-mix(in srgb, var(--royal) 10%, var(--white));
}

/* Small pictures of the app inside the "How it works" cards (decorative, not interactive) */
.demo { margin-top: 8px; display: grid; gap: 12px; }
.demo .sp-btn { pointer-events: none; cursor: default; }
.demo-label { font-size: 13px; line-height: 18px; color: var(--text-muted); }

/* Interest tiles: white with a hairline; selected ones take a royal tint and a check badge */
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tile {
  position: relative; flex: 1 1 0; min-width: 0; padding: 12px 4px 10px;
  display: grid; justify-items: center; gap: 6px;
  border-radius: var(--radius-md); background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 13px; line-height: 18px; font-weight: 500; text-align: center;
}
.tile .ico { width: 32px; height: 32px; border-radius: var(--radius-pill); display: grid; place-items: center; }
.tile svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile.on { background: color-mix(in srgb, var(--royal) 40%, var(--white)); box-shadow: inset 0 0 0 1.5px var(--royal); }
.tile.on .ico { background: var(--white); }
.tile .check {
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px;
  border-radius: var(--radius-pill); background: var(--royal); color: var(--white);
  display: grid; place-items: center;
}
.tile .check svg { width: 12px; height: 12px; stroke-width: 3; }

/* Place card: a sky-to-mint top, a place name, a heart and a distance */
.mini {
  border-radius: var(--radius-md); background: var(--white); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.mini-top { height: 64px; background: var(--gradient); display: grid; place-items: center; }
.mini-top svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mini-body { padding: 12px 14px 14px; display: grid; gap: 12px; }
.mini-row { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.mini-title { font-weight: 600; font-size: 16px; line-height: 22px; }
.mini-meta { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.mini-row svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mini-actions { display: flex; gap: 8px; }
.mini-actions .sp-btn { flex: 1; }

.mini.match .mini-body { gap: 12px; }
.mini.match p { font-size: 15px; line-height: 22px; }

@media (prefers-reduced-motion: reduce) {
  .sp-btn, .sp-btn:hover, .sp-btn:active { transition: none; transform: none; }
}

/* ---------- The sparkle with a face, used as a friendly accent (decorative) ---------- */
.friend { display: block; width: 72px; height: 72px; pointer-events: none; }
.hero-logo-card { position: relative; }
.hero-logo-card .hero-friend { position: absolute; top: -30px; right: -14px; width: 72px; height: 72px; rotate: 12deg; animation: bob 4.5s ease-in-out infinite; }
#about .wrap { position: relative; }
.about-friend { position: absolute; top: 0; right: 0; width: 112px; height: 112px; rotate: -10deg; }
.logo-band .wrap { position: relative; }
.logo-band .band-friend { position: absolute; top: 50%; width: 64px; height: 64px; margin-top: -32px; }
.logo-band .band-friend.l { left: 8%; rotate: -14deg; }
.logo-band .band-friend.r { right: 8%; width: 48px; height: 48px; margin-top: 0; rotate: 18deg; }
@keyframes bob { 50% { translate: 0 -6px; } }
@media (max-width: 820px) {
  .hero-logo-card .hero-friend { width: 56px; height: 56px; top: -24px; right: -6px; }
  .about-friend, .logo-band .band-friend { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hero-friend { animation: none; } }
