/* Grove Duel home page. privacy.html and support.html keep style.css. */

@font-face { font-family: "Rubik"; src: url(fonts/Rubik-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Onest"; src: url(fonts/Onest-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Onest"; src: url(fonts/Onest-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --ground: #0c1b0b;
  --forest: #12290f;
  --forest-2: #183614;
  --moss: #2f5e22;
  --leaf: #a6e06a;
  --sun: #f6c94c;
  --sun-hi: #ffd969;
  --on-sun: #1f2a0b;
  --text: #eef0e2;
  --text-2: #bccbaa;
  --band: #f1e7c9;
  --band-ink: #1b3013;
  --band-ink-2: #4d5d3c;
  --line: rgba(166, 224, 106, .18);
  --radius: 22px;
  --gutter: clamp(20px, 4vw, 44px);
  --max: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--moss) var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 17px/1.6 "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  caret-color: var(--sun);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--sun); color: var(--on-sun); }
img, video { display: block; max-width: 100%; }
a { color: var(--sun); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--sun-hi); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: "Rubik", "Onest", system-ui, sans-serif; font-weight: 800; line-height: 1.04; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--sun); color: var(--on-sun); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { left: 12px; }

/* ---------- store buttons ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 9px 22px 9px 16px;
  border-radius: 16px; text-decoration: none;
  background: var(--sun); color: var(--on-sun);
  box-shadow: 0 10px 24px -10px rgba(246, 201, 76, .55), inset 0 -3px 0 rgba(0, 0, 0, .14);
  transition: transform .25s var(--ease), background-color .2s, box-shadow .25s var(--ease);
}
.store:hover { background: var(--sun-hi); color: var(--on-sun); transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(246, 201, 76, .7), inset 0 -3px 0 rgba(0, 0, 0, .14); }
.store:active { transform: translateY(1px); }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 12px; font-weight: 600; opacity: .78; }
.store b { font-family: "Rubik", sans-serif; font-weight: 800; font-size: 19px; letter-spacing: .005em; }
/* On a phone, the visitor's own store leads and the other steps back. */
.is-ios .store[data-store="play"], .is-android .store[data-store="ios"] {
  background: rgba(12, 27, 11, .55); color: var(--text); box-shadow: inset 0 0 0 1.5px rgba(238, 240, 226, .35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.is-android .store[data-store="play"] { order: -1; }

/* ---------- top bar ---------- */
.top { position: absolute; inset: 0 0 auto; z-index: 3; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: "Rubik", sans-serif; font-weight: 800; font-size: 19px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.top nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 600; }
.top nav a { color: var(--text); text-decoration: none; opacity: .88; }
.top nav a:hover { opacity: 1; color: var(--sun-hi); }
.top nav .lang { padding: 6px 12px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px rgba(238, 240, 226, .4); opacity: 1; }
@media (max-width: 860px) { .top nav a:not(.lang) { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: max(640px, 100svh); max-height: 1080px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; object-position: 50% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* ground fade first so it paints on top; the copy scrim is anchored behind the copy, not a full-height band */
  background:
    linear-gradient(0deg, var(--ground) 0%, rgba(12, 27, 11, .55) 22%, rgba(12, 27, 11, 0) 46%),
    radial-gradient(72% 82% at 8% 92%, rgba(8, 20, 7, .9) 0%, rgba(8, 20, 7, .7) 40%, rgba(8, 20, 7, 0) 78%),
    linear-gradient(180deg, rgba(8, 20, 7, .55) 0%, rgba(8, 20, 7, 0) 18%);
}
.hero-copy { position: relative; z-index: 2; padding-bottom: clamp(48px, 9vh, 96px); }
.hero h1 { font-size: clamp(3.6rem, 10vw, 6rem); color: #fff; text-shadow: 0 4px 30px rgba(0, 0, 0, .45); }
.mark { display: flex; align-items: center; gap: 10px; margin: 14px 0 22px; }
.mark svg { width: 22px; height: 22px; color: var(--sun); }
.mark i { display: block; width: 92px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--sun), rgba(246, 201, 76, 0)); }
.lead { font-size: clamp(1.25rem, 2.3vw, 1.6rem); font-weight: 600; line-height: 1.3; max-width: 22ch; color: #fff; }
.sub { margin: 12px 0 28px; max-width: 40ch; color: var(--text-2); font-size: 17px; }
.hero .meta { margin-top: 18px; font-size: 14px; color: var(--text-2); }

@media (max-width: 760px) {
  .hero { min-height: max(600px, 100svh); }
  /* the tall key art sits whole at the top so all four guardians stay in view above the copy */
  .hero-art img {
    height: auto; bottom: auto; aspect-ratio: 4 / 5; object-position: 50% 0;
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  }
  .hero::after {
    background:
      linear-gradient(0deg, var(--ground) 0%, var(--ground) 36%, rgba(12, 27, 11, .6) 48%, rgba(12, 27, 11, 0) 60%),
      linear-gradient(180deg, rgba(8, 20, 7, .6) 0%, rgba(8, 20, 7, 0) 16%);
  }
  .hero-copy { padding-bottom: 36px; }
  .mark { margin: 10px 0 16px; }
  .sub { margin-bottom: 22px; font-size: 16px; }
  .stores { display: grid; grid-template-columns: 1fr; }
  .store { justify-content: center; }
}

/* the one authored moment: the grove settles into focus, then the copy rises */
@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: settle 1.2s var(--ease) both; }
  .hero-copy > :not(.stores) { animation: rise .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .hero-copy > :nth-child(4) { animation-delay: .2s; }
  .hero-copy > :nth-child(6) { animation-delay: .26s; }
}
@keyframes settle { from { transform: scale(1.06); filter: saturate(.7); } to { transform: none; filter: none; } }
@keyframes rise { from { opacity: .35; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- sections ---------- */
section { padding: clamp(72px, 11vw, 132px) 0; position: relative; }
section h2 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
.intro { max-width: 60ch; margin-top: 16px; font-size: 18px; color: var(--text-2); }

/* match: an annotated real screenshot */
.match { background: var(--ground); padding-top: clamp(40px, 6vw, 72px); }
.shot { position: relative; margin-top: clamp(32px, 5vw, 52px); border-radius: 28px; padding: 10px; background: #050c04; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px var(--line); }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; }
.pin {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  display: grid; place-items: center; font: 800 15px/1 "Rubik", sans-serif;
  background: var(--sun); color: var(--on-sun);
  box-shadow: 0 0 0 5px rgba(246, 201, 76, .3), 0 6px 14px rgba(0, 0, 0, .45);
}
/* pins ping twice, in reading order, when the screenshot comes into view */
@media (prefers-reduced-motion: no-preference) {
  .pin::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--sun); opacity: 0; }
  .shot.live .pin::after { animation: ping 1.8s var(--ease) 2; }
  .shot.live .pin:nth-of-type(2)::after { animation-delay: .25s; }
  .shot.live .pin:nth-of-type(3)::after { animation-delay: .5s; }
  .shot.live .pin:nth-of-type(4)::after { animation-delay: .75s; }
}
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
.legend { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: pin; }
.legend li { counter-increment: pin; font-size: 15.5px; color: var(--text-2); }
.legend strong { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.legend strong::before { content: counter(pin); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--sun); color: var(--on-sun); font: 800 13px/1 "Rubik", sans-serif; }
@media (max-width: 860px) { .legend { grid-template-columns: 1fr 1fr; gap: 22px 20px; } }
@media (max-width: 520px) {
  .shot { padding: 6px; border-radius: 18px; margin-left: calc(var(--gutter) * -.5); margin-right: calc(var(--gutter) * -.5); }
  .shot img { border-radius: 13px; }
  .pin { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 12px; box-shadow: 0 0 0 3px rgba(246, 201, 76, .3), 0 4px 10px rgba(0, 0, 0, .45); }
  /* on a narrow shot the HUD packs tighter: keep pin 3 inside the frame and pin 4 off the coin */
  .shot .pin:nth-of-type(3) { top: 11% !important; }
  .shot .pin:nth-of-type(4) { left: 77% !important; }
  .legend { grid-template-columns: 1fr; }
}

/* guardians: the signature picker */
.guardians {
  background:
    linear-gradient(180deg, var(--ground) 0, rgba(12, 27, 11, 0) 180px),
    radial-gradient(120% 80% at 75% 40%, #24481b 0%, var(--forest) 52%, var(--ground) 100%);
  overflow: hidden;
}
.g-layout { display: grid; grid-template-columns: minmax(280px, 440px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; margin-top: clamp(32px, 5vw, 56px); }
.stage { position: relative; aspect-ratio: 4 / 5; border-radius: 30px; overflow: hidden; background: var(--forest-2); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(246, 201, 76, .28); }
.stage video, .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.stage figure { margin: 0; position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); }
.stage figure.on { opacity: 1; }
.picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 520px; }
.pick {
  appearance: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--text);
  background: none; font: inherit; border-radius: 18px;
}
.pick span.face { display: block; aspect-ratio: 4 / 5; border-radius: 18px; background-size: cover; background-position: 50% 18%; box-shadow: 0 0 0 2px rgba(238, 240, 226, .14); filter: saturate(.55) brightness(.75); transition: filter .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease); }
.pick b { display: block; margin-top: 8px; font: 800 15px/1.2 "Rubik", sans-serif; opacity: .7; transition: opacity .2s; }
.pick:hover span.face { filter: saturate(.85) brightness(.92); transform: translateY(-3px); }
.pick[aria-selected="true"] span.face { filter: none; box-shadow: 0 0 0 3px var(--sun), 0 12px 26px -10px rgba(246, 201, 76, .6); transform: translateY(-3px); }
.pick[aria-selected="true"] b { opacity: 1; color: var(--sun); }
.g-panel { margin-top: 36px; max-width: 560px; }
.g-panel[hidden] { display: none; }
.g-panel h3 { font-size: clamp(2.6rem, 5.4vw, 4.2rem); color: #fff; }
.role { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--leaf); font-size: 18px; }
.g-panel > p { margin-top: 12px; font-size: 18px; color: var(--text-2); max-width: 44ch; }
.skills { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid var(--line); }
.skills li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--text-2); }
.skills b { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) { .g-panel:not([hidden]) { animation: rise .55s var(--ease) both; } }
@media (max-width: 860px) {
  .g-layout { grid-template-columns: 1fr; }
  .stage { max-width: 460px; width: 100%; margin: 0 auto; order: 2; }
  .g-side { display: contents; }
  .picker { order: 1; max-width: none; }
  .g-panels { order: 3; }
  .g-panel { margin-top: 0; }
  .skills li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 420px) { .pick b { font-size: 12.5px; } .picker { gap: 8px; } }

