/* =============================================================
   components.css — All reusable UI components
   Imports: tokens.css (via base.css)

   Sections in this file:
     1. Nav
     2. Hero
     3. Detail cards
     4. Schedule
     5. Guests grid
     6. RSVP form
     7. Footer
     8. Shared utilities (buttons, badges, dividers)
   ============================================================= */

/* ── 1. NAV ─────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-dusk);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-cream);
}

.nav__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav__links a {
  font-size: var(--text-sm);
  color: rgba(242, 237, 227, 0.7);
  letter-spacing: 0.5px;
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--color-cream);
}

.nav__cta {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
  background: var(--color-gold);
  padding: 6px 16px;
  border-radius: var(--radius-md);
  transition: background var(--transition);
}

.nav__cta:hover {
  background: var(--color-sunset);
  color: #fff;
}

/* ── 2. HERO ─────────────────────────────────────────────────── */

.hero {
  min-height: 520px;
  background: var(--color-dusk);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* CSS-drawn sunset sky layers */
.hero__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #2d1b4e 0%, #6b2d6b 50%, #e8733a 100%);
}

.hero__mesa-left,
.hero__mesa-right,
.hero__road,
.hero__sign {
  display: none;
}

/* Silhouette mesas */
.hero__mesa-left {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 30%;
  height: 55%;
  background: #1a0f2e;
  clip-path: polygon(
    0% 100%,
    0% 40%,
    15% 20%,
    30% 15%,
    50% 18%,
    65% 30%,
    80% 45%,
    100% 35%,
    100% 100%
  );
}

.hero__mesa-right {
  position: absolute;
  bottom: 0;
  right: -5%;
  width: 28%;
  height: 50%;
  background: #1a0f2e;
  clip-path: polygon(
    0% 35%,
    20% 45%,
    40% 25%,
    55% 15%,
    70% 20%,
    85% 10%,
    100% 25%,
    100% 100%,
    0% 100%
  );
}

/* Road */
.hero__road {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 120px;
  background: #2a2520;
  clip-path: polygon(35% 0%, 65% 0%, 100% 100%, 0% 100%);
}

/* Welcome to Austin sign */
.hero__sign {
  position: absolute;
  bottom: 110px;
  right: 22%;
  transform: rotate(3deg);
  animation: signIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

.hero__sign-diamond {
  width: 80px;
  height: 80px;
  background: #2a7a3a;
  border: 3px solid #fff;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__sign-text {
  transform: rotate(-45deg);
  text-align: center;
  line-height: 1.2;
  font-family: var(--font-body);
}

.hero__sign-text .welcome {
  display: block;
  font-size: 7px;
  color: #d4f0c4;
}
.hero__sign-text .to {
  display: block;
  font-size: 6px;
  color: #d4f0c4;
}
.hero__sign-text .city {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.hero__sign-post {
  width: 4px;
  height: 32px;
  background: #888;
  margin: 0 auto;
}

/* Hero content */
.hero__content {
  position: relative;
  z-index: 10;
  animation: fadeUp 0.7s ease 0.1s both;
}

.hero__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-xs);
}

.hero__title {
  font-family: var(--font-serif);
  font-size: var(--text-hero);
  font-weight: 700;
  color: var(--color-cream);
  text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.5);
  line-height: 1;
  letter-spacing: 2px;
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-sunset);
  margin-top: 6px;
}

.hero__meta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: rgba(242, 237, 227, 0.8);
}

.hero__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero__buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

/* ── 3. DETAIL CARDS ─────────────────────────────────────────── */

.details {
  background: var(--color-card-bg);
  padding: var(--space-lg) var(--space-sm);
}

.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.detail-card {
  background: #f9f5ef;
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
}

.detail-card__icon {
  font-size: 20px;
  color: var(--color-sunset);
  margin-bottom: var(--space-xs);
}

.detail-card__label {
  font-size: var(--text-xs);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.detail-card__value {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-ink);
}

.detail-card__sub {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 2px;
}

/* ── 4. SCHEDULE ─────────────────────────────────────────────── */

.schedule {
  background: var(--color-cream);
  padding: var(--space-lg) var(--space-sm);
  border-top: 1px solid var(--color-card-border);
}

.schedule__list {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
}

.schedule__row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-card-border);
}

