/* =========================================================================
   SPECTRUM FABRICATIONS — concept build
   World: "Shadow Study". A railing's real job is cutting light. The page is
   a deck surface at 49°N; cast shadow is the layout material, and the sun
   moves as you scroll. Seed 1469ec59.
   ========================================================================= */

/* ---------- tokens ---------- */
:root {
  /* lit ground — sun-bleached concrete, not cream */
  --sun:        #EDEAE3;
  --sun-hi:     #FAF8F4;
  --sun-low:    #DFDBD2;

  /* cast shadow — the committed colour, cool at this latitude */
  --shadow:     #232B33;
  --shadow-deep:#131920;
  --shade:      #4A5560;

  /* the metal itself */
  --alu:        #9AA3AB;
  --alu-hi:     #C9CFD4;

  /* sunlight on a milled edge — a light effect, never a brand accent */
  --edge:       #FFD8A2;
  --cast-dark:  #000000;

  /* text */
  --ink:        #1A2027;
  --ink-2:      #5A6570;
  --paper:      #EDEAE3;
  --paper-2:    #A8B2BC;
  --on-photo:   #DDE3E8;   /* body text over a photograph */

  /* sun position: 0 = morning (raking left), 1 = evening (raking right).
     Driven by scroll + the slider. Everything shadow-shaped reads this. */
  --sun-t: 0.5;
  --sun-skew: calc((var(--sun-t) - 0.5) * 64deg);
  --sun-len:  calc(1 - (var(--sun-t) - 0.5) * (var(--sun-t) - 0.5) * 2.4);
  --sun-op:   calc(0.34 + (1 - var(--sun-len)) * 0.3);

  --rule: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  --rule-dark: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);

  --pad: clamp(1.25rem, 4.5vw, 5rem);
  --stack: clamp(4.5rem, 11vh, 9rem);

  --ease: cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sun);
  color: var(--ink);
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: var(--shadow); color: var(--sun-hi); }

:where(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--shadow);
  outline-offset: 3px;
  border-radius: 1px;
}
.on-shadow :where(a, button, input, select):focus-visible { outline-color: var(--edge); }

/* ---------- type ---------- */
.display {
  font-family: Archivo, ui-sans-serif, sans-serif;
  font-variation-settings: 'wdth' 112, 'wght' 700;
  font-size: clamp(2.6rem, 1.1rem + 6.4vw, 6rem);
  line-height: .94;
  letter-spacing: -.035em;
  margin: 0;
  text-wrap: balance;
}
.display--sm {
  font-size: clamp(1.85rem, 1.1rem + 2.9vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -.03em;
}
h2, h3 {
  font-variation-settings: 'wdth' 108, 'wght' 650;
  letter-spacing: -.022em;
  text-wrap: balance;
  margin: 0;
}
h2 { font-size: clamp(1.6rem, 1.05rem + 2.1vw, 2.6rem); line-height: 1.08; }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.4rem); line-height: 1.2; }

p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: clamp(1.06rem, 1rem + .5vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.on-shadow .lede { color: var(--paper-2); }

/* measurement type — only ever for dimensions, job data and codes */
.spec {
  font-family: 'Martian Mono', ui-monospace, monospace;
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--ink-2);
}
.on-shadow .spec { color: var(--paper-2); }

/* ---------- photo hero ---------- */
/* Their own photograph leads. A procedural render in the hero reads as a
   diagram; a hero is expected to read as a photograph. The 3D moved to
   #preview, where a CAD register is the correct one. */
