/* ==========================================================================
   Aevalon landing page
   Source of truth for the design: design/reference/Horizon.dc.html
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL; licences in assets/fonts) ---------- */

@font-face {
  font-family: 'Lexend Exa';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../fonts/lexend-exa-latin-200-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lexend Exa';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/lexend-exa-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/outfit-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/outfit-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/outfit-latin-500-normal.woff2') format('woff2');
}

/* AVEROX (display face). Needs a commercial web licence before use on aevalon.com.
   When the licensed .woff2 is in assets/fonts/averox/, uncomment this block and
   add a <link rel="preload"> for it in index.html. Until then Lexend Exa is used.
@font-face {
  font-family: 'Averox';
  font-style: normal;
  font-weight: 100 400;
  font-display: swap;
  src: url('../fonts/averox/Averox-Regular.woff2') format('woff2');
}
*/

/* ---------- Tokens ---------- */

:root {
  --black: #000000;
  --ink-1: #070708;
  --ink-2: #0F0F11;
  --ink-3: #0B0B0C;
  --ivory: #F4F2EE;
  --white: #FFFFFF;
  --mist: #D9D9DD;
  --grey: #A8A8AE;
  --grey-dim: #7E7E84;
  --line: #222226;
  --line-strong: #3A3A40;
  --line-soft: #1A1A1D;
  --line-social: #2A2A2E;
  --error: #E8A5A0;
  --glow: rgba(255, 238, 220, 0.10);

  --font-display: 'Averox', 'Lexend Exa', sans-serif;
  --font-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(20px, 6vw, 88px);
  --section-space: clamp(120px, 14vw, 200px);
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ivory); }
a:hover { color: var(--white); }

:focus-visible { outline: 2px solid var(--ivory); outline-offset: 3px; }

img, svg { display: block; }

[hidden] { display: none !important; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--black);
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--black); }

/* ---------- Page background ---------- */

.page {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--black) 0%, var(--ink-1) 26%, var(--ink-2) 54%, var(--ink-3) 80%, var(--black) 100%);
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 36px var(--gutter) 0;
}

.brand { display: flex; color: var(--ivory); text-decoration: none; }

.wordmark { width: clamp(140px, 40vw, 176px); height: auto; aspect-ratio: 660 / 130; color: var(--ivory); }
.wordmark--small { width: 112px; }
/* Image version (legal pages) uses the tightly cropped file; same letter size as the inline header logo */
img.wordmark { width: 170px; aspect-ratio: 632.7 / 83.8; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.header-cta__line { display: inline-block; width: 28px; height: 1px; background: currentColor; transition: width .4s ease; }
.header-cta:hover .header-cta__line { width: 40px; }

/* ---------- Eyebrow labels ---------- */

.eyebrow {
  margin: 0;
  padding-left: 0.36em; /* balances trailing letter-spacing so the label sits truly centred */
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 12px;
  letter-spacing: 0.36em;
  color: var(--grey-dim);
}
.eyebrow--wide {
  padding-left: 0.42em;
  font-size: clamp(14px, 1.2vw, 16px);
  letter-spacing: 0.42em;
  color: var(--grey);
}

/* ---------- 1. Hero ---------- */

.hero {
  position: relative;
  min-height: 860px;
  min-height: clamp(620px, 100svh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  --sun-x: 62%;
}
/* Warm glow just above the rising sun; breathes slowly once the sun is up. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 40% 17% at var(--sun-x) 81%, var(--glow), rgba(0, 0, 0, 0) 100%);
  animation: breathe 7s ease-in-out 3.4s infinite alternate;
}

.hero__copy {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  /* 80px header + 64px breathing room, as on the design */
  padding: 144px var(--gutter) 160px;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 6vw, 96px);
  line-height: 1.12;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__line {
  margin: 0;
  font-size: clamp(17px, 1.4vw, 20px);
  letter-spacing: 0.02em;
  color: var(--grey);
}

.horizon { position: absolute; left: 0; right: 0; bottom: 0; height: 132px; }

.horizon__sun-clip {
  position: absolute;
  left: var(--sun-x);
  bottom: 68px;
  width: 108px;
  height: 54px;
  margin-left: -54px;
  overflow: hidden;
}
.horizon__sun {
  width: 108px;
  height: 108px;
  border: 1.5px solid var(--ivory);
  border-radius: 50%;
}

.horizon__line {
  position: absolute;
  left: 0; right: 0;
  bottom: 68px;
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 242, 238, 0.10), rgba(244, 242, 238, 0.85) var(--sun-x), rgba(244, 242, 238, 0.10));
}

