/* Fremma premium layer, shared by every page and loaded after each page's own styles (it is the source of truth).
   Palette taken from the atlas itself: the captures' studio backdrop as the page, bone ivory for text, muscle red as
   the one accent, the studio's slate as the only light. Status colours are quiet tints. No rules, no dots. */
:root {
  --background: #0d1116;
  --panel: #141a21;
  --panel-2: #1b222b;
  --text-primary: #f2ede4;
  --text-secondary: #9ba4b0;
  --text-tertiary: #7a828d;
  --accent: #c9452f;
  --accent-text: #f0a08f;
  --button-primary: #f2ede4;
  --button-primary-hover: #ffffff;
  --text-on-color: #0d1116;
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", "Helvetica Neue", Arial, sans-serif;
}
html, body { margin: 0; }
body { font-family: var(--font-sans); color: var(--text-primary);
  background: radial-gradient(70% 50% at 75% 0%, rgba(43, 52, 67, 0.5), transparent 70%) no-repeat, var(--background); }

/* a fine film grain behind the content, so it never dirties the atlas images */
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* one continuous surface: no band backgrounds, so no seams */
section.band, footer { background: none; }
footer { padding-top: 32px; }
footer details { color: var(--text-tertiary); }

/* header: transparent at the top, frosted once the page scrolls; one row on phones */
.shell { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; transition: background-color 300ms ease, box-shadow 300ms ease; }
.shell.is-scrolled { background: rgba(13, 17, 22, 0.78); backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15); box-shadow: 0 12px 30px -24px rgba(0, 0, 0, 0.9); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 41; background: var(--background); }
.shell .wrap { flex-wrap: nowrap; }

/* headlines */
.hero h1 { font-weight: 600; letter-spacing: -0.022em; line-height: 1.02; }
section h2 { font-weight: 600; letter-spacing: -0.02em; }
.hero h1, section h2 { background: linear-gradient(180deg, #fbf8f2, #e6dfd2); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* buttons */
.btn--primary { background: var(--button-primary); color: var(--text-on-color); box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.btn--primary:hover { background: var(--button-primary-hover); transform: translateY(-1px); }
.btn--ghost { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; color: var(--text-primary); text-decoration: none; font: 500 15px/1 var(--font-sans); background: var(--panel); transition: background-color 150ms ease; }
.btn--ghost:hover { background: var(--panel-2); }
.btn svg, .btn--ghost svg { width: 16px; height: 16px; fill: currentColor; }
.where { display: block !important; }
.where strong { color: var(--accent-text); font-weight: 600; }

/* status pills: quiet tints, the heading stays the loudest thing in a card */
.pill--available { background: rgba(140, 207, 171, 0.12); color: #8ccfab; }
.pill--building { background: rgba(230, 181, 110, 0.12); color: #e6b56e; }
.pill--soon { background: rgba(201, 69, 47, 0.18); color: var(--accent-text); }
.pill--planned { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); }

/* panels: solid, no borders */
.card, .systems a, .tile { background: var(--panel); box-shadow: 0 30px 60px -44px rgba(0, 0, 0, 0.95); }
.card:hover, .systems a:hover { background: var(--panel-2); }
.card { grid-template-rows: auto 1fr auto; }
.tile:hover { transform: none; box-shadow: 0 30px 60px -44px rgba(0, 0, 0, 0.95); }

/* hero light: one warm source from the atlas red, drifting slowly */
.hero::before { background: radial-gradient(45% 50% at 60% 45%, rgba(201, 69, 47, 0.16), transparent 70%) !important; animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(3%, 2%, 0) scale(1.06); } }

/* layout: no empty columns */
.method { align-items: start; }
.row--lead { align-items: start; }

/* entrance: the hero builds in once */
.hero > div > *, .hero > figure, .hero > .stage { animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero > div > *:nth-child(2) { animation-delay: 90ms; }
.hero > div > *:nth-child(3) { animation-delay: 180ms; }
.hero > div > *:nth-child(4) { animation-delay: 270ms; }
.hero > figure, .hero > .stage { animation: rise-img 1200ms cubic-bezier(0.2, 0.7, 0.2, 1) 120ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rise-img { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }

/* scroll reveal (motion.js marks only what starts below the first screen) */
.will-reveal { opacity: 0; transform: translateY(26px); }
.revealed { animation: rise 800ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--d, 0ms); }
.systems a img { transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.systems a:hover img { transform: translateY(-3px) rotate(-6deg) scale(1.08); }


/* the hero turntable: the atlas skull itself, captured from Fremma Anatomy, turned slowly or by hand. The frames carry the page colour; lighten lets the stage glow through, the mask fades the neck out */
.turntable { position: relative; }
.turn { width: 100%; aspect-ratio: 1 / 1; background: url("img/skull-turn.webp") 0 0 / 600% 600% no-repeat; cursor: grab; touch-action: pan-y; transform: scale(0.92); }
.turn.dragging { cursor: grabbing; }
.turn-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); font: 500 13px/1 var(--font-sans); opacity: 0.85; pointer-events: none; transition: opacity 400ms ease; }
.turntable.touched .turn-hint { opacity: 0; }
/* the wordmark alone in the header: crisp at any size */
.brand { font-size: 20px; letter-spacing: -0.02em; }

/* 8.5 pass: open stages around the skulls, the video turntable, the product capture */
.turntable, .method .stage { background: radial-gradient(55% 55% at 50% 45%, rgba(43, 52, 67, 0.6), transparent 72%); box-shadow: none; }
.turntable { display: grid; }
.turn-video, .turn { grid-area: 1 / 1; width: 100%; aspect-ratio: 1 / 1; }
.turn-video { mix-blend-mode: lighten; object-fit: cover; transform: scale(0.92);  -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%); mask-image: radial-gradient(closest-side, #000 78%, transparent 100%); }
.turn { opacity: 0; transition: opacity 120ms linear; mix-blend-mode: lighten; -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%); mask-image: radial-gradient(closest-side, #000 78%, transparent 100%); }
.turntable.drag-mode .turn { opacity: 1; }
.turntable.drag-mode .turn-video { opacity: 0; }
.shot-ui { border-radius: 22px; overflow: hidden; box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.95); }
.shot-ui img { width: 100%; height: auto; }
.cards:has(> .card:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1055px) { .cards:has(> .card:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.method .stage { background: #0d1116; }
.method .stage img { padding: 0; object-fit: cover; }
@media (max-width: 760px) { .shot-ui img { aspect-ratio: 4 / 5 !important; object-fit: cover; object-position: 50% 40%; } }

@media (max-width: 760px) { .cards:has(> .card:nth-child(4):last-child) { grid-template-columns: 1fr; } .hero::before { inset: 0 0 50% 0; } }

@media (max-width: 760px) {
  .hero > figure, .hero > .stage { order: -1; }
  .hero h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero > div > *, .hero > figure, .hero > .stage, .revealed { animation: none !important; }
  .will-reveal { opacity: 1; transform: none; }
}

/* the turntable inside a product hero: no card around it */
.hero figure.turntable { box-shadow: none; border-radius: 0; overflow: visible; }
/* the Fremma Anatomy mark: the atlas skull itself, no tile */
.brand img[src*="anatomy-skull"] { width: 40px; height: 40px; border-radius: 0; margin: -6px -2px -6px -6px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }
