/* ============================================================================
   Candywriter studio site — premium & cinematic design system
   Dark charcoal base, huge grotesk display type, candy-pink → magenta accents.
   Brand colors are official (Candywriter Style & Logo Guide):
     candy pink  #FB7598  (PMS 190C)   magenta  #E51A92  (PMS 225C)
   Fonts (Google Fonts, loaded in Base.astro) are placeholders for the official
   Candywriter brand font and can be swapped in one place once provided.
   ========================================================================== */

:root {
  /* Brand */
  --cw-pink:      #FB7598;
  --cw-pink-soft: #FFA8C0;
  --cw-magenta:   #E51A92;
  --cw-magenta-d: #B10E6E;
  --cw-grad:      linear-gradient(120deg, #FB7598 0%, #E51A92 100%);
  --cw-grad-soft: linear-gradient(120deg, rgba(251,117,152,.16), rgba(229,26,146,.16));

  /* Surfaces — the page is a mid charcoal gray with large divots; the strips
     (stats, footer) are a darker flat band that reads as recessed. */
  --bg:        #373637;   /* page backdrop — carries the dot pattern */
  --bg-2:      #1E1D21;   /* darker flat band (stats strip, footer) */
  --bg-panel:  #201E27;   /* legacy alias */
  --surface:   #211F28;   /* card */
  --surface-2: #272531;   /* raised card / hover */
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.14);
  --stroke-pink: rgba(251,117,152,.5);   /* strokes on dark/transparent fills */

  /* Divot texture — large recessed dents (dark rim on top, light catch below).
     Reads clearly on the gray --bg. Pair with background-size 44px. */
  --divot:
    radial-gradient(circle at 11px 11px, #333233 0 4px, rgba(51,50,51,0) 4.6px);

  /* Ink */
  --ink:    #F7F5FB;      /* primary text */
  --ink-2:  #A9A3B8;      /* secondary text */
  --ink-3:  #6F6980;      /* muted / captions */

  /* Type */
  --display: "Space Grotesk", "Archivo", system-ui, -apple-system, sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 34px;

  /* Shadow / glow */
  --shadow:      0 24px 60px -24px rgba(0,0,0,.7);
  --shadow-lg:   0 40px 90px -30px rgba(0,0,0,.85);
  --glow-pink:   0 0 90px -20px rgba(251,117,152,.55);
  --glow-mag:    0 0 120px -20px rgba(229,26,146,.55);
  --ring:        0 0 0 1px var(--line);

  /* Layout */
  --shell:   1200px;
  --shell-w: 1320px;
  --nav-h:   72px;
}

/* ------------------------------------------------------------------ reset */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  /* Dot texture on the gray base — shows through the transparent sections.
     Two layers with the 2nd offset by half a cell → staggered (interspersed)
     rows, same dot size and density. Opaque bands sit flat on top. */
  background-color: var(--bg);
  background-image: var(--divot), var(--divot);
  background-size: 22px 44px;
  background-position: 0 0, 11px 22px;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--cw-magenta); color: #fff; }

/* --------------------------------------------------------------- layout */
.shell { width: 100%; max-width: var(--shell-w); margin: 0 auto; padding: 0 40px; }
.section { position: relative; padding: 112px 0; }
.section--tight { padding: 72px 0; }
.section--alt { background: transparent; }
.section-head { max-width: 720px; margin: 0 0 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* --------------------------------------------------------------- type */
.display {
  font-family: var(--display);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -0.02em;
  margin: 0;
}
h1.display { font-size: clamp(44px, 7vw, 96px); }
h2.display { font-size: clamp(32px, 4.4vw, 60px); }
h3.display { font-size: clamp(22px, 2.4vw, 30px); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cw-pink);
  margin: 0 0 18px;
}
.kicker .dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--cw-grad);
  box-shadow: 0 0 12px rgba(229,26,146,.9);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3);
}
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.grad-text {
  background: var(--cw-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--grad {
  background: var(--cw-grad); color: #fff;
  box-shadow: 0 10px 30px -10px rgba(229,26,146,.7);
}
.btn--grad:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(229,26,146,.85); }
.btn--ghost {
  background: rgba(255,255,255,.04); color: var(--ink);
  border-color: var(--stroke-pink);
}
.btn--ghost:hover { background: rgba(251,117,152,.1); border-color: var(--cw-pink); transform: translateY(-2px); }
.btn--dark { background: #1c1b20; color: #fff; }
.btn--dark:hover { background: #2a2830; transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(0,0,0,.55); }
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* --------------------------------------------------------------- tags */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink-2);
  background: rgba(255,255,255,.03);
}
.tag--pink { color: var(--cw-pink); border-color: rgba(251,117,152,.4); background: rgba(251,117,152,.08); }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
}
.chip svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------- cards */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--stroke-pink);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(251,117,152,.45);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}

