/* Nines overview + test builder. Look = NINES Magazine (Issue 01): white page, Helvetica Neue light display,
   letter-spaced caps labels, hairline rules, full-bleed film, one ink panel per page. Single light theme by design. */
:root {
  --ink: #121212;
  --paper: #ffffff;
  --soft: #f3f2ef;      /* quiet panels, empty media */
  --line: #dddad3;      /* hairlines */
  --mute: #6e6c67;      /* captions, labels */
  --body: #2b2a28;      /* running text */
  --ok: #2f6b4f;        /* ready state */
  --warn: #9a5b12;      /* needs attention */
  --focus: #3a5bd9;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: max(16px, min(5vw, 56px));
  --max: 1240px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5;
       -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* type */
.lbl { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--mute); font-weight: 400; }
.lbl.ink { color: var(--ink); }
h1, h2, h3 { font-weight: 300; margin: 0; text-wrap: balance; }
.display { font-size: clamp(40px, 6.4vw, 84px); line-height: 1.02; letter-spacing: -.035em; }
.h2 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.06; letter-spacing: -.03em; }
.h3 { font-size: clamp(21px, 2.1vw, 26px); line-height: 1.15; letter-spacing: -.02em; font-weight: 400; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.45; color: var(--body); max-width: 40em; text-wrap: pretty; }
p { margin: 0; text-wrap: pretty; }
.small { font-size: 13px; line-height: 1.45; color: var(--mute); }
.num { font-variant-numeric: tabular-nums; }

/* top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(255,255,255,.96);
          border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.2) blur(6px); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 20px; width: auto; }
.brand .sep { width: 1px; height: 18px; background: var(--ink); opacity: .5; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.nav a:hover { opacity: .6; }
@media (max-width: 860px) { .nav a:not(.btn) { display: none; } }

/* buttons */
/* Buttons are sentence case, 15px, medium weight, 48px tall: they must read as actions, not labels. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px;
       background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 2px; font: inherit;
       font-size: 15px; font-weight: 500; letter-spacing: .01em; text-decoration: none; cursor: pointer;
       transition: background .15s, transform .15s; white-space: nowrap; }
.btn:hover { background: #33322f; }
.btn:active { transform: translateY(1px); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }
.btn.lg { min-height: 56px; padding: 0 30px; font-size: 16px; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--soft); }
.btn.light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.light:hover { background: #ecebe7; }
.btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
.textlink { font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.nav a.btn { min-height: 40px; padding: 0 18px; font-size: 14px; color: var(--paper); text-transform: none; letter-spacing: .01em; }
.nav a.btn:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .btn, .btn .arr { transition: none; } }

/* media */
.media { position: relative; overflow: hidden; background: var(--soft); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; left: 12px; bottom: 10px; font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase;
       color: #fff; text-shadow: 0 0 8px rgba(0,0,0,.45); pointer-events: none; }
.tag.dark { color: var(--ink); text-shadow: none; }
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }

/* sections */
section { padding-block: clamp(64px, 9vw, 120px); }
.rule { border-top: 1px solid var(--ink); }
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(32px, 4vw, 56px); max-width: 860px; }

/* ---- visual story components (magazine look) ---- */
/* the robot studio, full width inside the wrap */
.studio-hero { position: relative; aspect-ratio: 16 / 9; max-height: 640px; width: 100%; overflow: hidden; background: var(--soft); }
.studio-hero img { width: 100%; height: 100%; object-fit: cover; }
.studio-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 10px; }

/* capture-to-model chain: a real sequence, so numbered */
.chain { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: clamp(28px, 4vw, 48px); counter-reset: ch; }
.chain figure { display: grid; gap: 10px; align-content: start; counter-increment: ch; }
.chain .media { aspect-ratio: 3 / 4; }
.chain figcaption { margin: 0; display: grid; gap: 3px; letter-spacing: normal; text-transform: none; }
.chain figcaption b { font-size: 14px; font-weight: 500; color: var(--ink); }
.chain figcaption b::before { content: counter(ch, decimal-leading-zero) "  "; font-weight: 400; color: var(--mute); font-size: 11px; letter-spacing: .15em; }
.chain figcaption span { font-size: 13px; color: var(--mute); line-height: 1.4; }
.chain-note { margin-top: 20px; max-width: 46em; color: var(--body); }
@media (max-width: 860px) { .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain figure:last-child { grid-column: 1 / -1; } .chain figure:last-child .media { aspect-ratio: 4 / 3; } }

