/* ============================================================
   Stark Breakfast LLC — Puzzle Game Company
   Ember Noir system: deep warm charcoal, single ember-orange
   glow, cream type, a whisper of champagne gold.
   Dark full-screen hero, glowing particle field.
   No blue/purple. Premium, quiet, not your default AI gradient.
   ============================================================ */

:root {
  /* ---- Color tokens (Ember Noir) ---- */
  --bg:        #0F0D0B;   /* deep warm charcoal */
  --bg-2:      #16130F;   /* surface */
  --bg-3:      #1E1A15;   /* raised surface */
  --cream:     #F3EADB;   /* primary text */
  --cream-soft:#B7A992;   /* muted warm gray */
  --ember:     #F0892E;   /* primary warm accent / glow */
  --ember-bri: #FFB066;   /* glow highlight */
  --gold:      #E8C07D;   /* sparse tertiary (black-gold hint) */
  --line:      rgba(243, 234, 219, 0.14);
  --line-2:    rgba(243, 234, 219, 0.28);

  /* ---- Typography ---- */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* ---- Spacing (4px base) ---- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px; --s-24: 96px;

  /* ---- Effects ---- */
  --radius: 16px;
  --glow:     0 0 38px rgba(240, 137, 46, 0.32);
  --glow-soft:0 0 22px rgba(240, 137, 46, 0.18);
  --ease: 200ms cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--cream);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* Faint film grain — adds richness to the dark, not flat AI black */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 14px 28px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; background: transparent;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), color var(--ease), border-color var(--ease);
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }

.btn--primary { background: var(--ember); color: #160F06; box-shadow: var(--glow-soft); }
.btn--primary:hover { background: var(--ember-bri); transform: translateY(-2px); box-shadow: var(--glow); }

.btn--ghost { background: transparent; color: var(--cream); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ember); color: var(--ember); transform: translateY(-2px); }

/* Store icons inside buttons (monochrome, follow text color) */
.gp-ico, .apple-ico { width: 20px; height: 20px; flex: 0 0 auto; fill: currentColor; }
.apple-ico { transform: translateY(-1px); }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: var(--s-4) 0;
  transition: background var(--ease), box-shadow var(--ease), padding var(--ease), border-color var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(15, 13, 11, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding: var(--s-3) 0;
}
.nav__inner { width: min(1200px, 92vw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav__brand { display: flex; align-items: center; gap: var(--s-3); }
.nav__mark {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2);
  background: linear-gradient(150deg, var(--ember), var(--gold)); position: relative;
  box-shadow: var(--glow-soft);
}
.nav__mark::after { content: ""; position: absolute; inset: 7px; border-radius: 3px; background: var(--bg); }
.nav__name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.04em; }
.nav__name-accent { color: var(--ember); }
.nav__links { display: flex; gap: var(--s-8); }
.nav__links a { font-size: 0.95rem; font-weight: 600; color: var(--cream-soft); transition: color var(--ease); }
.nav__links a:hover { color: var(--ember); }
.nav__cta { padding: 10px 22px; font-size: 0.88rem; }

/* ============================================================
   Hero — full screen, glowing ember field
   ============================================================ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 78% 12%, rgba(240,137,46,0.16), transparent 55%),
              radial-gradient(90% 80% at 12% 95%, rgba(232,192,125,0.10), transparent 60%),
              var(--bg);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 42%, transparent, rgba(15,13,11,0.55) 100%);
}
.hero__particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.hero__content {
  position: relative; z-index: 3;
  width: min(1200px, 92vw); margin: 0 auto; padding-top: var(--s-16);
}
.hero__eyebrow {
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ember); margin-bottom: var(--s-4); font-weight: 700;
}
.hero__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 6rem); line-height: 0.98; letter-spacing: -0.03em;
  margin-bottom: var(--s-6); color: var(--cream);
}
.hero__title-accent {
  color: var(--ember);
  text-shadow: 0 0 34px rgba(240,137,46,0.45);
}
.hero__subtitle { max-width: 560px; font-size: clamp(1rem, 2vw, 1.2rem); color: var(--cream-soft); margin-bottom: var(--s-8); }
.hero__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-16); }
.hero__scroll {
  position: absolute; bottom: var(--s-8); left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: var(--s-2); color: var(--cream-soft);
}
.hero__scroll-text { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.hero__scroll-arrow { font-size: 1.1rem; animation: bob 1.8s ease-in-out infinite; color: var(--ember); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ============================================================
   Section heads
   ============================================================ */
.section-head { width: min(1200px, 92vw); margin: 0 auto var(--s-16); text-align: center; }
.section-head__eyebrow { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ember); margin-bottom: var(--s-3); font-weight: 700; }
.section-head__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; line-height: 1.08; margin-bottom: var(--s-4); color: var(--cream); }
.section-head__lede { color: var(--cream-soft); max-width: 520px; margin: 0 auto; font-size: 1.05rem; }

/* ============================================================
   Games
   ============================================================ */
.games { padding: var(--s-24) 0; position: relative; }
.game {
  width: min(1200px, 92vw); margin: 0 auto var(--s-24);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); align-items: center;
}
.game--reverse .game__art { order: 2; }

