/* Echoes of the Veil — landing page */

:root {
  --bg-deep: #0a0812;
  --bg-mid: #12101c;
  --bg-panel: #1a1628;
  --fog: #2a2340;
  --text: #ebe6f5;
  --text-muted: #a89bc0;
  --gold: #d4a84b;
  --gold-soft: #e8c878;
  --gold-dim: #8a6a2e;
  --purple: #7b5ea7;
  --purple-bright: #9b7cc8;
  --purple-glow: rgba(123, 94, 167, 0.35);
  --gold-glow: rgba(212, 168, 75, 0.22);
  --line: rgba(212, 168, 75, 0.22);
  --font-display: "Cinzel", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --space: clamp(1.25rem, 4vw, 2.5rem);
  --max: 68rem;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(123, 94, 167, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 40%, rgba(74, 40, 110, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 80%, rgba(212, 168, 75, 0.06), transparent 45%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 45%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--gold);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--bg-panel);
  color: var(--gold);
  border: 1px solid var(--line);
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keep party + baked-in title in frame when the ~16:9 art is cropped */
  object-position: center 42%;
  animation: hero-drift 32s var(--ease) infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  /* Light top so art/title show; stronger fade only at the bottom for CTA */
  background:
    linear-gradient(
      180deg,
      rgba(10, 8, 18, 0.12) 0%,
      rgba(10, 8, 18, 0.05) 48%,
      rgba(10, 8, 18, 0.35) 68%,
      rgba(10, 8, 18, 0.88) 86%,
      var(--bg-deep) 100%
    );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * var(--space), var(--max));
  margin: 0 auto;
  padding: clamp(3.5rem, 10vh, 5.5rem) 0 clamp(2.5rem, 7vh, 4rem);
  text-align: center;
  align-self: end;
}

.hero__title {
  margin: 0;
}

.hero__tagline {
  margin: 0 auto 1.5rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  color: var(--text-muted);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
  opacity: 0;
  animation: rise 1s var(--ease) 0.35s forwards;
}

.hero .btn {
  opacity: 0;
  animation: rise 1s var(--ease) 0.55s forwards;
}

/*
  Tall viewports (phones/tablets in portrait): don't force 100vh cover —
  that crops the wide art and hides the baked-in title. Show the image in
  its natural ratio, then place tagline/CTA in the flow below.
*/
@media (max-width: 900px) and (max-aspect-ratio: 10/11) {
  .hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .hero__media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 1024 / 529;
    flex: 0 0 auto;
  }

  .hero__image {
    object-position: center center;
    animation: none;
  }

  .hero__veil {
    background:
      linear-gradient(
        180deg,
        transparent 0%,
        transparent 70%,
        rgba(10, 8, 18, 0.55) 88%,
        var(--bg-deep) 100%
      );
  }

  .hero__content {
    flex: 0 0 auto;
    padding: 1.25rem var(--space) 2.75rem;
    background: linear-gradient(180deg, transparent, var(--bg-deep) 28%);
  }
}

/* —— Shared sections —— */
.section {
  padding: clamp(3.5rem, 10vw, 6rem) 0;
}

.section__inner {
  width: min(100% - 2 * var(--space), var(--max));
  margin: 0 auto;
}

.section__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  letter-spacing: 0.06em;
  color: var(--gold-soft);
  text-align: center;
}

.section__lead {
  margin: 0 auto 2.5rem;
  max-width: 36rem;
  text-align: center;
  color: var(--text-muted);
}

/* —— About —— */
.about {
  border-top: 1px solid var(--line);
}

.about__text {
  margin: 0 auto;
  max-width: 42rem;
  text-align: center;
  font-size: 1.125rem;
  color: var(--text);
}

/* —— Features —— */
.features {
  background:
    linear-gradient(180deg, transparent, rgba(26, 22, 40, 0.65), transparent);
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.feature-card {
  padding: 1.5rem 1.35rem;
  background: linear-gradient(165deg, rgba(42, 35, 64, 0.55), rgba(18, 16, 28, 0.8));
  border: 1px solid rgba(123, 94, 167, 0.35);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(232, 200, 120, 0.08);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.feature-card:hover {
  border-color: rgba(212, 168, 75, 0.45);
  transform: translateY(-3px);
}

.feature-card__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--gold);
}

.feature-card__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* —— CTA —— */
.cta {
  border-top: 1px solid var(--line);
}

.cta__inner {
  max-width: 32rem;
  text-align: center;
}

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: stretch;
}

.signup__input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.85rem 1.1rem;
  font: inherit;
  color: var(--text);
  background: rgba(10, 8, 18, 0.75);
  border: 1px solid rgba(123, 94, 167, 0.45);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.signup__input::placeholder {
  color: rgba(168, 155, 192, 0.65);
}

.signup__input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.signup__note {
  flex: 1 1 100%;
  margin: 0.35rem 0 0;
  min-height: 1.4em;
  font-size: 0.95rem;
  color: var(--purple-bright);
}

.signup__note.is-error {
  color: #e8a0a0;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg-deep);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
  box-shadow: 0 0 24px var(--gold-glow);
}

.btn:hover {
  color: var(--bg-deep);
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--gold-glow);
}

.btn:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.btn:active {
  transform: translateY(0);
}

/* —— Footer —— */
.footer {
  padding: 2.25rem 0 2.75rem;
  border-top: 1px solid var(--line);
  background: rgba(8, 6, 14, 0.85);
}

.footer__inner {
  width: min(100% - 2 * var(--space), var(--max));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__copy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  justify-content: center;
}

.footer__social a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.55;
  pointer-events: none;
}

.footer__social a:hover {
  color: var(--gold);
}

/* —— Motion —— */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.03) translateY(0);
  }
  to {
    transform: scale(1.07) translateY(-1%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__image,
  .hero__tagline,
  .hero .btn {
    animation: none;
    opacity: 1;
  }

  .feature-card,
  .btn {
    transition: none;
  }
}