/* how it works: three equal panels on one grid; subgrid keeps the four rows aligned across panels */
.flow-head { margin-top: clamp(64px, 8vw, 104px); margin-bottom: 20px; }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr);
        grid-template-rows: auto repeat(4, auto); column-gap: 0; }
.flow .panel { grid-row: 1 / span 5; display: grid; grid-template-rows: subgrid; row-gap: 0; padding: 22px 24px 24px;
               border: 1px solid var(--line); background: var(--paper); }
.flow .panel.ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.flow .ph { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--mute); padding-bottom: 14px; margin-bottom: 4px;
            border-bottom: 1px solid var(--line); align-self: end; }
.flow .panel.ink .ph { color: #b9b6ae; border-bottom-color: #3a3936; }
.flow .it { padding: 14px 0 0; display: grid; gap: 3px; align-content: start; }
.flow .it b { font-size: 16px; font-weight: 500; line-height: 1.3; }
.flow .it span { font-size: 14.5px; line-height: 1.45; color: var(--body); }
.flow .panel.ink .it span { color: #cfccc5; }
.flow .arrow { grid-row: 1 / span 5; display: flex; align-items: center; justify-content: center; color: var(--mute); font-size: 18px; }
@supports not (grid-template-rows: subgrid) { .flow .panel { display: flex; flex-direction: column; } .flow .ph { align-self: stretch; } }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 0; }
  .flow .panel { grid-row: auto; display: flex; flex-direction: column; }
  .flow .ph { align-self: stretch; }
  .flow .arrow { grid-row: auto; height: 36px; transform: rotate(90deg); }
}

/* one shoot, every destination */
.dest { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 8px; }
.dest .wide { grid-column: 1 / 2; grid-row: 1 / 3; }
.dest figure { display: grid; gap: 8px; align-content: start; }
.dest .media { height: 100%; }
.dest .wide .media { aspect-ratio: 4 / 3; }
.dest .tall .media { aspect-ratio: 3 / 4; }
.dest .film { grid-column: 2 / 4; }
.dest .film .media { aspect-ratio: 16 / 9; }
.dest figcaption { margin: 0; }
@media (max-width: 760px) { .dest { grid-template-columns: 1fr 1fr; } .dest .wide { grid-column: 1 / 3; grid-row: auto; } .dest .film { grid-column: 1 / 3; } }

/* one film, every format: true aspect ratios side by side, bottom-aligned */
.formats { display: grid; grid-template-columns: 0.56fr 0.8fr 1fr 1.78fr; gap: 8px; align-items: end; }
.formats figure { display: grid; gap: 8px; }
.formats .r916 { aspect-ratio: 9 / 16; } .formats .r45f { aspect-ratio: 4 / 5; } .formats .r11f { aspect-ratio: 1; } .formats .r169f { aspect-ratio: 16 / 9; }
.formats figcaption { margin: 0; }
@media (max-width: 760px) { .formats { grid-template-columns: 0.56fr 0.8fr 1fr; } .formats figure:last-child { grid-column: 1 / -1; } }

/* still and its film */
.pair2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair2 figure { display: grid; gap: 8px; } .pair2 figcaption { margin: 0; }
.pair2 .media { aspect-ratio: 4 / 5; }

/* three-step before/after */
.trio { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; }
.trio figure { display: grid; gap: 8px; } .trio figcaption { margin: 0; }
.trio .to { text-align: center; color: var(--mute); }
.trio .media { aspect-ratio: 3 / 4; }

/* skip link: hidden until focused */
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; font-size: 14px; text-decoration: none; }
.skip:focus { top: 12px; }

/* pause / play for every self-playing film */
.vidbtn { position: absolute; right: 10px; top: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
          background: rgba(18,18,18,.55); color: #fff; font-size: 13px; line-height: 1; display: grid; place-items: center; }
.vidbtn:hover { background: rgba(18,18,18,.8); }
.hero .vidbtn { top: auto; bottom: 44px; right: 16px; }

/* footer */
.foot { border-top: 1px solid var(--line); padding-block: 36px 48px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot .small a { text-decoration: none; }
