/* Brand font: Frutiger LT Std (client-supplied) */
@font-face { font-family: "Frutiger"; src: url("assets/fonts/FrutigerLTStd-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Frutiger"; src: url("assets/fonts/FrutigerLTStd-Roman.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Frutiger"; src: url("assets/fonts/FrutigerLTStd-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

/* NaturLoop — Cocoboard® · design tokens + base
   Theming contract: all colors/type via :root custom properties.
   Second skin for the exec pitch = duplicate this block under [data-theme]. */

:root {
  color-scheme: light;
  --bg: #F5F0ED;
  --bg-deep: #141814;
  --ink: #1A1D1A;
  --ink-muted: #5C665C;
  --brand: #445D41;
  --accent: #C4A27A;
  --pending: #B08A3E; /* reserved: placeholder/pending chrome only */

  --font-display: "Frutiger", "Frutiger Neue", "Source Sans 3", sans-serif;
  --font-expanded: "Frutiger", "Frutiger Neue", "Source Sans 3", sans-serif;
  --font-body: "Frutiger", "Frutiger Neue", "Source Sans 3", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --section-pad: clamp(4rem, 12vh, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }

/* --- section grammar --- */
section { padding: var(--section-pad) var(--gutter); }

.eyebrow {
  font-family: var(--font-expanded);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 1.25rem;
}
.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}
.prose {
  max-width: 34rem;
  color: var(--ink-muted);
}
.prose strong { color: var(--ink); }

.band--dark {
  --bg: var(--bg-deep);
  --ink: #EDEFEA;
  --ink-muted: #9AA69A;
  background: var(--bg);
  color: var(--ink);
}
.band--dark .eyebrow { color: var(--accent); }

.pending {
  color: var(--pending);
  text-decoration: underline dashed;
  text-underline-offset: 0.3em;
}

/* --- header / footer --- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--gutter);
}
.logo { display: block; }
.logo img { height: 54px; width: auto; }
.logo-old {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav { display: flex; gap: 0.75rem; }
.cta {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.55em 1.2em;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
}
.cta--ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}
.cta:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.site-footer {
  padding: 3rem var(--gutter);
  font-size: 0.85rem;
  color: var(--ink-muted);
  border-top: 1px solid rgba(26, 29, 26, 0.08);
}
.site-footer p { margin: 0.25rem 0; }

/* --- media slots + stand-in system --- */
.media-slot {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 6%, var(--bg));
}
.media-slot[data-placeholder="tier3"] {
  background:
    repeating-linear-gradient(115deg,
      rgba(196, 162, 122, 0.22) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(25deg,
      rgba(196, 162, 122, 0.16) 0 2px, transparent 2px 11px),
    linear-gradient(var(--accent), var(--accent));
  background-blend-mode: normal, normal, multiply;
  background-color: color-mix(in srgb, var(--accent) 30%, var(--bg));
}
.media-slot > img,
.media-slot > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent; /* hide broken-image alt artifacts; frame shows through */
}
.media-slot[data-ratio="16/9"] { aspect-ratio: 16 / 9; }
.media-slot[data-ratio="4/3"]  { aspect-ratio: 4 / 3; }
.media-slot[data-ratio="1/1"]  { aspect-ratio: 1 / 1; }
.slot-tag {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  color: #2B2109;
  background: var(--pending);
}

/* --- hero --- */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
  color: #fff;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media > img, .hero-media > video {
  will-change: transform;
}
#hero::after { /* legibility scrim */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20,24,20,0.35) 0%, rgba(20,24,20,0.05) 40%, rgba(20,24,20,0.65) 100%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: var(--section-pad) var(--gutter);
}
.hero-sub { color: rgba(255,255,255,0.85); }
.hero-tagline, .hero-sub {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.hero-sub { transition-delay: 0.15s; }
html.hero-in .hero-tagline, html.hero-in .hero-sub,
html.js-failed .hero-tagline, html.js-failed .hero-sub,
html:not(.js) .hero-tagline, html:not(.js) .hero-sub {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-tagline, .hero-sub { opacity: 1; transform: none; transition: none; }
}
.hero-tagline { margin-bottom: 1rem; }
.scroll-cue {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: 1.5rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.4rem;
}
.site-header { color: #fff; } /* overlays dark hero */
.site-header .cta--ghost { border-color: rgba(255,255,255,0.6); }

/* --- loop (pinned cosmology section) --- */
#loop { padding: 0; }
.loop-track { height: 700vh; }
html:not(.js) .loop-track, html.reduced .loop-track, html.js-failed .loop-track { height: auto; }
.loop-stage {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 4rem);
  align-items: center;
  padding: var(--section-pad) var(--gutter);
}
html:not(.js) .loop-stage, html.reduced .loop-stage, html.js-failed .loop-stage { position: static; min-height: 0; }
.loop-headline { font-size: clamp(2rem, 4vw, 3.5rem); }
.loop-step h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
/* js: steps swap; no-js / reduced: all stacked */
html.js:not(.reduced):not(.js-failed) .loop-step {
  position: absolute;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
html.js:not(.reduced):not(.js-failed) .loop-text { position: relative; padding-bottom: 24rem; }
html.js:not(.reduced):not(.js-failed) .loop-step.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
html:not(.js) .loop-step, html.reduced .loop-step, html.js-failed .loop-step { margin-bottom: 1.5rem; }

.loop-svg {
  width: min(100%, 520px);
  margin-inline: auto;
  color: var(--brand);
  font-family: var(--font-body);
  font-size: 13px;
}
.loop-svg > circle { stroke-opacity: 0.4; }
.loop-node { fill: var(--bg); stroke: currentColor; stroke-width: 2.5; }
.loop-svg text { fill: var(--ink); }
.loop-sub { fill: var(--ink-muted); }
.loop-arc { fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; }
html.js:not(.reduced):not(.js-failed) .loop-arc {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.loop-arc--return { stroke-opacity: 0.7; }
html.js:not(.reduced):not(.js-failed) .loop-seg {
  opacity: 0.55;
  transition: opacity 0.45s ease;
}
html.js:not(.reduced) .loop-seg.is-active { opacity: 1; }

@media (max-width: 760px) {
  .loop-stage { grid-template-columns: 1fr; align-content: center; gap: 1.5rem; }
  .loop-svg { max-width: 320px; }
}
@media (max-height: 860px) and (max-width: 760px), (max-height: 560px) {
  /* viewports too small to fit the pinned stage: never pin (no clipped SVG, no scroll trap) */
  .loop-track { height: auto; }
  .loop-stage { position: static; min-height: 0; }
  html.js:not(.reduced):not(.js-failed) .loop-step { position: static; opacity: 1; transform: none; pointer-events: auto; margin-bottom: 1.5rem; }
  html.js:not(.reduced):not(.js-failed) .loop-text { padding-bottom: 0; }
  html.js:not(.reduced):not(.js-failed) .loop-seg { opacity: 1; }
}

/* --- material --- */
#material { padding: 0 0 var(--section-pad); }
#material .media-slot { max-height: 70vh; }
#material .media-slot[data-ratio="16/9"] { aspect-ratio: auto; height: 80svh; max-height: 80svh; }
.material-copy { padding: var(--section-pad) var(--gutter) 0; }
.spec-list {
  margin: 2.5rem 0 0;
  max-width: 40rem;
  display: grid;
  gap: 1.25rem;
}
.spec-list > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(237, 239, 234, 0.15);
}
.spec-list dt {
  font-family: var(--font-expanded);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.2rem;
}
.spec-list dd { margin: 0; color: var(--ink-muted); }
.spec-list dd::first-line { color: var(--ink); }

/* --- proof --- */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin: 3rem 0 0;
}
.proof-strip .case-study { grid-column: 1 / -1; }
.proof-card { margin: 0; }
.proof-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 1.25rem 0 0.4rem;
}
.proof-card .prose { font-size: 0.95rem; }
.case-study {
  margin-top: var(--section-pad);
  padding-top: 2.5rem;
  border-top: 1px solid rgba(26, 29, 26, 0.1);
}
.case-headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin: 0 0 1rem;
}
@media (max-width: 760px) {
  .proof-strip { grid-template-columns: 1fr; }
  .spec-list > div { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* --- numbers --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.5rem;
}
.stat-item { display: grid; gap: 0.6rem; align-content: start; }
.stat {
  font-family: var(--font-expanded);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat.pending { font-size: clamp(1.3rem, 2.6vw, 2rem); }
.stat-label { font-size: 0.9rem; color: var(--ink-muted); max-width: 22rem; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: 1fr; } }

/* --- faq --- */
.faq-list { max-width: 44rem; margin-top: 2.5rem; }
.faq-list details { border-top: 1px solid rgba(26, 29, 26, 0.12); }
.faq-list details:last-child { border-bottom: 1px solid rgba(26, 29, 26, 0.12); }
.faq-list summary {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  padding: 1.1rem 2.5rem 1.1rem 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 1.3rem;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details > p { margin: 0 0 1.25rem; }

/* --- closing --- */
#closing { min-height: 70vh; display: grid; align-content: center; }
.closing-ctas { display: flex; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }
.cta--big { font-size: 1rem; padding: 0.9em 1.9em; }
#closing .cta--ghost { border-color: rgba(237,239,234,0.5); color: var(--ink); }

/* --- shared reveal system (JS adds .reveal; no-JS never hides) --- */
html.js:not(.reduced):not(.js-failed) .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s ease, transform 0.9s ease;
  transition-delay: var(--reveal-delay, 0s);
}
html.js:not(.reduced):not(.js-failed) .reveal.is-in { opacity: 1; transform: none; }

/* --- loop: scroll-scrubbed photo layer (husks -> fibre -> panel) --- */
.loop-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  display: none; /* shown only when the section pins (JS, full motion) */
}
html.js:not(.reduced):not(.js-failed) .loop-bg { display: block; }
.loop-bg::after { /* text-side legibility scrim, cinematic dark */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 24, 20, 0.62) 0%, rgba(20, 24, 20, 0.28) 45%, rgba(20, 24, 20, 0) 70%);
}
.loop-bg > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  will-change: opacity, transform;
}

