/* =============================================================
   Runtime Lightmap Baker — landing page
   Dark, cinematic. Green = primary accent, amber = secondary.
   ============================================================= */

/* ---------- Tokens ---------- */
:root{
  --bg-0:#0B0D0E;
  --bg-1:#121618;
  --bg-2:#171C1F;
  --panel:#1A1F22;

  --line:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.16);

  --text:#F2F5F4;
  --text-dim:#9AA5A4;
  --text-faint: #7A8482;

  --green:#45C64A;
  --green-bright:#5CE05F;
  --green-deep:#2E8A31;

  --amber:#FF8A1F;
  --amber-deep:#C96A12;

  --radius:14px;
  --maxw:1180px;

  /* layout scale */
  --topbar-h:68px;
  --pad-x:clamp(18px,4vw,40px);
  --sp-1:6px;
  --sp-2:12px;
  --sp-3:18px;
  --sp-4:26px;
  --sp-5:38px;
  --sp-6:56px;
  --sp-7:84px;
  --section-y:clamp(88px,11vw,120px);

  --font-display:'Anton','Arial Narrow',sans-serif;
  --font-body:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --ease:cubic-bezier(.22,.61,.36,1);

  color-scheme:dark;
}

/* ---------- Reset / base ---------- */
*,*::before,*::after{box-sizing:border-box}

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}

html,body{
  margin:0;
  padding:0;
  overflow-x:hidden;
}

body{
  min-height:100%;
  font-family:var(--font-body);
  font-size:17px;
  font-weight:400;
  line-height:1.65;
  color:var(--text);
  background-color:var(--bg-0);
  /* The page gradient lives on a composited fixed layer (body::before) instead
     of background-attachment:fixed, which forces a full-viewport repaint on
     every scroll frame (Chrome: kHasBackgroundAttachmentFixedObjects). */
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(180deg,var(--bg-0) 0%,var(--bg-1) 44%,var(--bg-0) 100%);
}

img,picture,svg{display:block;max-width:100%}
img{height:auto}

h1,h2,h3{
  font-family:var(--font-display);
  font-weight:400;
  text-transform:uppercase;
  letter-spacing:.6px;
  line-height:1.02;
  margin:0;
}

p{margin:0}
ul{margin:0;padding:0;list-style:none}

a{color:var(--green);text-decoration:none}
a:hover{color:var(--green-bright)}

button{font:inherit;color:inherit}

:focus-visible{
  outline:2px solid var(--green-bright);
  outline-offset:3px;
  border-radius:4px;
}

