:root {
  --paper: #e6d4b5;
  --paper-deep: #d7c09a;
  --cream: #f4ead6;
  --ink: #2b1a12;
  --ink-soft: #4a3224;
  --leather: #5c3317;
  --leather-mid: #7a4522;
  --leather-lite: #9a6134;
  --saddle: #3d2110;
  --sand: #c4a574;
  --sunset: #c45c26;
  --sunset-hot: #e07a3d;
  --rust: #8b3a1a;
  --rule: #c9b48a;
  --shadow: rgba(20, 10, 6, 0.35);
  --header-h: 4.6rem;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-serif: "IM Fell English", "Palatino Linotype", serif;
  --font-ui: "Outfit", "Segoe UI", sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
  --font-stamp: "Special Elite", "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--font-ui);
  background-color: #9a6a38;
  line-height: 1.6;
  overflow-x: hidden;
}

.desert-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(22, 12, 8, 0.38) 0%, rgba(22, 12, 8, 0.22) 42%, rgba(22, 12, 8, 0.58) 100%),
    url("images/desert-bg.jpg") center / cover no-repeat;
  background-color: #b07a48;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--leather);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 200;
}

.skip-link:focus {
  top: 1rem;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  min-height: var(--header-h);
  padding: 0.7rem 6vw;
  background: rgba(22, 12, 8, 0.42);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(244, 234, 214, 0.16);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 1 1 auto;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.35rem 0.7rem 0.2rem;
  border: 2px solid var(--leather);
  background: radial-gradient(circle at 30% 20%, #8a4d27, var(--leather) 62%);
  color: #f3e2c4;
  box-shadow: inset 0 1px 0 rgba(255, 232, 196, 0.28), 0 3px 0 var(--saddle);
  transform: none;
  border-radius: 10px;
}

.logo-mark {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo-sub {
  font-family: var(--font-stamp);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.nav-toggle {
  display: none;
  width: 2.8rem;
  height: 2.4rem;
  border: 1px solid rgba(244, 234, 214, 0.35);
  border-radius: 8px;
  background: rgba(92, 51, 23, 0.55);
  cursor: pointer;
  padding: 0.4rem 0.5rem;
}

.nav-toggle span {
  display: block;
  height: 3px;
  margin: 5px 0;
  background: #f3e2c4;
  border-radius: 2px;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.nav-tab {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  white-space: nowrap;
  border-radius: 999px;
}

.nav-tab:hover,
.nav-tab:focus-visible,
.nav-tab.is-active {
  background: rgba(244, 234, 214, 0.14);
  outline: none;
}

main {
  position: relative;
  z-index: 1;
  padding: 0 6vw 4rem;
  max-width: 1180px;
  margin: 0 auto;
}

#home,
#plan,
#history {
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  padding: 4.5rem 0 5rem;
  position: relative;
}

.hero::after {
  display: none;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f3c27a;
  margin-bottom: 0.7rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  max-width: 14ch;
  color: #faf3e6;
  text-shadow: 0 8px 28px rgba(20, 10, 6, 0.45);
}

.hero h1::after,
.section-kicker h2::after {
  content: "";
  display: block;
  width: 3.75rem;
  height: 1.5px;
  margin-top: 0.75rem;
  background: #e8c98a;
}

.lede {
  margin-top: 1.2rem;
  max-width: 44ch;
  color: rgba(250, 243, 230, 0.88);
  font-size: 1.05rem;
  font-weight: 400;
}

.luggage-tag {
  position: relative;
  color: var(--ink);
  background: linear-gradient(165deg, #f7edd8, #e9d7b4 55%, #dcc4a0);
  border: 2px solid var(--leather);
  padding: 1.8rem 1.5rem 1.3rem;
  box-shadow: 10px 14px 0 rgba(61, 33, 16, 0.12), 0 12px 24px var(--shadow);
  transform: rotate(1.4deg);
}

.luggage-tag::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--leather-mid);
  pointer-events: none;
}

.tag-punch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ead9bb, transparent 55%), var(--paper);
  border: 3px solid var(--leather);
  margin: 0 auto 0.8rem;
  box-shadow: inset 0 0 0 4px rgba(92, 51, 23, 0.15);
}

