/* ===============================================================
   its everyday bro secret service panel — download page
   Theme: cool blue-grey application UI with an animated teal
   title bar, layered panels and thin borders.
   Layout: single column, max 1120px.
   =============================================================== */

/* --- Tokens ---------------------------------------------------- */

:root {
  color-scheme: light;

  /* Canvas and surfaces */
  --canvas:       #d2dde5;
  --canvas-top:   #dce5ec;   /* top of the page — also the selected tab */
  --surface:      #ffffff;
  --surface-head: #eef3f6;   /* panel header strips */

  /* Lines */
  --line:         #c1ced8;
  --line-soft:    #dde5eb;

  /* Text */
  --text:         #13212b;
  --text-2:       #3f505c;
  --text-3:       #536575;

  /* Teal accent */
  --teal-050:     #e5f5f3;
  --teal-100:     #c6e9e4;
  --teal-300:     #7bcfc7;
  --teal-400:     #3fb2aa;
  --teal-500:     #1f958f;
  --teal-600:     #167b78;
  --teal-700:     #0e6160;

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

  --wrap:  1120px;
  --bar-h: 56px;
  --r:     8px;   /* panels */
  --r-sm:  6px;   /* buttons, tabs */

  --ease:     cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --shadow-2: 0 1px 2px rgba(17, 42, 58, .06), 0 10px 26px -14px rgba(17, 42, 58, .26);
  --shadow-3: 0 1px 2px rgba(17, 42, 58, .07), 0 18px 40px -20px rgba(17, 42, 58, .36), 0 44px 90px -48px rgba(17, 42, 58, .38);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: linear-gradient(180deg, var(--canvas-top) 0, var(--canvas) 520px) var(--canvas);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 20px);
  scrollbar-color: #a3b4c0 transparent;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(63, 178, 170, .28); }

a { color: inherit; text-decoration: none; }

h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }

svg { flex: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 32px;
}

/* --- Backdrop -------------------------------------------------- */
/* Soft colour washes that drift very slowly, plus a fine grain —
   the same idea as a desktop "mica" window material. */

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: -5vmax;   /* just enough margin for the drift below */
  z-index: -2;
  background:
    radial-gradient(34vmax 22vmax at 86% 16%, rgba(88, 196, 186, .30), transparent 70%),
    radial-gradient(38vmax 26vmax at 6% 44%, rgba(118, 154, 194, .24), transparent 70%),
    radial-gradient(48vmax 30vmax at 58% 98%, rgba(146, 176, 198, .40), transparent 72%);
  animation: backdrop-drift 46s ease-in-out infinite alternate;
}

body::after {
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .14 0 0 0 0 .18 0 0 0 .16 -.04'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

@keyframes backdrop-drift {
  0%   { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  50%  { transform: translate3d(1.5%, 1%, 0) scale(1.03); }
  100% { transform: translate3d(-.5%, 2%, 0) scale(1.015); }
}

/* --- Dot field --------------------------------------------------- */
/* Hangs from the title bar and dissolves down the page. It sits behind all
   content (negative z-index) and the mask is a long, eased ramp so there is
   never a visible edge. */

.site { position: relative; }

.dotfield {
  position: absolute;
  z-index: -1;
  top: var(--bar-h);
  left: 0;
  right: 0;
  height: clamp(380px, 68vh, 680px);
  pointer-events: none;
  background-image: radial-gradient(rgba(44, 78, 98, .26) 1px, transparent 1.5px);
  background-size: 16px 16px;
  background-position: 8px 8px;
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%, rgba(0, 0, 0, .86) 14%, rgba(0, 0, 0, .64) 30%, rgba(0, 0, 0, .40) 48%,
    rgba(0, 0, 0, .20) 66%, rgba(0, 0, 0, .07) 84%, transparent 100%);
          mask-image: linear-gradient(to bottom,
    #000 0%, rgba(0, 0, 0, .86) 14%, rgba(0, 0, 0, .64) 30%, rgba(0, 0, 0, .40) 48%,
    rgba(0, 0, 0, .20) 66%, rgba(0, 0, 0, .07) 84%, transparent 100%);
}

/* --- Brand mark ------------------------------------------------ */
/* The Team Fortress 2 emblem, pure white on transparent. */

.mark {
  width: 18px;
  height: 18px;
  flex: none;
  background: url("assets/tf2-logo.png") center / contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(6, 22, 30, .32));
}

