/* BlackBlinds — Coming Soon
   Palette: deep black + ivory. Mobile first. */

@property --bar {
  syntax: "<number>";
  inherits: true;
  initial-value: 0.24;
}

:root {
  --ink: #050505;
  --ink-2: #0b0b0a;
  --ivory: #f4eee3;
  --ivory-2: #efe8da;
  --ivory-deep: #d6cdbd;
  --muted: rgba(244, 238, 227, 0.58);
  --faint: rgba(244, 238, 227, 0.34);
  --hair: rgba(244, 238, 227, 0.18);
  --light: 250, 246, 238;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --rail-h: calc(var(--safe-t) + 16px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --display: "Syncopate", "Helvetica Neue", Arial, sans-serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --mono-h: clamp(128px, 26svh, 300px);
}

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

html {
  background: var(--ink);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-x: clip;
}

html.is-locked,
html.is-locked body {
  height: 100%;
  overflow: hidden;
}

::selection {
  background: var(--ivory);
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

button {
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

:focus-visible {
  outline: 1px solid var(--ivory);
  outline-offset: 4px;
}

/* ---------- Ambient scene ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene__light {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.no-js .scene__light,
.is-reduced .scene__light {
  opacity: 1;
}

.js.is-lit:not(.is-reduced) .scene__light {
  animation: flicker 1.1s linear forwards;
}

@keyframes flicker {
  0% { opacity: 0; }
  6% { opacity: 0.55; }
  9% { opacity: 0.05; }
  15% { opacity: 0.8; }
  18% { opacity: 0.2; }
  27% { opacity: 0.95; }
  31% { opacity: 0.5; }
  42%, 100% { opacity: 1; }
}

.scene__glow {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 150vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: radial-gradient(
    closest-side,
    rgba(var(--light), 0.2),
    rgba(var(--light), 0.08) 30%,
    rgba(var(--light), 0.025) 56%,
    transparent 74%
  );
}

.scene__shadow {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 160vmax;
  height: 160vmax;
  margin: -80vmax 0 0 -80vmax;
  transform: rotate(-16deg) skewX(-14deg);
  translate: calc(var(--px, 0) * -18px) calc(var(--py, 0) * -12px);
  -webkit-mask-image: radial-gradient(ellipse 30% 24% at 54% 46%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 30% 24% at 54% 46%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
}

.scene__bars {
  --bp: clamp(34px, 6vmin, 64px);
  position: absolute;
  inset: -10% 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent calc(var(--bp) * 0.18),
    rgba(var(--light), 0.085) calc(var(--bp) * 0.36),
    rgba(var(--light), 0.085) calc(var(--bp) * 0.62),
    transparent calc(var(--bp) * 0.8),
    transparent var(--bp)
  );
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  to { transform: translate3d(0, calc(var(--bp) * 1.5), 0); }
}

.scene__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 38%, rgba(0, 0, 0, 0.75) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Layout ---------- */

.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: calc(var(--safe-t) + 56px);
  padding: calc(var(--safe-t) + 20px) calc(var(--safe-r) + 76px) 0 calc(var(--safe-l) + 22px);
}

.top__label {
  font: 500 10px/1 var(--sans);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px calc(var(--safe-r) + 20px) 28px calc(var(--safe-l) + 20px);
  text-align: center;
}

.foot {
  position: relative;
  z-index: 2;
  padding: 0 22px calc(var(--safe-b) + 20px);
  text-align: center;
  font: 500 9.5px/1.6 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 238, 227, 0.28);
}

/* ---------- Monogram: the B is a blind ---------- */

.mono {
  position: relative;
  display: block;
  width: calc(var(--mono-h) * 100 / 140);
  height: var(--mono-h);
  margin: 0 0 clamp(22px, 4svh, 40px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 800px;
}

.mono::before {
  content: "";
  position: absolute;
  inset: -50% -85%;
  background: radial-gradient(closest-side, rgba(var(--light), 0.22), rgba(var(--light), 0.06) 45%, transparent 72%);
  opacity: 1;
  transition: opacity 1.2s var(--ease-io) 0.2s;
  pointer-events: none;
}

.is-b-closed .mono::before {
  opacity: 0.15;
}

.mono__svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotateY(calc(var(--px, 0) * 10deg)) rotateX(calc(var(--py, 0) * -8deg));
  transition: transform 0.6s var(--ease-out);
}

.mono__slats rect {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transform: scaleY(0.16);
  transition: transform 0.9s var(--ease-io);
  transition-delay: calc(var(--i) * 45ms);
}

.is-b-closed .mono__slats rect {
  transform: scaleY(1.04);
}

.is-b-ripple .mono__slats rect {
  animation: slat-ripple 1.25s var(--ease-io) calc(var(--i) * 55ms) both;
}

@keyframes slat-ripple {
  0%, 100% { transform: scaleY(0.16); }
  45% { transform: scaleY(1.04); }
}

.mono__outline {
  fill: none;
  stroke: rgba(244, 238, 227, 0.4);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* ---------- Wordmark ---------- */

.wordmark {
  margin: 0;
  margin-right: -0.14em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(19px, 7vw, 56px);
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ivory);
}

.b-slat {
  color: var(--ivory);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .b-slat {
    --pitch: 0.1em;
    background: repeating-linear-gradient(
      180deg,
      #fffdf8 0,
      var(--ivory-deep) calc(var(--pitch) * (1 - var(--bar))),
      transparent calc(var(--pitch) * (1 - var(--bar))),
      transparent var(--pitch)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    transition: --bar 0.9s var(--ease-io);
  }

  .is-b-closed .b-slat {
    --bar: 0.8;
  }

  .is-b-ripple .b-slat {
    animation: bar-ripple 1.25s var(--ease-io) both;
  }
}

@keyframes bar-ripple {
  0%, 100% { --bar: 0.24; }
  45% { --bar: 0.8; }
}

/* ---------- Coming soon ---------- */

.soon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  margin: clamp(14px, 2.6svh, 26px) 0 0;
  font-family: var(--serif);
  font-size: clamp(44px, 14vw, 128px);
  line-height: 1;
}

.soon em {
  display: block;
  padding: 0 0.04em 0.08em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ivory);
  background: linear-gradient(180deg, #fffdf8 10%, var(--ivory) 55%, var(--ivory-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.soon__rule {
  flex: none;
  width: clamp(16px, 5vw, 64px);
  height: 1px;
  background: var(--hair);
}

.tagline {
  max-width: 32ch;
  margin: clamp(12px, 2svh, 20px) 0 0;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--muted);
}

