/* ============================================================
   ahaaa.in — sections.css
   ------------------------------------------------------------
   🏠 THE ROOMS OF THE HOUSE
   Styles for each section of the page, written in the same
   order they appear on screen:

     1. Navigation bar
     2. Hero (the big "ahaaa" + the party-code bar)
     3. Marquee (the scrolling word strip)
     4. Game of the day (the big featured card)
     5. The games grid (+ the solo/party filter)
     6. Party mode (the 3 steps)
     7. The wishlist (nostalgia pills)
     8. Newsletter (the dark sign-up box)
     9. Footer

   ⚠️ MOSTLY MACHINERY. Text lives in index.html & js/data.js,
      colours live in css/tokens.css.
   ============================================================ */


/* ============ 1. NAVIGATION BAR ============ */

.nav{
  position:sticky;top:0;z-index:100;        /* stays stuck to the top */
  background:rgba(255,253,249,.82);
  backdrop-filter:blur(14px);               /* frosted-glass effect   */
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid transparent;
  transition:border-color .3s;
}
.nav.scrolled{border-bottom-color:var(--line)}  /* line appears on scroll */

.nav-in{
  display:flex;align-items:center;justify-content:space-between;
  height:72px;
}
.logo{
  font-family:var(--disp);font-weight:800;font-size:1.7rem;line-height:1;
  letter-spacing:-.01em;display:inline-flex;align-items:baseline;
}
.logo .dot{color:var(--blue)}               /* the blue full stop */

.nav-links{display:flex;gap:4px;align-items:center}
.nav-links a{
  font-weight:600;font-size:.95rem;color:var(--muted);
  padding:8px 14px;border-radius:var(--r-full);
  transition:color .2s, background .2s;
}
.nav-links a:hover{color:var(--ink);background:#F3F1EA}


/* ============ 2. HERO ============ */

.hero{
  position:relative;
  padding:100px 0 96px;                       /* lots of air */
  text-align:center;
}

/* "the weekend has a website now" pill with the blinking dot */
.hello{
  display:inline-flex;align-items:center;gap:8px;
  font-weight:600;font-size:.88rem;color:var(--muted);
  background:transparent;border:1.5px solid var(--line);
  padding:7px 16px;border-radius:var(--r-full);
  margin-bottom:38px;
}
.hello .pulse{
  width:8px;height:8px;border-radius:50%;background:var(--green);
  animation:pulse 2.4s infinite;
}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(0,189,142,.4)}
  70%{box-shadow:0 0 0 8px rgba(0,189,142,0)}
  100%{box-shadow:0 0 0 0 rgba(0,189,142,0)}
}

/* --- the giant tappable "ahaaa" wordmark --- */
/* tapping it adds extra a's — a quiet delight. logic in js/main.js */
.wordmark{
  display:inline-flex;align-items:baseline;justify-content:center;
  font-family:var(--disp);font-weight:800;
  font-size:clamp(4.4rem, 15vw, 10rem);       /* auto-scales phone→desktop */
  line-height:.95;letter-spacing:-.04em;
  padding:0 .1em;color:var(--ink);
  border-radius:32px;
  user-select:none;-webkit-user-select:none;
  transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.wordmark:active{transform:scale(.99)}

/* each letter is its own little animated span */
.ltr{
  display:inline-block;
  animation:pop-in .7s cubic-bezier(.4,0,.2,1) both;
}
.ltr.candy{animation:candy-in .55s cubic-bezier(.34,1.7,.64,1) both}  /* new a's */
.ltr.bye{animation:shrink-out .3s ease both}                          /* leaving a's */

@keyframes pop-in{
  0%{transform:translateY(24px);opacity:0}
  100%{transform:none;opacity:1}
}
@keyframes candy-in{
  0%{transform:translateY(-46px) scale(.3) rotate(-14deg);opacity:0}
  60%{transform:translateY(8px) scale(1.12) rotate(4deg);opacity:1}
  100%{transform:none;opacity:1}
}
@keyframes shrink-out{to{transform:scale(0);opacity:0}}

/* tagline + subtitle under the wordmark */
.tagline{
  font-family:var(--disp);font-weight:700;
  font-size:clamp(1.35rem, 3.4vw, 2rem);
  letter-spacing:-.01em;
  margin-top:20px;
}
.tagline em{
  font-style:normal;color:var(--blue);        /* one clean accent, no gradient */
}
.sub{
  color:var(--muted);max-width:500px;margin:16px auto 0;
  font-size:1.05rem;line-height:1.55;
}

/* --- the party-code bar --- */
.roombar-wrap{max-width:520px;margin:44px auto 0}
.roombar{
  display:flex;align-items:center;gap:10px;
  background:#fff;border:1.5px solid var(--line);
  border-radius:var(--r-full);
  padding:7px 7px 7px 22px;
  transition:border-color .25s, box-shadow .25s;
  text-align:left;
}
.roombar:focus-within{
  border-color:var(--ink);
  box-shadow:0 0 0 4px rgba(20,22,43,.05);
}

#roomCode{
  flex:1;min-width:0;border:none;outline:none;background:none;
  font:500 1.1rem var(--mono);color:var(--ink);
  letter-spacing:.12em;
  padding:12px 0;
  text-transform:uppercase;          /* codes always show as CAPITALS */
}
#roomCode::placeholder{
  color:#A9ACC0;letter-spacing:normal;text-transform:none;
  font:400 1.02rem var(--body);
}

