/* =========================================================
   Wild Olive Studios — stylesheet
   Palette: deep forest night + olive green + warm gold
   ========================================================= */

:root {
  --bg:        #0c1610;
  --bg-2:      #0f1d14;
  --panel:     #122318;
  --ink:       #eef3ea;
  --ink-soft:  #aebaa6;
  --olive:     #7fb069;
  --olive-br:  #9fcf6b;
  --gold:      #e7b75f;
  --line:      rgba(159, 207, 107, 0.16);

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Space Grotesk", system-ui, sans-serif;

  --maxw: 1180px;
  --radius: 18px;
  --shadow: 0 24px 60px -20px rgba(0,0,0,0.6);
}

/* ---------- reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(1200px 800px at 70% -10%, #16301f 0%, var(--bg) 55%) fixed, var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- animated background canvas ---------- */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  opacity: 0.55;
}

main, .nav, .footer, .marquee { position: relative; z-index: 1; }

/* ---------- buttons ---------- */
.btn {
  --pad: 0.85rem 1.6rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: var(--pad);
  font-family: var(--font-body);
  font-weight: 700; font-size: 0.98rem;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.9,.3,1), box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(135deg, var(--olive-br), var(--olive));
  color: #0b1a0f;
  box-shadow: 0 10px 30px -8px rgba(127,176,105,0.6);
}
.btn--primary:hover { box-shadow: 0 16px 40px -8px rgba(127,176,105,0.75); }
.btn--ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--olive); background: rgba(127,176,105,0.10); }
.btn--small { --pad: 0.55rem 1.05rem; font-size: 0.85rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  z-index: 50;
  transition: background .3s, backdrop-filter .3s, box-shadow .3s, padding .3s;
}
.nav.scrolled {
  background: rgba(10,20,14,0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-top: 0.7rem; padding-bottom: 0.7rem;
}
.nav__brand { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; }
.nav__logo { animation: spin-slow 24s linear infinite; }
.nav__name-accent { color: var(--olive-br); }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; font-weight: 500; }
.nav__links a { position: relative; color: var(--ink-soft); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content:""; position:absolute; left:0; bottom:-6px; height:2px; width:0;
  background: var(--olive-br); transition: width .25s;
}
.nav__links a:hover::after { width: 100%; }
.nav__cta { margin-left: 0.5rem; }
.nav__menu { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav__menu span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8rem clamp(1rem, 4vw, 3rem) 5rem;
}
/* full-bleed forest background image */
.hero__bg {
  position: absolute; top: 0; bottom: 0; left: 50%;
  transform: translateX(-50%); width: 100vw;
  z-index: 0; overflow: hidden;
}
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 70% center;
  animation: hero-drift 26s ease-in-out infinite alternate;
}
/* dark gradient overlay so the headline stays legible over the art */
.hero__overlay {
  position: absolute; top: 0; bottom: 0; left: 50%;
  transform: translateX(-50%); width: 100vw; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,14,10,0.94) 0%, rgba(8,14,10,0.80) 32%, rgba(8,14,10,0.30) 64%, rgba(8,14,10,0.10) 100%),
    linear-gradient(0deg, var(--bg) 1%, rgba(8,14,10,0.55) 18%, transparent 48%);
}
.hero__grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .35; z-index: 1;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 4px 4px;
}
.hero__inner { position: relative; z-index: 2; max-width: 640px; }
.hero__eyebrow {
  display: inline-block;
  font-weight: 700; letter-spacing: .04em;
  color: var(--olive-br);
  background: rgba(127,176,105,0.10);
  border: 1px solid var(--line);
  padding: .4rem .9rem; border-radius: 999px;
  margin-bottom: 1.4rem; font-size: .85rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 24px rgba(0,0,0,0.55);
}
.hero__word { color: var(--olive-br); font-style: italic; position: relative; }
.hero__word--alt { color: var(--gold); }
.hero__sub {
  color: var(--ink);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 44ch;
  margin-bottom: 2rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.6rem; }
.hero__stats { display: flex; gap: 2.4rem; list-style: none; padding: 0; flex-wrap: wrap; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stat-num { font-family: var(--font-display); font-weight: 900; font-size: 2rem; color: var(--ink); line-height: 1; }
.hero__stat-label { color: var(--ink-soft); font-size: .85rem; }

/* hero animated scene */
.hero__scene { position: relative; height: 460px; display: grid; place-items: center; }
.scene-glow {
  position: absolute; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(127,176,105,0.30), transparent 65%);
  filter: blur(10px);
  animation: pulse 6s ease-in-out infinite;
}
.olive-tree { width: min(100%, 400px); height: auto; overflow: visible; }