.tag-label,
.tag-stamp {
  font-family: var(--font-stamp);
  text-align: center;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
  font-size: 0.72rem;
}

.luggage-tag h2 {
  text-align: center;
  margin: 0.35rem 0 0.15rem;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
}

.tag-meta {
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.count-block {
  background: var(--cream);
  border: 1px solid var(--sand);
  text-align: center;
  padding: 0.55rem 0.2rem 0.4rem;
  box-shadow: inset 0 -6px 0 rgba(92, 51, 23, 0.06);
  overflow: hidden;
}

.count-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  color: var(--leather);
}

.count-value.is-ticking {
  animation: tick 320ms ease;
}

@keyframes tick {
  from {
    transform: translateY(0.45em);
    opacity: 0.25;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.count-label {
  font-family: var(--font-stamp);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tag-stamp {
  margin-top: 1rem;
  opacity: 0.75;
}

.section-kicker {
  margin-bottom: 1.6rem;
}

.section-kicker h2 {
  display: inline-block;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: #faf3e6;
  text-shadow: 0 4px 16px rgba(20, 10, 6, 0.35);
}

.section-kicker p {
  margin-top: 0.4rem;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: rgba(250, 243, 230, 0.86);
}

.plan-section {
  padding-bottom: 4.5rem;
}

.notepad {
  position: relative;
  color: var(--ink);
  background-color: #f7f1e4;
  background-image: repeating-linear-gradient(
    transparent 0 2.05rem,
    var(--rule) 2.05rem 2.12rem
  );
  padding: 2.2rem 1.8rem 2rem 4.2rem;
  box-shadow: 0 18px 30px var(--shadow);
  max-width: 44rem;
  clip-path: polygon(
    0% 3%,
    4% 0%,
    9% 2.4%,
    14% 0.4%,
    21% 2.8%,
    28% 0%,
    36% 2.2%,
    44% 0.6%,
    52% 2.6%,
    61% 0.2%,
    69% 2.4%,
    77% 0%,
    85% 2.2%,
    93% 0.5%,
    100% 2.8%,
    100% 100%,
    0% 100%
  );
}

.notepad::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 8%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 58, 26, 0.12), transparent 68%);
  pointer-events: none;
}

.notepad-margin {
  position: absolute;
  left: 3.15rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(196, 92, 38, 0.45);
}

.notepad-holes {
  position: absolute;
  left: 0.85rem;
  top: 1.8rem;
  bottom: 1.4rem;
  width: 1.15rem;
  background-image: radial-gradient(
    circle at 50% 50%,
    rgba(43, 26, 18, 0.22) 0 0.28rem,
    #d2b88c 0.3rem 0.42rem,
    transparent 0.44rem
  );
  background-size: 100% 2.1rem;
  background-repeat: repeat-y;
}

.notepad-title {
  font-family: var(--font-hand);
  font-size: 1.7rem;
  margin-bottom: 0.8rem;
}

.idea-form {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.4rem;
}

.idea-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--font-stamp);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
}

.idea-form input {
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed var(--leather-mid);
  padding: 0.2rem 0.1rem 0.35rem;
  font-family: var(--font-hand);
  font-size: 1.45rem;
  color: var(--ink);
  width: 100%;
}

.idea-form input:focus {
  outline: none;
  border-bottom-style: solid;
  border-bottom-color: var(--sunset);
}

.btn-leather {
  cursor: pointer;
  border: 2px solid var(--saddle);
  color: #f6e7cf;
  background: linear-gradient(180deg, var(--leather-lite), var(--leather) 55%, var(--saddle));
  font-family: var(--font-stamp);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.72rem 1.3rem 0.62rem;
  border-radius: 4px 14px 4px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 232, 196, 0.28), 0 4px 0 var(--saddle);
}

