:root {
  --ink: #2b2418;
  --ink-soft: #5c5348;
  --cream: #f6f0e4;
  --paper: #fbf7ef;
  --card: #f7f1e6;
  --line: #d9d0c0;
  --terracotta: #b45c3d;
  --terracotta-dark: #9a4c32;
  --forest: #3d4a3a;
  --forest-dark: #2f3a2c;
  --day: #3d5a47;
  --header: rgba(252, 249, 243, 0.94);
  --shadow: 0 18px 40px rgba(60, 46, 28, 0.12);
  --radius: 22px;
  --content: 26.5rem;
  --serif: "Playfair Display", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --script: "Caveat", "Segoe Script", cursive;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100vw;
  color: var(--ink);
  font-family: var(--sans);
  background-color: #e6dcc8;
  background-image:
    url("../assets/paper-grain.png"),
    url("../assets/map-bg.jpg");
  background-size: 180px 180px, cover;
  background-position: center, 58% 42%;
  background-attachment: scroll, fixed;
  background-repeat: repeat, no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 250, 240, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(246, 240, 228, 0.16), rgba(246, 240, 228, 0.08));
  z-index: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  background: var(--forest);
  color: white;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  width: 100%;
  max-width: 100%;
  min-height: 3.7rem;
  padding: 0.55rem 0.9rem;
  background: var(--header);
  border-bottom: 1px solid rgba(90, 74, 52, 0.08);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 3.15rem;
  height: 1.05rem;
  flex-shrink: 0;
  background-color: var(--ink);
  -webkit-mask: url("../assets/logo-mountains.png") no-repeat center / contain;
  mask: url("../assets/logo-mountains.png") no-repeat center / contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.brand-text span {
  font-family: var(--serif);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--ink-soft);
}

.nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.65rem;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

.nav a {
  position: relative;
  padding: 0.2rem 0;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18rem;
  height: 1px;
  background: var(--ink);
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, calc(var(--content) + 2.2rem));
  margin: 0 auto;
  padding: 1rem 0.9rem 3.2rem;
  min-width: 0;
  overflow-x: hidden;
}

.page--wide {
  width: min(100%, 36rem);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 0.85rem;
}

