/* BKXR Labs: coming-soon page. Plain CSS, no build step. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Colors are sampled from the painting: dusk sky, violet hills, pumpkin, window light. */
:root {
  color-scheme: light dark;
  --sky-top: #dde3f5;
  --sky-low: #ebe6f3;
  --ink: #24203d;
  --muted: #5b5470;
  --accent: #9a4823;
  --pumpkin: #e0874d;
  --line: rgb(36 32 61 / 0.16);
  --pill: rgb(255 255 255 / 0.55);
  --art-filter: none;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky-top: #13112a;
    --sky-low: #1d1832;
    --ink: #eceaf8;
    --muted: #aaa4c6;
    --accent: #f2a66e;
    --pumpkin: #f2a66e;
    --line: rgb(236 234 248 / 0.18);
    --pill: rgb(19 17 42 / 0.6);
    --art-filter: brightness(0.86) saturate(1.06);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--sky-low);
  background-image: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-low) 70%);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--pumpkin); outline-offset: 4px; border-radius: 4px; }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 3vh, 2.25rem);
  padding: clamp(1.75rem, 5vh, 4rem) 16px clamp(1.5rem, 4vh, 3rem);
  text-align: center;
}

/* Wordmark and tagline */
.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 620;
  font-size: clamp(3.1rem, 10vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
}
.wordmark em {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.tagline {
  margin: 0.9rem auto 0;
  max-width: 60ch;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  text-wrap: balance;
}

/* The painting */
/* Wide, but leave room on short laptop screens for the text and contact below it. */
.scene {
  margin: 0;
  width: min(100%, 1180px, max(600px, (100vh - 500px) * 2.47));
}
.frame {
  position: relative;
  aspect-ratio: 1447 / 585;
  overflow: hidden;
  -webkit-mask: url("/img/bleed.svg") center / 100% 100% no-repeat;
  mask: url("/img/bleed.svg") center / 100% 100% no-repeat;
}
.canvas {
  position: absolute;
  inset: 0;
  transform-origin: 66% 45%;
}
.canvas img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--art-filter);
}
/* A soft halo that breathes over the moon (78% across, 22% down the painting). */
.moon-glow {
  position: absolute;
  left: 78%;
  top: 22%;
  width: 30%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 251 255 / 0.7) 0%, rgb(222 216 255 / 0.32) 24%, transparent 62%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Coming soon: a pill that straddles the painting's lower edge */
.status {
  display: inline-flex;
  align-items: center;
  margin: calc(-1 * clamp(2.2rem, 4.5vw, 3.4rem)) 0 0;
  position: relative;
  padding: 0.6rem 1.5rem 0.65rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--pill);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 450;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.2;
}
.status .dot {
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.6em;
  border-radius: 50%;
  background: var(--pumpkin);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--pumpkin) 55%, transparent);
}
.status .dots span { display: inline-block; }

.teaser {
  margin: 0 auto;
  max-width: 52ch;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 350;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.contact {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.contact a {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.35s ease;
}
.contact a:hover { background-size: 0 1px; background-position: 100% 100%; }
.legal { margin: 0; font-size: 0.8rem; color: var(--muted); opacity: 0.8; }

/* Phones: crop the panorama to 4:3, keeping the moon and the big pumpkin in view. */
@media (max-width: 640px) {
  .frame {
    aspect-ratio: 4 / 3;
    -webkit-mask-image: url("/img/bleed-4x3.svg");
    mask-image: url("/img/bleed-4x3.svg");
  }
  .canvas {
    inset: 0 auto 0 50%;
    width: auto;
    aspect-ratio: 1447 / 585;
    translate: -63% 0;
  }
}

/* Motion: a quiet entrance, a slow drift in the painting, a breathing moon. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .reveal:nth-child(2) { animation-delay: 0.15s; }
  .reveal:nth-child(3) { animation-delay: 0.45s; }
  .reveal:nth-child(4) { animation-delay: 0.6s; }
  .reveal:nth-child(5) { animation-delay: 0.75s; }
  .canvas { animation: drift 38s ease-in-out infinite alternate; }
  .moon-glow { animation: breathe 6.5s ease-in-out infinite alternate; }
  .status .dot { animation: ping 2.4s ease-out infinite; }
  .status .dots span { animation: blink 1.8s ease-in-out infinite; }
  .status .dots span:nth-child(2) { animation-delay: 0.25s; }
  .status .dots span:nth-child(3) { animation-delay: 0.5s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes drift { from { scale: 1; } to { scale: 1.06; } }
@keyframes breathe { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pumpkin) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 0.6em transparent; }
}
@keyframes blink { 0%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* 404 */
.lost .moon { width: clamp(96px, 18vw, 140px); height: auto; }
.lost h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.1;
}
.lost p { margin: 0; color: var(--muted); }
.lost .home { font-family: var(--serif); font-size: 1.2rem; color: var(--accent); }