/* Game tile */
.gamecard {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface);
  border: 1px solid var(--stroke-pink);
  border-radius: var(--r-md);
  padding: 13px 15px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.gamecard:hover { transform: translateY(-3px); border-color: rgba(251,117,152,.5); box-shadow: var(--shadow); }
.gamecard-icon {
  width: 52px; height: 52px; border-radius: 13px; flex-shrink: 0;
  border: 1px solid var(--line-2);
  box-shadow: 0 8px 18px -10px rgba(0,0,0,.8);
  object-fit: cover; background: var(--surface-2);
}
.gamecard-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.gamecard-name { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.gamecard-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gamecard-foot a { font-size: 12px; font-weight: 600; color: var(--cw-pink); display: inline-flex; align-items: center; gap: 4px; }
.gamecard-foot a:hover { color: var(--cw-pink-soft); }

/* --------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: linear-gradient(180deg, #F27CA8 0%, #EA5F97 100%);
  border-bottom: 1px solid rgba(0,0,0,.14);
  transition: box-shadow .25s ease;
}
.nav.is-scrolled { box-shadow: 0 8px 24px -10px rgba(0,0,0,.55); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 24px; }
.nav-logo { display: inline-flex; align-items: center; height: 50px; }
.nav-logo img { height: 50px; width: auto; } /* official reversed (white) logo */
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-size: 15px; font-weight: 600; color: rgba(255,255,255,.82);
  position: relative; transition: color .18s ease; padding: 4px 0;
}
.nav-link:hover, .nav-link.is-active { color: #fff; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: #fff; border-radius: 2px;
}
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-sf { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,.8); }
.nav-sf b { color: #fff; font-weight: 700; }

.hamburger {
  display: none; width: 42px; height: 42px; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.55); border-radius: 12px; background: rgba(255,255,255,.15);
  color: #fff; cursor: pointer;
}
.mobile-sheet {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 99;
  background: rgba(11,10,15,.97); backdrop-filter: blur(20px);
  display: none; flex-direction: column; padding: 24px 40px; gap: 6px;
}
.mobile-sheet a {
  font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink);
}
.mobile-sheet a:last-of-type { border-bottom: none; }

/* --------------------------------------------------------------- footer */
.footer { background-color: var(--bg-2); box-shadow: inset 0 26px 40px -34px rgba(0,0,0,.9); padding: 64px 0 40px; }
.footer-top { display: grid; grid-template-columns: 2.3fr 1fr 1fr 1fr; gap: 40px; }
.footer-lockup { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.footer-brand-logo { height: 56px; width: auto; flex-shrink: 0; }
.footer-divider { width: 1px; align-self: stretch; min-height: 52px; background: rgba(255,255,255,.16); flex-shrink: 0; }
.footer-tagline { color: var(--ink-2); font-size: 14px; line-height: 1.55; max-width: 320px; margin: 0; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin: 4px 0 16px; }
.footer-col a { display: block; color: var(--ink-2); font-size: 14px; padding: 6px 0; transition: color .16s ease; }
.footer-col a:hover { color: var(--cw-pink); }
.footer-socials { display: flex; gap: 12px; margin-top: 18px; }
.socbtn {
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid transparent; color: #fff; background: var(--surface-2);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.socbtn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(0,0,0,.6); opacity: .92; }
.socbtn svg { width: 18px; height: 18px; }
.socbtn--x { background: #000; }
.socbtn--instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.socbtn--linkedin { background: #0A66C2; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.footer-bottom a { color: var(--ink-3); }
.footer-bottom a:hover { color: var(--cw-pink); }

/* --------------------------------------------------------------- misc fx */
.glow-orb { display: none; } /* design has no pink light flares */

/* Map preview (MapEmbed) — non-interactive tiles + overlay link to Google Maps */
.map-wrap { position: relative; display: block; }
.map-wrap iframe {
  display: block; width: 100%; height: 320px; border: 0; pointer-events: none;
  filter: saturate(0.9) brightness(0.92) contrast(1.02);
}
.map-open {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  justify-content: flex-end; padding: 12px; text-decoration: none;
}
.map-open-pill {
  background: rgba(10,10,14,.72); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(4px); transition: background .16s ease;
}
.map-open:hover .map-open-pill { background: var(--cw-magenta); }
.divider { height: 1px; background: var(--line); border: none; margin: 0; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .shell { padding: 0 22px; }
  .section { padding: 80px 0; }
  .nav-links, .nav-sf { display: none; }
  .hamburger { display: flex; }
  .mobile-sheet.is-open { display: flex; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .btn { width: 100%; }
  .nav-right .btn { width: auto; }
  /* Footer brand: stack the logo over the tagline; a vertical divider between
     them makes no sense once stacked, so drop it. */
  .footer { padding: 48px 0 36px; }
  .footer-lockup { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-divider { display: none; }
  .footer-tagline { max-width: none; }
}