.loop-text, .loop-svg { position: relative; z-index: 1; }
@media (max-height: 860px) and (max-width: 760px), (max-height: 560px) {
  html.js:not(.reduced):not(.js-failed) .loop-bg { display: none; } /* unpinned: no scrub */
}


/* --- our story button + video modal --- */
.our-story {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: 1.5rem;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  cursor: pointer;
}
.video-modal { position: fixed; inset: 0; z-index: 50; }
.video-modal__backdrop { position: absolute; inset: 0; background: rgba(20, 24, 20, 0.85); }
.video-modal__frame {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 1100px);
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-modal__frame iframe { width: 100%; height: 100%; display: block; }
.video-modal__close {
  position: absolute;
  top: -2.4rem;
  right: 0;
  font-size: 1.6rem;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
}
.footer-logo { margin-bottom: 1rem; }

.company-media {
  margin-top: 3rem;
  margin-inline: calc(-1 * var(--gutter));
  max-width: none;
}
.company-media[data-ratio="16/9"] { aspect-ratio: auto; height: 70svh; }


/* header sits over the dark hero: render the logo in white */
.site-header .logo img { filter: brightness(0) invert(1); }




/* --- apple-style one-shot section fade + image settle (JS adds classes; fallbacks untouched) --- */
html.js:not(.reduced):not(.js-failed) .reveal-sec { position: relative; }
html.js:not(.reduced):not(.js-failed) .reveal-sec::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--bg);
  transition: opacity 0.7s ease;
  pointer-events: none;
}
html.js:not(.reduced):not(.js-failed) .reveal-sec.is-in::before { opacity: 0; }
html.js:not(.reduced):not(.js-failed) .reveal-img > img {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.8s ease, transform 1.3s cubic-bezier(0, 0, 0.5, 1);
}
html.js:not(.reduced):not(.js-failed) .reveal-img.is-in > img {
  opacity: 1;
  transform: scale(1);
}