::selection{background:var(--green-deep);color:#fff}

/* anchor targets clear the fixed topbar */
[id]{scroll-margin-top:calc(var(--topbar-h) + 24px)}

.wrap{
  width:100%;
  max-width:var(--maxw);
  margin-inline:auto;
  padding-inline:var(--pad-x);
}

.skip-link{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:200;
  padding:12px 18px;
  background:var(--green);
  color:var(--bg-0);
  font-weight:700;
}
.skip-link:focus{left:12px;top:12px}

/* =============================================================
   Buttons
   ============================================================= */
.btn{
  --btn-py:13px;
  --btn-px:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:var(--btn-py) var(--btn-px);
  border:1px solid transparent;
  border-radius:10px;
  font-family:var(--font-body);
  font-weight:700;
  font-size:.86rem;
  letter-spacing:.9px;
  text-transform:uppercase;
  text-align:center;
  white-space:nowrap;
  cursor:pointer;
  transition:transform .22s var(--ease),background-color .22s var(--ease),
             box-shadow .22s var(--ease),border-color .22s var(--ease),color .22s var(--ease);
}

.btn--primary{
  background:var(--green);
  color:var(--bg-0);
  box-shadow:0 6px 22px -8px rgba(69,198,74,.65),0 0 0 1px rgba(92,224,95,.22) inset;
}
.btn--primary:hover{
  background:var(--green-bright);
  color:var(--bg-0);
  transform:translateY(-2px);
  box-shadow:0 12px 30px -10px rgba(92,224,95,.75),0 0 0 1px rgba(92,224,95,.35) inset;
}
.btn--primary:active{transform:translateY(0)}

.btn--ghost{
  background:rgba(255,255,255,.02);
  border-color:var(--line-strong);
  color:var(--text);
}
.btn--ghost:hover{
  color:var(--text);
  border-color:rgba(69,198,74,.55);
  background:rgba(69,198,74,.08);
  transform:translateY(-2px);
}
.btn--ghost:active{transform:translateY(0)}

.btn--sm{--btn-py:10px;--btn-px:16px;font-size:.76rem;letter-spacing:.8px;border-radius:9px}
.btn--lg{--btn-py:17px;--btn-px:30px;font-size:.92rem}

/* a span that only looks like a button (its parent <a> is the link) */
.btn--static{pointer-events:none}

/* =============================================================
   Topbar
   ============================================================= */
.topbar{
  position:fixed;
  inset:0 0 auto 0;
  z-index:100;
  height:var(--topbar-h);
  background:rgba(11,13,14,.55);
  border-bottom:1px solid transparent;
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  transition:background-color .3s var(--ease),border-color .3s var(--ease);
}
.topbar.is-scrolled{
  background:rgba(11,13,14,.92);
  border-bottom-color:var(--line);
  /* At 92% opacity the blur is invisible, but it would still re-read and
     re-blur the strip on every scroll frame. Drop it in the scrolled state. */
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}

.topbar__inner{
  height:100%;
  max-width:var(--maxw);
  margin-inline:auto;
  padding-inline:var(--pad-x);
  display:flex;
  align-items:center;
  gap:var(--sp-4);
}

.brand{
  display:flex;
  align-items:center;
  gap:11px;
  color:var(--text);
  min-width:0;
}
.brand:hover{color:var(--text)}
.brand__mark{
  border-radius:8px;
  flex:none;
  box-shadow:0 0 0 1px var(--line-strong);
}
.brand__name{
  font-family:var(--font-display);
  text-transform:uppercase;
  font-size:19px;
  letter-spacing:.8px;
  line-height:1;
  white-space:nowrap;
}

.nav{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:clamp(14px,2.2vw,30px);
}
.nav a{
  color:var(--text-dim);
  font-size:.9rem;
  font-weight:500;
  letter-spacing:.2px;
  padding:6px 2px;
  position:relative;
  transition:color .2s var(--ease);
}
.nav a::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:2px;
  background:var(--green);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .25s var(--ease);
}
.nav a:hover{color:var(--text)}
.nav a:hover::after{transform:scaleX(1)}

/* the nav's auto margin pushes both the nav and the CTA right; when the nav
   is hidden the CTA takes over that job (see the 860px block below) */
.topbar__cta{flex:none}

@media (max-width:860px){
  .nav{display:none}
  .topbar__cta{margin-left:auto}
}
@media (max-width:560px){
  .brand__name{display:none}
  .topbar__cta{font-size:.7rem;--btn-px:13px}
  /* "Get it on the Unity Asset Store" is too long for a phone topbar and the
     button is nowrap, so drop the lead-in and keep the part that matters. */
  .topbar__cta .btn__long{display:none}
}

/* =============================================================
   Hero
   ============================================================= */
.hero{
  position:relative;
  isolation:isolate;
  min-height:100vh;
  min-height:100svh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding-top:calc(var(--topbar-h) + clamp(40px,7vh,80px));
  padding-bottom:clamp(150px,19vh,200px);
  overflow:hidden;
  text-align:center;
}

/* Full-bleed scene backdrop.
   Stacking inside .hero (which is isolate + overflow:hidden):
     -3 photo   ->   -2 scrim   ->   -1 brand glow   ->   content
   The asset is tone-mapped rather than merely darkened: midtones are lifted
   (exposure 1.40) and highlights roll off toward a 0.36 ceiling instead of
   clipping to white. That is what lets the scene be bright while its PEAK
   luminance stays low enough for the type to survive - a flat darken cannot do
   both. Measured peak is 0.366, so the 0.57 plateau keeps the worst case at
   ~4.6:1 against --text across the content column, and the 0.06 edge leaves the
   scene almost unobscured where no text sits.
   Retuning: EXPO/PEAK live in the generator, the falloff in the stops below.
   Change either and the contrast numbers need rechecking. */
