/* Tailor Made Tastes — see DESIGN.md for the token source of truth. */

:root {
  --charcoal: #1f1b18;
  --copper: #b5652d;
  --copper-light: #c9784a;
  --copper-dark: #8f4d24;
  --stitch: #d8a468;
  --ivory: #faf6f0;
  --ivory-soft: #f3ece1;
  --card: #fffdf9;
  --hairline: #ded5c9;
  --text: #2e2a26;
  --text-soft: #5c554d;
  --text-faint: #81776d;
  --on-dark: #faf6f0;
  --on-dark-soft: #c9bfb4;
  --max-width: 1100px;
  --section-y: 5.5rem;
  --seq-height: 420vh;
}

* { box-sizing: border-box; }

/* The `hidden` attribute is how every dormant slot on this page stays dormant,
   but its display:none comes from the UA stylesheet and loses to any class that
   sets display — .field and .field-row are grids, .btn is a flex. Without this,
   hiding the form after a successful send silently does nothing. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Poppins", "Avenir Next", system-ui, sans-serif;
  color: var(--charcoal);
  letter-spacing: 0.02em;
  text-wrap: balance;
}

p { text-wrap: pretty; }
img { max-width: 100%; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

.chapter a:focus-visible, .contact-box a:focus-visible { outline-color: var(--stitch); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--charcoal);
  color: var(--on-dark);
  padding: 0.75rem 1.25rem;
  z-index: 60;
  font-size: 0.85rem;
  text-decoration: none;
}

.skip-link:focus { left: 1rem; top: 1rem; }

.eyebrow {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--copper-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.eyebrow-dark { color: var(--stitch); }

/* ---------------- Nav ---------------- */

header.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 246, 240, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.site-nav .logo-link { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-nav img.mark { height: 32px; width: auto; display: block; }

nav.links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav.links a {
  color: var(--text-soft);
  text-decoration: none;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.6rem 0;
  transition: color 0.2s ease;
}

nav.links a:hover { color: var(--copper-dark); }

nav.links a.nav-cta {
  color: var(--charcoal);
  border: 1px solid var(--charcoal);
  border-radius: 2px;
  padding: 0.6rem 1.1rem;
}

nav.links a.nav-cta:hover { background: var(--charcoal); color: var(--on-dark); }

/* ---------------- Scroll sequence ---------------- */

#sequence {
  position: relative;
  height: var(--seq-height);
  background: var(--charcoal);
}

#stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--charcoal);
}

.stage-poster,
#film-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Poster sits under the canvas: visible for the instant before the first
   frame decodes, and the floor if frames never arrive. */
.stage-poster { z-index: 0; filter: saturate(0.9); }
#film-canvas { z-index: 1; }

/* Two scrims: a vertical gradient for overall depth, and a centred radial
   pool so chapter copy keeps contrast over bright areas of the film
   without flattening the whole frame. */
.stage-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(58% 46% at 50% 50%, rgba(31, 27, 24, 0.55) 0%, transparent 72%),
    linear-gradient(
      180deg,
      rgba(31, 27, 24, 0.62) 0%,
      rgba(31, 27, 24, 0.36) 42%,
      rgba(31, 27, 24, 0.78) 100%
    );
}

.rail {
  position: absolute;
  z-index: 4;
  left: 1.75rem;
  top: 22vh;
  bottom: 22vh;
  width: 2px;
  background: rgba(216, 164, 104, 0.22);
}

.rail #rail-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--copper);
  transform-origin: top center;
  transform: scaleY(0);
}

.chapters {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0 1.5rem;
}

.chapter {
  grid-area: 1 / 1;
  max-width: 40rem;
  text-align: center;
  color: var(--on-dark);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.chapter.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.chapter-mark {
  width: min(230px, 58vw);
  height: auto;
  display: block;
  margin: 0 auto 1.75rem;
  /* Reversed monochrome. A hue inversion turns the copper M cyan, which
     DESIGN.md forbids — a flat white silhouette keeps the mark's
     construction without inventing a colour. */
  filter: brightness(0) invert(1);
}

.chapter h1, .chapter h2 {
  color: var(--on-dark);
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.16;
  margin: 0 auto 1rem;
  max-width: 22ch;
  text-shadow: 0 2px 24px rgba(31, 27, 24, 0.55);
}

.chapter p {
  color: var(--on-dark-soft);
  margin: 0 auto 1.75rem;
  max-width: 44ch;
  text-shadow: 0 1px 16px rgba(31, 27, 24, 0.6);
}

.chapter p.eyebrow { margin-bottom: 0.85rem; text-shadow: none; }
.chapter .btn { margin-top: 0.25rem; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  background: var(--charcoal);
  color: var(--on-dark);
  text-decoration: none;
  padding: 0.85rem 2.1rem;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.btn:hover { background: var(--copper-dark); }
.btn-accent { background: var(--copper); }
.btn-accent:hover { background: var(--copper-light); }

.btn-outline {
  background: transparent;
  color: var(--on-dark);
  border: 1px solid rgba(250, 246, 240, 0.4);
}

.btn-outline:hover { background: rgba(250, 246, 240, 0.1); }

/* ---------------- Capability strip ---------------- */

.capability { padding: 2.25rem 0; }

.capability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 2.5rem;
  text-align: center;
}

.capability-list li {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline);
}

