/* ==========================================================================
   FTLG Studios — ember-noir
   Near-black canvas, ember-amber for Gaming, cool cyan for Productivity.
   One palette, two temperatures, so the split reads before you read a word.
   ========================================================================== */

/* --- reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
/* The brand mark ships as <picture> for its WebP source. `contents` stops that
   wrapper generating a box, so the <img> keeps participating in its parent's
   layout directly — otherwise the hero mark's `margin: 0 auto` centres nothing
   and the topbar mark stops being a flex item. */
picture { display: contents; }

/* --- tokens --------------------------------------------------------------- */
:root {
  --ink:        #050404;
  --ink-2:      #0a0807;
  --ink-3:      #12100e;
  --ink-panel:  #100c0a;
  --hairline:   rgba(255, 236, 214, 0.10);
  --hairline-2: rgba(255, 236, 214, 0.18);

  --bone:       #f6efe7;
  --bone-2:     #cfc4b9;
  --bone-dim:   #9a8f85;

  --ember:      #ff8a2b;
  --ember-hot:  #ffc775;
  --ember-deep: #b8410a;

  --cool:       #56d2ff;
  --cool-hot:   #a9e9ff;
  --cool-deep:  #1d6f96;

  /* Per-section accent. Sections re-point these; everything else reads them. */
  --accent:     var(--ember);
  --accent-hot: var(--ember-hot);
  --accent-deep:var(--ember-deep);

  --display: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui,
             -apple-system, "Helvetica Neue", Arial, sans-serif;
  --text:    "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui,
             -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono:    ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --gut: clamp(20px, 5vw, 72px);
  --max: 1280px;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--text);
  font-size: clamp(15px, 0.55vw + 13px, 17px);
  line-height: 1.65;
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* --- ambient layers ------------------------------------------------------- */
/* Embers drift behind everything; grain sits on top of everything. Both are
   inert to pointer input so they never eat a click. */
#embers {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }   20% { transform: translate(-3%,2%); }
  40%     { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-2%); }
  80%     { transform: translate(3%,1%); }
}

.shell { position: relative; z-index: 1; }

/* --- header --------------------------------------------------------------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  display: flex; align-items: center; gap: 20px;
  padding: 14px var(--gut);
  background: linear-gradient(to bottom, rgba(5,4,4,0.92), rgba(5,4,4,0));
  transition: background .4s ease, backdrop-filter .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.topbar.stuck {
  background: rgba(6,5,4,0.86);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--hairline);
}
.topbar__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.topbar__mark { width: 26px; height: 26px; filter: drop-shadow(0 0 8px rgba(255,138,43,.55)); }
.topbar__name {
  font-family: var(--display); font-weight: 800;
  font-size: 15px; letter-spacing: .22em; text-transform: uppercase;
}
.topbar nav { display: flex; gap: 26px; }
.topbar nav a {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--bone-dim); padding: 6px 0; position: relative; transition: color .25s;
}
.topbar nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--accent); transition: right .3s ease;
}
.topbar nav a:hover { color: var(--bone); }
.topbar nav a:hover::after { right: 0; }
@media (max-width: 720px) { .topbar nav { display: none; } }

/* --- hero ----------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh;
  /* Two rows, cue in its own: reserving space for an absolutely-positioned cue
     only works while the hero is exactly one viewport tall. Once the content
     makes it taller — a short window, a long blurb — the cue sits at the bottom
     of the GROWN box and lands on the stat labels. In flow it cannot collide. */
  display: grid; grid-template-rows: 1fr auto; justify-items: center;
  align-items: center; text-align: center;
  row-gap: clamp(18px, 3.5vmin, 40px);
  padding: clamp(84px, 12vmin, 130px) var(--gut) clamp(22px, 3vmin, 34px);
  isolation: isolate;
}
.hero__bloom {
  position: absolute; z-index: -1; top: 50%; left: 50%;
  width: min(150vw, 1500px); aspect-ratio: 1; transform: translate(-50%,-56%);
  background: radial-gradient(circle,
      rgba(255,138,43,.17) 0%, rgba(184,65,10,.07) 28%, transparent 58%);
  filter: blur(28px);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { opacity: .75; transform: translate(-50%,-56%) scale(1); }
  50%     { opacity: 1;   transform: translate(-50%,-56%) scale(1.08); }
}
.hero__mark {
  /* vmin, not vw: a short-but-wide window is exactly where a vw-sized mark
     pushes the wordmark off the bottom of the fold. */
  width: clamp(112px, 21vmin, 300px); margin: 0 auto clamp(14px, 2.4vmin, 30px);
  filter: drop-shadow(0 0 34px rgba(255,138,43,.55))
          drop-shadow(0 0 90px rgba(184,65,10,.40));
  animation: markpulse 6s ease-in-out infinite;
}
@keyframes markpulse {
  0%,100% { transform: scale(1);     filter: drop-shadow(0 0 30px rgba(255,138,43,.50)) drop-shadow(0 0 80px rgba(184,65,10,.35)); }
  50%     { transform: scale(1.025); filter: drop-shadow(0 0 46px rgba(255,170,80,.70)) drop-shadow(0 0 120px rgba(184,65,10,.55)); }
}
.hero h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(2.1rem, 9.4vmin, 7rem); line-height: .9;
  letter-spacing: -0.02em; text-transform: uppercase;
  background: linear-gradient(178deg, #fff8f0 6%, #ffc775 42%, #ff8a2b 74%, #b8410a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 40px rgba(255,138,43,.28));
}
.hero__sub {
  margin-top: clamp(14px, 2vw, 22px);
  font-size: clamp(12px, 1.5vw, 15px); letter-spacing: clamp(.3em, .9vw, .62em);
  text-transform: uppercase; color: var(--ember-hot); font-weight: 600;
  padding-left: clamp(.3em,.9vw,.62em); /* optical: trailing letterspace */
}
.hero__line {
  width: min(560px, 82vw); height: 1px; margin: clamp(18px,3vmin,36px) auto;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  opacity: .55;
}
.hero__blurb {
  max-width: 62ch; margin: 0 auto; color: var(--bone-2);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}