.hero-photo {
  position: relative;
  min-height: clamp(28rem, 76vh, 44rem);
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--shadow-deep);
}
.hero-photo picture { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; }
.hero-photo-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(19,25,32,.90) 0%, rgba(19,25,32,.62) 34%, rgba(19,25,32,.12) 68%, rgba(19,25,32,.30) 100%),
    linear-gradient(to right, rgba(19,25,32,.55), transparent 62%);
}
.hero-photo-body { position: relative; z-index: 2; padding-block: clamp(2.5rem, 7vh, 4.5rem); color: var(--sun-hi); }
.hero-photo-body .display { color: var(--sun-hi); }
.hero-photo-body .lede { color: var(--on-photo); margin-top: 1.4rem; max-width: 44ch; }
.hero-photo-body .btn { background: var(--sun-hi); color: var(--shadow-deep); border-color: var(--sun-hi); }
.hero-photo-body .btn--ghost { background: transparent; color: var(--sun-hi); }
.hero-photo-body .btn--ghost:hover { background: color-mix(in srgb, var(--sun-hi) 14%, transparent); }
.hero-photo-credit { color: #AEB8C0; margin: 1.75rem 0 0; }

/* ---------- 3D preview section ---------- */
.preview-grid { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 62rem) { .preview-grid { grid-template-columns: .82fr 1.18fr; } }
.preview-stage { aspect-ratio: 4 / 3; }
.preview-stage .stage-fallback img { width: 100%; height: auto; border-radius: 2px; }

/* ---------- 3D stage ---------- */
/* The railing is real geometry under a real directional light. The deck is a
   ShadowMaterial plane on a transparent canvas, so the shadow it throws lands
   on the page's own background rather than on a box. */
.stage { position: relative; width: 100%; }
.stage canvas { display: block; }
.stage[data-webgl='failed'] .stage-fallback { display: block; }
.stage-fallback { display: none; width: 100%; }
.stage-hint {
  position: absolute; left: 0; bottom: 0; pointer-events: none;
}

/* ---------- surfaces ---------- */
.on-shadow {
  background: var(--shadow);
  color: var(--paper);
}
.on-shadow h2, .on-shadow h3, .on-shadow .display { color: var(--sun-hi); }
.on-shadow ::selection { background: var(--edge); color: var(--shadow-deep); }

.wrap { width: min(100% - var(--pad) * 2, 84rem); margin-inline: auto; }
.section { padding-block: var(--stack); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem var(--pad);
  background: color-mix(in srgb, var(--sun) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: var(--rule);
  transition: box-shadow .3s var(--ease);
}
.nav[data-lifted='true'] { box-shadow: 0 14px 34px -22px rgba(19,25,32,.7); }
.nav a { color: inherit; text-decoration: none; }

.mark { display: flex; align-items: center; gap: .6rem; font-variation-settings: 'wdth' 118, 'wght' 750; letter-spacing: -.03em; font-size: 1.0625rem; }
.mark svg { width: 22px; height: 22px; flex: none; }

.nav-links { display: flex; align-items: center; gap: clamp(.9rem, 1.8vw, 1.9rem); font-size: .875rem; font-weight: 500; }
.nav-links a { position: relative; padding-block: .35rem; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); }
@media (max-width: 900px) { .nav-links .opt { display: none; } }
/* At phone widths the mark plus four links overruns the bar and clips the last
   one. Keep the two that matter: the work, and the way to get in touch. */
@media (max-width: 36rem) {
  .nav { padding-inline: 1rem; }
  .mark { font-size: .9375rem; gap: .45rem; }
  .nav-links { gap: 1rem; font-size: .875rem; }
  .nav-links a { display: none; }
  .nav-links a:nth-last-child(-n+2) { display: inline-block; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .95rem 1.6rem;
  font: inherit; font-weight: 600; font-size: .9375rem;
  letter-spacing: -.01em;
  border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--sun-hi);
  text-decoration: none; cursor: pointer;
  border-radius: 2px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .2s;
  box-shadow: 0 10px 24px -16px rgba(19,25,32,.9);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -18px rgba(19,25,32,.85); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn--ghost:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); box-shadow: none; }
.on-shadow .btn { background: var(--sun-hi); color: var(--shadow-deep); border-color: var(--sun-hi); }
.on-shadow .btn--ghost { background: transparent; color: var(--sun-hi); }
.on-shadow .btn--ghost:hover { background: color-mix(in srgb, var(--sun-hi) 12%, transparent); }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(3rem, 8vh, 6.5rem) 0; overflow: hidden; }
.hero-grid { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); grid-template-columns: 1fr; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: end; } }

.hero .display em { font-style: normal; color: var(--shade); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 2rem; }

.hero-plate {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--shadow-deep);
  overflow: hidden;
  border-radius: 2px;
}
.hero-plate img { width: 100%; height: 100%; object-fit: cover; }
.hero-plate::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(19,25,32,.72), transparent 46%);
}
.plate-tag {
  position: absolute; left: 0; bottom: 0; z-index: 2;
  padding: .7rem .9rem;
  background: var(--shadow-deep); color: var(--paper-2);
  border-top-right-radius: 2px;
}

