/* Oak Tree Open Day RSVP: landing page + thank-you page (one stylesheet).
   Figma mmgZMtDSWlgS7htr5r8IV9: RSVP 5727:70 (desktop) / 5727:665 (mobile),
   TYP 5727:527 / 5727:867. Values are the Figma's at 390 and 1440, fluid in
   between: clamp(390 value, intercept + slope vw, 1440 value).
   tools/build_village.py copies this file to thank-you-page/assets/. */

:root {
  --navy: #233750;
  --navy-hover: #2d4566;
  --leaf: #29405b;
  --gold: #cc9848;
  --terracotta: #aa5638;
  --cream: #f4ecdb;
  --guest: #faf7f2;
  --chip: rgba(204, 152, 72, 0.18);
  --border: #d2d6dd;
  --muted: #5b6470;
  --error: #b3261e;
  --white: #fff;

  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* Leaf bands: the Figma pattern is 1440 wide on desktop, 1174 on the phone */
  --band-w: 1174.238px;
  --band-top: 0px;
}

@media (min-width: 720px) {
  :root {
    --band-w: max(1440px, 100%);
    --band-top: -10px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--navy);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
}

img,
svg {
  display: block;
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Page shell + leaf bands ----
   Top band: the vine pattern turned 180°, hung from the top of the page.
   Bottom band: the same pattern sitting on the footer, on its own navy
   ground, so where the two overlap (the thank-you page) it covers the top
   band exactly as the Figma's clip groups do. */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

main {
  position: relative;
  flex: 1;
  isolation: isolate;
  overflow: clip;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px clamp(48px, 36.49px + 2.952vw, 79px);
}

main::before,
main::after {
  content: "";
  position: absolute;
  left: 50%;
  z-index: -1;
  width: var(--band-w);
  pointer-events: none;
}

main::before {
  top: var(--band-top);
  aspect-ratio: 1440 / 624.5;
  background: url("../assets/f1a01af54dc74f3c.svg") center / 100% 100% no-repeat;
  transform: translateX(-50%) rotate(180deg);
}

main::after {
  bottom: 0;
  aspect-ratio: 1440 / 657.865;
  background: var(--navy) url("../assets/f1a01af54dc74f3c.svg") center bottom / 100% auto no-repeat;
  transform: translateX(-50%);
}

/* ---- Intro (logo, event, blurb) ---- */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  padding: clamp(33px, 27.43px + 1.429vw, 48px) 8px 0;
  color: var(--white);
  text-align: center;
}

.intro__logo {
  width: clamp(210px, 161.71px + 12.381vw, 340px);
  height: auto;
}

.intro__title {
  margin-top: clamp(51.7px, 43.68px + 2.057vw, 73.3px);
  font-size: clamp(30px, 19.23px + 2.762vw, 59px);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

.intro__details {
  margin-top: clamp(20.8px, 18.13px + 0.686vw, 28px);
  color: var(--gold);
  font-size: clamp(20px, 17.03px + 0.762vw, 28px);
  font-weight: 600;
  line-height: 1.2;
}

.intro__detail {
  display: block;
}

.intro__sep {
  display: none;
}

.intro__blurb {
  max-width: 530px;
  margin-top: clamp(18px, 14.06px + 1.01vw, 28.6px);
  font-size: clamp(17px, 15.89px + 0.286vw, 20px);
  line-height: 1.5;
  text-wrap: pretty;
}

@media (min-width: 720px) {
  .intro__detail {
    display: inline;
  }

  .intro__sep {
    display: inline;
    margin-inline: 0.45em;
  }
}

/* ---- Card ---- */
.card {
  width: 100%;
  max-width: 1042px;
  padding: clamp(28px, 20.57px + 1.905vw, 48px) clamp(20px, 6.63px + 3.429vw, 56px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: clamp(16px, 15.26px + 0.19vw, 18px);
  box-shadow: 0 10px 30px rgba(35, 55, 80, 0.12);
}

.rsvp-card {
  margin-top: clamp(45px, 29.4px + 4vw, 87px);
}

.card__title {
  font-size: clamp(24px, 21.77px + 0.571vw, 30px);
  font-weight: 600;
  line-height: 1.2;
}

/* ---- Form ---- */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 16.51px + 0.381vw, 22px);
  margin-top: clamp(18px, 16.51px + 0.381vw, 22px);
}

.rsvp-form__row {
  display: grid;
  gap: 18px;
}

@media (min-width: 720px) {
  .rsvp-form__row {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field__label {
  color: var(--navy);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

/* Trellis strips the designer "*" (.field__req) and appends its own star */
.field__req,
.trellis-req-star {
  margin-left: 0 !important; /* the label text already ends in a space */
  color: var(--terracotta) !important;
}

.trellis-req-star--error {
  color: var(--error) !important;
}

.field__input {
  width: 100%;
  height: clamp(56px, 55.26px + 0.19vw, 58px);
  padding: 0 clamp(16px, 15.26px + 0.19vw, 18px);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--navy);
  font: inherit;
  font-size: 18px;
  line-height: 1.3;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field__input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field__input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(35, 55, 80, 0.15);
}

/* Error state (Figma 5727:146): main.js sets .is-invalid from Trellis's
   own verdict. */
.field.is-invalid .field__input {
  border-width: 2px;
  border-color: var(--error);
}

.field.is-invalid .field__input:focus {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15);
}

.field__error {
  color: var(--error);
  font-size: 16px;
  line-height: 1.4;
}

/* Trellis's own inline message is replaced by .field__error */
.field .trellis-err {
  display: none !important;
}

/* Trellis's phone widget (intl-tel-input) wraps the input: let it fill the
   field and keep the dial-code button inside the border. */
.field .iti {
  display: block;
  width: 100%;
}

.field .iti__selected-country {
  border-radius: 10px 0 0 10px;
}

/* Second guest */
.guest {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 16.51px + 0.381vw, 22px) clamp(16px, 13.03px + 0.762vw, 24px) clamp(20px, 18.51px + 0.381vw, 24px);
  background: var(--guest);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.guest__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.guest__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.guest__chip {
  order: -1;
  padding: 3px 10px;
  background: var(--chip);
  border-radius: 20px;
  color: var(--terracotta);
  font-size: 16px;
  line-height: 1.4;
}

@media (min-width: 720px) {
  .guest__head {
    flex-direction: row;
    align-items: center;
  }

  .guest__chip {
    order: 0;
    padding: 4px 12px;
  }
}

/* Consent + submit */
.rsvp-form__submit {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 16.51px + 0.381vw, 22px);
}

