/* Sora — SIL Open Font License 1.1, subset to Latin basics */
@font-face {
  font-family: "Sora";
  src: url("fonts/sora-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --ink: #05060b;
  --text: #f4f7ff;
  --text-soft: rgba(222, 232, 255, 0.74);
  --text-faint: rgba(222, 232, 255, 0.42);
  --line: rgba(190, 210, 255, 0.22);
  --glow: rgba(150, 200, 255, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 100%, #1b2a4f 0%, var(--ink) 60%);
}

.backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 78%;
  transform-origin: 50% 75%;
  animation:
    settle 3.2s var(--ease) both,
    drift 38s ease-in-out 3.2s infinite alternate;
}

/* Readability veil + a slow, faint breathing light at the horizon */
.backdrop::before,
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.backdrop::before {
  background:
    radial-gradient(70% 55% at 50% 40%, rgba(5, 6, 11, 0.55), transparent 70%),
    linear-gradient(to bottom, rgba(5, 6, 11, 0.6) 0%, transparent 35%, transparent 75%, rgba(5, 6, 11, 0.5) 100%);
}

.backdrop::after {
  background: radial-gradient(40% 18% at 50% 74%, var(--glow), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: breathe 9s ease-in-out infinite alternate;
}

@keyframes settle {
  from { transform: scale(1.12); opacity: 0; filter: blur(6px); }
  to   { transform: scale(1.02); opacity: 1; filter: blur(0); }
}

@keyframes drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.06) translate3d(0, -0.6%, 0); }
}

@keyframes breathe {
  from { opacity: 0.35; }
  to   { opacity: 0.7; }
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: max(24px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom));
}

.hero__content {
  align-self: center;
  justify-self: center;
  text-align: center;
  max-width: 52rem;
  /* Lift the content above the horizon line */
  margin-bottom: 18vh;
}

.brand {
  margin: 0;
  font-size: clamp(4rem, 15vw, 10.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
  /* Room for descenders so background-clip doesn't crop the "y" */
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  background: linear-gradient(180deg, #ffffff 30%, #b9c9ec 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Optical nudge: tracking leaves trailing space on the right */
  padding-left: 0.04em;
}

.brand .dot { color: #9fd3ff; -webkit-text-fill-color: #9fd3ff; }

.tagline {
  margin: clamp(1.25rem, 3vw, 2rem) auto 0;
  font-size: clamp(1.15rem, 2.6vw, 1.75rem);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-soft);
}

.cta {
  --pad-x: 1.6rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  padding: 0.95rem var(--pad-x);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  font: inherit;
  font-size: 0.975rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition:
    border-color 0.4s var(--ease),
    background-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    transform 0.4s var(--ease);
}

/* Soft light sweep on hover */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 20%, rgba(170, 210, 255, 0.18) 50%, transparent 80%);
  transform: translateX(-110%);
  transition: transform 0.8s var(--ease);
}

.cta svg {
  width: 1em;
  height: 1em;
  transition: transform 0.4s var(--ease);
}

.cta:hover {
  border-color: rgba(190, 215, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 40px -12px rgba(120, 170, 255, 0.45);
  transform: translateY(-1px);
}

.cta:hover::before { transform: translateX(110%); }
.cta:hover svg { transform: translateX(4px); }
.cta:active { transform: translateY(0); }

.cta:focus-visible {
  outline: 2px solid #9fd3ff;
  outline-offset: 4px;
}

.footer {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.footer small { font-size: inherit; }

/* ---------- Load-in sequence ---------- */

.reveal {
  animation: rise 1.4s var(--ease) both;
  animation-delay: calc(0.5s + var(--i, 0) * 0.14s);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .hero__content { margin-bottom: 14vh; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .backdrop img { object-position: 50% 40%; }
  .hero__content { margin-bottom: 6vh; }
  .brand { font-size: clamp(3rem, 18vh, 6rem); }
  .cta { margin-top: 1.5rem; }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .backdrop img { transform: scale(1.02); }
  .cta:hover { transform: none; }
}
