/* ============================================================
   HAFIS — luxury chronograph microsite
   ============================================================ */

:root {
  --bg-light: #efeae1;
  --bg-light-2: #e5ded0;
  --bg-dark: #131209;
  --bg-accent: #362d1c;
  --text-on-light: #17150f;
  --text-on-light-muted: #5b5646;
  --text-on-dark: #f3efe4;
  --text-on-dark-muted: #b8b2a0;
  --accent: #a9793f;
  --accent-soft: #c9a06a;
  --line-light: rgba(23, 21, 15, 0.14);
  --line-dark: rgba(243, 239, 228, 0.16);

  --font-display: 'Fraunces', serif;
  --font-body: 'Archivo', sans-serif;
}

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

html {
  background: var(--bg-light);
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-on-light);
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ============================================================
   LOADER
   ============================================================ */

#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.loader-brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: 0.42em;
  color: var(--text-on-dark);
  padding-left: 0.42em;
}

#loader-bar {
  width: 200px;
  height: 1px;
  background: var(--line-dark);
  position: relative;
  overflow: hidden;
}

#loader-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--accent-soft);
  transition: width 0.25s ease-out;
}

#loader-percent {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-on-dark-muted);
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.8rem 4vw;
  mix-blend-mode: difference;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-mark {
  display: block;
  height: 2.2rem;
  width: auto;
  filter: invert(1);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.6rem;
}

.nav-links a {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  opacity: 0.82;
  position: relative;
  transition: opacity 0.3s ease;
}

.nav-links a:hover { opacity: 1; }

.nav-cta {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  border: 1px solid var(--line-dark);
  padding: 0.55em 1.3em;
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-cta:hover {
  background: var(--text-on-dark);
  color: var(--bg-dark);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero-standalone {
  position: relative;
  height: 100vh;
  width: 100%;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5vw;
  z-index: 10;
}

.hero-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-light-muted);
  margin-bottom: 1.6rem;
  display: block;
}

.hero-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.4rem, 9.5vw, 8.4rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--text-on-light);
  max-width: 18ch;
}

.hero-line { display: block; overflow: hidden; }
.hero-line span { display: inline-block; }
.hero-line .italic { font-style: italic; color: var(--accent); }

.hero-tagline {
  margin-top: 2.2rem;
  max-width: 34ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-on-light-muted);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 5vw;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-on-light-muted);
}

.scroll-arrow {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--text-on-light-muted), transparent);
  position: relative;
  animation: scroll-pulse 1.8s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}

/* ============================================================
   CANVAS / VIDEO LAYER
   ============================================================ */

.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 5;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
}

#canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#tint-overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: var(--bg-light);
  opacity: 0;
  mix-blend-mode: multiply;
  transition: background-color 0.6s ease;
}

#dark-overlay {
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background: var(--bg-dark);
  opacity: 0;
}

/* ============================================================
   MARQUEE
   ============================================================ */

.marquee-wrap {
  position: fixed;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  overflow: visible;
  white-space: nowrap;
}

.marquee-text {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 13vw;
  letter-spacing: -0.01em;
  color: var(--text-on-light);
  mix-blend-mode: difference;
  filter: invert(1);
}

/* ============================================================
   SCROLL CONTAINER + SECTIONS
   ============================================================ */

#scroll-container {
  position: relative;
  height: 750vh;
  z-index: 9;
}

.scroll-section {
  position: absolute;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}

.scroll-section.is-active {
  pointer-events: auto;
}

.section-inner {
  max-width: 40vw;
}

.align-left { padding-left: 6vw; padding-right: 50vw; }
.align-right { padding-left: 50vw; padding-right: 6vw; text-align: left; }
.align-right .section-inner { margin-left: auto; }

.section-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 1.1rem;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  line-height: 1.08;
  color: var(--text-on-light);
  margin-bottom: 1.3rem;
}

.section-body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-on-light-muted);
  max-width: 36ch;
}

/* text sits on dark video mid-scroll: lift contrast with soft shadow */
.section-content .section-heading,
.section-content .section-body,
.section-content .section-label {
  text-shadow: 0 1px 24px rgba(239, 234, 225, 0.55);
}

/* ============================================================
   STATS
   ============================================================ */

.section-stats {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-grid {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 6vw;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  color: var(--text-on-dark);
  line-height: 1;
}

.stat-suffix {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--accent-soft);
  margin-top: 0.5rem;
}

.stat-label {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--text-on-dark-muted);
  max-width: 20ch;
}

/* ============================================================
   CTA
   ============================================================ */

.section-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-inner {
  max-width: 46ch;
  text-align: center;
}

.section-cta .section-label { color: var(--accent-soft); }

.section-cta .section-heading {
  color: var(--text-on-dark);
  text-shadow: none;
}

.section-cta .section-body {
  color: var(--text-on-dark-muted);
  text-shadow: none;
  margin: 0 auto 2.2rem;
}

.cta-button {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-dark);
  background: var(--text-on-dark);
  padding: 1.05em 2.4em;
  border-radius: 999px;
  transition: transform 0.35s ease, background 0.35s ease;
}

.cta-button:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  position: relative;
  z-index: 20;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 6rem 6vw 2.4rem;
}

.footer-top {
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  display: block;
  margin-bottom: 1rem;
}

.footer-tagline {
  color: var(--text-on-dark-muted);
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 700px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-heading {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.3rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-on-dark-muted);
  transition: color 0.3s ease;
}

.footer-col a:hover { color: var(--text-on-dark); }

.footer-bottom {
  margin-top: 4.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-on-dark-muted);
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 768px) {
  #scroll-container { height: 550vh; }

  .align-left, .align-right {
    padding-left: 7vw;
    padding-right: 7vw;
    text-align: center;
  }

  .align-left .section-inner,
  .align-right .section-inner {
    max-width: 100%;
    margin: 0 auto;
    background: rgba(19, 18, 9, 0.42);
    backdrop-filter: blur(6px);
    padding: 1.6rem 1.4rem;
    border-radius: 4px;
  }

  .section-content .section-heading,
  .section-content .section-body,
  .section-content .section-label {
    text-shadow: none;
    color: var(--text-on-dark);
  }

  .section-body { color: var(--text-on-dark-muted); }

  .hero-heading { font-size: clamp(2.6rem, 13vw, 4rem); }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2.4rem 1.2rem; }

  .marquee-text { font-size: 22vw; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; }
}