/* =============================================================================
   Shared, reusable components (loaded site-wide via base.html). Page-specific
   layout lives in that page's own stylesheet (e.g. home.css). Consumes tokens
   from main.css.
   ========================================================================== */

/* --- Section header ------------------------------------------------------- */
.section-head { max-width: 660px; margin: 0 auto var(--space-12); text-align: center; }
.section-head .eyebrow { display: block; margin-bottom: var(--space-3); }
.section-head h2 { margin-bottom: var(--space-3); }

/* --- Interior page header ------------------------------------------------- */
.page-header {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--space-16), 12vw, var(--space-24)) clamp(var(--space-8), 6vw, var(--space-12));
  text-align: center;
}
.page-header__inner { position: relative; z-index: 1; max-width: 720px; margin-inline: auto; }
.page-header .eyebrow { display: block; margin-bottom: var(--space-3); }
.page-header h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: var(--space-4); }
.page-header .lead { max-width: 56ch; margin-inline: auto; }

/* --- Feature card (icon + title + body) ----------------------------------- */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--gold-faint);
  border-radius: var(--radius-card);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  transition: border-color var(--dur) var(--ease-cine), transform var(--dur) var(--ease-cine);
}
.feature-card:hover { border-color: var(--gold-hairline); transform: translateY(-2px); }
.feature-card__icon,
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  color: var(--gold);
  border: 1px solid var(--gold-hairline);
  border-radius: 50%;
  box-shadow: 0 0 24px -10px var(--ember-glow);
}
.feature-card__icon .icon, .icon-badge .icon { width: 24px; height: 24px; }
.feature-card__title { font-size: 1rem; letter-spacing: 0.04em; margin-bottom: var(--space-2); }
.feature-card__body { font-size: 0.9rem; margin: 0; }

/* --- Constellation steps -------------------------------------------------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-hairline) 12%, var(--gold-hairline) 88%, transparent);
  z-index: 0;
}
.step { position: relative; z-index: 1; text-align: center; padding-inline: var(--space-2); }
.step__node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-light);
  background: var(--surface-raised);
  border: 1px solid var(--gold-hairline);
  border-radius: 50%;
  box-shadow: 0 0 28px -10px var(--ember-glow);
}
.step__title { font-size: 1.05rem; margin-bottom: var(--space-2); }
.step__body { font-size: 0.92rem; margin: 0; }
.step__detail { font-size: 0.9rem; margin-top: var(--space-3); color: var(--muted); }

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps::before { display: none; }
}
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }

/* --- Template showcase cards ---------------------------------------------- */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.tpl-card {
  background: var(--surface);
  border: 1px solid var(--gold-faint);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-cine), transform var(--dur) var(--ease-cine);
}
.tpl-card:hover { border-color: var(--gold-hairline); transform: translateY(-3px); }
.tpl-card__preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-raised); }
.tpl-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: tpl-kenburns 12s var(--ease-cine) infinite alternate;
  will-change: transform;
}
.tpl-card__title-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1.05rem;
  color: var(--cream);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
  z-index: 2;
  /* gentle wash so the Cinzel name stays legible over any still */
  background: linear-gradient(180deg, rgba(10,13,28,0.12), rgba(10,13,28,0.42));
}
@keyframes tpl-kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.12) translate(-2%, -1%); }
}
.tpl-card__preview.is-scope::before,
.tpl-card__preview.is-scope::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12%;
  background: #05070f;
  z-index: 3;
}
.tpl-card__preview.is-scope::before { top: 0; }
.tpl-card__preview.is-scope::after { bottom: 0; }
.tpl-card__body { padding: var(--space-6); }
.tpl-card__body h3 { font-size: 1.1rem; margin-bottom: var(--space-2); }
.tpl-card__body > p { font-size: 0.92rem; margin-bottom: var(--space-4); }
.tpl-card__meta {
  list-style: none;
  margin: 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--gold-faint);
  display: grid;
  gap: var(--space-1);
}
.tpl-card__meta li { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--cream); }
.tpl-card__meta li span { color: var(--muted); letter-spacing: 0.04em; }

