/* Braw Games — landing site styles. Tokens in tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  /* Warm paper grain: faint fractal noise over a soft vertical wash */
  background-image:
    linear-gradient(180deg, #f7eed9 0%, var(--parchment) 40%, #efe2c6 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/></svg>");
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--glen-deep); text-decoration-color: rgba(46,74,52,.35); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; color: var(--ink); letter-spacing: -0.01em; }
em { font-style: italic; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--s3); top: var(--s3); background: var(--cream); padding: var(--s2) var(--s4); border-radius: var(--radius); z-index: 100; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4);
  padding: var(--s3) clamp(var(--s4), 4vw, var(--s7));
  background: rgba(247, 238, 217, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(43,38,34,.10);
}
.wordmark {
  display: inline-flex; align-items: center; gap: .5ch;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  color: var(--glen-deep); text-decoration: none; letter-spacing: -0.01em;
}
.wordmark em { color: var(--gold); font-style: italic; }
.wordmark .mark { color: var(--gold); font-size: .9em; }
.wordmark.small { font-size: 1.25rem; }
.logo-img { height: 48px; width: auto; display: block; }
.nav { display: flex; gap: clamp(var(--s3), 2vw, var(--s6)); flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 600; color: var(--ink-soft); }
.nav a:hover { color: var(--glen-deep); }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #f9f1de 0%, var(--parchment) 55%, #efe2c6 100%);
}
.hero-inner {
  max-width: 820px; margin: 0 auto; text-align: center;
  padding: clamp(var(--s5), 5vw, 72px) clamp(var(--s4), 4vw, var(--s7)) var(--s7);
  display: flex; flex-direction: column; align-items: center;
}
.hero-logo {
  width: min(480px, 82vw); height: auto; margin-bottom: var(--s4);
  filter: drop-shadow(0 14px 22px rgba(43,38,34,.22));
}
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--glen); margin: 0 0 var(--s3); }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin: 0 0 var(--s4); }
.hero h1 .hl { color: var(--glen-deep); }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--ink-soft); max-width: 46ch; margin: 0 auto var(--s5); }
.note { font-size: .9rem; color: var(--ink-soft); margin: var(--s4) 0 0; }
.badges { justify-content: center; }

.badges { display: flex; gap: var(--s3); flex-wrap: wrap; }
.badge {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: var(--s2) var(--s4); border-radius: var(--radius);
  background: var(--ink); color: var(--cream); line-height: 1.15; min-width: 150px;
  box-shadow: var(--shadow-soft); opacity: .92;
}
.badge strong { font-size: 1.05rem; }
.badge small { opacity: .75; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }

/* ---- Tartan divider ---- */
.tartan-rule {
  height: 18px;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(200,161,75,.9) 22px 24px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(200,161,75,.5) 22px 24px),
    repeating-linear-gradient(90deg, var(--tartan-navy) 0 30px, var(--glen-deep) 30px 60px),
    repeating-linear-gradient(0deg, rgba(44,62,90,.55) 0 30px, rgba(46,74,52,.55) 30px 60px);
  background-blend-mode: overlay, overlay, normal, multiply;
  border-block: 2px solid rgba(43,38,34,.25);
}

/* ---- Sections ---- */
.section { max-width: 1100px; margin: 0 auto; padding: clamp(var(--s7), 8vw, 96px) clamp(var(--s4), 4vw, var(--s7)); }
.band { max-width: none; background: var(--cream); border-block: 1px solid rgba(43,38,34,.08); }
.band > .section-head, .band > .game-grid { max-width: 1100px; margin-inline: auto; }
.section-head { max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--gold); margin: 0 0 var(--s2); }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 var(--s3); }
.sub { font-size: clamp(1rem, 2vw, 1.18rem); color: var(--ink-soft); margin: 0 0 var(--s4); }

/* ---- Cards ---- */
.cards { list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4); }
.card { background: var(--surface); border: 1px solid rgba(43,38,34,.10); border-radius: var(--radius-lg); padding: var(--s5); box-shadow: var(--shadow-soft); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.25rem; margin: 0 0 var(--s2); display: flex; align-items: center; gap: var(--s3); }
.card-icon { height: 2.6rem; width: auto; flex: 0 0 auto; filter: drop-shadow(0 2px 3px rgba(43,38,34,.16)); }
/* Tall, narrow icons (e.g. the bagpipe) get extra height so their visual
   weight matches the near-square icons. */
