/* ============================================================
   BLOWNMIRRORS — design tokens
   ============================================================ */
:root {
  --bg: #EDE7DD;
  --bg-alt: #E4DCCC;
  --ink: #1A1A1A;
  --ink-soft: #5C5648;
  --ink-faint: #8C8676;
  --line: rgba(26, 26, 26, 0.14);
  --line-soft: rgba(26, 26, 26, 0.08);
  --surface-dark: #17130F;
  --surface-dark-ink: #EDE7DD;
  --chrome-hi: #F5F3EE;

  --font-head: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --section-pad: clamp(64px, 12vh, 140px);
  --max: 1400px;

  --ease-slow: cubic-bezier(0.19, 1, 0.22, 1);
  --dur-slow: 900ms;
}

*, *::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: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--ink); color: var(--bg); }

/* ---------- typography ---------- */
.wordmark {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.section-number {
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--ink);
}

h2.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
}

p { margin: 0; }

.lede {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.8;
  color: var(--ink);
  max-width: 46ch;
}

.small-print {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* ---------- layout ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { position: relative; }

.hairline {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 6vw, 64px);
}

/* ---------- reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-slow), transform var(--dur-slow) var(--ease-slow);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background: var(--surface-dark);
  color: var(--surface-dark-ink);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23,19,15,0.55) 0%, rgba(23,19,15,0.35) 35%, rgba(23,19,15,0.75) 100%),
    linear-gradient(90deg, rgba(23,19,15,0.55) 0%, rgba(23,19,15,0.05) 45%, rgba(23,19,15,0.1) 100%);
}

.hero__top {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 5vw, 48px) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero__wordmark {
  font-size: clamp(30px, 6.5vw, 68px);
  line-height: 1;
}

.hero__sub {
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(237, 231, 221, 0.72);
}

.hero__stage {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 clamp(0px, 4vw, 40px);
}

.model-viewer {
  position: relative;
  width: min(72vw, 640px);
  aspect-ratio: 1 / 1;
  max-height: 62svh;
}

.model-viewer canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  touch-action: none;
}

.model-viewer__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
}

.model-viewer__fallback img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.45));
  transition: filter 1200ms var(--ease-slow), opacity 1200ms var(--ease-slow);
}

.model-viewer.is-loading .model-viewer__fallback img {
  filter: blur(18px) saturate(0.9) drop-shadow(0 30px 60px rgba(0,0,0,0.3));
}

.model-viewer canvas.is-ready {
  opacity: 1;
}
.model-viewer canvas {
  opacity: 0;
  transition: opacity 900ms var(--ease-slow);
}

.hero__bottom {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) clamp(28px, 6vh, 56px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.hero__tagline {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(18px, 2.6vw, 30px);
  letter-spacing: 0.01em;
  max-width: 20ch;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(237, 231, 221, 0.6);
  text-transform: uppercase;
}

.scroll-cue__line {
  width: 1px;
  height: 44px;
  background: rgba(237, 231, 221, 0.35);
  position: relative;
  overflow: hidden;
}

.scroll-cue__line::after {
  content: "";
  position: absolute;
  left: 0; top: -100%;
  width: 100%; height: 100%;
  background: rgba(237, 231, 221, 0.9);
  animation: scrollDrift 2.6s var(--ease-slow) infinite;
}

@keyframes scrollDrift {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__line::after { animation: none; top: 40%; }
}

/* ============================================================
   PHILOSOPHY
   ============================================================ */
.philosophy {
  padding: var(--section-pad) 0;
}

.philosophy__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.philosophy__text {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.philosophy__text p + p { margin-top: -6px; }

.philosophy__image {
  overflow: hidden;
  border-radius: 2px;
}

.philosophy__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transform: scale(1.01);
}

/* ============================================================
   MATERIAL — 3 step
   ============================================================ */
.material { padding: var(--section-pad) 0; background: var(--bg-alt); }