/* the sun control */
.sunbar {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: var(--rule);
  max-width: 34rem;
}
.sunbar label { flex: none; }
.sunbar input[type='range'] {
  flex: 1; height: 2px; appearance: none; background: color-mix(in srgb, var(--ink) 22%, transparent);
  cursor: ew-resize; border-radius: 2px;
}
.sunbar input[type='range']::-webkit-slider-thumb {
  appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--sun-hi); border: 1.5px solid var(--ink);
  box-shadow: 0 3px 9px -3px rgba(19,25,32,.8);
}
.sunbar input[type='range']::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--ink);
  background: var(--sun-hi);
}
.sunbar output { flex: none; min-width: 5.4ch; text-align: right; }

/* ---------- product bands ---------- */
.band { position: relative; display: grid; gap: 0; grid-template-columns: 1fr; border-top: var(--rule); }
@media (min-width: 54rem) { .band { grid-template-columns: 1fr 1fr; } .band--flip .band-media { order: -1; } }
.band-body { padding: clamp(2rem, 5vw, 4.5rem) 0; padding-right: clamp(0rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.band-media { position: relative; min-height: clamp(17rem, 42vw, 30rem); overflow: hidden; background: var(--shadow-deep); }
.band-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band-dims { display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; margin-top: 1.5rem; padding-top: 1rem; border-top: var(--rule); }

/* dimension line — real measurement notation, drawn */
.dim { display: inline-flex; align-items: center; gap: .5rem; }
.dim::before {
  content: ''; width: 26px; height: 1px; background: currentColor; opacity: .55;
  box-shadow: 0 -3px 0 -2.5px currentColor, 0 3px 0 -2.5px currentColor;
}

/* ---------- process rail ---------- */
/* Five steps. auto-fit would leave a hole at any width that isn't a factor of
   five, so the columns are declared and the last step closes the row itself. */
.rail { display: grid; gap: 1px; background: color-mix(in srgb, var(--paper) 16%, transparent); grid-template-columns: repeat(5, 1fr); border: var(--rule-dark); }
@media (max-width: 72rem) {
  .rail { grid-template-columns: repeat(3, 1fr); }
  .rail-step:nth-child(4) { grid-column: 1 / 3; }
  .rail-step:nth-child(5) { grid-column: 3 / -1; }
}
@media (max-width: 46rem) {
  .rail { grid-template-columns: repeat(2, 1fr); }
  .rail-step:nth-child(4) { grid-column: auto; }
  .rail-step:nth-child(5) { grid-column: 1 / -1; }
}
@media (max-width: 30rem) {
  .rail { grid-template-columns: 1fr; }
  .rail-step:nth-child(5) { grid-column: auto; }
}
.rail-step { background: var(--shadow); padding: 1.6rem 1.25rem 1.9rem; }
.rail-step h3 { margin-bottom: .5rem; }
.rail-step p { font-size: .9375rem; color: var(--paper-2); margin: 0; }
.rail-step svg { width: 30px; height: 30px; margin-bottom: 1.1rem; stroke: var(--edge); fill: none; stroke-width: 1.5; }

/* ---------- gallery ---------- */
.gal { columns: 3 15rem; column-gap: 10px; }
.gal figure { margin: 0 0 10px; break-inside: avoid; position: relative; overflow: hidden; background: var(--shadow-deep); border-radius: 2px; }
.gal img { width: 100%; transition: transform .7s var(--ease), filter .7s var(--ease); }
.gal figure:hover img { transform: scale(1.045); }
.gal figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem .85rem .7rem;
  background: linear-gradient(to top, rgba(19,25,32,.9), transparent);
  color: var(--paper-2);
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.gal figure:hover figcaption, .gal figure:focus-within figcaption { opacity: 1; transform: none; }

/* ---------- testimonials ---------- */
.says { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.say { display: flex; flex-direction: column; gap: 1rem; padding-top: 1.1rem; border-top: 2px solid var(--ink); }
.say blockquote { margin: 0; font-size: 1.0625rem; line-height: 1.55; }
.say img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 2px; }
.say-who { margin-top: auto; }
.say-who strong { display: block; font-variation-settings: 'wght' 650; }

/* ---------- placeholder marking (client-visible, deliberate) ---------- */
.tbd {
  position: relative;
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--edge) 55%, transparent) 0 8px, transparent 8px 16px);
  outline: 1px dashed color-mix(in srgb, var(--ink) 45%, transparent);
  padding: .1em .4em;
  border-radius: 1px;
}
.on-shadow .tbd { outline-color: color-mix(in srgb, var(--edge) 70%, transparent); background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--edge) 26%, transparent) 0 8px, transparent 8px 16px); }
.tbd-note { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem 1.1rem; border: 1px dashed color-mix(in srgb, var(--ink) 40%, transparent); background: color-mix(in srgb, var(--edge) 22%, transparent); border-radius: 2px; }
.tbd-note svg { width: 17px; height: 17px; flex: none; margin-top: .18rem; stroke: var(--ink); fill: none; stroke-width: 1.6; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.1rem; }
.field input, .field select, .field textarea {
  font: inherit; padding: .8rem .9rem; border-radius: 2px;
  border: 1.5px solid color-mix(in srgb, var(--paper) 30%, transparent);
  background: color-mix(in srgb, var(--sun-hi) 6%, transparent); color: var(--paper);
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--paper-2) 80%, transparent); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--edge); outline: none; }
.field select option { background: var(--shadow-deep); color: var(--paper); }