.card-icon--tall { height: 3.5rem; }
.card p { margin: 0; color: var(--ink-soft); }
.band .card { background: var(--parchment); }

.soon { display: inline-block; margin-top: var(--s2); font-family: var(--font-body); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--heather); background: rgba(107,78,122,.12); padding: 2px 10px; border-radius: 999px; }

/* ---- Games ---- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s5); margin-top: var(--s6); }
.game { display: flex; flex-direction: column; background: var(--parchment); border: 1px solid rgba(43,38,34,.10); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); }
.band .game { background: var(--surface); }
.game picture { display: block; }
.game img { display: block; width: 100%; height: 280px; object-fit: cover; object-position: center; border-bottom: 1px solid rgba(43,38,34,.10); }
.game > div { padding: var(--s5); }
.game h3 { font-size: 1.35rem; margin: 0 0 var(--s2); }
.game p { margin: 0; color: var(--ink-soft); }
.game.upcoming { justify-content: center; text-align: center; border-style: dashed; }

/* ---- Buttons ---- */
.btn { display: inline-block; background: var(--glen-deep); color: var(--cream); font-weight: 700; text-decoration: none; padding: var(--s3) var(--s5); border-radius: 999px; box-shadow: var(--shadow-soft); transition: transform .2s var(--ease), background .2s var(--ease); }
.btn:hover { transform: translateY(-2px); background: var(--glen); }
.btn.ghost { background: transparent; color: var(--glen-deep); border: 2px solid var(--glen-deep); box-shadow: none; }
.btn.ghost:hover { background: rgba(46,74,52,.08); }

/* ---- CTA ---- */
.cta { text-align: center; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ---- Footer ---- */
.site-footer { background: var(--glen-deep); color: #e9e0cb; margin-top: var(--s6); }
.foot-inner { max-width: 900px; margin: 0 auto; padding: var(--s7) clamp(var(--s4), 4vw, var(--s7)); text-align: center; }
.footer-wordmark { display: block; width: min(340px, 78%); height: auto; margin: 0 auto var(--s3); filter: drop-shadow(0 3px 8px rgba(0,0,0,.28)); }
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark em { color: var(--sandstone); }
.site-footer .mark { color: var(--sandstone); }
.credits { color: rgba(233,224,203,.8); font-size: .9rem; max-width: 60ch; margin: var(--s4) auto; }
.copyright { font-size: .85rem; color: rgba(233,224,203,.7); }
.site-footer a { color: var(--sandstone); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  /* Single-column game cards use the portrait art — give it a taller slot
     (~1/3 taller than the base so more of the scene is visible). */
  .game img { height: clamp(400px, 109vw, 613px); }
  /* Anchor to the bottom so the full caber tosser is visible. */
  .game img.anchor-bottom { object-position: bottom; }
}

@media (max-width: 820px) {
  .nav { display: none; }
  .logo-img { height: 40px; }

  /* Hand-drawn scene as the mobile hero backdrop, under a parchment scrim
     that keeps the headline legible and eases off so the characters show. */
  .hero {
    background:
      linear-gradient(to bottom,
        rgba(244,233,210,.88) 0%,
        rgba(244,233,210,.80) 40%,
        rgba(244,233,210,.66) 72%,
        rgba(244,233,210,.60) 100%),
      url("background-portrait.jpg") center top / cover no-repeat,
      var(--parchment);
  }
  /* The scene already carries the castle + wordmark, so drop the big logo
     to avoid a double-castle and give the artwork room. */
  .hero-logo { display: none; }
}
/* Landscape scene as a subtle footer backdrop on wider screens, under a
   deep-glen scrim so the light footer text stays legible. */
@media (min-width: 821px) {
  .site-footer {
    background:
      linear-gradient(to bottom,
        rgba(29,46,33,.90) 0%,
        rgba(29,46,33,.84) 55%,
        rgba(29,46,33,.80) 100%),
      url("background-landscape.jpg") center 42% / cover no-repeat,
      var(--glen-deep);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}