.hero__bg{
  position:absolute;
  inset:0;
  z-index:-3;
  display:block;
  pointer-events:none;
}
.hero__bg img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 40%;
}

.hero__scrim{
  position:absolute;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background:
    /* fade the foot of the hero into the page so the section seam vanishes */
    linear-gradient(180deg,
      transparent 52%,
      rgba(11,13,14,.86) 88%,
      var(--bg-0) 100%),
    /* A wide plateau holds ~.75 across the whole content column so body text
       clears 4.5:1, then falls away quickly so the scene reads at the edges. */
    radial-gradient(95% 80% at 50% 40%,
      rgba(11,13,14,.60) 0%,
      rgba(11,13,14,.57) 62%,
      rgba(11,13,14,.30) 85%,
      rgba(11,13,14,.06) 100%);
}

.hero__glow{
  position:absolute;
  inset:-20% -10% 0 -10%;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(58% 46% at 50% 30%,rgba(69,198,74,.11),transparent 70%),
    radial-gradient(46% 40% at 82% 78%,rgba(255,138,31,.07),transparent 72%),
    radial-gradient(70% 55% at 12% 88%,rgba(69,198,74,.05),transparent 75%);
}

.hero__inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:var(--sp-4);
}

.hero__icon{
  width:132px;
  height:132px;
  border-radius:26px;
  box-shadow:
    0 0 0 1px rgba(69,198,74,.34),
    0 0 0 6px rgba(69,198,74,.07),
    0 30px 60px -22px rgba(0,0,0,.9);
}

.hero__title{
  font-size:clamp(2.6rem,7vw,5.4rem);
  line-height:.95;
  letter-spacing:1px;
  max-width:14ch;
  margin-top:var(--sp-1);
  background:linear-gradient(180deg,#FFFFFF 12%,#C9D2D0 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hero__sub{
  color:var(--text-dim);
  font-size:clamp(1rem,1.9vw,1.22rem);
  max-width:36ch;
  text-wrap:balance;
}

/* Compatibility line. .hero__inner is a flex column with gap:var(--sp-4);
   the negative margin pulls this up so it reads as a second line of the
   subline rather than a separate block. */
.hero__compat{
  margin-top:calc(var(--sp-4) * -0.62);
  color:var(--text-dim);
  font-size:clamp(.9rem,1.5vw,1.02rem);
  letter-spacing:.2px;
  text-wrap:balance;
}
.hero__compat strong{
  color:var(--text);
  font-weight:700;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-top:var(--sp-1);
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:8px 16px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.025);
  color:var(--text-dim);
  font-size:.83rem;
  font-weight:500;
  letter-spacing:.2px;
  white-space:nowrap;
}
.chip__dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 10px rgba(69,198,74,.85);
  flex:none;
}

.hero__actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
  margin-top:var(--sp-3);
}

/* "Get it on the Unity Asset Store" is wider than a small phone, and .btn is
   nowrap — without this the primary CTA is silently clipped by the page's
   overflow-x:hidden rather than wrapping. Stack them full-width instead. */
@media (max-width:560px){
  .hero__actions{
    width:100%;
    flex-direction:column;
    align-items:stretch;
  }
  .hero__actions .btn{
    width:100%;
    white-space:normal;
    line-height:1.3;
    --btn-px:16px;
  }
}

/* scroll cue — sits clear of the diagonal edge below it */
.scrollcue{
  position:absolute;
  left:50%;
  bottom:clamp(64px,8vh,96px);
  transform:translateX(-50%);
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  color:var(--text-faint);
  transition:color .25s var(--ease);
}
.scrollcue:hover{color:var(--green)}
.scrollcue__line{
  width:1px;
  height:38px;
  background:linear-gradient(180deg,transparent,var(--line-strong));
}
.scrollcue__chev{animation:cue 2.4s var(--ease) infinite}

@keyframes cue{
  0%,100%{transform:translateY(0);opacity:.55}
  50%{transform:translateY(6px);opacity:1}
}

/* no room for the cue on short viewports (landscape phones) */
@media (max-height:640px){
  .scrollcue{display:none}
}

