/* =========================================================
   Desvío — Coming Soon

   Layout proportions below were measured directly off the Figma
   concept screenshot (1301px-wide reference) and expressed as vw so
   everything scales together: icon 6.5vw, wordmark 43.2vw, glass
   lens 24vw, icon→wordmark gap 3.9vw, wordmark→"Coming Soon" gap 4.8vw.
   ========================================================= */

@font-face {
  font-family: 'Bootzy TM';
  src: url('assets/fonts/BootzyTM.woff2') format('woff2'),
       url('assets/fonts/BootzyTM.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --ink: #f5f3ee;
  --glass-blur: 9px;
  --glass-radius: 50%;
  --lens-static: clamp(200px, 24vw, 380px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

body {
  min-height: 100svh;
  font-family: 'Bebas Neue', 'Bootzy TM', system-ui, sans-serif;
}

img, video { max-width: 100%; display: block; }

/* ---------- background video ---------- */

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  filter: grayscale(0.15) contrast(1.05) brightness(0.82);
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ---------- hero / lockup ---------- */

.hero {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
}

.lockup {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Icon, then the wordmark group */
.mark-group {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-logo {
  position: relative;
  z-index: 3;
  width: clamp(44px, 6.5vw, 95px);
  height: auto;
  margin-bottom: clamp(16px, 3.9vw, 56px);
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5));
}

/* The glass lens centers exactly on the wordmark (both axes) */
.wordmark-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-logo {
  position: relative;
  z-index: 3;
  width: clamp(300px, 43.2vw, 640px);
  height: auto;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.55));
}

/* Sits below the glass lens, clearing it the same way it does in the Figma concept */
.coming-soon {
  position: relative;
  z-index: 3;
  margin: clamp(20px, 4.84vw, 64px) 0 0;
  font-family: 'Bootzy TM', 'Bebas Neue', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 2vw, 26px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.92;
}

/* ---------- glass lens (Apple "liquid glass" style) ---------- */

.glass-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.glass {
  border-radius: var(--glass-radius);
  pointer-events: none;
  isolation: isolate;
}

/* Sits behind the wordmark, centered exactly on it, per the Figma "Glass" layer */
.glass--static {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--lens-static);
  height: var(--lens-static);
  transform: translate(-50%, -50%);
  z-index: 1;
  animation: glass-breathe 16s ease-in-out infinite;
}

/* Layer 1: the frosted, refractive backdrop itself */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backdrop-filter: blur(var(--glass-blur)) saturate(1.7) brightness(1.16) contrast(1.02);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.7) brightness(1.16) contrast(1.02);
  filter: url(#glass-refraction);
}

/* Layer 2: specular light (-45deg / 80%) + a crisp directional edge, Apple-glass style */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 22%, rgba(255,255,255,0) 42%),
    radial-gradient(circle at 78% 82%, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 45%);
  box-shadow:
    inset 0 0 0 0.5px rgba(255,255,255,0.16),
    inset 0.75px 0.75px 0.5px rgba(255,255,255,0.6),
    inset -0.75px -0.75px 0.75px rgba(0,0,0,0.18),
    0.75px 0.75px 2.5px -3px rgba(255,90,90,0.55),
    -0.75px -0.75px 2.5px -3px rgba(90,170,255,0.55),
    0 10px 28px rgba(0,0,0,0.24);
}

@keyframes glass-breathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.02; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass::before {
    background: rgba(255,255,255,0.08);
    filter: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  :root {
    --lens-static: clamp(170px, 58vw, 280px);
    --glass-blur: 7px;
  }

  /* Below this width the wordmark is pinned to its 300px floor (43.2vw < 300px
     the whole way down to 640px), so its rendered height is a fixed 100.84px
     (300 * 279/830). That lets the icon and "Coming Soon" be pinned straight
     to the lens's own edges with simple algebra, however big --lens-static is:
     icon bottom sits ~10px into the top of the circle, and "Coming Soon" is
     positioned so the circle's bottom edge passes through its vertical center
     (margin-top puts its top edge exactly on the circle's bottom, then
     translateY(-50%) — relative to its own height, whatever that ends up
     being — pulls it up by half its height). */
  .icon-logo {
    width: clamp(56px, 15vw, 84px);
    margin-bottom: calc(var(--lens-static) / 2 - 60.42px);
  }

  .coming-soon {
    font-size: clamp(17px, 4.5vw, 22px);
    margin-top: calc(var(--lens-static) / 2 - 50.42px);
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .glass--static {
    animation: none;
  }
}
