/* ============================
   Wedding Site — styles.css
   ============================ */

/* ---------- Root Variables ---------- */
:root {
  --nav-height: 72px;
  --ink: #141414;
  --muted: #6f6f6f;

  /* Hero carousel sizes */
  --gap: 6px;
  --slide-min: 42vw;
  --slide-min-md: 22vw;

  /* Drawer menu */
  --menu-width-desktop: 33.333vw;
}

/* ---------- Base Resets ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  color: var(--ink);
  background: #fff;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

/* Prevent scroll when drawer is open */
.body--no-scroll { overflow: hidden; }

/* ============================
   NAVIGATION BAR
   ============================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.nav__inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 6px;
  position: relative;
}

@media (min-width:900px) {
  .nav__inner {
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
  }
}

/* Logo */
.logo {
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
}
@media (min-width:900px) {
  .logo { position: static; justify-self: start; }
}
.logo__img {
  height: 64px;
  width: auto;
  display: block;
}
@media (max-width:420px) {
  .logo__img { height: 52px; }
}

/* Hamburger (mobile menu button) */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 12px;
  cursor: pointer;
}
.hamburger__bar {
  width: 28px;
  height: 2px;
  background: #000;
  display: block;
}
@media (min-width:900px) {
  .hamburger { display: none; }
}

/* Desktop Navigation */
.desktop-nav { display: none; }
.desktop-menu {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.desktop-menu a {
  text-decoration: none;
  color: #000;
  font-family: "Lora", serif;
  font-size: 17px;
}
@media (min-width:900px) {
  .desktop-nav { display: block; justify-self: center; }
}

/* Desktop RSVP button */
.desktop-cta {
  display: none;
}
@media (min-width:900px) {
  .nav__inner .desktop-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    height: 32px;
    min-height: 32px;
    border-radius: 0;
    background: #2f2f2f;
    color: #fff;
    text-decoration: none;
    font-family: "Lora", serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    margin-left: auto;
  }
}

/* ============================
   MOBILE DRAWER MENU
   ============================ */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  background: #fff;
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 60;
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mobile-menu.open { transform: translateX(0); }

@media (min-width:900px) {
  .mobile-menu { width: var(--menu-width-desktop); }
}

/* Backdrop overlay behind drawer */
.menu__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 59;
}
.menu__backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Close button */
.menu__close {
  position: absolute;
  top: 10px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
}

/* Menu list inside drawer */
.menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(520px, 90%);
  text-align: center;
  font-family: "Lora", serif;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.menu__list a {
  text-decoration: none;
  color: #000;
}

/* RSVP button inside mobile drawer */
.menu__cta {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 28px;
  border-radius: 0;
  background: #2f2f2f;
  color: #fff !important;
  font-family: "Lora", serif;
  font-weight: 600;
  letter-spacing: .03em;
}

/* ============================
   HERO SECTION (Carousel)
   ============================ */
.hero {
  position: relative;
  height: calc(100vh - var(--nav-height));
  display: grid;
  place-items: center;
  background: #dfd8d3;
}
.hero-frame {
  width: 100vw;
  height: 100%;
  position: relative;
}
.carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.carousel__track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  gap: var(--gap);
  padding: 0 var(--gap);
  will-change: transform;
}
.slide {
  flex: 0 0 var(--slide-min);
  height: 100%;
  object-fit: cover;
  background: #dfd8d3;
}
@media (min-width:900px) {
  .slide { flex-basis: var(--slide-min-md); }
}

/* Overlay text over hero */
.hero__overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
  padding: 0 16px;
}
.titleblock {
  display: block;
  margin: 0;
}
.names {
  font-family: "Pinyon Script", cursive;
  line-height: 0.9;
  margin: 0;
}
.names--stacked { 
  display: grid; 
  gap: 0;
  margin-bottom: 12px;
}
.names__line { 
  font-size: clamp(44px, 9vw, 110px);
  line-height: 1.2;
}
.names__amp { 
  font-size: clamp(36px, 7.5vw, 88px);
  line-height: 1.2;
  margin: -0.1em 0;
}
.meta {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: .06em;
  color: #fff;
  margin: 0;
  line-height: 1;
}

.hero-rsvp-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 24px;
  background-color: #fff;
  border: 2px solid #fff;
  color: #000;
  font-family: "Playfair Display", serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border-radius: 0;
}

.hero-rsvp-btn:hover {
  background-color: transparent;
  color: #fff;
  transform: translateY(-1px);
}

/* ============================
   COUNTDOWN SECTION
   ============================ */
.countdown {
  padding: 72px 0;
  background: none;
  color: #fff;
  position: relative;
}

/* When JS adds .has-bg, the background image will show */
.countdown.has-bg {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Optional: slight dark overlay for readability */
.countdown.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 0;
}