/* diagonal brand motif: green hairline slash closing the hero */
.hero__edge{
  position:absolute;
  left:0;right:0;bottom:-1px;
  height:clamp(56px,8vw,132px);
  z-index:1;
  pointer-events:none;
}
.hero__edge::before,
.hero__edge::after{
  content:"";
  position:absolute;
  left:0;right:0;
  clip-path:polygon(0 100%,100% 0,100% 100%);
}
.hero__edge::before{
  top:0;bottom:0;
  background:var(--green);
  opacity:.85;
  /* fade the hairline out at both ends so it reads as a cut, not a laser */
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 16%,#000 84%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0%,#000 16%,#000 84%,transparent 100%);
}
.hero__edge::after{
  top:2px;bottom:-8px;
  background:var(--bg-0);
}

/* =============================================================
   Sections & headings
   ============================================================= */
.section{
  position:relative;
  padding-block:var(--section-y);
}

.sechead{
  max-width:62ch;
  margin-bottom:clamp(34px,5vw,54px);
}
.eyebrow{
  font-size:.72rem;
  font-weight:600;
  letter-spacing:2.4px;
  text-transform:uppercase;
  color:var(--text-faint);
  margin-bottom:var(--sp-2);
}
.sechead__title{
  font-size:clamp(1.9rem,4.2vw,3.1rem);
  letter-spacing:.8px;
}
.rule{
  display:block;
  width:64px;
  height:3px;
  border-radius:2px;
  margin-top:18px;
  background:linear-gradient(90deg,var(--amber),var(--amber-deep));
}
.sechead__sub{
  color:var(--text-dim);
  margin-top:18px;
  font-size:1.02rem;
  max-width:56ch;
}

.note{
  margin-top:var(--sp-4);
  color:var(--text-faint);
  font-size:.87rem;
  max-width:60ch;
}

/* =============================================================
   YouTube facade (click-to-load)
   ============================================================= */
.yt-box{
  position:relative;
  aspect-ratio:16/9;
  width:100%;
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--bg-2);
  border:1px solid var(--line);
}
.yt-box--wide{
  box-shadow:0 40px 90px -46px rgba(0,0,0,.95),0 0 0 1px rgba(255,255,255,.03);
}

.yt-facade{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:0;
  margin:0;
  border:0;
  background:var(--bg-2);
  cursor:pointer;
  display:block;
}
.yt-facade:focus-visible{outline-offset:-3px}

.yt-facade__thumb{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s var(--ease),filter .35s var(--ease);
}
.yt-facade__scrim{
  position:absolute;
  inset:0;
  background:
    radial-gradient(60% 60% at 50% 50%,rgba(0,0,0,.18),rgba(0,0,0,.5) 100%),
    linear-gradient(180deg,rgba(11,13,14,.05),rgba(11,13,14,.65));
  transition:opacity .35s var(--ease);
}

.yt-facade__play{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:88px;
  height:88px;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:var(--bg-0);
  background:var(--green);
  box-shadow:0 0 0 1px rgba(92,224,95,.5),0 14px 40px -12px rgba(69,198,74,.8);
  transition:transform .3s var(--ease),background-color .3s var(--ease);
}
.yt-facade__play svg{margin-left:4px}

.yt-facade__hint{
  position:absolute;
  left:18px;
  bottom:16px;
  font-size:.72rem;
  font-weight:600;
  letter-spacing:1.6px;
  text-transform:uppercase;
  color:var(--text-dim);
}

.yt-facade:hover .yt-facade__thumb{transform:scale(1.035)}
.yt-facade:hover .yt-facade__scrim{opacity:.72}
.yt-facade:hover .yt-facade__play{
  transform:translate(-50%,-50%) scale(1.07);
  background:var(--green-bright);
}

.yt-box iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  display:block;
}

@media (max-width:640px){
  .yt-facade__play{width:66px;height:66px}
  .yt-facade__play svg{width:26px;height:26px}
  .yt-facade__hint{display:none}
}

/* =============================================================
   Demo section
   ============================================================= */
.section--demo{
  position:relative;
  isolation:isolate;
  overflow:hidden;
}
.demo__glow{
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(52% 48% at 78% 26%,rgba(69,198,74,.10),transparent 72%),
    radial-gradient(46% 44% at 14% 82%,rgba(255,138,31,.06),transparent 74%);
}