.game__art {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
  background:
    radial-gradient(120% 110% at 25% 15%, rgba(240,137,46,0.14), transparent 55%),
    var(--bg-2);
  display: grid; place-items: center;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.4), 0 24px 60px rgba(0,0,0,0.45);
}
.game__art-svg { width: 74%; height: 74%; }
.game__art-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 700ms cubic-bezier(.22,.61,.36,1);
}
.game:hover .game__art-img { transform: scale(1.035); }

/* Tiny Valor — soft champagne-gold halo frames its blue-and-gold key art */
.game__art--valor {
  border-color: var(--line-2);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.4), 0 24px 60px rgba(0,0,0,0.45), 0 0 44px rgba(232,192,125,0.12);
}

.game__tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ember); font-weight: 700;
  padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; margin-bottom: var(--s-4);
}
.game__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.06; letter-spacing: -0.01em;
  margin-bottom: var(--s-4); color: var(--cream);
}
.game__desc { color: var(--cream-soft); font-size: 1.05rem; margin-bottom: var(--s-6); max-width: 46ch; }
.game__features { list-style: none; display: grid; gap: var(--s-3); margin-bottom: var(--s-8); }
.game__features li { display: flex; align-items: flex-start; gap: var(--s-3); color: var(--cream); font-weight: 500; }
.game__features .dot {
  flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; margin-top: 9px;
  background: var(--ember); box-shadow: 0 0 10px rgba(240,137,46,0.6);
}
.game__actions { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.game__meta { font-size: 0.85rem; color: var(--cream-soft); font-weight: 500; margin-left: var(--s-2); }

/* Two store buttons — equal width.
   inline-grid + 1fr 1fr sizes under an intrinsic (shrink-to-fit) constraint, so both
   tracks resolve to the WIDER button's max-content instead of each hugging its own text. */
.game__stores {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  max-width: 100%;
}
.game__stores .btn { width: 100%; }

/* App Store buttons are hidden site-wide for now — Google Play only.
   To bring them back, remove the .btn--appstore class from the markup. */
.btn--appstore { display: none; }
.game__stores:has(.btn--appstore) { grid-template-columns: 1fr; }

/* ============================================================
   Company / About
   ============================================================ */
.company { padding: var(--s-24) 0; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.company__grid { width: min(1200px, 92vw); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--s-16); align-items: center; }
.company__text { color: var(--cream-soft); font-size: 1.08rem; margin: var(--s-6) 0 var(--s-6); max-width: 52ch; }
.company__address {
  display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--s-12);
  padding: var(--s-4) var(--s-6); border-left: 4px solid var(--ember);
  background: var(--bg-3); border-radius: 0 10px 10px 0; max-width: 52ch;
}
.company__address-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); font-weight: 700; }
.company__address { color: var(--cream); font-weight: 600; font-size: 1rem; }
.company__values { display: grid; gap: var(--s-4); }
.value {
  display: flex; gap: var(--s-4); align-items: baseline; padding: var(--s-4);
  border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line);
}
.value__num { font-family: var(--font-mono); color: var(--ember); font-weight: 700; font-size: 0.95rem; }
.value p { color: var(--cream); font-weight: 500; }

.company__card {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 70% 10%, rgba(240,137,46,0.22), transparent 55%),
    radial-gradient(100% 100% at 20% 100%, rgba(232,192,125,0.14), transparent 60%),
    var(--bg-3);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.45), 0 24px 60px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-4);
}
.company__card-mark {
  width: 76px; height: 76px; border-radius: 20px; border: 1px solid var(--line-2);
  background: linear-gradient(150deg, var(--ember), var(--gold)); position: relative;
  box-shadow: var(--glow-soft);
}
.company__card-mark::after { content: ""; position: absolute; inset: 22px; border-radius: 10px; background: var(--bg); }
.company__card-name { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.1em; font-size: 1.1rem; color: var(--cream); }
.company__card-sub { color: var(--cream-soft); font-size: 0.85rem; letter-spacing: 0.06em; font-weight: 500; }
.company__card-addr { color: var(--cream); font-size: 0.92rem; line-height: 1.5; text-align: center; opacity: 0.9; }

/* ============================================================
   Footer
   ============================================================ */
.footer { padding: var(--s-24) 0 var(--s-8); background: var(--bg); }
.footer__cta { width: min(1200px, 92vw); margin: 0 auto var(--s-16); text-align: center; }
.footer__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; color: var(--cream); }
.footer__text { color: var(--cream-soft); margin: var(--s-4) 0 var(--s-8); font-size: 1.05rem; }
.footer__links { display: flex; gap: var(--s-4); justify-content: center; flex-wrap: wrap; }
.footer__bar {
  width: min(1200px, 92vw); margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--s-4); padding-top: var(--s-8); border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--cream-soft); font-weight: 500;
}
.footer__brand { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.08em; color: var(--cream); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .game { grid-template-columns: 1fr; gap: var(--s-8); }
  .game--reverse .game__art { order: 0; }
  .company__grid { grid-template-columns: 1fr; gap: var(--s-12); }
  .company__card { aspect-ratio: 16 / 10; max-width: 420px; }
}
@media (max-width: 560px) {
  .hero__actions .btn { flex: 1 1 auto; }
  .game__stores { grid-template-columns: 1fr; width: 100%; }
  .footer__bar { flex-direction: column; text-align: center; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