@media (max-width: 900px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tpl-grid { grid-template-columns: 1fr; } }

/* --- Bands (open-source / privacy / CTA) ---------------------------------- */
.band { position: relative; }
.band__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--gold-faint);
  border-radius: var(--radius-card);
  padding: clamp(var(--space-8), 5vw, var(--space-16));
}
.band--privacy .band__inner { background: var(--surface-raised); }
.band__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  color: var(--gold);
  border: 1px solid var(--gold-hairline);
  border-radius: 50%;
  box-shadow: 0 0 40px -12px var(--ember-glow);
  flex-shrink: 0;
}
.band__icon .icon { width: 34px; height: 34px; }
.band h2 { margin-bottom: var(--space-3); }
.band .lead { margin-bottom: var(--space-6); max-width: 60ch; }
.band__cta { display: flex; gap: var(--space-4); flex-wrap: wrap; }

@media (max-width: 680px) {
  .band__inner { grid-template-columns: 1fr; text-align: center; }
  .band__icon { margin: 0 auto; }
  .band .lead { margin-inline: auto; }
  .band__cta { justify-content: center; }
}

/* --- Feature rows (Features page): alternating media/text ----------------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  padding-block: clamp(var(--space-12), 8vw, var(--space-16));
}
.feature-row + .feature-row { border-top: 1px solid var(--gold-faint); }
.feature-row:nth-child(even) .feature-row__media { order: 2; }
.feature-row__text .eyebrow { display: block; margin-bottom: var(--space-3); }
.feature-row__text h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: var(--space-4); }
.feature-row__list { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.feature-row__list li { position: relative; padding-left: var(--space-8); color: var(--cream); }
.feature-row__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  background: var(--gold);
  /* four-point wayfinder star bullet (echoes the aperture motif) */
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
/* feature-row media: a real graded travel still */
.feature-row__media .swatch {
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-card);
  border: 1px solid var(--gold-hairline);
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8), 0 0 60px -28px var(--ember-glow);
}
.feature-row__media .swatch__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 760px) {
  .feature-row { grid-template-columns: 1fr; gap: var(--space-8); }
  .feature-row:nth-child(even) .feature-row__media { order: 0; }
  .feature-row__media { order: -1; }
}

/* --- Generic responsive grid for cards ------------------------------------ */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .card-grid { grid-template-columns: 1fr; } }

/* =============================================================================
   Forms + waitlist (M5)
   ========================================================================== */
.field { display: block; width: 100%; }
.field__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream);
  background: var(--surface-raised);
  border: 1px solid var(--gold-hairline);
  border-radius: var(--radius-input);
  padding: 0.85rem 1rem;
  transition: border-color var(--dur) var(--ease-cine), box-shadow var(--dur) var(--ease-cine);
}
.field__input::placeholder { color: var(--muted); }
.field__input:focus {
  outline: none;
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px var(--gold-faint);
}
.field__error { color: var(--ember); font-size: 0.9rem; margin: var(--space-2) 0 0; }

.waitlist-widget { width: 100%; }
.waitlist-form__row { display: flex; gap: var(--space-3); align-items: stretch; }
.waitlist-form__row .field { flex: 1; }
.waitlist-form__row .btn { white-space: nowrap; }
.waitlist-form__note { font-size: 0.8rem; margin: var(--space-3) 0 0; text-align: center; }
/* htmx: dim the form while a request is in flight */
.waitlist-form.htmx-request { opacity: 0.6; pointer-events: none; }

.waitlist-success {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--gold-hairline);
  border-radius: var(--radius-card);
  animation: waitlist-pop var(--dur) var(--ease-cine);
}
.waitlist-success__mark { display: inline-flex; width: 56px; height: 56px; color: var(--gold); margin-bottom: var(--space-4); }
.waitlist-success__mark .mark { width: 100%; height: 100%; }
.waitlist-success h3 { margin-bottom: var(--space-3); }
@keyframes waitlist-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.get-badges { justify-content: center; }

@media (max-width: 480px) {
  .waitlist-form__row { flex-direction: column; }
}