/* draw-on branches */
.branch { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s ease forwards; }
.branch--2 { animation-delay: .7s; }
.branch--3 { animation-delay: 1s; }
.leaf, .olive { transform-box: fill-box; transform-origin: center; opacity: 0; animation: pop .6s cubic-bezier(.2,1.4,.4,1) forwards; }
.leaves .leaf:nth-child(1){ animation-delay: 1.5s; }
.leaves .leaf:nth-child(2){ animation-delay: 1.7s; }
.leaves .leaf:nth-child(3){ animation-delay: 1.9s; }
.leaves .leaf:nth-child(4){ animation-delay: 2.1s; }
.leaves .leaf:nth-child(5){ animation-delay: 2.3s; }
.leaves .leaf:nth-child(6){ animation-delay: 2.5s; }
.olives .olive:nth-child(1){ animation-delay: 2.6s; }
.olives .olive:nth-child(2){ animation-delay: 2.8s; }
.olives .olive:nth-child(3){ animation-delay: 3.0s; }
.leaves { animation: sway 7s ease-in-out 3s infinite; transform-origin: 200px 250px; }

/* floating sprites */
.sprite { position: absolute; font-size: 2rem; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.sprite--1 { top: 8%;  left: 6%;  animation: float 5s ease-in-out infinite; }
.sprite--2 { top: 20%; right: 4%; animation: float 6.5s ease-in-out infinite .4s; }
.sprite--3 { bottom: 16%; left: 2%; animation: float 5.5s ease-in-out infinite .8s; }
.sprite--4 { bottom: 8%; right: 12%; animation: float 6s ease-in-out infinite 1.2s; }

/* scroll cue */
.hero__scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 14px;
  display: grid; place-items: start center; padding-top: 7px;
  z-index: 2;
}
.hero__scroll span { width: 4px; height: 8px; border-radius: 4px; background: var(--olive-br); animation: scroll-dot 1.6s ease-in-out infinite; }

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(127,176,105,0.05);
  overflow: hidden; padding: .9rem 0;
}
.marquee__track {
  display: flex; gap: 2.2rem; width: max-content;
  font-family: var(--font-display); font-weight: 900; font-size: 1.1rem;
  letter-spacing: .06em; color: var(--olive-br); text-transform: uppercase;
  animation: marquee 28s linear infinite;
}
.marquee__track span:nth-child(even){ color: var(--gold); }

/* ---------- generic section ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 8rem) clamp(1rem, 4vw, 3rem); }
.section__head { max-width: 660px; margin-bottom: 3rem; }
.section__kicker {
  text-transform: uppercase; letter-spacing: .18em; font-weight: 700;
  font-size: .8rem; color: var(--olive-br); margin-bottom: .8rem;
}
.section__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section__lead { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- games grid ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.6rem; }
.game-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: transform .3s cubic-bezier(.2,.9,.3,1), box-shadow .3s, border-color .3s;
}
.game-card__play-link {
  position: absolute; inset: 0; z-index: 2;
}
.game-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent, var(--olive)) 50%, transparent); }
.game-card__art { position: relative; }
.game-card__cover {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--accent, #345), var(--accent2, #123));
  position: relative; overflow: hidden;
}
.game-card__cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.9,.3,1);
}
.game-card:hover .game-card__cover img { transform: scale(1.06); }
/* gentle top shade so the badge always sits on a readable surface */
.game-card__cover::before {
  content:""; position:absolute; inset:0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,10,8,0.35), transparent 36%);
}
.game-card__cover::after {
  content:""; position:absolute; inset:-50%; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.14) 50%, transparent 60%);
  transform: translateX(-30%); transition: transform .6s;
}
.game-card:hover .game-card__cover::after { transform: translateX(30%); }
.game-card__badge {
  position: absolute; top: .8rem; left: .8rem; z-index: 2;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  padding: .32rem .75rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--olive-br), var(--olive));
  color: #0b1a0f;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.6);
}
.game-card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.game-card__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.game-card__tags span {
  font-size: .72rem; color: var(--ink-soft);
  border: 1px solid var(--line); padding: .2rem .6rem; border-radius: 999px;
}
.game-card__title { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; }
.game-card__desc { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.game-card__links { display: flex; gap: .6rem; margin-top: .4rem; }

/* featured card: spans two columns with side-by-side art + body */
@media (min-width: 700px) {
  .game-card--featured { grid-column: span 2; flex-direction: row; }
  .game-card--featured .game-card__art { flex: 1.15; min-height: 300px; }
  .game-card--featured .game-card__cover { position: absolute; inset: 0; aspect-ratio: auto; }
  .game-card--featured .game-card__body { flex: 1; justify-content: center; }
  .game-card--featured .game-card__title { font-size: 1.9rem; }
}

/* ghost / coming soon card */
.game-card--ghost { border-style: dashed; background: transparent; }
.game-card__ghost-inner {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; gap:.6rem; padding:2rem;
}
.game-card__plus { font-size: 2.4rem; color: var(--olive-br); font-family: var(--font-display); line-height: 1; }
.game-card__ghost-inner h3 { font-family: var(--font-display); font-size: 1.3rem; }
.game-card__ghost-inner p { color: var(--ink-soft); font-size: .9rem; }

/* ---------- studio ---------- */
.studio__grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 3rem; align-items: center; }
.studio__text p { color: var(--ink-soft); margin-bottom: 1rem; font-size: 1.05rem; }
.studio__text em { color: var(--ink); font-style: italic; }
.studio__panel {
  display: grid; gap: 1.2rem;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem;
}
.studio__stat { border-left: 3px solid var(--olive); padding-left: 1rem; }
.studio__stat-num { display:block; font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; color: var(--gold); }
.studio__stat-label { color: var(--ink-soft); font-size: .9rem; }