.roombar-go{
  flex:none;
  font-family:var(--disp);font-weight:700;font-size:1rem;line-height:1;
  background:var(--ink);color:#fff;
  padding:13px 26px 15px;border-radius:var(--r-full);
  transition:opacity .2s;
}
.roombar-go:hover{opacity:.85}

/* the two quick paths under the bar */
.hero-actions{
  display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap;
  margin-top:20px;
}
.quick-btn{
  display:inline-flex;align-items:center;gap:8px;
  font-weight:600;font-size:.98rem;line-height:1;
  color:var(--muted);
  padding:10px 8px;border-radius:var(--r-full);
  transition:color .2s;
}
.quick-btn:hover{color:var(--ink)}
/* the one primary quick path gets quiet emphasis */
.quick-btn.primary{
  font-family:var(--disp);font-weight:700;color:var(--ink);
  background:#fff;border:1.5px solid var(--line);
  padding:11px 22px 13px;
  transition:border-color .2s, transform .15s;
}
.quick-btn.primary:hover{border-color:var(--ink);transform:none}


/* ============ 4. GAME OF THE DAY ============ */
/* the card content is built by js/arcade.js from js/data.js  */

.feat{
  display:grid;grid-template-columns:1.1fr .9fr;gap:0;
  margin-top:40px;
  background:#fff;border:1.5px solid var(--line);border-radius:var(--r-lg);
  overflow:hidden;
}

.feat-info{
  padding:52px 48px;
  display:flex;flex-direction:column;align-items:flex-start;gap:18px;
}
.feat-info .gbadge{margin-bottom:2px}
.feat-info h3{
  font-family:var(--disp);font-weight:800;
  font-size:clamp(2.4rem, 5vw, 3.4rem);
  line-height:1;letter-spacing:-.02em;
}
.feat-info p{color:var(--muted);font-size:1.05rem;line-height:1.55;max-width:440px}

.feat-stats{
  display:flex;flex-wrap:wrap;gap:16px;
  font-family:var(--mono);font-size:.82rem;color:var(--muted);
}
.feat-stat{display:inline-flex;align-items:center;gap:16px}
.feat-stat::after{content:"·";color:var(--line)}
.feat-stat:last-child::after{content:""}

.btn-play{
  font-size:1.1rem;padding:15px 30px 17px;
  margin-top:8px;
}

/* the illustrated right half — a friendly snake on a soft tint */
.feat-art{
  position:relative;
  background:color-mix(in srgb, var(--c,var(--blue)) 6%, #fff);
  border-left:1.5px solid var(--line);
  display:grid;place-items:center;
  min-height:320px;
  overflow:hidden;
}
.feat-art svg{position:relative;width:min(72%, 340px);height:auto}

/* gentle idle bob for the illustration */
.feat-art .bob{animation:art-bob 4s ease-in-out infinite}
@keyframes art-bob{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-8px)}
}


