/* ─────────────────────────────────────────────────────────────────────────
   Testpack — Mockup 03 (Atelier) — Base styles
   Dark editorial helpers: gradient-bordered CTAs/cards (ammobox pattern),
   accent label (left rust bar with fade), scroll-linked test list,
   marquee with lozenge separator, premium motion.
   ─────────────────────────────────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--obsidian);
  color: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: 'ss01';
  /* full-page warm gradient — cinematic depth on first paint */
  background-image: linear-gradient(to bottom right, var(--bg-grad-from), var(--bg-grad-to));
  background-attachment: fixed;
}

/* ─── Display ramp — Fraunces serif, optical-size aware ──────────────── */

.font-display { font-family: var(--font-display); font-optical-sizing: auto; }
.font-mono    { font-family: var(--font-mono); }
.font-body    { font-family: var(--font-body); }

.h-hero {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  font-size: clamp(3rem, 7vw, 6.75rem);
  line-height: 0.97;
  letter-spacing: -0.025em;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: 'opsz' 100, 'SOFT' 30;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.h-section {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: 'opsz' 72, 'SOFT' 30;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

/* italic accent — sits inside display headlines for editorial flourish */
.h-accent {
  font-style: italic;
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  color: var(--rust-bright);
}

/* Accent labels — small uppercase running titles */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust-bright);
}
.eyebrow::before {
  content: ''; width: 28px; height: 1px;
  background: var(--rust-bright);
}

/* Accent label — vertical rust bar with horizontal fade (ammobox LabelAccent) */
.label-accent {
  width: 12px;
  height: 18px;
  border-left: 2px solid var(--rust);
  background-image: linear-gradient(to right,
    rgba(139, 58, 31, 0.5),
    rgba(139, 58, 31, 0));
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.6rem;
}

/* Spec / monospace metadata */
.spec {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.spec-sm {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ─── Gradient-bordered CTA (ammobox ButtonBordered pattern) ─────────── */

.cta-bordered {
  position: relative;
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius);
  background-image: linear-gradient(to right, var(--rust-deep), var(--rust-bright));
  cursor: pointer;
  transition: transform 200ms var(--ease-out-quart);
}
.cta-bordered:hover { transform: translateY(-1px); }

.cta-bordered__inner {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  background: rgba(139, 58, 31, 0.08);
  color: var(--paper-light);
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.005em;
  transition: background 200ms var(--ease-out-quart);
}
.cta-bordered:hover .cta-bordered__inner { background: rgba(194, 85, 51, 0.18); }

.cta-ghost {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: border-color 200ms var(--ease-out-quart),
              background 200ms var(--ease-out-quart);
}
.cta-ghost:hover { border-color: var(--paper); background: rgba(242, 235, 224, 0.04); }

.cta-arrow {
  width: 14px; height: 14px;
  transition: transform 200ms var(--ease-out-quart);
}
.cta-bordered:hover .cta-arrow,
.cta-ghost:hover .cta-arrow { transform: translateX(3px); }

/* ─── Gradient-bordered card (subtle frame on dark) ──────────────────── */

.frame {
  position: relative;
  padding: 1px;
  border-radius: var(--radius-lg);
  background-image: linear-gradient(160deg,
    rgba(194, 85, 51, 0.45) 0%,
    rgba(242, 235, 224, 0.05) 40%,
    rgba(92, 36, 16, 0.4) 100%);
  transition: transform 320ms var(--ease-out-quart);
}
.frame:hover { transform: translateY(-3px); }
.frame__inner {
  background: var(--coal);
  border-radius: calc(var(--radius-lg) - 1px);
  padding: 1.75rem;
  height: 100%;
}

/* ─── Scroll-linked test list (signature Pack pattern) ───────────────── */

.test-list { list-style: none; padding: 0; margin: 0; }

.test-list__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}
.test-list__num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--paper-dim);
  transition: color 320ms var(--ease-out-quart);
  width: 2.5rem;
}
.test-list__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: 'opsz' 72, 'SOFT' 30;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--paper-mute);
  transition: color 320ms var(--ease-out-quart);
}
.test-list__iso {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--paper-dim);
  transition: color 320ms var(--ease-out-quart);
}

.test-list__desc {
  grid-column: 2 / 3;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--paper-soft);
  margin-top: 0.5rem;
  max-width: 50ch;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease-out-quart),
              opacity 400ms var(--ease-out-quart),
              margin-top 400ms var(--ease-out-quart);
}

.test-list__item.is-active .test-list__num,
.test-list__item.is-active .test-list__iso {
  color: var(--rust-bright);
}
.test-list__item.is-active .test-list__title {
  color: var(--paper-light);
}
.test-list__item.is-active .test-list__desc {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.7rem;
}

.test-list__item:hover .test-list__title {
  color: var(--paper-light);
}

/* The visual frame on the left — photo placeholders stack here */
.test-stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
}
.test-stage__photo {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 600ms var(--ease-out-expo),
              transform 6s var(--ease-out-expo);
  transform: scale(1.06);
}
.test-stage__photo.is-active {
  opacity: 1;
  transform: scale(1);
}
.test-stage__photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 10, 7, 0.85) 0%, rgba(15, 10, 7, 0) 50%);
  pointer-events: none;
}
.test-stage__caption {
  position: absolute; bottom: 1.25rem; left: 1.25rem; right: 1.25rem;
  z-index: 2;
  display: flex; align-items: end; justify-content: space-between; gap: 1rem;
}

/* ─── Marquee credentials strip (lozenge separator) ──────────────────── */

.marquee {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  padding: 0.9rem 0;
}
.marquee__track {
  display: flex; gap: 2.5rem;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 38s linear infinite;
  width: max-content;
}
.marquee__sep {
  color: var(--rust-bright);
  font-size: 0.85rem;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Stat block ─────────────────────────────────────────────────────── */

.stat__value {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--rust-bright);
}
.stat__label {
  font-size: 0.92rem;
  color: var(--paper-soft);
  margin-top: 0.65rem;
  max-width: 26ch;
}

/* ─── Process step ──────────────────────────────────────────────────── */

.step__num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--rust-bright);
  margin-bottom: 1.5rem;
}

/* ─── Reveal on scroll ───────────────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms var(--ease-out-quart),
              transform 800ms var(--ease-out-quart);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Honeycomb wash — subtle cardboard-cell backdrop ─────────────────
   Applied to specific sections where the brand metaphor (honeycomb = the
   cellular structure of fibreboard) earns its place. Kept faint so the
   premium aesthetic doesn't get pattern-noise. */

.hex-wash { position: relative; }
.hex-wash::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/honeycomb-cream-strong.svg');
  background-size: 56px 100px;
  background-repeat: repeat;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.hex-wash > * { position: relative; z-index: 1; }

/* Stronger variant — used on the hero photo placeholder where the cardboard
   metaphor wants to read more explicitly. */
.hex-wash--strong::before { opacity: 0.32; }

/* Vignette variant — fades to transparent at top + bottom so the pattern
   doesn't form hard edges against neighbouring sections. */
.hex-wash--vignette::before {
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%, black 18%, black 82%, transparent 100%);
          mask-image: linear-gradient(to bottom,
    transparent 0%, black 18%, black 82%, transparent 100%);
}

/* ─── Selection ──────────────────────────────────────────────────────── */
::selection { background: var(--rust); color: var(--paper-light); }

/* ─── Focus ──────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--rust-bright);
  outline-offset: 3px;
}