/* App icon tile that holds the mark */
.app-icon {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(155deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, .07));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24), 0 1px 2px rgba(6, 22, 30, .28);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
}

/* --- Title bar ------------------------------------------------- */

/* Shared animated gradient: used by the header and the mobile notice */
.titlebar-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(90deg, #2c4556 0%, #2b5163 42%, #2f6e78 66%, #43a09c 86%, #66c7c1 100%);
}
.titlebar-bg::before,
.titlebar-bg::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
}
/* Base gradient — slides slowly so the teal end breathes */
.titlebar-bg::before {
  left: -14%;
  width: 128%;
  /* the bright teal is kept to the right edge so white labels stay legible */
  background: linear-gradient(90deg,
    #2c4556 0%, #2b4c5e 26%, #2b5466 44%, #2c5f6e 60%,
    #307079 72%, #3b8f92 82%, #56b4ad 92%, #6ccac4 100%);
  animation: titlebar-drift 20s ease-in-out infinite alternate;
}
/* Misty light along the top edge, like the reference title bar */
.titlebar-bg::after {
  left: -20%;
  right: -20%;
  background:
    radial-gradient(34% 120% at 30% -40%, rgba(214, 228, 236, .34), transparent 70%),
    radial-gradient(26% 150% at 80% -50%, rgba(178, 240, 228, .36), transparent 70%),
    linear-gradient(180deg, rgba(222, 234, 242, .14), transparent 62%);
  animation: titlebar-mist 14s ease-in-out infinite alternate;
}

/* Turquoise glow pinned to the right edge (in px, so it never reaches
   the tab labels on narrower windows) */
.header::after,
.mobile-gate__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(300px 170% at 100% 30%,
    rgba(126, 216, 205, .62) 0%, rgba(126, 216, 205, .24) 45%, rgba(126, 216, 205, 0) 78%);
  animation: titlebar-glow 11s ease-in-out infinite alternate;
}

@keyframes titlebar-glow {
  from { opacity: .7; }
  to   { opacity: 1; }
}

@keyframes titlebar-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(10.5%, 0, 0); }
}
@keyframes titlebar-mist {
  from { transform: translate3d(-5%, 0, 0); opacity: .7; }
  to   { transform: translate3d(5%, 0, 0);  opacity: 1; }
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--bar-h);
  color: #fff;
  transition: box-shadow .3s var(--ease);
}
.header.is-scrolled {
  box-shadow: 0 1px 0 rgba(10, 28, 38, .22), 0 12px 28px -16px rgba(10, 28, 38, .6);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-right: 22px;
  border-right: 1px solid rgba(255, 255, 255, .16);
  border-radius: 2px;
}
.brand:hover .app-icon {
  background-color: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34), 0 1px 3px rgba(6, 22, 30, .32);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }

.brand__name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .005em;
  text-shadow: 0 1px 1px rgba(6, 22, 30, .2);
}

.brand__sub {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}

/* Section tabs — the selected one is drawn by .tabs__indicator,
   which slides between tabs and opens into the page below. */
.tabs {
  position: relative;
  align-self: flex-end;
  display: flex;
  gap: 2px;
  height: 44px;
}

.tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 1px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 1px 1px rgba(6, 22, 30, .25);
  transition: color .3s var(--ease), background-color .25s var(--ease);
}

.tab__icon {
  width: 15px;
  height: 15px;
  opacity: .78;
  transition: opacity .25s var(--ease), color .3s var(--ease);
}