/* ============ 5. THE GAMES GRID ============ */

.arcade{background:#fff;border-top:1.5px solid var(--line);border-bottom:1.5px solid var(--line)}

.games-head{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:24px;flex-wrap:wrap;
}

/* the solo / party filter switch */
.seg{
  display:inline-flex;gap:4px;
  background:var(--paper);border:1.5px solid var(--line);
  border-radius:var(--r-full);padding:5px;
}
.seg-btn{
  font-family:var(--disp);font-weight:700;font-size:.98rem;line-height:1;
  color:var(--muted);
  padding:11px 20px 13px;border-radius:var(--r-full);
  transition:color .2s, background .2s, transform .15s;
}
.seg-btn:hover{color:var(--ink)}
.seg-btn.is-on{background:var(--ink);color:#fff}
.seg-btn:active{transform:scale(.96)}

.games-grid{
  display:grid;gap:16px;margin-top:40px;
  grid-template-columns:repeat(4,1fr);
}

/* one game card — built by js/arcade.js from js/data.js.
   its candy colour arrives as --c via an inline style, used
   sparingly (just the emoji tile + a hover hairline).         */
.gcard{
  position:relative;display:flex;flex-direction:column;gap:12px;
  padding:24px;text-align:left;
  background:#fff;border:1.5px solid var(--line);border-radius:var(--r-md);
  transition:transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s, border-color .25s, opacity .3s;
}
.gcard:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-soft);
  border-color:color-mix(in srgb, var(--c) 30%, var(--line));
}
.gcard:active{transform:translateY(-1px)}
.gcard.hide{display:none}                    /* used by the filter */

/* the big emoji in its tinted squircle — the card's one spot of colour */
.gicon{
  position:relative;width:52px;height:52px;flex:none;
  display:grid;place-items:center;
  font-size:1.6rem;line-height:1;
  background:color-mix(in srgb, var(--c) 12%, #fff);
  border-radius:16px;
}

.gcard h3{
  font-family:var(--disp);font-weight:800;font-size:1.25rem;line-height:1.12;
  letter-spacing:-.01em;
}
.gcard .blurb{color:var(--muted);font-size:.92rem;line-height:1.45;flex:1}

/* the little solo/party badge + player count — quiet, monochrome */
.gmeta{display:flex;align-items:center;gap:8px}
.gbadge{
  font-family:var(--mono);font-weight:500;font-size:.72rem;line-height:1;
  letter-spacing:.04em;text-transform:uppercase;
  color:var(--muted);background:var(--paper);border:1.5px solid var(--line);
  padding:5px 10px 6px;border-radius:var(--r-full);
}
.gplayers{font-family:var(--mono);font-size:.78rem;color:var(--muted)}

/* bottom row: play pill (live) or soon label */
.gfoot{display:flex;align-items:center;justify-content:space-between;margin-top:2px}
.gplay{
  font-family:var(--disp);font-weight:700;font-size:.92rem;line-height:1;
  color:#fff;background:var(--ink);
  padding:9px 18px 11px;border-radius:var(--r-full);
  transition:opacity .2s;
}
.gcard:hover .gplay{opacity:.85}
.gsoon{
  font-family:var(--mono);font-size:.8rem;line-height:1;
  color:var(--muted);
}
/* live cards get a small green dot + "live" label bottom-left */
.glive{
  display:inline-flex;align-items:center;gap:7px;
  font-family:var(--mono);font-size:.78rem;color:var(--muted);
}
.glive-dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--green);
  animation:pulse 2.4s infinite;
}


/* ============ 6. PARTY MODE (the 3 steps) ============ */

.steps{
  display:grid;grid-template-columns:repeat(3,1fr);gap:16px;
  margin-top:40px;
}
.step{
  background:#fff;border:1.5px solid var(--line);border-radius:var(--r-md);
  padding:30px 26px;
}
.step-num{
  display:grid;place-items:center;
  width:38px;height:38px;border-radius:12px;
  font-family:var(--disp);font-weight:800;font-size:1.15rem;
  color:var(--ink);background:var(--paper);border:1.5px solid var(--line);
  margin-bottom:18px;
}
.step h3{
  font-family:var(--disp);font-weight:800;font-size:1.2rem;
  letter-spacing:-.01em;margin-bottom:6px;
}
.step p{color:var(--muted);font-size:.95rem;line-height:1.5}