/* Light radiating from aevum along the horizon, towards time (left) and eternity (right). */
.horizon__pulse {
  position: absolute;
  top: -1px;
  height: 3px;
  background-repeat: no-repeat;
  background-size: 40% 100%;
  background-image: linear-gradient(90deg, rgba(255, 238, 220, 0), rgba(255, 238, 220, 0.9), rgba(255, 238, 220, 0));
  filter: blur(1px);
  opacity: 0;
}
.horizon__pulse--time { left: 0; right: calc(100% - var(--sun-x)); animation: pulse-time 6s cubic-bezier(.3, 0, .4, 1) 3.6s infinite; }
.horizon__pulse--eternity { left: var(--sun-x); right: 0; animation: pulse-eternity 6s cubic-bezier(.3, 0, .4, 1) 3.6s infinite; }

.horizon__label {
  position: absolute;
  bottom: 36px;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--grey-dim);
}
.horizon__label--time { left: var(--gutter); }
.horizon__label--aevum { left: var(--sun-x); transform: translateX(-50%); font-weight: 300; color: var(--ivory); }
.horizon__label--eternity { right: var(--gutter); margin-right: -0.3em; }

/* ---------- 2. Aevum ---------- */

.aevum {
  display: flex;
  justify-content: center;
  padding: var(--section-space) var(--gutter);
}
.aevum__text {
  margin: 0;
  max-width: 940px;
  text-align: center;
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.4;
  font-weight: 300;
  color: var(--mist);
  text-wrap: balance;
}
.aevum__word { color: var(--ivory); font-weight: 400; }

/* ---------- 3. Built in ---------- */

.built-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  padding: 0 var(--gutter) var(--section-space);
}

.built-in__list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.built-in__list li {
  padding: 28px 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(20px, 1.9vw, 28px);
  letter-spacing: 0.14em;
  text-indent: 0.14em; /* balances trailing letter-spacing */
}
.built-in__list li + li { border-top: 1px solid var(--line); }

@media (min-width: 900px) {
  .built-in__list { grid-template-columns: repeat(5, 1fr); }
  .built-in__list li { padding: 44px 0; }
  .built-in__list li + li { border-top: 0; border-left: 1px solid var(--line); }
}

.built-in__note { margin: 0; font-size: 17px; color: var(--grey); text-align: center; }

/* ---------- 4. The Aevalon Horizon ---------- */

.family {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
  padding: 40px var(--gutter) clamp(140px, 15vw, 220px);
}

.family__row {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  align-items: center;
  gap: 40px 16px;
}
.family__row svg { width: 100%; max-width: 112px; height: auto; }

@media (min-width: 1080px) {
  .family__row { display: flex; justify-content: space-between; gap: 32px; }
  .family__row svg { width: 124px; max-width: none; }
}

/* ---------- 5. Early access ---------- */

.invite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 120px var(--gutter) 28px;
  text-align: center;
  background: radial-gradient(ellipse 50% 60% at 50% 40%, rgba(255, 238, 220, 0.05), rgba(0, 0, 0, 0) 70%);
}

.invite__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(30px, 4.4vw, 68px);
  line-height: 1.15;
  letter-spacing: 0.06em;
}
.invite__sub { margin: 0; font-size: 18px; color: var(--grey); }

.invite__form {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  margin-top: 24px;
}

.choice {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.opt { position: relative; display: inline-flex; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--grey);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.opt:hover span { border-color: var(--grey-dim); color: var(--ivory); }
.opt input:checked + span { background: var(--ivory); border-color: var(--ivory); color: var(--black); }
.opt input:focus-visible + span { outline: 2px solid var(--ivory); outline-offset: 3px; }

.fields {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 28px 24px;
}

.field {
  flex: 1 1 280px; /* name + email share a row, company takes the full row below */
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--grey-dim);
}
.field input {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ivory);
  font: inherit;
  font-size: 17px;
  letter-spacing: 0.01em;
  caret-color: var(--ivory);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input::placeholder { color: var(--grey-dim); opacity: 1; }
