/* =========================================================
   My Eighth House: Coming Soon
   ========================================================= */

:root {
  --black: #0a0a0c;
  --black-soft: #111116;
  --navy: #13213f;
  --navy-deep: #0c1529;
  --navy-line: rgba(58, 82, 135, 0.45);
  --gold: #d4af6a;
  --gold-light: #e8cf98;
  --gold-dim: rgba(212, 175, 106, 0.35);
  --white: #f6f2ea;
  --muted: rgba(246, 242, 234, 0.68);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --container: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.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;
}

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

/* ---------- Shared type ---------- */

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  margin: 0 0 3.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.1;
  text-align: center;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 2rem;
  max-width: 220px;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.divider span {
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.8rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, #b8924f);
  color: var(--black);
}
.btn--gold:hover,
.btn--gold:focus-visible {
  box-shadow: 0 0 28px rgba(212, 175, 106, 0.45);
  transform: translateY(-1px);
}

.btn--large { padding: 1.1rem 2.4rem; }

/* =========================================================
   1. HERO
   ========================================================= */

.hero {
  position: relative;
  min-height: min(100vh, 1000px);
  min-height: min(100svh, 1000px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(19, 33, 63, 0.9), transparent 60%),
    var(--black);
}

.hero__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 210%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 175, 106, 0.16), transparent 62%);
  pointer-events: none;
  animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.95); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.05); }
}

/* --- Threshold media container (swap img for video/canvas later) --- */

.threshold {
  position: relative;
  z-index: 1;
  width: min(300px, 62vw);
  margin-bottom: 1.5rem;
  animation: rise 1.6s var(--ease) both;
}

.threshold__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 5;          /* shape of the arch; keep for video too */
  overflow: hidden;
}

.threshold__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;            /* crops the square logo file to the arch */
  object-position: 50% 45%;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  animation: rise 1.6s 0.3s var(--ease) both;
}

.hero__headline {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1.05;
  color: var(--white);
}

.hero__tagline {
  margin: 0.9rem 0 2.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}

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

/* --- Signup --- */

.signup__row {
  display: flex;
  padding: 0.35rem;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  background: rgba(12, 21, 41, 0.6);
  backdrop-filter: blur(6px);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.signup__row:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 106, 0.12);
}

.signup__input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1.1rem;
  border: 0;
  background: transparent;
  color: var(--white);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
}
.signup__input::placeholder { color: rgba(246, 242, 234, 0.45); }
.signup__input:focus { outline: none; }

.signup__button { flex-shrink: 0; }

.signup__note {
  margin: 0.9rem 0 0;
  min-height: 1.7em;
  font-size: 0.85rem;
  color: var(--muted);
}
.signup__note.is-error { color: #e9a38f; }

.signup__button:disabled {
  cursor: default;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
}

/* Honeypot: off-screen for people, still present for bots */
.signup__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup__confirm {
  margin: 0;
  padding: 1.1rem 1.5rem;
  border: 1px solid var(--gold-dim);
  border-radius: 28px;
  background: rgba(12, 21, 41, 0.6);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--gold-light);
  animation: rise 0.8s var(--ease) both;
}
.signup__confirm:focus { outline: none; }

/* --- Scroll cue --- */

.hero__scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 48px;
  overflow: hidden;
  z-index: 1;
}
.hero__scroll span {
  display: block;
  width: 1px;
  height: 100%;
  background: linear-gradient(var(--gold), transparent);
  animation: drip 2.4s ease-in-out infinite;
}
@keyframes drip {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* =========================================================
   2. BOOK
   ========================================================= */

.book {
  padding: 7rem 0;
  background:
    linear-gradient(180deg, var(--navy-deep), var(--navy) 50%, var(--navy-deep));
  border-top: 1px solid var(--navy-line);
  border-bottom: 1px solid var(--navy-line);
}

.book__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
}

.book__cover {
  justify-self: center;
  width: 100%;
  max-width: 360px;
  padding: 0.75rem;
  border: 1px solid var(--gold-dim);
}
.book__cover img {
  width: 100%;
  height: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(212, 175, 106, 0.08);
}

