/* ============================================================
   Trunk Heaven Sanctuary — Coming Soon
   Palette: forest green, clay/terracotta, warm ivory, bark brown
   ============================================================ */

:root {
  --bark: #2b2119;
  --forest-dark: #22301f;
  --forest: #37492f;
  --forest-light: #4f6640;
  --clay: #b5723f;
  --clay-light: #d99b63;
  --ivory: #f6efe1;
  --ivory-dim: #e7dcc4;
  --gold: #cf9d4e;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ivory);
  background: var(--forest-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.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: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;

  /* Placeholder background: warm gradient standing in for a hero
     photograph. To use a real photo later, replace this rule with:
       background: linear-gradient(180deg, rgba(20,28,17,.35), rgba(20,28,17,.75)),
                   url("images/hero.jpg") center/cover no-repeat;
  */
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(207, 157, 78, 0.16), transparent 60%),
    linear-gradient(160deg, var(--forest) 0%, var(--forest-dark) 55%, var(--bark) 100%);
}

.hero__texture {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  mix-blend-mode: soft-light;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(80% 60% at 50% 40%, transparent 0%, rgba(15, 20, 12, 0.55) 100%);
}

.hero__inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* Compact hero variant for secondary pages (e.g. voting) — same
   full-height background, but content is top-aligned instead of
   vertically centered since list length varies. */
.hero--compact .hero__inner {
  padding: 5rem 1.5rem 3.5rem;
  justify-content: flex-start;
}

.mark {
  width: 64px;
  height: 64px;
  margin-bottom: 1.75rem;
  color: var(--gold);
  opacity: 0.92;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
  font-weight: 600;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  line-height: 1.05;
  margin: 0 0 1.35rem;
  color: var(--ivory);
  letter-spacing: -0.01em;
}

.wordmark--small {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  max-width: 34em;
  color: var(--ivory-dim);
  margin: 0 0 1.75rem;
}

.message {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 36em;
  color: var(--ivory-dim);
  margin: 0 0 1.5rem;
  opacity: 0.9;
}

/* ---------------------------------------------------------
   Footprint trail — small decorative divider that leads the eye
   from the intro copy down toward the naming teaser and form.
   --------------------------------------------------------- */

.footprints {
  width: 150px;
  height: auto;
  color: var(--gold);
  fill: currentColor;
  opacity: 0.55;
  margin: 0 0 1.5rem;
}

/* ---------------------------------------------------------
   Name-an-elephant teaser
   --------------------------------------------------------- */

.naming {
  max-width: 34em;
  margin: 0 0 1.75rem;
}

.naming__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  color: var(--gold);
  margin: 0 0 0.6rem;
}

.naming__text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ivory-dim);
  margin: 0;
  opacity: 0.9;
}

/* ---------------------------------------------------------
   Email signup
   --------------------------------------------------------- */

.signup {
  width: 100%;
  max-width: 460px;
  margin: 0 0 1.25rem;
}

.signup__row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.signup__row--name {
  margin-bottom: 0.6rem;
}

.signup__row--name .signup__input {
  flex-basis: 100%;
}

.signup__input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.95rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--bark);
  background: var(--ivory);
  border: 1px solid transparent;
  border-radius: 999px;
  outline: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.signup__input::placeholder {
  color: #8a7d68;
}

.signup__input:focus {
  box-shadow: 0 0 0 3px rgba(207, 157, 78, 0.55);
}

.signup__button {
  flex: 0 0 auto;
  padding: 0.95rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ivory);
  background: var(--clay);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.signup__button:hover {
  background: var(--clay-light);
}

.signup__button:active {
  transform: scale(0.97);
}

.signup__note {
  margin: 0.85rem 2px 0;
  font-size: 0.8rem;
  color: var(--ivory-dim);
  opacity: 0.7;
  text-align: left;
}

.signup__feedback {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--gold);
  min-height: 1.2em;
}

.signup__feedback[data-state="error"] {
  color: #e08a6b;
}

/* honeypot field, hidden from real visitors */
.signup__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.leaderboard-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(207, 157, 78, 0.4);
  padding-bottom: 1px;
  margin: 0 0 1.75rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.leaderboard-link:hover {
  color: var(--clay-light);
  border-color: currentColor;
}

/* ---------------------------------------------------------
   Voting page
   --------------------------------------------------------- */

.vote-board {
  width: 100%;
  max-width: 520px;
  margin: 0 0 1.5rem;
  text-align: left;
}

.vote-status {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  margin: 0 0 1.25rem;
}

.vote-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vote-card {
  padding: 1.1rem 1.25rem;
  background: rgba(246, 239, 225, 0.05);
  border: 1px solid rgba(246, 239, 225, 0.14);
  border-radius: 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.vote-card--leading {
  border-color: rgba(207, 157, 78, 0.55);
  background: rgba(207, 157, 78, 0.09);
}

.vote-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.vote-card__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ivory);
}

.vote-card__badge {
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.15rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bark);
  background: var(--gold);
  border-radius: 999px;
  vertical-align: middle;
}

.vote-card__count {
  flex: 0 0 auto;
  font-size: 0.85rem;
  color: var(--ivory-dim);
  opacity: 0.8;
  white-space: nowrap;
}

.vote-card__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(246, 239, 225, 0.12);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.vote-card__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--clay), var(--gold));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.vote-card__button {
  width: 100%;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(207, 157, 78, 0.5);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.vote-card__button:hover:not(:disabled) {
  background: var(--gold);
  color: var(--bark);
}

.vote-card__button:active:not(:disabled) {
  transform: scale(0.98);
}

.vote-card__button:disabled {
  cursor: default;
  opacity: 0.55;
}

.vote-footnote {
  font-size: 0.85rem;
  color: var(--ivory-dim);
  opacity: 0.75;
  margin: 0 0 2rem;
}

.vote-footnote a {
  color: var(--gold);
}

.back-link {
  font-size: 0.85rem;
  color: var(--ivory-dim);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.back-link:hover {
  opacity: 1;
  color: var(--gold);
}

/* ---------------------------------------------------------
   Social links
   --------------------------------------------------------- */

.social {
  display: flex;
  gap: 1.1rem;
  margin-top: 0.5rem;
}

.social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(246, 239, 225, 0.28);
  color: var(--ivory);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.social__link:hover {
  border-color: var(--gold);
  background: rgba(207, 157, 78, 0.12);
  transform: translateY(-2px);
}

.social__link svg {
  width: 18px;
  height: 18px;
}

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

.footer {
  position: relative;
  padding: 1.5rem 1.5rem 1.75rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ivory-dim);
  opacity: 0.65;
  border-top: 1px solid rgba(246, 239, 225, 0.12);
}

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

@media (max-width: 480px) {
  .hero__inner {
    padding: 5.5rem 1.25rem 3rem;
  }

  .signup__row {
    flex-direction: column;
  }

  .signup__button {
    width: 100%;
  }

  .signup__note {
    text-align: center;
  }

  .hero--compact .hero__inner {
    padding: 4.5rem 1.25rem 3rem;
  }

  .vote-card__row {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