/* ---------- values ---------- */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.value-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; transition: transform .3s, border-color .3s;
}
.value-card:hover { transform: translateY(-4px); border-color: var(--olive); }
.value-card__icon { font-size: 2.2rem; margin-bottom: .8rem; display: inline-block; }
.value-card:hover .value-card__icon { animation: wiggle .5s ease; }
.value-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .4rem; }
.value-card p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- follow / cta ---------- */
.follow__card {
  max-width: 860px; margin: 0 auto; text-align: center;
  background: linear-gradient(180deg, rgba(127,176,105,0.10), var(--bg-2));
  border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(2rem, 5vw, 4rem);
}
.follow__lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 52ch; margin: 1rem auto 2.4rem; }
.follow__links {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 2.4rem;
}
.social-btn {
  display: flex; align-items: center; gap: .9rem; text-align: left;
  padding: 1rem 1.2rem; border-radius: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  transition: transform .25s, border-color .25s, background .25s;
}
.social-btn:hover { transform: translateY(-3px); border-color: var(--olive); background: rgba(127,176,105,0.10); }
.social-btn__icon { font-size: 1.6rem; }
.social-btn__label { display: flex; flex-direction: column; line-height: 1.25; }
.social-btn__label strong { font-size: 1rem; }
.social-btn__label small { color: var(--ink-soft); font-size: .8rem; }

.follow__form { display: flex; gap: .6rem; max-width: 440px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.follow__form input {
  flex: 1; min-width: 220px;
  padding: .85rem 1.2rem; border-radius: 999px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--line); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem;
}
.follow__form input:focus { outline: none; border-color: var(--olive-br); box-shadow: 0 0 0 3px rgba(127,176,105,0.2); }
.follow__note { color: var(--ink-soft); font-size: .85rem; margin-top: 1rem; }
.follow__note.success { color: var(--olive-br); font-weight: 700; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 3rem clamp(1rem,4vw,3rem); background: rgba(0,0,0,0.25); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; text-align: center; display: grid; gap: .6rem; place-items: center; }
.footer__brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; }
.footer__tag { color: var(--olive-br); }
.footer__legal { color: var(--ink-soft); font-size: .82rem; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.9,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- keyframes ---------- */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 0%{opacity:0; transform:scale(0);} 100%{opacity:1; transform:scale(1);} }
@keyframes sway { 0%,100%{ transform: rotate(-2deg);} 50%{ transform: rotate(2deg);} }
@keyframes float { 0%,100%{ transform: translateY(0) rotate(-3deg);} 50%{ transform: translateY(-18px) rotate(3deg);} }
@keyframes pulse { 0%,100%{ transform: scale(1); opacity:.8;} 50%{ transform: scale(1.08); opacity:1;} }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes marquee { from { transform: translateX(0);} to { transform: translateX(-50%);} }
@keyframes scroll-dot { 0%{ transform: translateY(0); opacity:1;} 70%{ transform: translateY(14px); opacity:0;} 100%{opacity:0;} }
@keyframes wiggle { 0%,100%{transform:rotate(0);} 25%{transform:rotate(-12deg);} 75%{transform:rotate(12deg);} }
@keyframes hero-drift { from { transform: scale(1.06) translate(0,0); } to { transform: scale(1.12) translate(-1.5%, -1.5%); } }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { padding-top: 7rem; }
  /* on tall/narrow screens, frame the glowing tree and darken more for text */
  .hero__bg img { object-position: 76% center; }
  .hero__overlay {
    background:
      linear-gradient(180deg, rgba(8,14,10,0.55) 0%, rgba(8,14,10,0.30) 30%, rgba(8,14,10,0.80) 100%),
      linear-gradient(0deg, var(--bg) 1%, transparent 55%);
  }
  .studio__grid { grid-template-columns: 1fr; }
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: flex; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; gap: 1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10,20,14,0.96); backdrop-filter: blur(14px);
    padding: 1.4rem clamp(1rem,4vw,3rem); border-bottom: 1px solid var(--line);
  }
}