.tab:hover { color: #fff; background-color: rgba(255, 255, 255, .11); }
.tab:hover .tab__icon { opacity: 1; }

.tab[aria-current] {
  color: var(--text);
  text-shadow: none;
  background-color: transparent;
}
.tab[aria-current] .tab__icon { color: var(--teal-500); opacity: 1; }

.tabs__indicator {
  position: absolute;
  z-index: 0;
  left: 0;
  bottom: 0;
  width: 0;
  height: 100%;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: var(--canvas-top);
  box-shadow: inset 0 2px 0 var(--teal-400);
  opacity: 0;
  transition: transform .5s var(--ease-out), width .5s var(--ease-out), opacity .3s var(--ease);
}
.tabs.is-ready .tabs__indicator { opacity: 1; }

/* Small inverted corners where the tab meets the page */
.tabs__indicator::before,
.tabs__indicator::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 8px;
}
.tabs__indicator::before {
  left: -8px;
  background: radial-gradient(circle at 0 0, transparent 7.5px, var(--canvas-top) 8px);
}
.tabs__indicator::after {
  right: -8px;
  background: radial-gradient(circle at 100% 0, transparent 7.5px, var(--canvas-top) 8px);
}

/* --- Hero ------------------------------------------------------ */

.hero {
  padding-top: 36px;
  overflow-x: clip;   /* the ambient light below reaches past the column; never let it scroll sideways */
}

.hero > .wrap { position: relative; }

/* Ambient light pooled behind the main window */
.hero > .wrap::before {
  content: "";
  position: absolute;
  inset: -6% -10% -22% -10%;
  z-index: 0;
  pointer-events: none;
  /* each ellipse fades out inside this box, so no edge is ever visible */
  background:
    radial-gradient(28% 42% at 30% 52%, rgba(46, 182, 170, .36) 0%, rgba(46, 182, 170, .16) 45%, rgba(46, 182, 170, 0) 100%),
    radial-gradient(26% 42% at 72% 46%, rgba(82, 146, 204, .28) 0%, rgba(82, 146, 204, .12) 45%, rgba(82, 146, 204, 0) 100%);
  animation: ambient-breathe 9s ease-in-out infinite alternate;
}

@keyframes ambient-breathe {
  from { opacity: .55; transform: scale(.985); }
  to   { opacity: 1;   transform: scale(1.015); }
}

.window {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.hero__window {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.hero__copy {
  padding: 52px 52px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-600);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal-500), var(--teal-300));
}

.hero__title {
  font-family: var(--display);
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero__title span { color: #587080; font-weight: 500; }

.hero__lede {
  margin: 0;
  max-width: 50ch;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.65;
}

.hero__actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: .01em;
  white-space: pre-wrap;
}

/* --- Product viewer -------------------------------------------- */

.viewer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 460px;
  border-left: 1px solid var(--line);
  background: #bcd3de;
}

/* Poster and no-WebGL fallback: the same artwork, blurred, drifting slowly */
.viewer::before {
  content: "";
  position: absolute;
  inset: -28px;
  z-index: 0;
  background: #bcd3de url("assets/liquid-bg.webp") center / cover;
  filter: blur(7px) saturate(.85);
}
.viewer.is-static::before { animation: liquid-drift 60s ease-in-out infinite alternate; }

@keyframes liquid-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1.06) rotate(-1deg); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.14) rotate(1.5deg); }
}

/* Animated background: rendered small, blurred here. Oversized so the
   blur never fades out at the pane edges. */
.viewer__bg {
  position: absolute;
  top: -28px;
  left: -28px;
  z-index: 0;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  display: block;
  filter: blur(7px);
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.viewer.has-bg .viewer__bg { opacity: 1; }

/* A thin translucent wash that ties the colours to the site's teal, plus
   glass-like edge light. Never receives pointer events. */
.viewer__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(90% 70% at 50% 36%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 68%),
    linear-gradient(180deg, rgba(31, 149, 143, .14), rgba(31, 149, 143, .04) 45%, rgba(18, 62, 78, .20));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .42),
    inset 0 0 0 1px rgba(255, 255, 255, .12),
    inset 0 -70px 90px -60px rgba(10, 52, 62, .38);
}

