/* ============ Tokens ============ */
:root{
  --color-bg: #171310;
  --color-bg-alt: #1d1812;
  --color-surface: #241d16;
  --color-border: #3a2f22;
  --color-text: #f3ede1;
  --color-text-muted: #b7ab97;
  --color-accent: #c9a24a;
  --color-accent-strong: #e2bd6b;
  --color-on-accent: #1a1409;

  --font-display: 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  --radius: 4px;
  --max-width: 1240px;
  --header-h: 88px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ============ Reset ============ */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; color-scheme: dark; }
body{
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
h1,h2,h3{ font-family: var(--font-display); font-weight: 600; margin: 0 0 var(--space-sm); letter-spacing: 0.01em; }
p{ margin: 0 0 var(--space-sm); color: var(--color-text-muted); }
ul{ list-style: none; margin: 0; padding: 0; }
button{ font-family: inherit; }
svg{ width: 1.5em; height: 1.5em; fill: none; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.skip-link{
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--color-accent); color: var(--color-on-accent);
  padding: 0.75em 1.25em; border-radius: var(--radius); font-weight: 600;
}
.skip-link:focus{ left: var(--space-sm); top: var(--space-sm); }

:focus-visible{ outline: 2px solid var(--color-accent-strong); outline-offset: 3px; }

section{ padding: var(--space-2xl) var(--space-sm); }
.section-head{ max-width: 760px; margin: 0 auto var(--space-xl); text-align: center; }
.eyebrow{
  font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.75rem; color: var(--color-accent); margin-bottom: var(--space-xs); font-weight: 600;
}
h2{ font-size: clamp(1.9rem, 3.2vw, 2.75rem); color: var(--color-text); }

/* ============ Buttons ============ */
.btn{
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.9em 1.6em; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease);
  white-space: nowrap;
}
.btn svg{ width: 1.1em; height: 1.1em; fill: currentColor; }
.btn-primary{ background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover{ background: var(--color-accent-strong); transform: translateY(-2px); }
.btn-ghost{ border-color: var(--color-border); color: var(--color-text); }
.btn-ghost:hover{ border-color: var(--color-accent); color: var(--color-accent-strong); transform: translateY(-2px); }
.btn-call{ border: 1px solid var(--color-border); color: var(--color-text); padding: 0.6em 1.1em; font-size: 0.85rem; }
.btn-call svg{ fill: var(--color-accent); }
.btn-call:hover{ border-color: var(--color-accent); }
.btn-large{ padding: 1.1em 2em; font-size: 1.05rem; }

/* ============ Header ============ */
.site-header{
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  background: linear-gradient(to bottom, rgba(15,12,9,0.85), rgba(15,12,9,0));
  transition: background 300ms var(--ease), backdrop-filter 300ms var(--ease);
}
.site-header.is-scrolled{
  background: rgba(20, 16, 12, 0.86);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 1px 0 var(--color-border);
}
.header-inner{
  width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-sm);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
}
.logo{ display: flex; align-items: center; gap: 0.6em; flex-shrink: 0; }
.logo-mark{ width: 34px; height: 34px; }
.logo-mark path{ stroke: var(--color-accent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.logo-text{ font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.02em; color: var(--color-text); white-space: nowrap; }
.logo-text em{ font-style: normal; color: var(--color-accent); margin-left: 0.3em; }

.main-nav{ display: flex; align-items: center; gap: var(--space-lg); }
.main-nav ul{ display: flex; gap: var(--space-md); }
.main-nav a:not(.btn){
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
  position: relative; padding-bottom: 4px;
}
.main-nav a:not(.btn)::after{
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--color-accent);
  transition: right 260ms var(--ease);
}
.main-nav a:not(.btn):hover::after, .main-nav a:not(.btn):focus-visible::after{ right: 0; }

.nav-toggle{
  display: none; width: 44px; height: 44px; border: none; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span{ width: 22px; height: 2px; background: var(--color-text); transition: transform 250ms var(--ease), opacity 250ms var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero{
  position: relative; min-height: 100svh;
  padding: 0; overflow: hidden;
}
.hero-media{ position: absolute; inset: 0; background: #0c0906; overflow: hidden; }
.hero-backdrop{
  position: absolute; inset: -5%; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(38px) brightness(0.55) saturate(1.15);
  transform: scale(1.12);
}
.hero-video, .hero-media img{
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
}
.hero-overlay{
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to bottom, rgba(15,12,9,0.55) 0%, rgba(15,12,9,0.35) 40%, rgba(15,12,9,0.75) 100%),
    linear-gradient(to right, rgba(10,8,6,0.55), rgba(10,8,6,0.15) 45%, rgba(10,8,6,0.55));
}

/* On tall/portrait screens the 16:9 video would lose its edges (and any on-camera
   signage text) under object-fit:cover, so show it whole and let the blurred
   backdrop fill the letterboxed space instead. */
@media (max-aspect-ratio: 1/1){
  .hero-video{ object-fit: contain; }
}
.hero-frame{
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.hero-content{
  position: relative; width: 100%; height: 100%; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  max-width: 900px; margin: 0 auto; padding: clamp(120px, 24vh, 220px) var(--space-sm) clamp(96px, 18vh, 170px);
}

.hero-eyebrow{
  font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.3em;
  font-size: 0.8rem; color: var(--color-accent-strong); font-weight: 600; margin: 0;
}
.hero-actions{ display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap; }

.scroll-cue{
  position: absolute; bottom: var(--space-md); left: 50%; transform: translateX(-50%);
  color: #fff; opacity: 0.8; z-index: 2; animation: bob 2.2s ease-in-out infinite;
}
.scroll-cue svg{ width: 26px; height: 26px; }
.scroll-cue:hover{ opacity: 1; }
@keyframes bob{ 0%,100%{ transform: translate(-50%, 0); } 50%{ transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce){ .scroll-cue{ animation: none; } }

/* ============ Story ============ */
.story{ max-width: var(--max-width); margin: 0 auto; }
.story-row{
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center;
  margin-bottom: var(--space-2xl);
}
.story-row:last-child{ margin-bottom: 0; }
.story-row-reverse .story-text{ order: 2; }
.story-row-reverse .story-media{ order: 1; }
.story-media img{ border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5); aspect-ratio: 3/2; object-fit: cover; }
.story-text h2{ font-size: clamp(1.8rem, 3vw, 2.5rem); }

/* ============ Services ============ */
.services{ background: var(--color-bg-alt); }
.service-grid{
  max-width: var(--max-width); margin: 0 auto var(--space-xl);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md);
}
.service-card{
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: var(--space-lg) var(--space-md); text-align: left;
  transition: transform 260ms var(--ease), border-color 260ms var(--ease);
}
.service-card:hover{ transform: translateY(-6px); border-color: var(--color-accent); }
.service-icon{
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-md); color: var(--color-accent);
}
.service-icon svg{ width: 26px; height: 26px; }
.service-card h3{ font-size: 1.3rem; color: var(--color-text); }
.service-card p{ font-size: 0.95rem; margin: 0; }

.service-showcase{
  max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: var(--space-md);
}
.service-showcase img{ border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; }
.service-showcase figure{ margin: 0; }

/* ============ Gallery ============ */
.gallery-grid{
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: var(--space-xs);
}
.gallery-grid img{ width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); transition: transform 500ms var(--ease), filter 500ms var(--ease); }
.gallery-grid img:hover{ transform: scale(1.03); filter: brightness(1.05); }
.gallery-grid img:nth-child(4){ grid-column: span 2; grid-row: span 2; }

/* ============ Contact person ============ */
.contact-person{ background: var(--color-bg); }
.contact-person-inner{
  max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center;
}
.contact-person-inner img{
  border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5); width: 100%; height: auto;
}
.contact-person-info h3{ font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--color-text); margin-bottom: var(--space-xs); }
.contact-person-info .eyebrow{ margin-bottom: 0.2em; }
.contact-person-info p{ max-width: 40ch; }

