@font-face {
  font-family: 'MOUNIER';
  src: url('assets/fonts/MOUNIER.otf') format('opentype');
  font-display: swap;
}

/* The stage is the garden photo, scaled to cover the window like
   background-size: cover. The screen, title and email are placed in the
   photo's own percentages, so they stay on the TV at every size.
   Each photo's screen rectangle was measured from its pure-black pixels. */
:root {
  --cs-photo: url('assets/images/coming-soon/garden.jpg');
  --cs-ratio: 1.7778;
  --scr-l: 37.66%;
  --scr-t: 33.89%;
  --scr-w: 21.64%;
  --scr-h: 29.58%;
  --board-w: 21%;
  --board-bottom: 71.2%;
  --mail-top: 71.4%;

  --cs-ink: #fff8f2;
  --cs-glass: rgba(50, 31, 82, 0.5);
  --cs-ease: cubic-bezier(0.645, 0.045, 0.355, 1);
  --font-splash: 'MOUNIER', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;
}
@media (max-aspect-ratio: 3/4) {
  :root {
    --cs-photo: url('assets/images/coming-soon/garden-portrait.jpg');
    --cs-ratio: 0.5625;
    --scr-l: 26.39%;
    --scr-t: 37.89%;
    --scr-w: 40.83%;
    --scr-h: 18.13%;
    --board-w: min(62%, 88vw);
    --board-bottom: 65.6%;
    --mail-top: 61.8%;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: #2f4a22;
  color: var(--cs-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.cs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 900ms var(--cs-ease);
}
.cs.is-ready { opacity: 1; }

.cs-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, 100vh * var(--cs-ratio));
  height: max(100vh, 100vw / var(--cs-ratio));
  transform: translate(-50%, -50%);
  background: var(--cs-photo) center / 100% 100% no-repeat;
  container-type: size;
}

/* TV screen */
.cs-screen {
  position: absolute;
  left: var(--scr-l);
  top: var(--scr-t);
  width: var(--scr-w);
  height: var(--scr-h);
  overflow: hidden;
  border-radius: 7% / 9%;
  background: #050407;
  box-shadow: inset 0 0 18px 6px rgba(0, 0, 0, 0.85);
}
.cs-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
  opacity: 0;
  transition: opacity 1200ms var(--cs-ease);
}
.cs-video.is-playing { opacity: 1; }
/* Curved CRT glass: scanlines, a dark rim and a soft sky reflection. */
.cs-screen-glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(120% 90% at 30% 18%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 45%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.55) 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 0 26px rgba(0, 0, 0, 0.7);
}

/* Wooden sign lying on the grass above the TV, its bottom edge just
   touching the TV's top. The light wood face is 43–86% of the image's
   height, so the lettering is centred there. */
.cs-board {
  position: absolute;
  left: 50%;
  bottom: var(--board-bottom);
  width: var(--board-w);
  aspect-ratio: 669 / 451;
  transform: translateX(-50%) rotate(-1.5deg);
  container-type: inline-size;
}
.cs-board-wood {
  display: block;
  width: 100%;
  height: 100%;
  filter:
    sepia(0.12) saturate(1.08) brightness(0.97)
    drop-shadow(0.9cqw 1.6cqw 1.2cqw rgba(14, 30, 8, 0.5));
}
.cs-title {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 46%;
  bottom: 17%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-family: var(--font-splash);
  font-weight: 400;
  font-size: 8.4cqw;
  line-height: 1.04;
  letter-spacing: 0.02em;
  text-align: center;
  text-wrap: balance;
  color: #3a2314;
  /* The display face is a hairline; a stroke gives it the weight of
     burnt-in lettering, and multiply lets the wood grain show through. */
  -webkit-text-stroke: 0.035em #3a2314;
  mix-blend-mode: multiply;
  text-shadow: 0 0.04em 0 rgba(255, 240, 220, 0.35);
}

/* Email under the TV */
.cs-mail {
  position: absolute;
  left: 50%;
  top: var(--mail-top);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--cs-glass);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background-color 220ms ease;
}
.cs-mail:hover,
.cs-mail:focus-visible { background: rgba(50, 31, 82, 0.72); }

/* Top bar */
.cs-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 3vw, 36px) 0;
  pointer-events: none;
}
.cs-bar > * { pointer-events: auto; }

.cs-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 52px;
  padding: 0 18px 0 4px;
  border-radius: 999px;
  background: var(--cs-glass);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
/* splash.png has its mark right of and below centre, so the image is
   enlarged and shifted to centre the mark in its box (as in the site nav). */
.cs-logo-mark {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  overflow: hidden;
}
.cs-logo-mark img {
  position: absolute;
  width: 169%;
  height: 169%;
  max-width: none;
  left: -39.8%;
  top: -37.4%;
}
.cs-logo-name {
  font-family: var(--font-splash);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cs-social { display: flex; gap: 10px; }
.cs-icon,
.cs-sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  min-width: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--cs-ink);
  background: var(--cs-glass);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  cursor: pointer;
  transition: background-color 220ms ease, transform 220ms ease;
}
.cs-icon:hover,
.cs-icon:focus-visible,
.cs-sound:hover,
.cs-sound:focus-visible { background: rgba(50, 31, 82, 0.72); transform: translateY(-1px); }

.cs-sound {
  position: absolute;
  z-index: 3;
  left: clamp(16px, 3vw, 36px);
  bottom: max(18px, env(safe-area-inset-bottom));
  gap: 9px;
  padding: 0 18px 0 14px;
  font: 500 0.85rem/1 var(--font-body);
  letter-spacing: 0.02em;
}
.cs-sound-on { display: none; }
.cs-sound[aria-pressed="true"] .cs-sound-on { display: block; }
.cs-sound[aria-pressed="true"] .cs-sound-off { display: none; }

:focus-visible { outline: 2px solid #ffc2e3; outline-offset: 3px; }

/* Butterflies fly over the garden, under the bar and buttons. They take no
   pointer events, so the page underneath stays clickable. */
.cs-butterflies {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
/* Each butterfly is a photographed specimen split into a left wing (the
   right is its mirror) and a body strip, so the wings can hinge on the body.
   The shadow is the same rig, darkened and blurred; its filter sits on the
   still images so a wingbeat only changes transforms. */
.cs-bf {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--bf-size);
  height: calc(var(--bf-size) * var(--bf-aspect));
  will-change: transform;
}
.cs-bf-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.cs-bf-wing {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.cs-bf-wing--l { left: 0; transform-origin: 100% 50%; }
.cs-bf-wing--r { left: 50%; transform-origin: 0 50%; }
.cs-bf img {
  display: block;
  width: 100%;
  height: 100%;
}
.cs-bf-mirror { transform: scaleX(-1); }
.cs-bf-body {
  position: absolute;
  top: 0;
  left: calc(50% - var(--bf-body) / 2);
  width: var(--bf-body) !important;
}
.cs-bf--shadow img {
  filter: brightness(0) blur(calc(var(--bf-size) * 0.035));
  opacity: 0.34;
}

@media (max-width: 640px) {
  .cs-logo { height: 46px; padding-right: 14px; }
  .cs-logo-mark { width: 40px; height: 40px; }
  .cs-logo-name { font-size: 1rem; }
  .cs-icon { height: 42px; min-width: 42px; }
  .cs-mail { height: 40px; font-size: 0.85rem; }
}
@media (max-width: 380px) {
  .cs-logo-name { display: none; }
  .cs-logo { padding-right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .cs, .cs-video { transition: none; }
}