/* Content inside countdown */
.countdown__inner {
  width: min(1100px, 92vw);
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding: 32px 0;
  z-index: 1;
}

.countdown__title {
  font-family: "Lora", serif;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  font-size: clamp(14px, 2vw, 20px);
}

.countdown__grid {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: end;
  flex-wrap: nowrap;
  margin-top: 6px;
}

.countdown__grid .t {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.countdown__grid .n {
  font-family: "Lora", serif;
  font-weight: 400;
  font-size: clamp(44px, 9vw, 120px);
  line-height: 1;
  color: rgba(255,255,255,0.98);
  text-shadow: 0 6px 18px rgba(0,0,0,.6);
}

/* Add colon between time blocks */
.countdown__grid .t:not(:last-child) .n::after {
  content: ":";
  margin-left: 10px;
  color: rgba(255,255,255,0.95);
  font-size: inherit;
  font-weight: 400;
  display: inline-block;
  transform: translateY(-0.06em);
}

.countdown__grid .l {
  margin-top: 8px;
  font: 500 12px/1 Inter, system-ui;
  color: rgba(255,255,255,0.9);
  text-transform: capitalize;
}

/* Responsive countdown size adjustments */
@media (max-width:520px) {
  .countdown__grid { gap: 8px; }
  .countdown__grid .n { font-size: clamp(36px, 12vw, 72px); }
}

/* ============================
   FULL-WIDTH IMAGE SECTIONS
   ============================ */
.full-width-image {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .full-width-image.mobile { display: block; }
  .full-width-image.desktop { display: none; }
}

@media (min-width: 901px) {
  .full-width-image.mobile { display: none; }
  .full-width-image.desktop { display: block; }
}

/* ============================
   DIRECTIONS BUTTON SECTION
   ============================ */
.directions-section {
  background-color: #dfd8d3;
  padding: 60px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.directions-section-reception {
  background-color: #f2efeb;
  padding: 60px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}


.directions-button {
  display: inline-block;
  padding: 18px 48px;
  background-color: transparent;
  border: 2px solid #000;
  color: #000;
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
  cursor: pointer;
}

.directions-button:hover {
  background-color: #000;
  color: #dfd8d3;
}

@media (max-width: 640px) {
  .directions-button {
    padding: 16px 36px;
    font-size: 14px;
    letter-spacing: 0.12em;
  }
}

/* ============================
   ACCOMMODATION PAGE
   ============================ */
.accommodation-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 60px;
  overflow: hidden;
}

.accommodation-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.accommodation-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  color: #000;
}

.accommodation-text {
  font-family: "Playfair Display", serif;
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 50px;
  color: #000;
}

.booking-button {
  display: inline-block;
  padding: 18px 48px;
  background-color: transparent;
  border: 2px solid #000;
  color: #000;
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 40px;
}

.booking-button:hover {
  background-color: #000;
  color: #fff;
  transform: translateY(-2px);
}

.accommodation-note {
  font-family: "Playfair Display", serif;
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 400;
  line-height: 1.5;
  margin-top: 40px;
  color: #000;
}

@media (max-width: 768px) {
  .accommodation-hero {
    padding: 60px 15px 40px;
  }
  
  .booking-button {
    padding: 16px 36px;
    font-size: 16px;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 640px) {
  .accommodation-text {
    font-size: clamp(20px, 6vw, 32px);
  }
  
  .accommodation-note {
    font-size: clamp(14px, 4vw, 20px);
  }
}

/* ============================
   PIN ENTRY PAGE
   ============================ */
.pin-page {
  min-height: 100vh;
  background: #dfd8d3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pin-container {
  background: #fff;
  border-radius: 12px;
  padding: 60px 40px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.pin-header {
  margin-bottom: 40px;
}

.pin-logo {
  height: 80px;
  width: auto;
  margin-bottom: 20px;
}

.pin-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
}

.pin-subtitle {
  font-family: "Lora", serif;
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

.pin-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.pin-inputs {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.pin-digit {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-weight: 500;
  background: #fff;
  transition: all 0.2s ease;
}

.pin-digit:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.1);
}

.pin-digit::-webkit-outer-spin-button,
.pin-digit::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pin-digit[type=number] {
  -moz-appearance: textfield;
}

.pin-error {
  color: #dc3545;
  font-family: "Lora", serif;
  font-size: 14px;
  background: rgba(220, 53, 69, 0.1);
  padding: 12px 20px;
  border-radius: 6px;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.pin-submit {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 16px 48px;
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pin-submit:hover {
  background: #000;
  transform: translateY(-1px);
}

.pin-submit:active {
  transform: translateY(0);
}

.shake {
  animation: shake 0.6s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}

@media (max-width: 480px) {
  .pin-container {
    padding: 40px 20px;
  }
  
  .pin-inputs {
    gap: 12px;
  }
  
  .pin-digit {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}