.schedule__row:last-child {
  border-bottom: none;
}

.schedule__time {
  font-size: var(--text-sm);
  color: var(--color-muted);
  min-width: 60px;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.schedule__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-card-border);
  margin-top: 5px;
  flex-shrink: 0;
}

.schedule__dot--active {
  background: var(--color-dusk);
}

.schedule__info {
  flex: 1;
}

.schedule__title {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-ink);
}

.schedule__location {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: 2px;
}

.schedule__tag {
  font-size: var(--text-xs);
  padding: 3px 10px;
  border-radius: var(--radius-md);
  background: #ede8f8;
  color: #3c3489;
  flex-shrink: 0;
  align-self: flex-start;
}

.schedule__tag--food {
  background: #e1f5ee;
  color: #085041;
}

/* ── 5. GUESTS GRID ──────────────────────────────────────────── */

.guests {
  background: var(--color-card-bg);
  padding: var(--space-lg) var(--space-sm);
  border-top: 1px solid var(--color-card-border);
}

.guests__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.guest-card {
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-xs);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.guest-card--placeholder {
  border-style: dashed;
  opacity: 0.5;
}

.guest-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f0ebe0;
  border: 1px solid var(--color-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
}

.guest-card__name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
}

.guest-card__role {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ── 6. RSVP FORM ────────────────────────────────────────────── */

.rsvp {
  background: var(--color-dusk);
  padding: var(--space-xl) var(--space-sm);
  text-align: center;
}

.rsvp__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-cream);
  margin-bottom: var(--space-xs);
}

.rsvp__sub {
  font-size: var(--text-sm);
  color: rgba(242, 237, 227, 0.7);
  margin-bottom: var(--space-md);
}

.rsvp__form {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  max-width: 420px;
  margin: 0 auto;
}

.rsvp__input {
  flex: 1;
  padding: 10px var(--space-sm);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(242, 237, 227, 0.3);
  border-radius: var(--radius-md);
  color: var(--color-cream);
  outline: none;
  transition: border-color var(--transition);
}

.rsvp__input::placeholder {
  color: rgba(242, 237, 227, 0.4);
}
.rsvp__input:focus {
  border-color: var(--color-gold);
}

.rsvp__count {
  margin-top: var(--space-sm);
  font-size: var(--text-xs);
  color: rgba(242, 237, 227, 0.5);
  letter-spacing: 1px;
}

/* ── 7. FOOTER ───────────────────────────────────────────────── */

.footer {
  background: #130b22;
  padding: var(--space-md) var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.footer__brand {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: rgba(242, 237, 227, 0.4);
}

.footer__contact {
  font-size: var(--text-xs);
  color: rgba(242, 237, 227, 0.4);
}

/* ── 8. SHARED: BUTTONS, BADGES, SECTION LABELS ──────────────── */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  transition:
    background var(--transition),
    color var(--transition);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--color-cream);
  color: var(--color-ink);
}

.btn--primary:hover {
  background: var(--color-gold);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-cream);
  border: 1px solid rgba(242, 237, 227, 0.3);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn--rsvp {
  background: var(--color-gold);
  color: var(--color-ink);
  padding: 10px var(--space-sm);
  white-space: nowrap;
}

.btn--rsvp:hover {
  background: var(--color-sunset);
  color: #fff;
}

/* Section label (uppercase eyebrow) */
.section-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
}

.section-label--light {
  color: var(--color-gold);
}

/* Section heading */
.section-heading {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-ink);
}

.section-heading--light {
  color: var(--color-cream);
}

/* Announce banner */
.announce {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: var(--radius-md);
  padding: 5px 14px;
  font-size: var(--text-xs);
  color: var(--color-gold);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes signIn {
  from {
    opacity: 0;
    transform: rotate(3deg) scale(0.6) translateY(20px);
  }
  to {
    opacity: 1;
    transform: rotate(3deg) scale(1) translateY(0);
  }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */

@media (max-width: 600px) {
  .hero__title {
    font-size: 40px;
  }
  .hero__subtitle {
    font-size: var(--text-lg);
  }
  .hero__meta {
    flex-direction: column;
    gap: 6px;
  }
  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }
  .nav__links {
    display: none;
  }
  .footer {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
  .rsvp__form {
    flex-direction: column;
  }
}