/* ---------- footer ---------- */
.foot { border-top: var(--rule-dark); padding-block: 3rem 2rem; }
.foot a { color: var(--paper); }
.foot-cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

/* Content is visible by default. The sun crossing the sky is this page's one
   authored motion; a fade-up on every section would be a second, weaker one —
   and anything that hides content behind a scroll listener eventually shows a
   visitor a blank page. */

/* keep the switcher off the last line of every page */
body { padding-bottom: 4.5rem; }

/* ---------- concept switcher (pitch tool, not part of the product) ---------- */
.switcher {
  position: fixed; z-index: 90; left: 50%; bottom: 1rem; transform: translateX(-50%);
  display: flex; align-items: center; gap: .2rem;
  padding: .3rem .35rem;
  background: color-mix(in srgb, var(--shadow-deep) 92%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--sun-hi) 16%, transparent);
  border-radius: 100px;
  box-shadow: 0 16px 40px -18px color-mix(in srgb, var(--cast-dark) 85%, transparent);
  max-width: calc(100vw - 1.5rem);
  overflow-x: auto;
  scrollbar-width: none;
}
.switcher::-webkit-scrollbar { display: none; }
.switcher a {
  flex: none;
  padding: .5rem .85rem; border-radius: 100px;
  color: #A8B2BC; text-decoration: none;
  font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
  transition: background .25s, color .25s;
}
.switcher a:hover { color: var(--sun-hi); background: color-mix(in srgb, var(--sun-hi) 9%, transparent); }
.switcher a[aria-current] { background: #FAF8F4; color: #131920; }
@media print { .switcher { display: none; } }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 2vw, 1.5rem);
  padding: clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--shadow-deep) 94%, transparent);
  backdrop-filter: blur(8px);
  animation: lb-in .28s cubic-bezier(.16,1,.3,1);
}
@keyframes lb-in { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .lightbox { animation: none } }
.lb-frame { margin: 0; max-width: min(100%, 68rem); display: flex; flex-direction: column; gap: .85rem; }
.lb-frame img {
  max-height: 78vh; width: auto; max-width: 100%; object-fit: contain;
  border-radius: 2px; box-shadow: 0 40px 90px -40px rgba(0,0,0,.95);
}
.lb-frame figcaption { color: var(--paper-2); text-align: center; }
.lb-btn {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sun-hi) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--sun-hi) 26%, transparent);
  border-radius: 50%; cursor: pointer; padding: 0;
  transition: background .2s, transform .2s;
}
.lb-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--sun-hi); stroke-width: 1.7; stroke-linecap: round; }
.lb-btn:hover { background: color-mix(in srgb, var(--sun-hi) 22%, transparent); transform: scale(1.06); }
.lb-btn:focus-visible { outline: 2px solid var(--edge); outline-offset: 3px; }
.lb-close { position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
@media (max-width: 40rem) {
  .lb-prev, .lb-next { position: absolute; bottom: clamp(1rem, 4vw, 2rem); }
  .lb-prev { left: 22%; } .lb-next { right: 22%; }
}

/* the gallery is now interactive, so it must look it */
.gal figure { cursor: zoom-in; }
.gal figure:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