/* ---------- Notify form ---------- */

.notify {
  width: 100%;
  max-width: 420px;
  margin: clamp(22px, 4svh, 36px) 0 0;
}

.notify__field {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 5px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(244, 238, 227, 0.03);
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.notify__field:focus-within {
  border-color: rgba(244, 238, 227, 0.5);
  background: rgba(244, 238, 227, 0.05);
  box-shadow: 0 0 0 4px rgba(244, 238, 227, 0.06), 0 14px 40px -14px rgba(var(--light), 0.3);
}

.notify input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 8px 0 18px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  color: var(--ivory);
  font: 400 16px/1 var(--sans);
  letter-spacing: 0.01em;
}

.notify input::placeholder {
  color: var(--faint);
}

.notify input:-webkit-autofill {
  -webkit-text-fill-color: var(--ivory);
  -webkit-box-shadow: 0 0 0 40px var(--ink-2) inset;
  caret-color: var(--ivory);
}

.notify button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 18px 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffdf8, var(--ivory-2));
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 8px 24px -10px rgba(var(--light), 0.45);
  color: var(--ink);
  font: 600 11.5px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
}

.notify button svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease-out);
}

.notify button:active {
  transform: scale(0.97);
}

.notify.is-sending button {
  opacity: 0.6;
  pointer-events: none;
}

.notify.is-done .notify__field {
  border-color: rgba(244, 238, 227, 0.4);
}

.notify.is-done input {
  pointer-events: none;
  color: var(--muted);
}

.notify__note {
  min-height: 1.5em;
  margin: 12px 0 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--faint);
}

@media (hover: hover) {
  .notify button:hover svg {
    transform: translateX(3px);
  }
}

/* ---------- Entrance ---------- */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  filter: blur(8px);
  transition:
    opacity 1.4s var(--ease-out),
    transform 1.6s var(--ease-out),
    filter 1.4s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms + 250ms);
}

.js.is-lit .reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

.js .wordmark {
  letter-spacing: 0.3em;
  transition:
    opacity 1.4s var(--ease-out),
    transform 1.6s var(--ease-out),
    filter 1.4s var(--ease-out),
    letter-spacing 2.4s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms + 250ms);
}