.demo-card{
  position:relative;
  display:block;
  border-radius:calc(var(--radius) + 6px);
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--bg-2);
  box-shadow:0 50px 110px -52px rgba(0,0,0,.95);
  transition:border-color .3s var(--ease),box-shadow .3s var(--ease),transform .3s var(--ease);
}
.demo-card:hover{
  border-color:rgba(69,198,74,.4);
  box-shadow:0 60px 120px -50px rgba(0,0,0,1),0 0 46px -20px rgba(69,198,74,.4);
}

.demo-card__img{
  width:100%;
  height:auto;
  display:block;
  transition:transform .6s var(--ease);
}
.demo-card__scrim{
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(11,13,14,.34) 0%,rgba(11,13,14,.62) 55%,rgba(11,13,14,.86) 100%);
  transition:opacity .35s var(--ease);
}
.demo-card__cta{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:var(--sp-4);
}
.demo-card:hover .demo-card__img{transform:scale(1.03)}
.demo-card:hover .demo-card__scrim{opacity:.78}
.demo-card:hover .btn--static{
  background:var(--green-bright);
  transform:translateY(-2px);
  box-shadow:0 14px 34px -10px rgba(92,224,95,.8);
}
.demo-card:focus-visible{outline-offset:4px}

@media (max-width:560px){
  .demo-card .btn--lg{--btn-py:14px;--btn-px:18px;font-size:.76rem;white-space:normal}
}

/* =============================================================
   Cards / grid
   ============================================================= */
.grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(20px,2.6vw,32px);
}
@media (max-width:860px){
  .grid-2{grid-template-columns:minmax(0,1fr)}
}

.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:clamp(20px,2.4vw,28px);
  transition:border-color .3s var(--ease),transform .3s var(--ease);
}
.card:hover{border-color:var(--line-strong)}
.card__title{
  font-size:1.24rem;
  letter-spacing:.7px;
  margin-bottom:var(--sp-3);
}
.card__text{
  color:var(--text-dim);
  font-size:.94rem;
  margin-top:var(--sp-3);
}

/* =============================================================
   Footer
   ============================================================= */
.footer{
  position:relative;
  border-top:1px solid var(--line);
  padding-block:clamp(52px,7vw,78px);
  background:linear-gradient(180deg,rgba(255,255,255,.014),transparent 60%);
}
.footer__grid{
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr;
  gap:clamp(28px,4vw,54px);
  align-items:start;
}
@media (max-width:760px){
  .footer__grid{grid-template-columns:minmax(0,1fr);gap:34px}
}

.brand--footer .brand__name{
  display:inline;
  font-size:20px;
}
.footer__copy{
  margin-top:var(--sp-3);
  color:var(--text-faint);
  font-size:.85rem;
}
.footer__heading{
  font-size:.98rem;
  letter-spacing:1.4px;
  color:var(--text);
  margin-bottom:var(--sp-3);
}
.footer__list li + li{margin-top:8px}
.footer__list a{
  font-size:.94rem;
  color:var(--green);
  word-break:break-word;
}
.footer__list a:hover{text-decoration:underline;text-underline-offset:3px}

/* =============================================================
   Scroll reveal
   Only engages when JS can actually run and motion is welcome —
   so a no-JS visitor still sees everything.
   ============================================================= */
@media (prefers-reduced-motion:no-preference){
  .js-reveal .reveal{
    opacity:0;
    transform:translateY(18px);
    transition:opacity .7s var(--ease),transform .7s var(--ease);
    will-change:opacity,transform;
  }
  .js-reveal .reveal.is-visible{
    opacity:1;
    transform:none;
    will-change:auto;      /* release the compositor layer once revealed */
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
  .scrollcue__chev{animation:none}
  .btn:hover,.demo-card:hover .demo-card__img,
  .yt-facade:hover .yt-facade__thumb,
  .yt-facade:hover .yt-facade__play{transform:none}
  .demo-card:hover .btn--static{transform:none}
  .yt-facade:hover .yt-facade__play{transform:translate(-50%,-50%)}
}

/* ---------- Very wide screens ---------- */
@media (min-width:1700px){
  /* Scale the ROOT: every size on the page is rem-based, so body{font-size}
     would not move any of it. */
  :root{--maxw:1320px; font-size:18px}
}