/* the example room code chip inside step 1 */
.code-eg{
  font-family:var(--mono);font-size:.88em;color:var(--ink);
  background:var(--paper);border:1.5px solid var(--line);
  padding:2px 9px;border-radius:7px;letter-spacing:.1em;
}

/* the note line under the steps */
.eco-note{
  margin-top:32px;display:inline-flex;align-items:center;gap:9px;
  color:var(--muted);font-size:.98rem;
}
.eco-note .star{color:var(--muted)}
.eco-note b{color:var(--ink);font-weight:700}


/* ============ 7. THE WISHLIST ============ */
/* pills use .pill from components.css                         */

.wish{background:#fff;border-top:1.5px solid var(--line);border-bottom:1.5px solid var(--line)}
.eco-pills{
  display:flex;flex-wrap:wrap;gap:10px;margin-top:40px;
}
/* wishlist pills use the display font (they're names, not URLs) */
.wish .pill{font-family:var(--disp);font-weight:700;font-size:.98rem}
/* a pill you've already voted for */
.pill.voted{
  border-color:var(--c);
  background:color-mix(in srgb, var(--c) 8%, #fff);
}
.pill.voted::after{content:"✓";font-weight:700;color:var(--c)}


/* ============ 8. NEWSLETTER (dark box) ============ */

.news{
  position:relative;
  background:var(--ink);color:#fff;
  border-radius:var(--r-lg);
  padding:80px 40px;
  text-align:center;overflow:hidden;
}
.news h2{color:#fff;position:relative;z-index:1}
.news .lede{color:rgba(255,255,255,.7);margin-left:auto;margin-right:auto;position:relative;z-index:1}

.news-form{
  position:relative;z-index:1;
  display:flex;gap:10px;max-width:480px;margin:32px auto 0;
  background:rgba(255,255,255,.1);
  border:1.5px solid rgba(255,255,255,.22);
  border-radius:var(--r-full);padding:7px 7px 7px 22px;
  transition:border-color .2s, background .2s;
}
.news-form:focus-within{border-color:rgba(255,255,255,.6);background:rgba(255,255,255,.14)}
.news-form input{
  flex:1;min-width:0;background:none;border:none;outline:none;
  color:#fff;font:600 1.02rem var(--body);
}
.news-form input::placeholder{color:rgba(255,255,255,.5);font-weight:500}

.news-done{                                  /* "you're in!" message */
  position:relative;z-index:1;display:none;
  font-family:var(--disp);font-weight:700;font-size:1.3rem;
  margin-top:32px;
}
.news-fine{position:relative;z-index:1;margin-top:16px;font-size:.88rem;color:rgba(255,255,255,.5)}


/* ============ 9. FOOTER ============ */

footer{padding:80px 0 46px;text-align:center}

/* the giant outlined "ahaaa" — fills electric blue on hover */
.foot-word{
  font-family:var(--disp);font-weight:800;line-height:.9;letter-spacing:-.03em;
  font-size:clamp(4.5rem, 17vw, 13rem);
  color:transparent;
  -webkit-text-stroke:2px #DDDAD0;
  transition:color .5s;
  user-select:none;cursor:default;
}
.foot-word:hover{color:var(--blue);-webkit-text-stroke:2px var(--blue)}

.foot-tag{font-family:var(--disp);font-weight:700;font-size:1.15rem;margin-top:8px}

.foot-links{
  display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-top:26px;
}
.foot-links a{
  color:var(--muted);font-weight:600;font-size:.95rem;
  padding:8px 14px;border-radius:var(--r-full);
  transition:color .2s, background .2s;
}
.foot-links a:hover{color:var(--ink);background:#F3F1EA}

.foot-fine{margin-top:30px;color:var(--muted);font-size:.9rem}
.foot-fine .heart{color:var(--pink)}