/* ============ Contact ============ */
.contact{ background: var(--color-bg-alt); }
.contact-grid{
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl);
}
.contact-grid > *{ min-width: 0; }
.contact-details{ display: flex; flex-direction: column; gap: var(--space-md); margin-bottom: var(--space-md); }
.contact-details li{ display: flex; gap: var(--space-sm); align-items: flex-start; }
.contact-details li > div{ min-width: 0; }
.contact-details svg{ color: var(--color-accent); flex-shrink: 0; margin-top: 2px; width: 22px; height: 22px; }
.contact-details strong{ display: block; color: var(--color-text); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.2em; }
.contact-details span, .contact-details a{ color: var(--color-text-muted); font-size: 1.05rem; }
.contact-details a:hover{ color: var(--color-accent-strong); }
.map-link{ display: inline-block; margin-top: 0.3em; font-size: 0.85rem; color: var(--color-accent) !important; font-weight: 600; }

.map-embed{ border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); aspect-ratio: 16/10; }
.map-embed iframe{ width: 100%; height: 100%; border: 0; filter: grayscale(0.3) invert(0.92) contrast(0.9); }

.contact-form{
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-xs);
}
.form-intro{ font-size: 0.9rem; margin-bottom: var(--space-sm); }
.contact-form label{ font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-top: var(--space-xs); }
.contact-form input, .contact-form textarea{
  background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius);
  color: var(--color-text); padding: 0.8em 1em; font-family: inherit; font-size: 1rem;
  min-height: 44px; transition: border-color 200ms var(--ease);
}
.contact-form textarea{ resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus{ border-color: var(--color-accent); }
.contact-form .btn{ margin-top: var(--space-sm); align-self: flex-start; }
.form-note{ font-size: 0.85rem; color: var(--color-accent-strong); min-height: 1.2em; margin: 0; }

/* ============ Footer ============ */
.site-footer{ background: #100d09; border-top: 1px solid var(--color-border); padding: var(--space-xl) var(--space-sm); }
.footer-inner{ max-width: var(--max-width); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); text-align: center; }
.footer-inner p{ font-size: 0.9rem; }
.footer-inner a:hover{ color: var(--color-accent-strong); }
.footer-copy{ font-size: 0.8rem; color: #6b5f4d; }

/* ============ Reveal animation base (no-JS / reduced-motion fallback = visible) ============ */
.reveal{ opacity: 1; }
.js-ready .reveal{ opacity: 0; transform: translateY(28px); }
.js-ready .reveal.is-visible{ opacity: 1; transform: translateY(0); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }

.service-grid .service-card:nth-child(1){ transition-delay: 0ms; }
.service-grid .service-card:nth-child(2){ transition-delay: 90ms; }
.service-grid .service-card:nth-child(3){ transition-delay: 180ms; }
.gallery-grid img:nth-child(odd){ transition-delay: 60ms; }

/* ============ Responsive ============ */
@media (max-width: 1024px){
  .service-grid{ grid-template-columns: repeat(2, 1fr); }
  .gallery-grid{ grid-auto-rows: 180px; }
}

@media (max-width: 860px){
  .main-nav{ display: none; }
  .nav-toggle{ display: flex; }
  .main-nav.is-open{
    display: flex; position: fixed; inset: var(--header-h) 0 0 0; height: calc(100dvh - var(--header-h));
    background: rgba(18,14,10,0.98); backdrop-filter: blur(10px);
    flex-direction: column; align-items: stretch; justify-content: center; padding: var(--space-lg) var(--space-md);
    gap: var(--space-lg); overflow-y: auto;
  }
  .main-nav.is-open ul{ flex-direction: column; gap: var(--space-md); text-align: center; }
  .main-nav.is-open a:not(.btn){ font-size: 1.1rem; }
  .main-nav.is-open .btn-call{ justify-content: center; }

  .story-row{ grid-template-columns: 1fr; gap: var(--space-md); }
  .story-row-reverse .story-text, .story-row-reverse .story-media{ order: initial; }

  .contact-grid{ grid-template-columns: 1fr; }
  .contact-person-inner{ grid-template-columns: 1fr; text-align: center; }
  .contact-person-info p{ max-width: none; margin-left: auto; margin-right: auto; }

  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .gallery-grid img:nth-child(4){ grid-column: span 2; grid-row: span 1; }

  section{ padding: var(--space-xl) var(--space-sm); }
}

@media (max-width: 520px){
  .service-grid{ grid-template-columns: 1fr; }
  .hero-actions{ flex-direction: column; width: 100%; }
  .hero-actions .btn{ justify-content: center; }
  .logo-text{ font-size: 1.05rem; }
}

/* Match the letterboxed video's own rectangle (same fitting math as object-fit:contain)
   so the heading/buttons hug the video's actual top and bottom edges, not the full screen.
   Placed last so it wins over the generic responsive rules above. */
@media (max-aspect-ratio: 1/1){
  .hero-content{
    width: min(100%, calc(100svh * 16 / 9));
    height: auto;
    aspect-ratio: 16 / 9;
    padding: clamp(10px, 6%, 24px) var(--space-xs);
  }
  .hero-eyebrow{ font-size: 0.68rem; letter-spacing: 0.22em; }
  .hero-actions{ flex-direction: row; flex-wrap: nowrap; gap: var(--space-xs); width: auto; }
  .hero-actions .btn{ padding: 0.55em 0.9em; font-size: 0.72rem; gap: 0.4em; }
}
