/* ===== Palette & type (matched to the Canva Save the Date) ===== */
:root {
  --cream: #F6F4F0;        /* exact background of the invite art */
  --cream-deep: #EFEBE3;
  --paper: #FBFAF7;
  --sage: #9DAE8C;
  --sage-dark: #6F8460;
  --brown: #4A3427;
  --brown-soft: #7A6556;
  --wattle: #E2B33C;
  --line: #DED8CC;

  --display: "Italiana", "Didot", serif;
  --serif: "Cormorant Garamond", "Garamond", Georgia, serif;

  --radius: 14px;
  --gutter: clamp(16px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--sage-dark); }
strong { font-weight: 600; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 680px; }
.center { text-align: center; }
.small { font-size: 0.95em; color: var(--brown-soft); }

/* ===== Shared type ===== */
.eyebrow {
  margin: 0 0 .5rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: .8rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--brown);
}
.script { font-family: var(--serif); font-weight: 700; color: var(--brown); line-height: 1.15; letter-spacing: .01em; }
.title {
  text-wrap: balance;
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 2rem + 3vw, 4rem);
  line-height: 1;
  color: var(--sage);
  letter-spacing: .02em;
}
.lead { font-size: 1.12em; margin: 0 0 1rem; }
.names {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  color: var(--sage);
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: .01em;
}
.amp { font-family: var(--display); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.6rem;
  border: 1.5px solid var(--sage-dark);
  border-radius: 999px;
  background: transparent;
  color: var(--sage-dark);
  font: 500 .85rem/1 var(--serif);
  letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--solid { background: var(--sage-dark); color: #fff; }
.btn--solid:hover { background: #5d7050; }
.btn--ghost { border-style: dashed; width: 100%; margin-top: .25rem; letter-spacing: .12em; }
.btn--wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--sage-dark); text-decoration: underline; text-underline-offset: 3px;
}

/* ===== 1. Hero: wattle + text, then the big bush party scene ===== */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--cream);
}
/* The art has the invite's cream baked in; "darken" makes those boxes vanish where they overlap */
.hero__wattle, .hero__scene { mix-blend-mode: darken; }

/* Feathered watercolour edges so the scene melts into the page */
.feather {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 10%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 10%, #000 88%, transparent 100%);
          mask-composite: intersect;
}
.hero__wattle {
  position: absolute; top: 0; left: 0;
  width: min(54vw, 300px);
  z-index: -1;
}
.hero__text {
  padding: calc(min(54vw, 300px) * 0.92) var(--gutter) 0;
  text-align: center;
}
.hero__kicker { font-size: clamp(1.3rem, 1.05rem + 1.2vw, 2rem); margin: 0 auto .6rem; white-space: nowrap; }
.hero .names { font-size: clamp(4rem, 2.6rem + 9vw, 8.5rem); }
.hero__date {
  margin: 1.1rem 0 0;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  letter-spacing: .03em;
}
.hero__date sup { font-size: .5em; }
.hero__sub { margin: .1rem 0 0; font-size: 1.15em; color: var(--brown-soft); }
.hero__note {
  display: inline-block;
  margin: 1rem 0 0; padding: .3rem 1rem;
  border: 1px solid var(--wattle); border-radius: 999px;
  color: var(--brown);
}
.hero__cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.hero__cta .btn { min-width: 140px; }
.hero__scene { width: 112%; max-width: none; margin: 1rem 0 0 -6%; }

@media (min-width: 900px) {
  .hero__wattle { width: min(30vw, 440px); }
  .hero__text { padding-top: 6rem; }
  .hero__scene { width: min(100%, 1300px); margin: 1.5rem auto 0; }
}

/* ===== Sections ===== */
.section { padding: clamp(3rem, 8vw, 6rem) 0; text-align: center; }
.section--tint { background: var(--cream-deep); }

/* Cards */
.cards {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
  text-align: left;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.card p { margin: 0 0 .75rem; }
.card p:last-child { margin-bottom: 0; }
.card__title {
  margin: 0 0 .75rem;
  font-family: var(--serif); font-weight: 700;
  font-size: 1.75rem; line-height: 1.15; color: var(--sage-dark);
}
.card--feature {
  background: linear-gradient(160deg, #FFFDF5, var(--paper));
  border-color: var(--wattle);
  box-shadow: 0 10px 30px -18px rgba(150, 110, 20, .45);
}
.card__eyebrow { color: #A27714; margin-bottom: .35rem !important; }
.card__ask { font-style: italic; color: var(--sage-dark); }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 1.5rem; margin-bottom: .6rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--wattle);
}
@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card--feature { grid-column: 1 / -1; padding: 2rem 2.25rem; }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: 1fr 1fr 1.2fr; }
  .card--feature { grid-column: auto; padding: 1.6rem 1.5rem; }
}