/* ---------------- Sections ---------------- */

section { padding: var(--section-y) 0; }
#sequence { padding: 0; }

section.alt {
  background: var(--ivory-soft);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.section-head { max-width: 40rem; margin: 0 0 3rem; }

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.125rem);
  line-height: 1.24;
  margin: 0 0 0.9rem;
  font-weight: 600;
}

.section-head > p:not(.eyebrow) { color: var(--text-soft); margin: 0; max-width: 42ch; }

/* ---------------- Services ---------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--copper);
  padding: 2rem;
}

.service-card h3 { font-size: 1.25rem; margin: 0 0 0.75rem; font-weight: 600; }
.service-card > p { color: var(--text-soft); margin: 0 0 1.5rem; font-size: 0.9375rem; }

.service-card ul {
  list-style: none;
  padding: 1.25rem 0 0;
  margin: 0 0 1.75rem;
  font-size: 0.9375rem;
  color: var(--text-soft);
  border-top: 1px dashed rgba(181, 101, 45, 0.3);
}

.service-card li { padding-left: 1.35rem; position: relative; margin-bottom: 0.6rem; }
.service-card li:last-child { margin-bottom: 0; }

.service-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 2px;
  background: var(--copper);
}

.card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--copper-dark);
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.card-link::after { content: "→"; margin-left: 0.5rem; transition: transform 0.2s ease; display: inline-block; }
.card-link:hover { color: var(--charcoal); }
.card-link:hover::after { transform: translateX(4px); }

/* ---------------- Gallery (dormant) ---------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.gallery-grid .shot {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 1px solid var(--hairline);
}

/* ---------------- Process ---------------- */

.process-steps { list-style: none; margin: 0 auto; padding: 0; max-width: 44rem; }

.process-step {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-bottom: 1px dashed rgba(181, 101, 45, 0.35);
}

.process-step:first-child { padding-top: 0; }
.process-step:last-child { border-bottom: none; padding-bottom: 0; }

.process-step .num {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--stitch);
  line-height: 1.1;
}

.process-step h3 { margin: 0 0 0.4rem; font-size: 1.0625rem; font-weight: 600; }
.process-step p { margin: 0; color: var(--text-soft); font-size: 0.9375rem; }

/* ---------------- Testimonials (dormant) ---------------- */

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.quote {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--stitch);
  padding: 2rem;
}

.quote blockquote {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
}

