/* Huddle marketing site. Values come from the "Home page (desktop)" design. */

:root {
  --bg: #FBF6EE;
  --card: #FFFFFF;
  --border: #ECE1CF;
  --line: #F2EBDD;
  --chip: #F5EEE1;
  --ink: #2A2420;
  --muted: #6B6156;
  --subtle: #8A8074;
  --faint: #A69C8E;
  --placeholder: #BBAF9C;

  --coral: #FF6B4A;
  --coral-dark: #E85A3B;
  --coral-tint: rgba(255, 107, 74, 0.12);
  --gold: #FFB629;
  --gold-ink: #9A6A00;
  --gold-tint: rgba(255, 182, 41, 0.16);
  --teal: #20C2A6;
  --blue: #2E9BFF;
  --blue-dark: #1F7FD6;
  --blue-tint: rgba(46, 155, 255, 0.14);
  --purple: #9B6BFF;
  --purple-tint: rgba(155, 111, 255, 0.14);
  --pink: #FF5C93;

  --shadow-card: 0 2px 10px rgba(42, 32, 20, 0.05);
  --shadow-float: 0 24px 60px rgba(42, 32, 20, 0.10);

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  --gutter: 80px;
  --max: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: var(--ink); }
a:hover { color: var(--coral-dark); }
img, svg { display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; }
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* ---------- Brand mark ---------- */
.mark {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 11px; background: var(--coral);
}
.mark svg { width: 56%; height: 56%; fill: #FFFFFF; }
.mark--sm { width: 28px; height: 28px; border-radius: 9px; }
.mark--lg { width: 52px; height: 52px; border-radius: 15px; }

.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand__name { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); }

/* ---------- Nav ---------- */
.site-header { padding-top: 24px; padding-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: 36px; font-size: 15px; font-weight: 600; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--coral-dark); }
.site-nav .site-nav__signin { color: var(--ink); font-weight: 700; }