.material__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.step {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step__frame {
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
}

.step__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.step__label {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.step__index {
  font-family: var(--font-head);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}

.step__caption {
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ============================================================
   PROCESS STRIP
   ============================================================ */
.process { padding: var(--section-pad) 0; }

.process__strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.6vw, 20px);
}

.process__item { display: flex; flex-direction: column; gap: 12px; }

.process__frame {
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
}

.process__frame img { width: 100%; height: 100%; object-fit: cover; }

.process__caption {
  font-family: var(--font-head);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   APPLICATIONS GALLERY
   ============================================================ */
.applications { padding: var(--section-pad) 0; background: var(--bg-alt); }

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 20vw;
  gap: clamp(10px, 1.4vw, 16px);
}

.gallery__tile {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  grid-column: span 2;
  grid-row: span 1;
}

.gallery__tile--wide { grid-column: span 3; }
.gallery__tile--tall { grid-row: span 2; }

.gallery__tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1400ms var(--ease-slow);
}

.gallery__tile:hover img { transform: scale(1.045); }

.gallery__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,19,15,0) 45%, rgba(23,19,15,0.72) 100%);
}

.gallery__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 20px;
  color: var(--chrome-hi);
}

.gallery__caption .eyebrow { color: rgba(237,231,221,0.75); }

.gallery__title {
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.gallery__line {
  font-size: 12px;
  color: rgba(237,231,221,0.82);
  margin-top: 6px;
  max-width: 28ch;
}

/* ============================================================
   SIZES
   ============================================================ */
.sizes { padding: var(--section-pad) 0; }

.sizes__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: end;
}

.size-card { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }

.size-card__frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 2px;
  overflow: hidden;
}

.size-card__frame img { width: 78%; height: 78%; object-fit: contain; }

.size-card__dim {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.size-card__name {
  font-size: 12px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sizes__note {
  margin-top: clamp(36px, 6vw, 64px);
  text-align: center;
}

/* ============================================================
   TECHNICAL
   ============================================================ */
.technical { padding: var(--section-pad) 0; background: var(--bg-alt); }

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 48px;
  max-width: 760px;
}

.spec-list dt {
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.spec-list dd {
  margin: 6px 0 0;
  font-size: 15px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: var(--section-pad) 0; }

.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 96px);
}

.contact__intro { display: flex; flex-direction: column; gap: 18px; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.form-field label {
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.form-field input,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
  min-height: 44px;
  transition: border-color 300ms var(--ease-slow);
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--ink-faint); }

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.form-field textarea { resize: vertical; min-height: 110px; }

.form-field--file {
  border: 1px dashed var(--line);
  border-radius: 2px;
  padding: 16px;
  cursor: pointer;
}

.file-hint { font-size: 12px; color: var(--ink-faint); }

.btn {
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 16px 32px;
  min-height: 48px;
  cursor: pointer;
  transition: background 300ms var(--ease-slow), color 300ms var(--ease-slow);
}

.btn:hover { background: transparent; color: var(--ink); }

.form-status {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-soft);
  min-height: 1.4em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface-dark);
  color: var(--surface-dark-ink);
  padding: clamp(48px, 8vw, 80px) 0 28px;
}

.site-footer .wordmark { font-size: 20px; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: clamp(36px, 6vw, 64px);
}

.footer__col { display: flex; flex-direction: column; gap: 10px; }

.footer__col .eyebrow { color: rgba(237,231,221,0.55); }

.footer__col a, .footer__col p { font-size: 14px; color: rgba(237,231,221,0.85); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(237,231,221,0.16);
  font-size: 12px;
  color: rgba(237,231,221,0.5);
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .philosophy__grid { grid-template-columns: 1fr; }
  .philosophy__image { order: -1; }
  .philosophy__image img { aspect-ratio: 16 / 10; }

  .material__steps { grid-template-columns: 1fr; gap: 28px; }

  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; }
  .gallery__tile { grid-column: span 1 !important; grid-row: span 1 !important; }

  .sizes__grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; gap: 40px; }

  .spec-list { grid-template-columns: 1fr; }

  .contact__grid { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 680px) {
  .process__strip { grid-template-columns: repeat(3, 1fr); }
  .process__item:nth-child(4), .process__item:nth-child(5) { display: none; }

  .hero__stage { justify-content: center; padding-top: 12px; }
  .model-viewer { width: 84vw; max-height: 46svh; }

  .hero__bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .scroll-cue { flex-direction: row; align-self: center; }
  .scroll-cue__line { width: 44px; height: 1px; }
  .scroll-cue__line::after { animation-name: scrollDriftH; }
}

@keyframes scrollDriftH {
  0% { left: -100%; }
  60% { left: 100%; }
  100% { left: 100%; }
}

@media (max-width: 440px) {
  .process__strip { grid-template-columns: repeat(3, 1fr); }
}