.js.is-lit .wordmark {
  letter-spacing: 0.14em;
}

/* ---------- Full-screen blinds ---------- */

.blinds {
  display: none;
}

.js .blinds {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100lvh;
  z-index: 50;
  overflow: hidden;
  touch-action: none;
  cursor: pointer;
  will-change: transform;
}

.js .blinds.is-gone,
.is-reduced .blinds {
  visibility: hidden;
  pointer-events: none;
}

.blinds__rail {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: var(--rail-h);
  background: linear-gradient(180deg, #080808, #161615 72%, #0a0a0a);
  box-shadow: 0 1px 0 rgba(244, 238, 227, 0.16), 0 10px 22px rgba(0, 0, 0, 0.65);
}

.blinds__body {
  position: absolute;
  top: var(--rail-h);
  left: 0;
  right: 0;
  bottom: 0;
  perspective: 1100px;
  perspective-origin: 50% 30%;
}

.blinds__slats {
  position: absolute;
  inset: 0;
}

.slat {
  position: absolute;
  top: 0;
  left: -3%;
  width: 106%;
  background: linear-gradient(180deg, #1b1b1a 0%, #121211 30%, #0a0a0a 70%, #050505 100%);
  will-change: transform;
}

.slat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 4%, rgba(var(--light), 0.5) 50%, transparent 96%);
  opacity: 0;
}

.blinds.is-lit .slat::before {
  animation: flicker 1.1s linear forwards;
}

.slat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--light), 0.16), rgba(var(--light), 0.03) 60%, transparent);
  opacity: calc(var(--a, 0) * var(--lit, 0));
}

.blinds.is-lit {
  --lit: 1;
}

.blinds__bottom {
  position: absolute;
  top: 0;
  left: -3%;
  width: 106%;
  height: 12px;
  background: linear-gradient(180deg, #2a2a28, #0e0e0d);
  box-shadow: inset 0 1px 0 rgba(var(--light), 0.22), 0 8px 18px rgba(0, 0, 0, 0.7);
  will-change: transform;
}

.blinds__ladders {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: var(--full, 100%);
  transform-origin: 50% 0;
  pointer-events: none;
}

.blinds__ladders i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(244, 238, 227, 0.1);
}

.blinds__ladders i:first-child { left: 16%; }
.blinds__ladders i:last-child { right: 16%; }

/* ---------- Pull cord ---------- */

.cord {
  position: fixed;
  top: 0;
  right: calc(var(--safe-r) + 14px);
  z-index: 60;
  width: 44px;
  height: calc(var(--safe-t) + 108px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.no-js .cord,
.is-reduced .cord {
  display: none;
}

.cord__line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: calc(100% - 32px);
  background: linear-gradient(180deg, rgba(244, 238, 227, 0.1), rgba(244, 238, 227, 0.55));
  transform-origin: 50% 0;
}

.cord__knob {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 10px;
  height: 24px;
  margin-left: -4.5px;
  border-radius: 6px;
  background: linear-gradient(90deg, #a9a196, #fffdf8 45%, #bdb5a8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), 0 0 18px rgba(var(--light), 0.2);
}

.cord__hint {
  position: absolute;
  right: calc(50% + 12px);
  bottom: 14px;
  font: italic 14px/1 var(--serif);
  color: var(--faint);
  transition: opacity 0.6s;
}

.cord.is-pulling .cord__knob {
  animation: pull-knob 0.7s var(--ease-out);
}

.cord.is-pulling .cord__line {
  animation: pull-line 0.7s var(--ease-out);
}

@keyframes pull-knob {
  30% { transform: translateY(16px); }
  60% { transform: translateY(-4px); }
}

@keyframes pull-line {
  30% { transform: scaleY(1.2); }
  60% { transform: scaleY(0.95); }
}

/* ---------- Larger screens ---------- */

@media (min-width: 768px) {
  :root {
    --mono-h: clamp(160px, 30svh, 320px);
  }

  .top {
    padding-left: calc(var(--safe-l) + 40px);
  }

  .top__label {
    font-size: 11px;
  }

  .tagline {
    font-size: 16px;
  }

  .cord {
    right: calc(var(--safe-r) + 32px);
  }
}

@media (max-height: 640px) and (orientation: landscape) {
  :root {
    --mono-h: clamp(90px, 22svh, 160px);
  }

  .hero {
    padding-top: 8px;
  }

  .soon {
    font-size: clamp(34px, 8vw, 72px);
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