/* ---------- Shared bits ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 100px;
  padding: 8px 16px; font-size: 13.5px; font-weight: 700;
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }

.tag {
  align-self: flex-start; font-size: 12.5px; font-weight: 700; color: var(--gold-ink);
  background: var(--gold-tint); border-radius: 100px; padding: 5px 13px;
}

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.star { width: 12px; height: 12px; fill: var(--gold); flex-shrink: 0; }
.stars { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--gold-ink); }

.check {
  width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.check svg { width: 12px; height: 12px; fill: none; stroke: #FFFFFF; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.check--open { background: #FFFFFF; border: 2px solid currentColor; }

/* ---------- Invite form ---------- */
.invite {
  display: flex; align-items: center; gap: 8px; width: 100%; max-width: 520px;
  background: var(--card); border: 1px solid var(--border); border-radius: 100px;
  padding: 6px 6px 6px 24px; box-shadow: var(--shadow-card);
}
.invite--sunk { background: var(--bg); box-shadow: none; }
.invite input {
  flex-grow: 1; min-width: 0; height: 48px; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 15.5px; font-weight: 500; color: var(--ink);
}
.invite input::placeholder { color: var(--placeholder); }
.invite:focus-within { border-color: var(--coral); }
.invite button {
  height: 50px; padding: 0 26px; border: none; border-radius: 100px;
  background: var(--coral); color: #FFFFFF; font-family: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.invite button:hover { background: var(--coral-dark); }
.invite__note { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.invite__status { min-height: 20px; font-size: 13.5px; font-weight: 600; color: var(--coral-dark); }
.invite .invite__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; align-items: center; padding-top: 64px; padding-bottom: 96px; text-align: center; }
.hero h1 { margin-top: 24px; max-width: 860px; font-size: 68px; line-height: 74px; }
.hero__lede { margin-top: 22px; max-width: 660px; font-size: 19px; line-height: 30px; color: var(--muted); }
.hero .invite { margin-top: 36px; }
.hero .invite__note { margin-top: 14px; }
.hero .invite__status { margin-top: 6px; }

/* ---------- Kids ---------- */
.kids { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kids__inner { padding-top: 96px; padding-bottom: 96px; display: flex; align-items: center; gap: 72px; }
.kids__copy { flex: 1 1 0; display: flex; flex-direction: column; gap: 18px; }
.kids__copy h2 { font-size: 44px; line-height: 52px; }
.kids__copy p { font-size: 17px; line-height: 27px; color: var(--muted); }

.perks { margin-top: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.perk { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.perk svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.perk strong { font-size: 14px; font-weight: 700; }
.perk span { font-size: 13px; line-height: 19px; color: var(--muted); }

.kid-demo {
  width: 440px; flex-shrink: 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.kid-demo__head { display: flex; align-items: center; gap: 12px; }
.kid-demo__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--purple-tint); border: 2.5px solid var(--purple); color: var(--purple);
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700;
}
.kid-demo__who { flex-grow: 1; }
.kid-demo__name { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.kid-demo__streak { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kid-demo__total {
  display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--border);
  border-radius: 100px; padding: 7px 14px; font-family: var(--font-display); font-size: 18px; font-weight: 600;
}
.kid-demo__total .star { width: 16px; height: 16px; }
.kid-demo__panel { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 11px; }
.kid-demo__panel h3 { font-size: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row__label { flex-grow: 1; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.kid-demo__nudge { background: var(--gold-tint); border-radius: 100px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; color: var(--gold-ink); }
.reward { padding: 4px 0; }
.reward .row__label { color: var(--ink); }
.cost {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700;
  background: var(--chip); border-radius: 100px; padding: 4px 11px;
}

/* ---------- Features ---------- */
.features { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 44px; }
.features__intro { display: flex; flex-direction: column; gap: 14px; max-width: 680px; }
.features__intro h2 { font-size: 44px; line-height: 52px; }
.features__intro p { font-size: 18px; line-height: 28px; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.feature { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.feature__head { display: flex; align-items: center; gap: 12px; }
.feature__icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.feature__icon svg { width: 22px; height: 22px; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 24px; line-height: 30px; }
.feature > p { font-size: 15.5px; line-height: 24px; color: var(--muted); }
.feature ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.feature li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 22px; }
.feature li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.small-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.small { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.small h3 { font-size: 19px; line-height: 24px; }
.small p { font-size: 14.5px; line-height: 22px; color: var(--muted); }

/* ---------- Install ---------- */
.install { padding-bottom: 96px; }
.install__panel {
  background: var(--ink); border-radius: 28px; padding: 56px 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 48px;
}
.install__copy { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.install__copy h2 { font-size: 36px; line-height: 44px; color: #FFFFFF; }
.install__copy p { font-size: 16.5px; line-height: 26px; color: #E8DFD1; }
.platforms { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.install__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; flex-shrink: 0; }
.install__how {
  height: 46px; padding: 0 24px; border: none; border-radius: 100px; background: var(--coral); color: #FFFFFF;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.install__how:hover { background: var(--coral-dark); }

/* ---------- "See how" dialog ---------- */
.how {
  width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 28px; padding: 36px 36px 32px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-float);
}
.how::backdrop { background: rgba(42, 36, 32, 0.5); }
.how[open] { animation: how-in 0.18s ease-out; }
@keyframes how-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .how[open] { animation: none; } }
.how__close-form { position: absolute; top: 16px; right: 16px; margin: 0; }
.how__close {
  width: 38px; height: 38px; border: none; border-radius: 50%; background: var(--chip); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.how__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.how h2 { font-size: 28px; line-height: 34px; padding-right: 40px; }
.how__lede { margin-top: 8px; font-size: 15.5px; line-height: 24px; color: var(--muted); }
.how__tabs { margin-top: 22px; display: flex; gap: 4px; padding: 4px; background: var(--chip); border-radius: 100px; }
.how__tabs button {
  flex: 1; height: 38px; border: none; border-radius: 100px; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.how__tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-card); }
.how__steps { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.how__steps[hidden] { display: none; }
.how__steps li { counter-increment: step; position: relative; padding-left: 38px; font-size: 15.5px; line-height: 23px; }
.how__steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--coral-tint); color: var(--coral-dark); font-family: var(--font-display); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.how__steps strong { font-weight: 700; }
.how__foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; line-height: 21px; color: var(--muted); }
.how__open {
  margin-top: 16px; display: inline-flex; align-items: center; height: 46px; padding: 0 24px; border-radius: 100px;
  background: var(--ink); color: #FFFFFF; font-size: 15px; font-weight: 700; text-decoration: none;
}
.how__open:hover { color: #FFFFFF; background: #000; }
.platforms span { font-size: 14px; font-weight: 700; color: #FFFFFF; border: 1px solid #5A5048; border-radius: 100px; padding: 10px 18px; }

/* ---------- Founder ---------- */
.founder { padding-bottom: 96px; }
.founder__inner { max-width: 960px; margin: 0 auto; display: flex; gap: 48px; align-items: center; }
.founder__photo {
  width: 280px; height: 300px; flex-shrink: 0; border-radius: 22px; background: var(--chip);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--muted); overflow: hidden;
}
.founder__photo img { width: 100%; height: 100%; object-fit: cover; }
.founder__copy { display: flex; flex-direction: column; gap: 16px; }
.founder__copy h2 { font-size: 40px; line-height: 48px; }
.founder__copy p { font-size: 17px; line-height: 28px; color: var(--muted); }
.founder__sig { font-family: var(--font-display); font-size: 20px; font-weight: 600; }

/* ---------- Final CTA ---------- */
.cta { padding-bottom: 80px; }
.cta__panel { padding: 72px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.cta__panel h2 { margin-top: 8px; font-size: 44px; line-height: 52px; }
.cta__panel > p { max-width: 560px; font-size: 17px; line-height: 27px; color: var(--muted); }
.cta__panel .invite { margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.site-footer__inner { padding-top: 28px; padding-bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer__made { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.site-footer__links { display: flex; gap: 28px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.site-footer__links a { text-decoration: none; color: var(--muted); }
.site-footer__links a:hover { color: var(--coral-dark); }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 48px var(--gutter) 96px; }
.legal h1 { font-size: 48px; line-height: 56px; }
.legal__updated { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--subtle); }
.legal h2 { margin-top: 44px; font-size: 26px; line-height: 32px; }
.legal h3 { margin-top: 26px; font-size: 19px; line-height: 24px; }
.legal p, .legal li { font-size: 16.5px; line-height: 27px; color: var(--muted); }
.legal p { margin-top: 14px; }
.legal ul { margin: 14px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal strong { color: var(--ink); font-weight: 700; }
.legal a { color: var(--coral-dark); }
.legal__summary { margin-top: 28px; padding: 24px 28px; }
.legal__summary p:first-child { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .kids__inner { flex-direction: column; align-items: stretch; gap: 48px; }
  .kid-demo { width: 100%; max-width: 520px; align-self: center; }
  .small-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install__panel { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .site-nav { gap: 20px; }
  .site-nav .site-nav__section { display: none; }
  .hero { padding-top: 32px; padding-bottom: 64px; }
  .hero h1 { font-size: 42px; line-height: 48px; }
  .hero__lede { font-size: 17px; line-height: 27px; }
  .kids__inner, .features { padding-top: 64px; padding-bottom: 64px; }
  .kids__copy h2, .features__intro h2, .cta__panel h2 { font-size: 34px; line-height: 40px; }
  .founder__copy h2 { font-size: 32px; line-height: 38px; }
  .perks, .feature-grid, .small-grid { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: 24px; }
  .kid-demo { padding: 18px; }
  .install, .founder { padding-bottom: 64px; }
  .install__panel { padding: 36px 28px; }
  .install__copy h2 { font-size: 30px; line-height: 36px; }
  .how { padding: 28px 22px 24px; }
  .how h2 { font-size: 24px; line-height: 30px; }
  .how__tabs button { font-size: 13px; }
  .founder__inner { flex-direction: column; align-items: flex-start; gap: 28px; }
  .founder__photo { width: 100%; height: auto; aspect-ratio: 1000 / 961; }
  .cta { padding-bottom: 56px; }
  .cta__panel { padding: 44px 20px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .legal h1 { font-size: 38px; line-height: 44px; }
}

@media (max-width: 480px) {
  .invite { flex-direction: column; align-items: stretch; border-radius: 26px; padding: 6px; }
  .invite input { padding: 0 16px; text-align: center; }
  .invite button { width: 100%; }
}