.field input:focus { outline: none; }
.field input:focus-visible { outline: none; border-bottom-color: var(--ivory); box-shadow: 0 1px 0 var(--ivory); }
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ivory);
  box-shadow: 0 0 0 1000px var(--ink-2) inset;
  transition: background-color 9999s ease-out 0s;
}
.was-validated .field input:invalid { border-bottom-color: var(--error); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.button {
  min-height: 50px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--black);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color .2s ease;
}
.button:hover { background: var(--white); }
.button[disabled] { opacity: .6; cursor: progress; }

.form-status { margin: -20px 0 0; min-height: 1.5em; font-size: 14px; color: var(--grey); }
.form-status:empty { display: none; }
.form-status[data-kind="error"] { color: var(--error); }

.form-note { margin: -16px 0 0; font-size: 13px; color: var(--grey-dim); }
.form-note a { color: var(--grey); }

.form-success { max-width: 560px; margin-top: 24px; padding: 8px 0 40px; }
.form-success:focus { outline: none; }
.form-success__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: 0.06em;
}
.form-success__text { margin: 0; font-size: 18px; color: var(--grey); }

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  justify-content: center;
  padding: 0 0 max(16px, env(safe-area-inset-bottom));
}

.site-footer__inner {
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 32px;
  padding: 40px var(--gutter) 32px;
  border-top: 1px solid var(--line-soft);
}

.social { display: flex; align-items: center; gap: 12px; }
.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-social);
  color: var(--ivory);
  transition: border-color .2s ease;
}
a.social__link:hover { border-color: var(--ivory); }

.legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 28px;
  font-size: 13px;
  color: var(--grey-dim);
}

/* ---------- Motion ---------- */

@keyframes rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@keyframes breathe { from { opacity: 1; } to { opacity: .55; } }
/* Pulses start at the sun's edge and fade out towards the ends of the line. */
@keyframes pulse-time {
  0% { background-position: 150% 0; opacity: 0; }
  10% { opacity: 1; }
  55%, 100% { background-position: -50% 0; opacity: 0; }
}
@keyframes pulse-eternity {
  0% { background-position: -50% 0; opacity: 0; }
  10% { opacity: 1; }
  55%, 100% { background-position: 150% 0; opacity: 0; }
}
/* The wordmark's O rises from behind its line, like the sun. */
@keyframes o-rise { from { transform: translateY(66px); } to { transform: translateY(0); } }
.site-header .wordmark { --o-anim: o-rise 1.8s cubic-bezier(.2, .75, .2, 1) .5s both; }
.wordmark__o { animation: var(--o-anim, none); }

.rise { animation: rise 3s cubic-bezier(.2, .75, .2, 1) .4s both; }
.fade { animation: fade 2.4s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .fade, .hero::before, .horizon__pulse, .wordmark__o { animation: none; }
  *, *::before, *::after { transition: none !important; }
}

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

@media (max-width: 480px) {
  .site-header { padding-top: 24px; }
  .hero__copy { padding-top: 120px; padding-bottom: 150px; }
  .horizon__label { letter-spacing: 0.24em; }
  .horizon__label--eternity { margin-right: -0.24em; }
  /* On phones the sun moves to the centre so AEVUM has room between TIME and ETERNITY */
  .hero::before { background: radial-gradient(ellipse 80% 15% at var(--sun-x) 81%, var(--glow), rgba(0, 0, 0, 0) 100%); }
  .hero { --sun-x: 50%; }
}

/* ==========================================================================
   Legal pages (privacy.html, terms.html, 404.html)
   ========================================================================== */

.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 36px var(--gutter) 0;
}

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) var(--gutter) var(--section-space);
}
.doc h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.doc h2 {
  margin: 48px 0 12px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ivory);
}
.doc p, .doc li { font-size: 17px; line-height: 1.65; color: var(--mist); }
.doc ul { padding-left: 1.2em; }
.doc .meta { margin: 0 0 32px; font-size: 14px; color: var(--grey-dim); }
.doc .draft-banner {
  margin: 0 0 40px;
  padding: 14px 18px;
  border: 1px dashed var(--error);
  border-radius: 8px;
  font-size: 14px;
  color: var(--error);
}
.doc mark { background: rgba(232, 165, 160, 0.16); color: var(--ivory); padding: 0 4px; border-radius: 3px; }

.notfound {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px var(--gutter);
  text-align: center;
}
.notfound h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.notfound p { margin: 0; color: var(--grey); }