.viewer__canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.viewer.is-dragging .viewer__canvas { cursor: grabbing; }
.viewer[data-state="loading"] .viewer__canvas,
.viewer[data-state="error"] .viewer__canvas { cursor: default; }
.viewer__canvas:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .92);
  outline-offset: -8px;
  border-radius: 12px;
}

/* Loading / error */
.viewer__status {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity .7s var(--ease), visibility 0s linear .7s;
}
.viewer[data-state="ready"] .viewer__status { opacity: 0; visibility: hidden; }

.viewer__chip {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 11px 18px 11px 13px;
  border-radius: 999px;
  color: var(--teal-700);
  background: rgba(255, 255, 255, .42);
  border: 1px solid rgba(255, 255, 255, .62);
  box-shadow: 0 1px 2px rgba(17, 42, 58, .10), 0 14px 30px -14px rgba(17, 42, 58, .45), inset 0 1px 0 rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
          backdrop-filter: blur(14px) saturate(1.3);
}
.viewer[data-state="loading"] .viewer__chip--loading { display: inline-flex; }
.viewer[data-state="error"] .viewer__chip--error { display: inline-flex; padding-left: 18px; pointer-events: auto; }

.viewer__ring { width: 28px; height: 28px; transform: rotate(-90deg); }
.viewer__ring circle { fill: none; stroke-width: 3.4; }
.viewer__ring-track { stroke: rgba(14, 97, 96, .18); }
.viewer__ring-fill {
  stroke: var(--teal-600);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset .25s var(--ease);
}

.viewer__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.viewer__progress { font-family: var(--mono); letter-spacing: .02em; margin-left: 4px; opacity: .8; }

.viewer__error { font-size: 13px; font-weight: 500; }
.viewer__retry {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(14, 97, 96, .28);
  background: rgba(255, 255, 255, .55);
  color: var(--teal-700);
  cursor: pointer;
}
.viewer__retry:hover { background: rgba(255, 255, 255, .8); }
.viewer__retry:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }

/* Reset control */
.viewer__reset {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: var(--r-sm);
  color: var(--teal-700);
  background: rgba(255, 255, 255, .34);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 1px 2px rgba(17, 42, 58, .10), 0 8px 18px -10px rgba(17, 42, 58, .5), inset 0 1px 0 rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
          backdrop-filter: blur(12px) saturate(1.3);
  cursor: pointer;
  transition: background-color .25s var(--ease), transform .2s var(--ease), opacity .5s var(--ease);
}
.viewer__reset svg { width: 16px; height: 16px; transition: transform .5s var(--ease-out); }
.viewer__reset:hover { background: rgba(255, 255, 255, .6); }
.viewer__reset:hover svg { transform: rotate(-90deg); }
.viewer__reset:active { transform: scale(.94); }
.viewer__reset:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
.viewer:not([data-state="ready"]) .viewer__reset { opacity: 0; pointer-events: none; }

/* --- Panels ---------------------------------------------------- */

.section { padding-top: 22px; }
main > .section:last-child { padding-bottom: 64px; }

.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 20px;
  background: linear-gradient(180deg, #f5f8fa, var(--surface-head));
  border-bottom: 1px solid var(--line-soft);
}

.panel__icon { width: 16px; height: 16px; color: var(--teal-500); }

.panel__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  color: #3a4b57;
}

/* --- Release (download information) ---------------------------- */

/* The download panel gets a faint teal ambient light under it */
.panel--release {
  box-shadow: var(--shadow-2), 0 24px 60px -30px rgba(38, 164, 155, .5);
}

.release {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 24px 24px 24px 22px;
}

.release__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--teal-600);
  background: linear-gradient(160deg, #f1faf9, #d5efea);
  box-shadow: inset 0 0 0 1px rgba(31, 149, 143, .22), 0 6px 14px -8px rgba(31, 149, 143, .6);
}
.release__icon svg { width: 26px; height: 26px; }