.btn-leather:hover,
.btn-leather:focus-visible {
  outline: none;
}

.btn-leather:active {
  box-shadow: inset 0 1px 0 rgba(255, 232, 196, 0.2), 0 2px 0 var(--saddle);
}

.idea-list {
  display: grid;
  gap: 0.45rem;
}

.idea-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  padding-right: 1rem;
}

.idea-when {
  color: var(--sunset);
  font-size: 1.2rem;
  white-space: nowrap;
}

.history-section {
  padding-top: 1.2rem;
  padding-bottom: 2rem;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin: 0.2rem 0 1.6rem;
}

.upload-status {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: #f3c27a;
  min-height: 1.4em;
}

.postmark {
  position: relative;
  width: 148px;
  height: 148px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #f3c27a;
  transform: rotate(-11deg);
}

.postmark-ring {
  position: absolute;
  inset: 0;
  border: 4px double currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px rgba(139, 58, 26, 0.08);
}

.postmark-ring::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1.5px dashed currentColor;
  border-radius: 50%;
}

.postmark-copy {
  position: relative;
  z-index: 1;
  font-family: var(--font-stamp);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
}

.postmark-copy small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.postmark:hover,
.postmark:focus-visible {
  color: var(--sunset);
  outline: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.4rem 1.6rem;
  padding: 0.8rem 0 1rem;
}

.polaroid {
  position: relative;
  margin: 0;
  color: var(--ink);
  background: #faf6ee;
  padding: 0.7rem 0.7rem 2.6rem;
  box-shadow: 3px 8px 16px var(--shadow);
  transition: transform 320ms ease;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: sepia(0.18) contrast(1.05) saturate(0.92);
  background: #cbb48c;
}

.polaroid figcaption {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.45rem;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  text-align: center;
  color: var(--ink-soft);
}

.polaroid.tape::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 34%;
  width: 72px;
  height: 26px;
  background: linear-gradient(180deg, rgba(248, 230, 170, 0.55), rgba(232, 205, 132, 0.38));
  transform: rotate(-8deg);
  box-shadow: 0 1px 2px rgba(43, 26, 18, 0.16);
}

.polaroid.pin::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #f0c3a0, var(--sunset) 42%, var(--rust));
  box-shadow: 0 2px 0 var(--saddle);
}

.rotate-left { transform: rotate(-3.4deg); }
.rotate-right { transform: rotate(2.8deg); }
.rotate-slight { transform: rotate(-1.2deg); }
.rotate-left-soft { transform: rotate(-2.1deg); }
.rotate-right-soft { transform: rotate(3.2deg); }
.rotate-slight-opp { transform: rotate(1.1deg); }

.polaroid:hover {
  transform: rotate(0deg) translateY(-10px);
  z-index: 2;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 1.6rem 6vw 2.6rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 243, 230, 0.72);
}

.footer-mark {
  margin-top: 0.35rem;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sunset);
}

@media (max-width: 720px) {
  .site-header {
    align-items: center;
    padding-top: 0.7rem;
  }

  .nav-toggle {
    display: block;
    flex-shrink: 0;
  }

  .header-top {
    width: 100%;
  }

  .site-nav {
    position: absolute;
    right: 4vw;
    top: 4.4rem;
    display: none;
    background: rgba(22, 12, 8, 0.92);
    border: 1px solid rgba(244, 234, 214, 0.2);
    border-radius: 14px;
    padding: 0.5rem;
    box-shadow: 0 10px 20px var(--shadow);
    z-index: 80;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav-tab {
    min-width: 11rem;
    border-radius: 999px;
  }

  .nav-tab:hover,
  .nav-tab:focus-visible,
  .nav-tab.is-active {
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .idea-form {
    grid-template-columns: 1fr;
  }

  .btn-leather {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 4.4rem;
  }

  .notepad {
    padding-left: 3.2rem;
  }

  .gallery {
    grid-template-columns: 1fr;
    max-width: 22rem;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .polaroid,
  .count-value.is-ticking {
    transition: none;
    animation: none;
  }
}