.hero__stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(20px,5vw,64px);
  margin-top: clamp(24px, 4vmin, 52px);
}
.stat__n {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1; color: var(--ember-hot);
}
.stat__l {
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--bone-dim); margin-top: 8px;
}
.scrollcue {
  margin-top: clamp(20px, 4vmin, 42px);
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--bone-dim); display: grid; gap: 10px; justify-items: center;
}
/* On a short window the hero content already fills the fold; the cue is
   decoration and would only crowd the stat labels. */
@media (max-height: 720px) { .scrollcue { display: none; } }
.scrollcue span { display: block; width: 1px; height: 40px;
  background: linear-gradient(var(--ember), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%,100% { opacity:.3; transform: scaleY(.6); transform-origin: top; }
                 50%     { opacity:1;  transform: scaleY(1);   transform-origin: top; } }

/* --- section scaffolding -------------------------------------------------- */
.band { padding: clamp(80px, 12vw, 170px) 0; position: relative; }
.band--cool { --accent: var(--cool); --accent-hot: var(--cool-hot); --accent-deep: var(--cool-deep); }
.wrap { width: min(var(--max), calc(100% - 2 * var(--gut))); margin-inline: auto; }

.bandhead { margin-bottom: clamp(46px, 7vw, 88px); }
.bandhead__kicker {
  display: flex; align-items: center; gap: 16px;
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.bandhead__kicker::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent); opacity: .5;
}
.bandhead h2 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.4rem, 8vw, 6rem); line-height: .92; letter-spacing: -0.025em;
  margin-top: 14px;
  background: linear-gradient(180deg, var(--bone) 30%, color-mix(in srgb, var(--accent) 70%, #000));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bandhead p { margin-top: 18px; max-width: 60ch; color: var(--bone-2); }

/* --- project ------------------------------------------------------------- */
.proj { position: relative; margin-bottom: clamp(70px, 10vw, 150px); }
.proj:last-child { margin-bottom: 0; }

.proj__stage {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--ink-2);
  aspect-ratio: 21 / 9;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9);
}
@media (max-width: 780px) { .proj__stage { aspect-ratio: 4 / 3; border-radius: 14px; } }
/* Cinematic stages only — the product stage lays its screenshot out in normal
   flow inside .win, and an inherited `position:absolute` collapses it. */
