/* ===================================================================
   OCTABOOT — The Anatomy of a Suit
   Master Luxury Bespoke Tailoring Stylesheet
   =================================================================== */

:root {
  --bg:        #0a0a0b;
  --bg-soft:   #111114;
  --ink:       #f3efe6;
  --ink-dim:   #b8b2a6;
  --ink-faint: #6d685f;
  --gold:      #c6a35c;
  --gold-soft: #d8bd82;
  --line:      rgba(198,163,92,.28);
  --serif:     "Cormorant Garamond", "Times New Roman", serif;
  --sans:      "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease:      cubic-bezier(.16,.84,.32,1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ---------- Shared Editorial Typography ---------------------------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow--center {
  text-align: center;
}

/* ===================================================================
   1. Loader
   =================================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  background: var(--bg);
  transition: opacity 1s var(--ease), visibility 1s var(--ease);
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__mark img {
  width: 70px;
  height: auto;
  opacity: 0.9;
  animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 0.95;
    transform: translateY(-4px);
  }
}

.loader__bar {
  width: min(240px, 54vw);
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.loader__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.25s linear;
}

.loader__pct {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.loader__pct i {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--gold);
  margin-left: 2px;
}

.loader__label {
  font-size: 0.62rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ===================================================================
   2. Header
   =================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem clamp(1.2rem, 4vw, 3.2rem);
  mix-blend-mode: difference;
  transition: transform 0.5s var(--ease);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand__mark {
  width: 30px;
  height: auto;
}

.brand__word {
  font-size: 0.9rem;
  letter-spacing: 0.44em;
  font-weight: 400;
  color: #fff;
  padding-left: 0.15em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.4rem);
}

.nav a {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1;
  outline: none;
}

.nav__cta {
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0.6rem 1.1rem;
  opacity: 1 !important;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease) !important;
}

.nav__cta:hover,
.nav__cta:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

/* ===================================================================
   3. Scene & Pinned Canvas
   =================================================================== */
.scene {
  position: relative;
  height: 850vh;
  background: var(--bg);
}