.hero h1 {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-family: var(--serif);
  font-size: min(3.2rem, 8.4vw);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

.hero h1 span {
  display: block;
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0 1.05rem;
  padding: 0 0.4rem;
  color: var(--ink-soft);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker svg {
  width: 2.4rem;
  height: 0.7rem;
}

.polaroid {
  position: relative;
  width: min(84%, 16.5rem);
  max-width: 100%;
  min-width: 0;
  margin: 0.15rem auto 0.2rem;
  padding: 0.6rem 0.6rem 0.25rem;
  background: #fbfaf6;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 30px rgba(50, 40, 20, 0.18);
  transform: rotate(-1.4deg);
}

.polaroid::before,
.polaroid::after {
  content: "";
  position: absolute;
  height: 1.15rem;
  background: rgba(226, 210, 168, 0.58);
  box-shadow: 0 1px 2px rgba(80, 60, 20, 0.12);
}

.polaroid::before {
  top: -0.55rem;
  left: 1.15rem;
  width: 3.6rem;
  transform: rotate(-8deg);
}

.polaroid::after {
  top: -0.35rem;
  right: 1.4rem;
  width: 2.4rem;
  transform: rotate(6deg);
}

.polaroid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 42%;
}

.polaroid-date {
  margin: 0.55rem 0 0.45rem;
  font-family: var(--script);
  font-size: 1.55rem;
  font-weight: 600;
  color: #3a3328;
}

.countdown {
  width: min(100%, 20.5rem);
  margin: 1.05rem auto 0.95rem;
  padding: 0.95rem 1rem 1.05rem;
  background: rgba(247, 241, 230, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 1.15rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.countdown p {
  margin: 0 0 0.7rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.countdown-grid strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}

.countdown-grid span {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: min(100%, 20.5rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.7rem;
  padding: 0.65rem 0.9rem;
  border: 0;
  border-radius: 0.7rem;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(80, 40, 20, 0.12);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.75;
}

.btn:active {
  transform: translateY(0);
}

.btn-terracotta {
  background: var(--terracotta);
}

.btn-terracotta:hover {
  background: var(--terracotta-dark);
}

.btn-forest {
  background: var(--forest);
}

.btn-forest:hover {
  background: var(--forest-dark);
}

.btn .arrow {
  margin-left: auto;
  font-size: 1.05rem;
}

.sheet {
  background: rgba(248, 243, 232, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1rem 1.5rem;
  max-width: 100%;
  min-width: 0;
}

.sheet-header {
  text-align: center;
  margin-bottom: 1.35rem;
}

.sheet-header h1 {
  margin: 0;
  max-width: 100%;
  font-family: var(--serif);
  font-size: min(2.15rem, 7.1vw);
  font-weight: 600;
  font-style: italic;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.page-programme .sheet-header h1 {
  font-style: normal;
}

.sheet-header p {
  margin: 0.7rem auto 0;
  max-width: 22rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.section {
  margin: 0 0 1.35rem;
  padding: 1rem 0.95rem 1.1rem;
  background: rgba(255, 252, 246, 0.72);
  border-radius: 1rem;
  min-width: 0;
  max-width: 100%;
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.section h2 svg {
  width: 1.15rem;
  height: 1.15rem;
}

.field {
  margin-bottom: 0.85rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field label,
.legend {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--serif);
  font-size: 0.92rem;
  overflow-wrap: break-word;
}

.req {
  color: var(--terracotta);
}

.hint {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: break-word;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.35rem 0 0.45rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
}

input::placeholder,
textarea::placeholder {
  color: #b0a696;
  font-style: italic;
}

input:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--terracotta);
}

textarea {
  min-height: 2.6rem;
  resize: vertical;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
}

.stack {
  display: grid;
  gap: 0.55rem;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.choice input {
  appearance: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  border: 1.5px solid #6f675c;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-content: center;
}

.choice input::after {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
}

.choice input:checked::after {
  transform: scale(1);
}

.presence-row {
  margin-bottom: 0.85rem;
}

.presence-row:last-child {
  margin-bottom: 0;
}

.form-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.form-error {
  margin: 0;
  color: #9a4c32;
  font-size: 0.88rem;
  text-align: center;
}

.form-submit .btn {
  min-width: 13.5rem;
}

.success {
  text-align: center;
  padding: 2.2rem 1rem;
}

.success h2 {
  margin: 0.4rem 0 0.6rem;
  font-family: var(--serif);
  font-size: 1.8rem;
}

.success p {
  margin: 0;
  color: var(--ink-soft);
}

.timeline {
  position: relative;
  padding-left: 0.1rem;
}

.day {
  position: relative;
  padding-left: 0;
  margin-bottom: 1.45rem;
}

.day::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 2.65rem;
  bottom: -1.2rem;
  z-index: 0;
  border-left: 2px dotted #7d9a7a;
}

.day:last-child {
  margin-bottom: 0;
}

.day:last-child::before {
  display: none;
}

.day-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6.1rem;
  margin: 0 0 0.95rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: #fff;
  line-height: 1.1;
  background: var(--day);
  box-shadow: 0 8px 16px rgba(40, 60, 40, 0.16);
}

.day-badge strong,
.day-badge span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 3.4rem 1.25rem minmax(0, 1fr);
  gap: 0.45rem 0.45rem;
  align-items: start;
  margin: 0 0 0.85rem 1.7rem;
}

.event:last-child {
  margin-bottom: 0;
}

.event-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--forest);
  padding-top: 0.12rem;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.event-icon {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.05rem;
}

.event h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  overflow-wrap: break-word;
}

.event p {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.compass {
  display: flex;
  position: fixed;
  left: 0.7rem;
  bottom: 0.55rem;
  z-index: 2;
  align-items: flex-end;
  gap: 0.7rem;
  color: #1a1610;
  pointer-events: none;
  filter: drop-shadow(0 0 1px rgba(255, 250, 240, 0.9)) drop-shadow(0 1px 2px rgba(255, 250, 240, 0.55));
}

.compass svg {
  width: 2.55rem;
  height: 2.55rem;
}

.scale {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1a1610;
}

.scale b {
  display: block;
  width: 4.8rem;
  height: 0.32rem;
  margin-bottom: 0.18rem;
  background:
    linear-gradient(90deg, #1a1610 0 50%, transparent 50% 100%),
    linear-gradient(#1a1610, #1a1610);
  background-size: 25% 100%, 100% 3px;
  background-repeat: repeat-x, no-repeat;
  background-position: left bottom, left bottom;
}

@media (max-width: 719px) {
  .page--wide {
    padding: 1.35rem 1.65rem 4.6rem;
  }

  .page {
    padding-bottom: 4.6rem;
  }
}

@media (max-width: 520px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.5rem 0.8rem 0.55rem;
  }

  .nav {
    justify-content: space-between;
    width: 100%;
    gap: 0.4rem;
    font-size: 0.78rem;
  }

  .nav a {
    flex: 1;
    text-align: center;
  }

  .nav a:first-child {
    text-align: left;
  }

  .nav a:last-child {
    text-align: right;
  }

  .kicker svg {
    display: none;
  }
}

@media (min-width: 720px) {
  .site-header {
    padding: 0.7rem 1.6rem;
  }

  .nav {
    gap: 1.05rem;
    font-size: 0.82rem;
  }

  .brand-text strong {
    font-size: 0.92rem;
  }

  .page {
    padding-top: 1.5rem;
    padding-bottom: 4rem;
  }

  .hero {
    padding-top: 0.9rem;
  }

  .kicker {
    font-size: 0.66rem;
    letter-spacing: 0.2em;
  }

  .polaroid {
    width: min(100%, 16.5rem);
  }

  .countdown {
    margin: 0.7rem auto 0.6rem;
    padding: 0.75rem 0.9rem 0.85rem;
  }

  .btn {
    font-size: 0.92rem;
    min-height: 2.85rem;
    padding: 0.7rem 1.1rem;
  }

  .sheet {
    padding: 1.8rem 1.55rem 1.9rem;
  }

  .sheet-header h1 {
    font-size: 2.15rem;
    white-space: nowrap;
  }

  .page-programme .sheet-header h1 {
    white-space: normal;
  }

  .event {
    grid-template-columns: 4.2rem 1.35rem minmax(0, 1fr);
    margin-left: 1.85rem;
  }

  .compass {
    left: 1.2rem;
    bottom: 0.9rem;
  }
}