.quote figcaption {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

/* ---------------- Contact ---------------- */

.contact-box {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 3rem;
  background: var(--charcoal);
  color: var(--on-dark);
  padding: 3.25rem;
  border-radius: 4px;
}

.contact-box h2 {
  color: var(--on-dark);
  font-size: clamp(1.5rem, 2.6vw, 1.75rem);
  margin: 0 0 0.85rem;
}

.contact-main > p { color: var(--on-dark-soft); margin: 0 0 2rem; max-width: 40ch; }

.contact-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.contact-actions:empty { display: none; }

.contact-pending {
  border: 1px dashed var(--stitch);
  border-radius: 2px;
  padding: 1rem 1.15rem;
  font-size: 0.875rem;
  color: var(--on-dark-soft);
  margin: 0;
}

.contact-pending strong { color: var(--stitch); }

.contact-pending code {
  font-size: 0.85em;
  color: var(--on-dark);
  background: rgba(250, 246, 240, 0.1);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

/* ---------------- Enquiry form ---------------- */

.enquiry { display: grid; gap: 1.15rem; }

/* Off-screen rather than display:none — bots read the stylesheet too. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.field { display: grid; gap: 0.4rem; }

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.15rem;
}

.enquiry label {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}

.enquiry .opt {
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-faint);
}

/* 1rem is load-bearing: anything smaller and iOS zooms the page on focus. */
.enquiry input,
.enquiry textarea {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  min-height: 46px;
  width: 100%;
  padding: 0.65rem 0.85rem;
  color: var(--on-dark);
  background: rgba(250, 246, 240, 0.06);
  border: 1px solid rgba(250, 246, 240, 0.22);
  border-radius: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.enquiry textarea { resize: vertical; }

.enquiry input:hover,
.enquiry textarea:hover { border-color: rgba(250, 246, 240, 0.38); }

.enquiry input:focus,
.enquiry textarea:focus {
  outline: 2px solid var(--stitch);
  outline-offset: 1px;
  border-color: var(--stitch);
  background: rgba(250, 246, 240, 0.1);
}

.enquiry input:invalid:not(:placeholder-shown) { border-color: var(--copper-light); }

.enquiry .hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.enquiry button {
  border: 0;
  cursor: pointer;
  justify-self: start;
  margin-top: 0.35rem;
}

.enquiry button:disabled { opacity: 0.65; cursor: progress; }

.form-status {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-radius: 2px;
  font-size: 0.9375rem;
  border-left: 3px solid var(--stitch);
  background: rgba(250, 246, 240, 0.07);
  color: var(--on-dark-soft);
}

.form-status.is-sent {
  border-left-color: var(--stitch);
  color: var(--on-dark);
}

/* A failure has to be impossible to mistake for a thank-you. */
.form-status.is-failed {
  border-left-color: var(--copper-light);
  background: rgba(201, 120, 74, 0.16);
  color: var(--on-dark);
}

.contact-meta {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(216, 164, 104, 0.4);
  font-size: 0.875rem;
  color: var(--on-dark-soft);
}

.contact-meta + .contact-meta { border-top: none; padding-top: 0; margin-top: 0.5rem; }

.contact-cred {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--stitch);
}

.contact-aside { border-left: 1px solid rgba(250, 246, 240, 0.14); padding-left: 2.5rem; }

.contact-checklist { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; color: var(--on-dark-soft); }
.contact-checklist li { padding: 0.55rem 0 0.55rem 1.35rem; position: relative; }

.contact-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15em;
  width: 10px;
  height: 2px;
  background: var(--stitch);
}

/* ---------------- Footer ---------------- */

footer { border-top: 1px solid var(--hairline); padding: 2.5rem 0; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-mark { height: 26px; width: auto; display: block; opacity: 0.8; }
.footer-inner p { margin: 0; font-size: 0.8125rem; color: var(--text-faint); letter-spacing: 0.03em; }

/* ---------------- Reveals ---------------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-rise linear both;
      animation-timeline: view();
      animation-range: entry 4% cover 26%;
    }
  }

  /* Content is only hidden once JS confirms it can reveal it. */
  .js-reveal .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .js-reveal .reveal.is-in { opacity: 1; transform: none; }
  .js-reveal .stagger > .reveal:nth-child(2) { transition-delay: 0.09s; }
  .js-reveal .stagger > .reveal:nth-child(3) { transition-delay: 0.18s; }
}

@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 960px) {
  :root { --section-y: 4rem; }
  .contact-box { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; padding: 2.5rem; }
  .contact-aside {
    border-left: none;
    border-top: 1px solid rgba(250, 246, 240, 0.14);
    padding-left: 0;
    padding-top: 2rem;
  }
}

@media (max-width: 780px) {
  :root { --seq-height: 320vh; }
  .rail { left: 1rem; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 1.25rem; }

  .site-nav .wrap { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .site-nav .logo-link { justify-content: center; }
  nav.links { justify-content: center; gap: 0.85rem 1.1rem; }
  nav.links a { font-size: 0.6875rem; padding: 0.5rem 0; }
  nav.links a.nav-cta { padding: 0.5rem 0.9rem; }

  .chapter h1, .chapter h2 { font-size: clamp(1.6rem, 7vw, 2.1rem); }
  .chapter .btn, .contact-actions .btn { width: 100%; }
  .enquiry button { width: 100%; justify-self: stretch; }

  .capability-list { grid-template-columns: minmax(0, 1fr); gap: 0.85rem; }
  .services-grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .service-card { padding: 1.75rem 1.5rem; }
  .process-step { grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; }
  .process-step .num { font-size: 1.25rem; }
  .contact-box { padding: 2rem 1.5rem; }
  .footer-inner { justify-content: center; text-align: center; }
}

/* ---------------- Reduced motion / no frames ----------------
   420vh of dead scroll over a still image is hostile. Collapse the
   sequence into ordinary stacked content instead. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }

  #sequence { height: auto; }
  #stage { position: relative; height: auto; min-height: 100vh; }
  .chapters { position: relative; inset: auto; padding: 4rem 1.5rem; gap: 4rem; }
  .chapter { grid-area: auto; opacity: 1; transform: none; pointer-events: auto; }
  .rail { display: none; }
}

body.sequence-failed #sequence { height: auto; }
body.sequence-failed #stage { position: relative; height: auto; min-height: 100vh; }
body.sequence-failed .chapters { position: relative; inset: auto; padding: 4rem 1.5rem; gap: 4rem; }
body.sequence-failed .chapter { grid-area: auto; opacity: 1; transform: none; }
body.sequence-failed .rail { display: none; }