.book__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.05;
}

.book__subtitle {
  margin: 0.9rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  color: var(--gold-light);
}

.book__note {
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* =========================================================
   3. PILLARS
   ========================================================= */

.pillars {
  padding: 7rem 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(19, 33, 63, 0.55), transparent 60%),
    var(--black);
}

.pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;   /* an open card grows alone; neighbours keep their height */
  gap: 1.5rem;
}

.pillar {
  position: relative;
  padding: 2.75rem 2rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(19, 33, 63, 0.55), rgba(12, 21, 41, 0.25));
  border: 1px solid var(--navy-line);
  border-radius: 160px 160px 6px 6px;   /* echoes the arch */
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.pillar:hover {
  border-color: var(--gold-dim);
  transform: translateY(-4px);
}

.pillar__numeral {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.pillar__title {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.65rem;
  line-height: 1.2;
}

.pillar__text {
  margin: 0;
  text-wrap: balance;
  font-size: 0.95rem;
  color: var(--muted);
}

/* --- Expandable cards --- */

.pillar__toggle {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
/* Stretch the button's hit area over the whole card */
.pillar__toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 160px 160px 6px 6px;
}
.pillar__toggle:focus-visible { outline: none; }
.pillar__toggle:focus-visible::after {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.pillar.is-open { border-color: var(--gold-dim); }

/* Height animates via grid rows (0fr -> 1fr) */
.pillar__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.5s var(--ease), visibility 0s 0.5s;
}
.pillar.is-open .pillar__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.5s var(--ease), visibility 0s;
}

.pillar__panel-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.pillar.is-open .pillar__panel-inner {
  opacity: 1;
  transition: opacity 0.5s 0.1s var(--ease);
}

.pillar__more {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--navy-line);
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--white);
  opacity: 0.85;
}

.pillar__fine {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--muted);
}

.pillar__join {
  position: relative;
  z-index: 1;            /* sits above the card-wide toggle */
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 4px;
  transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
.pillar__join:hover,
.pillar__join:focus-visible {
  color: var(--gold-light);
  text-shadow: 0 0 14px rgba(212, 175, 106, 0.6);
}

/* Gold + that turns into – */
.pillar__icon {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  margin: 1.25rem auto 0;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.pillar__icon::before,
.pillar__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1px;
  background: var(--gold);
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease);
}
.pillar__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.pillar.is-open .pillar__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.pillar:hover .pillar__icon,
.pillar.is-open .pillar__icon {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 106, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .pillar__panel,
  .pillar.is-open .pillar__panel,
  .pillar__panel-inner,
  .pillar.is-open .pillar__panel-inner,
  .pillar__icon::after { transition: none; }
}

/* =========================================================
   4. FOOTER
   ========================================================= */

.footer {
  padding: 3.5rem 0 2.5rem;
  background: var(--black);
  border-top: 1px solid var(--navy-line);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer__wordmark {
  width: 240px;
  height: auto;
  /* the wordmark file has generous empty margins */
  margin: -1.9rem 0 -1.6rem;
}

.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease),
              filter 0.3s var(--ease);
}
.footer__social:hover,
.footer__social:focus-visible {
  color: var(--gold-light);
  text-shadow: 0 0 14px rgba(212, 175, 106, 0.6);
  filter: drop-shadow(0 0 6px rgba(212, 175, 106, 0.45));
}

.footer__socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__copy {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(246, 242, 234, 0.45);
}

/* =========================================================
   Scroll reveal
   ========================================================= */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 860px) {
  .book { padding: 5rem 0; }
  .book__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .book__cover { max-width: 300px; }
  .divider { margin-left: auto; margin-right: auto; }

  .pillars { padding: 5rem 0; }
  .pillars__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .hero { padding-top: 2rem; }
  .threshold { width: min(240px, 64vw); }

  .signup__row {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 22px;
  }
  .signup__input { text-align: center; }
  .signup__button { width: 100%; }

  .btn--large { width: 100%; padding: 1.1rem 1.25rem; }

  .section-title { margin-bottom: 2.5rem; }

  .footer__socials {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