.sticky {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.frames-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Cinematic overlays */
.grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grade--vignette {
  box-shadow: inset 0 0 26vw 6vw rgba(0, 0, 0, 0.72);
}

.grade--top {
  height: 40%;
  top: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
}

.grade--bottom {
  height: 42%;
  bottom: 0;
  top: auto;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
}

.grain {
  position: absolute;
  inset: -50%;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain 6s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -5%); }
  60%  { transform: translate(-3%, 4%); }
  80%  { transform: translate(5%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ===================================================================
   4. Editorial Panels
   =================================================================== */
.panel {
  position: absolute;
  z-index: 20;
  max-width: min(30ch, 34vw);
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

/* Movement 00 — Hero Title */
.panel--hero {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 44ch;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 10vw, 8.4rem);
  line-height: 0.94;
  letter-spacing: -0.01em;
  margin: 1.1rem 0 1.4rem;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-soft);
  font-weight: 300;
}

.hero-sub {
  font-size: clamp(0.9rem, 1.15vw, 1.02rem);
  color: var(--ink-dim);
  max-width: 40ch;
  margin: 0 auto;
  letter-spacing: 0.02em;
}

.scroll-cue {
  margin-top: 2.6rem;
  font-size: 0.6rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.scroll-cue span {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.2s var(--ease) infinite;
}

@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Left & Right Editorial Panels */
.panel--left {
  left: clamp(1.4rem, 6vw, 7rem);
  top: 50%;
  transform: translateY(-50%);
  text-align: left;
}

.panel--right {
  right: clamp(1.4rem, 6vw, 7rem);
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
}

.panel__index {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.4rem;
}

.panel__kicker {
  font-size: 0.64rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.75;
  margin-bottom: 1.1rem;
}

.panel__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin-bottom: 1.3rem;
}

.panel__body {
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  color: var(--ink-dim);
  line-height: 1.75;
  letter-spacing: 0.015em;
}

.panel__spec {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.panel__spec i {
  font-style: normal;
  color: var(--gold);
  margin-right: 0.7em;
}

.panel--right .panel__spec {
  display: inline-block;
}

/* Bottom Progress Bar & Counter */
.progress {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

.scene-count {
  position: absolute;
  bottom: 1.4rem;
  right: clamp(1.2rem, 4vw, 3.2rem);
  z-index: 40;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: 0.1em;
}

.scene-count i {
  font-style: normal;
  color: var(--ink-faint);
  font-size: 0.8rem;
  margin-left: 0.3em;
}

/* ===================================================================
   5. Outro / CTA & Footer
   =================================================================== */
.outro {
  position: relative;
  z-index: 2;
  background: radial-gradient(120% 90% at 50% 0%, #16151a 0%, var(--bg) 60%);
  padding: clamp(6rem, 14vh, 11rem) 1.5rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.outro__mark img {
  width: 64px;
  height: auto;
  opacity: 0.9;
  margin-bottom: 1.8rem;
}

.outro__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  line-height: 0.96;
  margin: 1.1rem 0 1.6rem;
  letter-spacing: -0.01em;
}

.outro__body {
  max-width: 46ch;
  color: var(--ink-dim);
  font-size: 1.02rem;
  line-height: 1.8;
}

.btn {
  margin-top: 2.6rem;
  display: inline-block;
  padding: 1.1rem 2.6rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: background 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background: var(--gold);
  color: #0a0a0b;
  outline: none;
}

/* Site Footer */
.site-footer {
  width: 100%;
  max-width: 1200px;
  margin: clamp(6rem, 12vh, 10rem) auto 0;
  padding: 3rem clamp(1.2rem, 4vw, 2rem) 2.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  text-align: left;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  align-self: start;
}

.foot-brand img {
  width: 30px;
  height: auto;
}

.foot-brand span {
  letter-spacing: 0.4em;
  font-size: 0.85rem;
}

.foot-cols {
  display: flex;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.foot-cols h4 {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  font-weight: 400;
}

.foot-cols a {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-dim);
  margin-bottom: 0.55rem;
  transition: color 0.3s;
}

.foot-cols a:hover,
.foot-cols a:focus-visible {
  color: var(--ink);
  outline: none;
}

.foot-legal {
  grid-column: 1 / -1;
  margin-top: 1.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

/* ===================================================================
   6. Interactive Bespoke Modals & Drawers
   =================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  background: #111114;
  border: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3.2rem);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  transform: translateY(20px);
  transition: transform 0.4s var(--ease);
}

.modal-backdrop.is-active .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink-faint);
  transition: color 0.3s;
  padding: 0.4rem;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--gold);
  outline: none;
}

.modal-header {
  margin-bottom: 2rem;
  text-align: left;
}

.modal-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0.6rem 0 0.8rem;
}

.modal-sub {
  color: var(--ink-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Modal Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group--full {
  margin-top: 1.2rem;
}

.form-group label {
  font-size: 0.64rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: #18181d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  padding: 0.85rem 1rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><polygon points='0,0 10,0 5,6' fill='%23c6a35c'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.2rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: #1c1c22;
}

.form-actions {
  margin-top: 1.8rem;
}

.btn--submit {
  width: 100%;
  text-align: center;
  margin-top: 0;
}

/* Success Confirmation State */
.booking-success {
  text-align: center;
  padding: 2rem 1rem;
}

.success-mark {
  width: 50px;
  height: 50px;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
}

.success-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.8rem;
}

.success-body {
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 42ch;
  margin: 0 auto 2rem;
}

.btn--secondary {
  border-color: var(--line);
  color: var(--ink);
  margin-top: 0;
}

/* Editorial Story Drawer */
.drawer-card {
  max-width: 720px;
}

.drawer-header {
  margin-bottom: 1.5rem;
}

.drawer-content {
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.drawer-content strong {
  color: var(--ink);
  font-weight: 400;
}

.drawer-content ul {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ===================================================================
   7. Responsive Adaptations
   =================================================================== */
@media (max-width: 900px) {
  .scene {
    height: 760vh;
  }
  .panel {
    max-width: none;
    width: min(88vw, 44ch);
  }
  .panel--left,
  .panel--right {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 11vh;
    transform: translateX(-50%);
    text-align: center;
  }
  .panel__spec {
    display: inline-block;
  }
  .grade--bottom {
    height: 56%;
  }
  .nav a:not(.nav__cta) {
    display: none;
  }
  .site-footer {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .foot-cols {
    flex-wrap: wrap;
    gap: 2rem;
  }
  .scene-count {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .brand__word {
    display: none;
  }
  .site-header {
    padding: 1rem 1.2rem;
  }
  .nav__cta {
    font-size: 0.65rem;
    padding: 0.45rem 0.85rem;
    letter-spacing: 0.18em;
    white-space: nowrap;
  }
  .eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
  }
}

@media (max-width: 440px) {
  .hero-title {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
    line-height: 0.96;
    margin: 0.8rem 0 1.2rem;
  }
  .panel--left,
  .panel--right {
    bottom: 8vh;
  }
  .panel__title {
    font-size: clamp(1.8rem, 7.5vw, 2.6rem);
    margin-bottom: 0.9rem;
  }
  .panel__body {
    font-size: 0.88rem;
    line-height: 1.6;
  }
  .modal-card {
    padding: 1.6rem 1rem;
  }
}

/* ===================================================================
   8. Reduced Motion Accessibility
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  .grain,
  .scroll-cue span,
  .loader__mark img {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
