:root {
  color-scheme: dark;
  --ink: #09090a;
  --paper: #f7f4ee;
  --accent: #da6b5d;
  --logo-width: min(520px, 37vw);
  --logo-top: clamp(20px, 4.3vh, 52px);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
  color: var(--paper);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #c3bfc3;
}
.background, .background__video, .background__shade, .background__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.background { z-index: -1; background: url("assets/poster.webp") center / cover no-repeat; }
.background__video {
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
}
.background__shade {
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(6, 6, 8, .35) 0%, rgba(6, 6, 8, .12) 28%, transparent 49%, rgba(7, 7, 8, .16) 74%, rgba(5, 5, 6, .56) 100%),
    linear-gradient(90deg, rgba(6, 7, 9, .11), transparent 27%, transparent 73%, rgba(6, 7, 9, .11));
}
.background__grain {
  opacity: .075;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: multiply;
}

/* Shared logo: begins at the preloader's center, then floats to the header. */
.brand {
  position: fixed;
  z-index: 31;
  top: 50%;
  left: 50%;
  width: var(--logo-width);
  max-width: calc(100vw - 52px);
  transform: translate(-50%, -50%) scale(1.08);
  transform-origin: center center;
  transition:
    top 1.35s cubic-bezier(.68, 0, .16, 1),
    transform 1.35s cubic-bezier(.68, 0, .16, 1);
  pointer-events: none;
  will-change: top, transform;
}
.brand__surface { position: relative; width: 100%; padding: 14px 17px; }
.brand__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 170px;
  object-fit: contain;
  user-select: none;
}
.is-ready .brand {
  top: var(--logo-top);
  transform: translate(-50%, 0) scale(1);
}

/* The visual preloader waits for video readiness, rather than a fake fixed time. */
.loader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #08090a;
  opacity: 1;
  visibility: visible;
  transition: opacity .9s ease .2s, visibility 0s linear 1.1s;
}
.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(120, 40, 38, .11), transparent 53%);
}
.loader__details {
  position: absolute;
  left: 50%;
  top: calc(50% + min(11vw, 110px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 220px;
  transform: translateX(-50%);
  text-align: center;
  transition: opacity .25s ease, transform .55s ease;
}
.loader__eyebrow, .loader__status {
  color: rgba(247,244,238,.46);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: .28em;
  white-space: nowrap;
}
.loader__status { color: rgba(247,244,238,.28); font-size: 8px; letter-spacing: .23em; }
.loader__track {
  position: relative;
  width: 160px;
  height: 1px;
  overflow: hidden;
  background: rgba(247,244,238,.18);
}
.loader__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 36%;
  background: #f5f0e9;
  box-shadow: 0 0 10px rgba(255,255,255,.7);
  animation: loading-slide 1.55s ease-in-out infinite;
}
@keyframes loading-slide {
  from { transform: translateX(-115%); }
  to { transform: translateX(395%); }
}
.is-ready .loader { opacity: 0; visibility: hidden; }
.is-ready .loader__details { opacity: 0; transform: translate(-50%, 12px); }

/* Minimal, tactile Instagram button. */
.actions {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: max(48px, calc(env(safe-area-inset-bottom) + 36px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 19px;
  width: max-content;
  max-width: calc(100% - 32px);
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity .9s ease .75s, transform .9s cubic-bezier(.2,.7,.2,1) .75s;
}
.is-ready .actions { opacity: 1; transform: translate(-50%, 0); }
.actions__eyebrow {
  color: rgba(255,255,255,.88);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .29em;
  text-shadow: 0 2px 18px rgba(0,0,0,.9);
}
.instagram-button {
  --mag-x: 0px;
  --mag-y: 0px;
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-width: 313px;
  height: 66px;
  padding: 0 22px;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 9px;
  outline: none;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0,0,0,.25);
  color: #111;
  text-decoration: none;
  -webkit-backdrop-filter: blur(17px);
  backdrop-filter: blur(17px);
  transform: translate3d(var(--mag-x), var(--mag-y), 0);
  transition:
    border-color .3s ease,
    background .3s ease,
    box-shadow .3s ease,
    color .3s ease,
    transform .32s cubic-bezier(.2,.7,.15,1);
}
.instagram-button__shine {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(116deg, transparent 0%, transparent 29%, rgba(0,0,0,.09) 50%, transparent 70%, transparent 100%);
  transform: translateX(-120%);
  transition: transform .75s cubic-bezier(.25,.6,.3,1);
}
.instagram-button__icon { display: inline-flex; flex-shrink: 0; width: 22px; height: 22px; }
.instagram-button__icon svg { width: 100%; height: 100%; }
.instagram-button__text { font-size: 14px; font-weight: 650; letter-spacing: .008em; white-space: nowrap; }
.instagram-button__arrow {
  display: inline-flex;
  width: 17px;
  height: 17px;
  margin-left: 3px;
  opacity: .7;
  transform: translate(0,0);
  transition: opacity .3s ease, transform .3s ease;
}
.instagram-button__arrow svg { width: 100%; height: 100%; }
.instagram-button:hover, .instagram-button:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #111;
  box-shadow: 0 18px 48px rgba(0,0,0,.32), 0 0 0 1px rgba(255,255,255,.22);
}
.instagram-button:hover .instagram-button__shine, .instagram-button:focus-visible .instagram-button__shine { transform: translateX(120%); }
.instagram-button:hover .instagram-button__arrow, .instagram-button:focus-visible .instagram-button__arrow { opacity: 1; transform: translate(3px, -3px); }
.instagram-button:active { background: #eaeaea; }
.instagram-button:focus-visible { outline: 2px solid rgba(255,255,255,.96); outline-offset: 5px; }

/* Desktop-only custom cursor, never on touch screens. */
.custom-cursor { display: none; position: fixed; top: 0; left: 0; pointer-events: none; z-index: 100; border-radius: 50%; }
@media (hover: hover) and (pointer: fine) {
  .has-custom-cursor, .has-custom-cursor a { cursor: none; }
  .has-custom-cursor .custom-cursor { display: block; opacity: 0; transition: opacity .2s ease; }
  .has-custom-cursor .custom-cursor.is-visible { opacity: 1; }
  .custom-cursor--ring { width: 32px; height: 32px; margin: -16px 0 0 -16px; border: 1px solid rgba(255,255,255,.88); mix-blend-mode: difference; }
  .custom-cursor--dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fcf4ec; mix-blend-mode: difference; }
}

@media (max-width: 700px) {
  :root { --logo-width: calc(100vw - 46px); --logo-top: max(22px, env(safe-area-inset-top)); }
  .brand { max-width: 430px; }
  .brand__surface { padding: 11px 13px; }
  .loader__details { top: calc(50% + 90px); gap: 15px; }
  .actions { bottom: max(34px, calc(env(safe-area-inset-bottom) + 26px)); gap: 16px; }
  .instagram-button { min-width: min(313px, calc(100vw - 48px)); height: 61px; gap: 12px; padding: 0 15px; }
  .instagram-button__text { font-size: 13px; }
  .instagram-button__icon { width: 20px; height: 20px; }
  .background__shade {
    background: linear-gradient(to bottom, rgba(0,0,0,.24), transparent 30%, transparent 56%, rgba(0,0,0,.53) 100%);
  }
}
@media (max-height: 560px) and (min-width: 701px) {
  :root { --logo-width: min(340px, 34vw); --logo-top: 10px; }
  .brand__surface { padding: 8px 13px; }
  .actions { bottom: 15px; gap: 10px; }
  .instagram-button { height: 50px; }
  .loader__details { top: calc(50% + 75px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .brand { will-change: auto; }
}