/* ways to play: a sunlit band */
.modes { background: var(--band); color: var(--band-ink); }
.modes h2 { color: var(--band-ink); }
.modes .intro { color: var(--band-ink-2); }
.modes a { color: #6b4d00; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); margin-top: clamp(36px, 5vw, 56px); }
.cols h3 { font-size: 26px; display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 2px solid var(--band-ink); }
.cols h3 svg { width: 30px; height: 30px; color: var(--moss); }
.ways { list-style: none; padding: 0; margin: 0; }
.ways li { display: grid; grid-template-columns: 40px 1fr; gap: 6px 14px; padding: 18px 0; border-bottom: 1px solid rgba(27, 48, 19, .16); }
.ways svg { width: 26px; height: 26px; color: var(--moss); margin-top: 2px; grid-row: span 2; }
.ways b { font-family: "Rubik", sans-serif; font-weight: 800; font-size: 19px; line-height: 1.25; }
.ways span { color: var(--band-ink-2); font-size: 16px; }
.note { margin-top: 30px; font-size: 15px; color: var(--band-ink-2); }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

/* streamers and the maker's note */
.creators { background: var(--ground); }
.c-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.c-list { list-style: none; padding: 0; margin: 30px 0 34px; }
.c-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; font-size: 18px; }
.c-list svg { width: 24px; height: 24px; flex: none; color: var(--leaf); margin-top: 3px; }
.mail { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 14px; font-weight: 600; text-decoration: none; color: var(--text); box-shadow: inset 0 0 0 1.5px rgba(238, 240, 226, .45); transition: box-shadow .2s, color .2s, background-color .2s; }
.mail:hover { color: var(--on-sun); background: var(--sun); box-shadow: none; }
.mail svg { width: 20px; height: 20px; }
.maker { position: relative; margin: 0; padding: 34px 32px 30px; border-radius: var(--radius); background: linear-gradient(160deg, #1d3d17, #12290f); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), inset 0 0 0 1px var(--line); }
.maker::before { content: ""; position: absolute; top: -22px; left: 28px; width: 46px; height: 46px; border-radius: 14px; background: url(icon.png) center/cover; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); }
.maker p { font-size: 17.5px; line-height: 1.65; color: var(--text); }
.maker p + p { margin-top: 14px; }
.maker footer { margin-top: 22px; font-weight: 600; color: var(--sun); }
.maker footer span { display: block; font-weight: 400; color: var(--text-2); font-size: 15px; }
@media (max-width: 860px) { .c-grid { grid-template-columns: 1fr; } .maker { margin-top: 18px; } }

/* close */
/* close: the call to download, then the four guardians lined up beneath it */
.close { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 0; text-align: center; overflow: hidden; }
.close > img {
  position: relative; z-index: -1; width: 100%; height: clamp(280px, 42vw, 760px); object-fit: cover; object-position: 50% 62%;
  margin-top: clamp(-48px, -3vw, -16px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 26%, #000 76%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 26%, #000 76%, transparent 100%);
}
.close h2 { font-size: clamp(2.6rem, 7vw, 5rem); color: #fff; }
.close p { margin: 14px auto 30px; color: var(--text-2); font-size: 18px; }
.close .stores { justify-content: center; }
@media (max-width: 760px) { .close .stores { max-width: 340px; margin: 0 auto; } }

/* footer */
.foot { background: var(--ground); border-top: 1px solid var(--line); padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); font-size: 15px; color: var(--text-2); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--sun-hi); text-decoration: underline; }

/* phone-only download bar once the hero buttons scroll away */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 18px;
  background: rgba(12, 27, 11, .86); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7), inset 0 0 0 1px var(--line);
  transform: translateY(140%); transition: transform .45s var(--ease);
}
.dock.show { transform: none; }
.dock .brand { font-size: 16px; }
.dock .brand img { width: 32px; height: 32px; }
.dock .brand small { display: block; font: 400 13px/1.2 "Onest", sans-serif; color: var(--text-2); }
.dock a.get { flex: none; padding: 11px 20px; border-radius: 12px; background: var(--sun); color: var(--on-sun); font: 800 16px/1 "Rubik", sans-serif; text-decoration: none; }
@media (max-width: 760px) { .dock { display: flex; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