.rsvp-form__consent {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.rsvp-form__consent a {
  color: var(--terracotta);
  text-decoration: underline;
  text-underline-position: from-font;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  padding: 0 24px;
  background: var(--navy);
  border: 0;
  border-radius: 10px;
  color: var(--white);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}

.button:active {
  transform: scale(0.97);
}

.button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--navy-hover);
  }
}

@media (min-width: 720px) {
  .rsvp-form__submit {
    align-items: center;
    gap: 28px;
    padding-top: 6px;
    text-align: center;
  }

  .rsvp-form__consent {
    max-width: 726px;
  }

  .button {
    width: 260px;
    height: 62px;
  }
}

/* ---- Call block ---- */
.call {
  display: flex;
  align-items: center;
  gap: clamp(14px, 13.26px + 0.19vw, 16px);
  width: 100%;
  margin-top: clamp(39px, 26.37px + 3.238vw, 73px);
  padding: clamp(16px, 15.26px + 0.19vw, 18px) clamp(18px, 15.77px + 0.571vw, 24px);
  background: var(--cream);
  border: 1px solid var(--gold);
  border-radius: clamp(12px, 11.26px + 0.19vw, 14px);
  color: var(--navy);
  text-decoration: none;
  transition: transform 160ms var(--ease-out);
}

.call:active {
  transform: scale(0.98);
}

.call:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.call__icon {
  flex: none;
  width: clamp(26px, 25.26px + 0.19vw, 28px);
  height: auto;
  color: var(--terracotta);
}

.call__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.call__lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.call__number {
  font-size: clamp(24px, 22.51px + 0.381vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

@media (min-width: 720px) {
  .call {
    width: auto;
  }
}

/* ---- Footer (Figma 2376:1193 desktop, 5727:744 mobile) ---- */
.footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 24px 32px;
  background: var(--navy);
  color: var(--white);
}

.footer__logo {
  width: 160px;
  height: auto;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none;
  font-size: 12px;
  line-height: 16px;
}

.footer__links a {
  color: inherit;
  text-decoration: underline;
  text-underline-position: from-font;
}

.footer__links a:focus-visible,
.rsvp-form__consent a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .footer__links a:hover,
  .call:hover .call__number {
    opacity: 0.8;
  }
}

@media (min-width: 720px) {
  .footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 63px 80px 63px 77px;
  }

  .footer__logo {
    width: clamp(200px, 21vw, 299px);
  }

  .footer__links {
    align-items: flex-end;
    padding: 0;
    border-top: 0;
    font-size: 15px;
    line-height: 23px;
  }
}

/* ---- Thank-you page ---- */
.page--thanks .intro {
  padding-top: clamp(33px, 19.63px + 3.429vw, 69px);
}

.thanks__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 27px;
  margin-top: clamp(49.7px, 42.79px + 1.771vw, 68.3px);
}

.thanks__badge {
  flex: none;
  width: 50px;
  height: 50px;
}

.thanks__title {
  max-width: 334px;
  font-size: clamp(30px, 24.8px + 1.333vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

.page--thanks .intro__blurb {
  margin-top: clamp(20px, 17.4px + 0.667vw, 27px);
}

.event-card {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 7.26px + 0.19vw, 10px);
  margin-top: clamp(65.5px, 63.83px + 0.429vw, 70px);
  padding-block: clamp(28px, 22.06px + 1.524vw, 44px);
}

.event-card__eyebrow {
  color: var(--terracotta);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-card__title {
  font-size: clamp(24px, 21.77px + 0.571vw, 30px);
  font-weight: 600;
  line-height: 1.2;
}

.event-card__title--next {
  margin-top: clamp(6px, 5.26px + 0.19vw, 8px);
  font-size: clamp(22px, 19.03px + 0.762vw, 30px);
}

.event-card__when {
  font-size: clamp(18px, 16.51px + 0.381vw, 22px);
  line-height: 1.3;
}

.event-card__sep {
  margin-inline: 0.45em;
}

.event-card__where,
.event-card__body {
  color: var(--muted);
  font-size: clamp(17px, 15.89px + 0.286vw, 20px);
  line-height: 1.5;
}

.event-card__rule {
  width: 100%;
  height: 1px;
  margin: 0;
  background: var(--border);
  border: 0;
}

.page--thanks .call {
  margin-top: clamp(9px, -15.14px + 6.19vw, 74px);
  min-height: 87px;
}

@media (min-width: 720px) {
  .thanks__heading {
    flex-direction: row;
    gap: 16px;
  }

  .thanks__title {
    max-width: none;
    line-height: 1.2;
  }

  .page--thanks .call {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .call {
    transition: background-color 150ms ease;
  }

  .button:active,
  .call:active {
    transform: none;
  }
}