.release__list {
  margin: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.release__list > div {
  min-width: 0;
  padding: 2px 26px;
  border-left: 1px solid var(--line-soft);
}
.release__list > div:first-child { padding-left: 0; border-left: 0; }

.release__list dt {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.release__list dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* --- Notes (details) ------------------------------------------- */

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notes p {
  margin: 0;
  padding: 22px 26px 24px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
}
.notes p + p { border-left: 1px solid var(--line-soft); }

.notes strong {
  padding: 1px 5px;
  border: 1px solid var(--teal-100);
  border-radius: 4px;
  background: var(--teal-050);
  color: var(--teal-700);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

/* --- Buttons --------------------------------------------------- */

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .005em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform .2s var(--ease),
    box-shadow .3s var(--ease),
    border-color .25s var(--ease),
    color .25s var(--ease),
    background-color .25s var(--ease);
}

.btn__icon { width: 16px; height: 16px; }
.btn__arrow { transform-box: fill-box; transform-origin: center; }

.btn:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
}

/* Primary: the main download */
.btn--primary {
  height: 48px;
  padding: 0 22px 0 19px;
  color: #fff;
  border-color: #0f6463;
  background: linear-gradient(180deg, #1a8984 0%, #137571 55%, #0f6867 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .26),
    inset 0 -2px 0 rgba(0, 0, 0, .07),
    0 1px 2px rgba(8, 60, 60, .22),
    0 8px 20px -8px rgba(23, 135, 128, .62);
  text-shadow: 0 1px 1px rgba(0, 40, 40, .28);
}

/* Lighter gradient that fades in on hover */
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #1d928c 0%, #157d79 55%, #116f6d 100%);
  opacity: 0;
  transition: opacity .3s var(--ease);
}

/* Sheen that sweeps across once on hover */
.btn--primary::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 0;
  width: 45%;
  z-index: -1;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .26) 50%, transparent 100%);
  transform: translateX(-130%) skewX(-14deg);
  pointer-events: none;
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 4px rgba(0, 30, 30, .22),
    0 1px 2px rgba(8, 60, 60, .2);
}

/* Secondary: the download button inside the release panel */
.btn--secondary {
  color: var(--text);
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff, #f2f6f8);
  box-shadow: 0 1px 2px rgba(17, 42, 58, .08), inset 0 1px 0 #fff;
}
.btn--secondary .btn__icon { color: var(--teal-500); transition: color .25s var(--ease); }

.btn--secondary:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(17, 42, 58, .14);
}

@media (hover: hover) {
  .btn--primary:hover {
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .3),
      inset 0 -2px 0 rgba(0, 0, 0, .07),
      0 2px 4px rgba(8, 60, 60, .2),
      0 14px 28px -10px rgba(23, 135, 128, .72);
  }
  .btn--primary:hover::before { opacity: 1; }
  .btn--primary:hover::after {
    transform: translateX(330%) skewX(-14deg);
    transition: transform 1.1s cubic-bezier(.45, .05, .3, 1);
  }
  .btn:hover .btn__arrow { animation: arrow-nudge .7s var(--ease) 1; }

  .btn--secondary:hover {
    transform: translateY(-1px);
    color: var(--teal-700);
    border-color: #8ccbc4;
    box-shadow: 0 1px 2px rgba(17, 42, 58, .08), 0 8px 18px -10px rgba(31, 149, 143, .55), inset 0 1px 0 #fff;
  }
  .btn--secondary:hover .btn__icon { color: var(--teal-600); }
}

.btn:active { transition-duration: .08s; }

@keyframes arrow-nudge {
  0%, 100% { transform: translateY(0); }
  45%      { transform: translateY(2.5px); }
  70%      { transform: translateY(-.5px); }
}

/* Focus rings on the dark title bar */
.brand:focus-visible,
.tab:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .92);
  outline-offset: 3px;
}
.tab:focus-visible { outline-offset: -5px; }
.tab[aria-current]:focus-visible { outline-color: var(--teal-500); }