/* Photos (bottom of the page): always centred, even with 1 or 2 photos */
.gallery {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .75rem;
  margin-top: 2.5rem;
}
.gallery figure {
  flex: 0 1 100%;
  margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--cream-deep); aspect-ratio: 4 / 5;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery figure:hover img { transform: scale(1.03); }
@media (min-width: 640px) { .gallery figure { flex-basis: calc((100% - .75rem) / 2); } }
@media (min-width: 1024px) { .gallery figure { flex-basis: calc((100% - 1.5rem) / 3); } }

/* ===== 3. Location ===== */
.address { font-size: 1.5em; line-height: 1.35; margin: 0 0 1.5rem; }
.callout {
  text-align: left;
  background: #FFF8E4;
  border-left: 4px solid var(--wattle);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 0 0 1.5rem;
}
.callout strong { display: block; margin-bottom: .2rem; }
.coords { margin: .9rem 0 2rem; font-size: .95em; color: var(--brown-soft); }
.copied { margin-left: .5rem; color: var(--sage-dark); font-style: italic; }
.map {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  background: var(--cream);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (min-width: 760px) { .map { aspect-ratio: 16 / 8; } }

/* ===== 4. RSVP form ===== */
.form { text-align: left; margin-top: 1.5rem; }
fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.25rem 1.25rem 1.4rem;
  margin: 0 0 1.25rem;
  min-width: 0;
}
legend {
  padding: 0 .5rem;
  font-family: var(--display); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem); color: var(--sage-dark);
}
.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
label, .label { display: block; font-weight: 600; margin-bottom: .3rem; }
.optional { font-weight: 400; color: var(--brown-soft); font-style: italic; }
.hint { margin: .35rem 0 .75rem; font-size: .92em; color: var(--brown-soft); line-height: 1.4; }
.field .hint { margin-bottom: 0; }
input[type="text"], input[type="tel"], input[type="email"], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: .65rem .85rem;
  font: inherit; font-size: 1.05rem; /* ≥16px so iOS doesn't zoom */
  color: var(--brown);
  background: #fff;
  border: 1px solid #CFC7B8;
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #B3A89A; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--sage-dark);
  box-shadow: 0 0 0 3px rgba(157, 174, 140, .35);
}
.invalid input[type="text"], .invalid input[type="tel"], input.invalid { border-color: #B5523B; }
.invalid .choice span { border-color: #B5523B; }

.choices { display: flex; gap: .5rem; flex-wrap: wrap; }
.choices--stack { flex-direction: column; }
.choices--stack .choice { flex: none; }
.choice { margin: 0; font-weight: 400; flex: 1 1 140px; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; gap: .6rem;
  min-height: 48px; padding: .55rem .9rem;
  border: 1px solid #CFC7B8; border-radius: 10px; background: #fff;
  transition: background .15s, border-color .15s;
}
.choice span::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--sage-dark); background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
}
.choice input:checked + span { border-color: var(--sage-dark); background: #F1F4EC; }
.choice input:checked + span::before { background: var(--sage-dark); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(157, 174, 140, .45); }


.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__error { color: #A3412C; min-height: 1.4em; margin: 0 0 .5rem; text-align: center; }

.thanks { text-align: center; padding: 2rem 0; outline: none; }
.thanks__script { font-size: clamp(2.4rem, 2rem + 2vw, 3.2rem); color: var(--sage-dark); margin: 0 0 .5rem; }

/* ===== 5. Closing ===== */
.closing { text-align: center; padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem); }
.closing__script { font-weight: 400; white-space: nowrap; font-size: clamp(1rem, 4.2vw, 2.4rem); margin: 0 0 1rem; }
.names--small { font-size: clamp(2.4rem, 1.8rem + 3vw, 3.8rem); }
.closing__date { letter-spacing: .4em; color: var(--brown-soft); margin: .75rem 0 0; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint span { animation: none; }
}

/* While the latest wording loads from the Google Sheet (max 2.5s) */
[data-cms] { transition: opacity .3s ease; }
.cms-loading [data-cms] { opacity: 0; }
.closing .narrow { max-width: 900px; }

/* RSVP dropdown (No. of Kids) */
select {
  appearance: none; -webkit-appearance: none;
  max-width: 140px;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236F8460' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center;
  cursor: pointer;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