/* --- first-visit hero sequence (plays once per session) --- */
@keyframes heroEnter {
  from { opacity: 0; transform: scale(1.14); }
  to { opacity: 1; transform: scale(1.06); }
}
html.js:not(.reduced):not(.js-failed) .hero-media > img {
  animation: heroEnter 1.3s cubic-bezier(0, 0, 0.3, 1) both;
}
html.first-visit.js:not(.reduced):not(.js-failed) .hero-media > img {
  animation-duration: 2.2s;
}
html.first-visit .hero-tagline { transition-delay: 0.9s; }
html.first-visit .hero-sub { transition-delay: 1.2s; }
html.first-visit.js:not(.reduced) .our-story,
html.first-visit.js:not(.reduced) .site-header {
  opacity: 0;
  transition: opacity 0.6s ease 1.5s;
}
html.first-visit.hero-in .our-story,
html.first-visit.hero-in .site-header { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html.first-visit .hero-media > img { animation: none; }
  html.first-visit .our-story, html.first-visit .site-header { opacity: 1; transition: none; }
}

/* swiss flag band: slight white veil */
.company-media--flag::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.35);
}
.case-study--solo { margin-top: 0; padding-top: 0; border-top: 0; }

/* loop copy in white over the scrim */
html.js:not(.reduced):not(.js-failed) .loop-text { color: #fff; }
html.js:not(.reduced):not(.js-failed) .loop-text .eyebrow { color: var(--accent); }
html.js:not(.reduced):not(.js-failed) .loop-text .prose { color: rgba(255, 255, 255, 0.85); }


/* loop veil (only used in the alternate ?veil=alt mode) */
.loop-veil {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
}

/* swiss flag: slow cinematic drift */
@keyframes flagDrift {
  0%, 100% { transform: scale(1.06) translateX(-1.2%); }
  50% { transform: scale(1.14) translateX(1.2%); }
}
html.js:not(.reduced) .company-media--flag.is-in > img {
  animation: flagDrift 16s ease-in-out infinite;
}