.proj:not(.proj--product) .proj__stage img,
.proj:not(.proj--product) .proj__stage video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.03);
  transition: transform 1.1s cubic-bezier(.2,.7,.3,1), opacity .8s;
}
.proj:not(.proj--product):hover .proj__stage img,
.proj:not(.proj--product):hover .proj__stage video { transform: scale(1.07); }
.proj__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(5,4,4,.96) 2%, rgba(5,4,4,.55) 34%, rgba(5,4,4,.12) 62%, rgba(5,4,4,.5) 100%),
    radial-gradient(120% 90% at 15% 100%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%);
}
.proj__index {
  position: absolute; top: clamp(14px,2vw,26px); right: clamp(16px,2.4vw,32px);
  font-family: var(--display); font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255,236,214,.22);
  letter-spacing: -0.03em;
}
.proj__plate {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: clamp(18px, 3.4vw, 46px);
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px;
}
.proj__titlewrap { min-width: min(100%, 420px); }
.proj__title {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1.9rem, 5.2vw, 4rem); line-height: .95; letter-spacing: -0.025em;
  text-shadow: 0 2px 30px rgba(0,0,0,.75);
}
.proj__tag {
  margin-top: 8px; color: var(--accent-hot); font-weight: 600;
  font-size: clamp(.9rem, 1.6vw, 1.12rem); letter-spacing: .01em;
  text-shadow: 0 2px 18px rgba(0,0,0,.8);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.chip {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--hairline-2); background: rgba(8,6,5,.62);
  backdrop-filter: blur(8px); color: var(--bone-2);
}
.chip--live { border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent-hot); background: color-mix(in srgb, var(--accent) 14%, rgba(8,6,5,.62)); }

.proj__body {
  display: grid; gap: clamp(24px, 4vw, 56px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  padding: clamp(24px, 3.4vw, 44px) clamp(4px, 1vw, 14px) 0;
}
@media (max-width: 860px) { .proj__body { grid-template-columns: 1fr; } }
/* The feature list usually runs much longer than the blurb, which left a tall
   void beside it. Sticking the blurb keeps it beside whatever you're reading. */
.proj__desc {
  font-size: clamp(1rem, 1.5vw, 1.16rem); color: var(--bone-2);
  position: sticky; top: 96px; align-self: start;
}
@media (max-width: 860px) { .proj__desc { position: static; } }
.proj__desc strong { color: var(--bone); font-weight: 600; }
.proj__status {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hairline);
  font-size: .86em; line-height: 1.6; color: var(--bone-dim);
}
.proj__status::before {
  content: "Status"; display: block; margin-bottom: 5px;
  font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}

.feats { display: grid; gap: 12px; }
.feats li { display: flex; gap: 14px; align-items: flex-start; list-style: none; }
.feats li::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin-top: .62em;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.feats b { color: var(--bone); font-weight: 600; }
.feats span { color: var(--bone-dim); }

/* --- product stage -------------------------------------------------------- */
/* Games get a full-bleed cinematic plate. Software does not: a UI screenshot
   stretched behind a headline is just noise under text. Here the screenshot is
   presented as a screenshot — framed, upright, legible — and the copy sits
   beside it on clean black. */
.proj--product .proj__stage {
  aspect-ratio: auto; display: grid; align-items: center;
  gap: clamp(22px, 3.6vw, 52px); padding: clamp(24px, 3.6vw, 56px);
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  background:
    radial-gradient(120% 130% at 8% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 58%),
    linear-gradient(160deg, var(--ink-3), var(--ink-2) 60%);
}
@media (max-width: 900px) {
  .proj--product .proj__stage { grid-template-columns: 1fr; }
}
/* Top-right is where the window sits on a product stage, so the index moves to
   the opposite corner rather than hiding behind the screenshot. */
.proj--product .proj__index {
  top: clamp(12px, 1.8vw, 20px); left: clamp(22px, 3.4vw, 52px); right: auto;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
}
.prod__copy .proj__title { text-shadow: none; }
.prod__copy .proj__tag { text-shadow: none; }
.prod__copy .chips { margin-left: 0; margin-top: 18px; }

/* A minimal window chrome — enough to read as "an application", not a mockup
   of a specific vendor's browser. */