/* --- Footer (status bar) --------------------------------------- */

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site > main { flex: 1 0 auto; }

.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

.footer__inner {
  min-height: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: var(--text-3);
}

.footer__file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
}
.footer__file svg { width: 13px; height: 13px; color: var(--teal-500); }

/* --- Entrance animations --------------------------------------- */
/* Only active once the inline script has added .js to <html>;
   ui.js adds .is-in as each element scrolls into view. */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
}
.js .hero__copy > [data-reveal] { transform: translate3d(0, 8px, 0); }

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity .7s var(--ease-out) var(--reveal-delay, 0ms),
    transform .9s var(--ease-out) var(--reveal-delay, 0ms);
}

.hero__copy > :nth-child(1) { --reveal-delay: 140ms; }
.hero__copy > :nth-child(2) { --reveal-delay: 200ms; }
.hero__copy > :nth-child(3) { --reveal-delay: 260ms; }
.hero__copy > :nth-child(4) { --reveal-delay: 320ms; }

/* --- Responsive ------------------------------------------------ */

@media (max-width: 1100px) {
  .hero__copy { padding: 44px 40px 42px; }
}

@media (max-width: 960px) {
  .wrap { padding-inline: 24px; }

  .hero__window { grid-template-columns: minmax(0, 1fr); }
  .hero__title { font-size: clamp(30px, 4.8vw, 42px); }
  .hero__lede { max-width: 62ch; }

  /* Stacked: the viewer sits under the copy at a fixed, generous height. */
  .viewer {
    min-height: 0;
    height: clamp(360px, 62vw, 540px);
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .notes { grid-template-columns: minmax(0, 1fr); }
  .notes p + p { border-left: 0; border-top: 1px solid var(--line-soft); }
  .notes p { padding: 18px 24px 20px; }
}

@media (max-width: 860px) {
  .release { grid-template-columns: auto minmax(0, 1fr); row-gap: 20px; }
  .release__cta { grid-column: 2; }
}

/* Narrow layouts. Normally hidden behind the mobile gate below,
   but kept working so the gate can be removed without a redesign. */
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }

  .header__inner { gap: 10px; }
  .brand { padding-right: 0; border-right: 0; }
  .brand__sub { display: none; }
  .tab { padding-inline: 11px; }
  .tab__icon { display: none; }

  .hero { padding-top: 20px; }
  .hero__copy { padding: 30px 22px 28px; }
  .hero__actions { width: 100%; }
  .btn--primary { width: 100%; }
  .viewer { height: clamp(320px, 92vw, 420px); }

  .release { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .release__icon { display: none; }
  .release__cta { grid-column: auto; }
  .release__list { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
  .release__list > div,
  .release__list > div:first-child { padding: 0; border-left: 0; }

  .notes p { padding: 16px 20px 18px; }

  .footer__inner { flex-direction: column; justify-content: center; gap: 2px; padding-block: 10px; text-align: center; }
}

@media (max-width: 440px) {
  .brand__text { display: none; }
  .brand { padding-right: 4px; }
}

/* --- Mobile gate ----------------------------------------------- */

.mobile-gate { display: none; }

@media (max-width: 720px), (pointer: coarse) and (max-width: 900px) {
  .site { display: none; }

  .mobile-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
  }

  .mobile-gate__inner {
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-3);
    animation: gate-in .6s var(--ease-out) both;
  }

  .mobile-gate__bar {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 14px;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(6, 22, 30, .2);
  }
  .mobile-gate__bar .app-icon { width: 26px; height: 26px; border-radius: 6px; }
  .mobile-gate__bar .mark { width: 16px; height: 16px; }

  .mobile-gate__body { display: grid; gap: 10px; padding: 22px 20px 24px; }
  .mobile-gate h1 { font-family: var(--display); font-size: 20px; letter-spacing: -.01em; }
  .mobile-gate p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }
}

@keyframes gate-in {
  from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* --- Reduced motion -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  body::before, body::after, .titlebar-bg { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
