/* ==========================================================================
   Vrbos Studio: landing page
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050705;
  --green-deep: #13261a;
  --green: #5f9f63;
  --mint: #d6f3c6;
  --text: #f2f5ef;
  --text-body: rgba(242, 245, 239, 0.82);
  --text-muted: rgba(242, 245, 239, 0.5);

  --pad: clamp(24px, 3vw, 48px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--mint); color: var(--bg); }

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

/* --------------------------------------------------------------------------
   Background
   -------------------------------------------------------------------------- */

.bg-fallback,
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Static glow used before WebGL is ready, and as the fallback without WebGL. */
.bg-fallback {
  background:
    radial-gradient(ellipse 26% 24% at 70% 40%, rgba(214, 243, 198, 0.85), rgba(214, 243, 198, 0) 72%),
    radial-gradient(ellipse 42% 38% at 63% 32%, rgba(95, 159, 99, 0.7), rgba(95, 159, 99, 0) 72%),
    radial-gradient(ellipse 62% 58% at 52% 44%, rgba(19, 38, 26, 0.95), rgba(19, 38, 26, 0) 78%),
    var(--bg);
  animation: fade-in 1.6s ease both;
}

.bg-canvas {
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.gl-ready .bg-canvas { opacity: 1; }
.no-webgl .bg-canvas { display: none; }

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

.stage {
  position: relative;
  z-index: 1;
  /* A definite height lets the empty top track shrink first when space is
     short (landscape phones); content may still scroll if it can't fit. */
  height: 100vh;
  height: 100svh;
  display: grid;
  /* Equal top/bottom tracks keep the logo optically centred; the bottom
     track grows if the corner text needs more room (small screens). */
  grid-template-rows: 1fr auto 1fr;
  padding:
    max(var(--pad), env(safe-area-inset-top))
    max(var(--pad), env(safe-area-inset-right))
    max(var(--pad), env(safe-area-inset-bottom))
    max(var(--pad), env(safe-area-inset-left));
}

/* --------------------------------------------------------------------------
   Logotype
   -------------------------------------------------------------------------- */

.logo {
  grid-row: 2;
  justify-self: center;
  position: relative;
  margin: 0;
  /* never taller than ~33% of the viewport (short landscape screens) */
  width: min(clamp(160px, 20vw, 310px), 48svh);
  aspect-ratio: 1455.155 / 1000;
  color: var(--text);
  transform-origin: 50% 50%;
  animation: logo-in 2s var(--ease-out) 0.2s both;
}

.logo svg {
  position: absolute;
  top: 0;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Proportions taken from the original artboard (1455.155 × 1000). */
.logo__mark { left: 0; width: 68.639%; }
.logo__word {
  left: 79.762%;
  width: 20.238%;
  animation: word-in 1.6s var(--ease-out) 0.75s both;
}

/* --------------------------------------------------------------------------
   Corner texts
   -------------------------------------------------------------------------- */

.corners {
  grid-row: 3;
  align-self: end;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding-top: 32px;
}

.corner { max-width: 340px; }
.corner--contact { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }

.corner__label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.corner__text {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-body);
  text-wrap: pretty;
}

.corner__note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

/* Copy-to-clipboard email */
.copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 450;
  letter-spacing: 0.005em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.copy__text {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.45s var(--ease-out), color 0.3s ease;
  padding-bottom: 2px;
}

.copy__icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
  transition: opacity 0.3s ease, transform 0.45s var(--ease-out);
}

.copy__icon--check { display: none; color: var(--mint); opacity: 1; }

.copy:hover .copy__text,
.copy:focus-visible .copy__text { background-size: 100% 1px; }
.copy:hover .copy__icon--copy { opacity: 1; transform: translateY(-1px); }

.copy:focus-visible {
  outline: 1px solid var(--mint);
  outline-offset: 6px;
  border-radius: 2px;
}

.copy.is-copied .copy__text { color: var(--mint); }
.copy.is-copied .copy__icon--copy { display: none; }
.copy.is-copied .copy__icon--check { display: block; animation: pop 0.45s var(--ease-out) both; }
.copy.is-copied + .copy__status { color: var(--mint); }

/* --------------------------------------------------------------------------
   Intro animation
   -------------------------------------------------------------------------- */

.corner > * { animation: rise-in 1.2s var(--ease-out) both; }
.corner--about > :nth-child(1)   { animation-delay: 1.40s; }
.corner--about > :nth-child(2)   { animation-delay: 1.48s; }
.corner--about > :nth-child(3)   { animation-delay: 1.56s; }
.corner--contact > :nth-child(1) { animation-delay: 1.50s; }
.corner--contact > :nth-child(2) { animation-delay: 1.58s; }
.corner--contact > :nth-child(3) { animation-delay: 1.66s; }

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Logo: zooms out from a soft blur into focus. */
@keyframes logo-in {
  0%   { opacity: 0; filter: blur(28px); transform: scale(1.35); }
  35%  { opacity: 1; }
  100% { opacity: 1; filter: none; transform: none; }
}

/* Vertical wordmark wipes in along its reading direction (bottom → top). */
@keyframes word-in {
  from { opacity: 0; clip-path: inset(100% 0 0 0); transform: translateY(6%); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
}

@keyframes rise-in {
  from { opacity: 0; filter: blur(10px); transform: translateY(12px); }
  to   { opacity: 1; filter: none; transform: none; }
}

@keyframes pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Final state immediately (used for screenshots: ?static) */
.is-static *,
.is-static *::before,
.is-static *::after {
  animation: none !important;
  transition: none !important;
}

/* Social preview image (?static&og): logo only */
.is-og .corners { display: none; }
.is-og .logo { width: 30vw; }

@media (prefers-reduced-motion: reduce) {
  .logo,
  .logo__word,
  .corner > *,
  .bg-fallback {
    animation: fade-in 0.6s ease both !important;
  }
  .bg-canvas { transition-duration: 0.6s; }
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .corners {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
  .corner { max-width: 420px; }
  .corner--contact { text-align: left; align-items: flex-start; }
  .corner__text { font-size: 13.5px; }
}