.win {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--hairline-2);
  background: var(--ink);
  box-shadow: 0 34px 80px -24px rgba(0,0,0,.95),
              0 0 0 1px rgba(0,0,0,.5),
              0 0 70px -30px color-mix(in srgb, var(--accent) 60%, transparent);
  transform: perspective(1600px) rotateY(-3deg) rotateX(1.4deg);
  transition: transform .8s cubic-bezier(.2,.7,.3,1);
}
.proj--product:hover .win { transform: perspective(1600px) rotateY(0deg) rotateX(0deg); }
@media (max-width: 900px) { .win, .proj--product:hover .win { transform: none; } }
.win__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 12px; background: rgba(255,255,255,.035);
  border-bottom: 1px solid var(--hairline);
}
.win__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.16); }
.win__bar b {
  margin-left: 8px; font-weight: 500; font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--bone-dim);
}
.win img { width: 100%; height: auto; display: block; }

/* --- gallery -------------------------------------------------------------- */
.shots {
  display: grid; gap: 12px; margin-top: clamp(22px, 3vw, 38px);
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.shot {
  position: relative; overflow: hidden; border-radius: 11px;
  border: 1px solid var(--hairline); background: var(--ink-2);
  aspect-ratio: 16 / 10; cursor: zoom-in;
}
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1), filter .4s; }
.shot:hover img, .shot:hover video { transform: scale(1.08); filter: brightness(1.12); }
.shot__cap {
  position: absolute; inset: auto 0 0 0; padding: 22px 12px 9px;
  font-size: 11px; letter-spacing: .04em; color: var(--bone-2);
  background: linear-gradient(to top, rgba(5,4,4,.95), transparent);
}
.shot__play {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.shot__play::after {
  content: ""; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(6,5,4,.6); backdrop-filter: blur(6px);
  border: 1px solid var(--hairline-2);
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 45%, transparent);
  background-image: linear-gradient(transparent, transparent);
  clip-path: none;
}
.shot__play svg { position: absolute; width: 15px; height: 15px; margin-left: 3px; fill: var(--bone); }

/* --- lightbox ------------------------------------------------------------- */
.lb {
  position: fixed; inset: 0; z-index: 100; display: none;
  place-items: center; padding: clamp(16px, 4vw, 56px);
  background: rgba(3,2,2,.93); backdrop-filter: blur(18px);
}
.lb[open], .lb.on { display: grid; }
.lb figure { max-width: min(1400px, 96vw); max-height: 88vh; display: grid; gap: 14px; }
.lb img, .lb video {
  max-width: 100%; max-height: 78vh; width: auto; height: auto; margin-inline: auto;
  border-radius: 12px; border: 1px solid var(--hairline-2);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.95);
}
.lb figcaption { text-align: center; color: var(--bone-dim); font-size: 13px; }
.lb__x {
  position: fixed; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--hairline-2); background: rgba(10,8,7,.7);
  display: grid; place-items: center; font-size: 20px; color: var(--bone);
}
.lb__x:hover { border-color: var(--ember); color: var(--ember-hot); }

/* --- footer --------------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--hairline); margin-top: clamp(60px, 9vw, 120px);
  padding: clamp(44px, 7vw, 80px) 0 46px; text-align: center;
}
.foot__mark { width: 62px; margin: 0 auto 20px; opacity: .85;
  filter: drop-shadow(0 0 20px rgba(255,138,43,.5)); }
.foot__name {
  font-family: var(--display); font-weight: 800; letter-spacing: .26em;
  text-transform: uppercase; font-size: 14px;
}
.foot__tag { color: var(--ember); font-size: 11px; letter-spacing: .3em;
  text-transform: uppercase; margin-top: 10px; }
.foot__meta { color: var(--bone-dim); font-size: 12px; margin-top: 26px; }

/* --- reveal --------------------------------------------------------------- */
/* Scoped to .js, which site.js sets on <html> before anything else can fail.
   Without scripting the content is simply visible — a scroll animation must
   never be the reason a page renders blank. */
.js .rv { opacity: 0; transform: translateY(26px); filter: blur(6px);
  transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1), filter .9s; }
.js .rv.in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; }
  .rv { opacity: 1; transform: none; filter: none; }
  #embers { display: none; }
}
