/* ==========================================================================
   Dinners for the 99% — styles
   ========================================================================== */

@font-face {
  font-family: "BBH Bogle";
  src: url("assets/typefaces/BBH_Bogle/BBHBogle-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Host Grotesk";
  src: url("assets/typefaces/Host_Grotesk/HostGrotesk-VariableFont_wght.ttf")
    format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Host Grotesk";
  src: url("assets/typefaces/Host_Grotesk/HostGrotesk-Italic-VariableFont_wght.ttf")
    format("truetype-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Millionaire Trial";
  src: url("assets/typefaces/millionairetrial-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---- tokens ------------------------------------------------------------- */

:root {
  --bg: #1f5e8a;            /* deep dinner blue */
  --bg-deep: #1a527a;
  --cream: #f3eccc;         /* warm cream / candlelight */
  --cream-dim: rgba(243, 236, 204, 0.78);
  --cream-soft: rgba(243, 236, 204, 0.55);
  --field: #f3eccc;
  --field-text: #1f5e8a;
  --field-placeholder: rgba(31, 94, 138, 0.55);
  --seal: #b62828;

  --font-display: "BBH Bogle", "Impact", "Anton", sans-serif;
  --font-body: "Host Grotesk", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-script: "Millionaire Trial", "Snell Roundhand", cursive;

  --max-w: 75rem;            /* 1200px — wide enough for the oversized logo */
  --max-prose: 42rem;        /* ~672px — readable measure for body copy */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-gap: clamp(3rem, 7vw, 7.5rem);  /* 120px around filigrees / between sections */
}

/* ---- reset / base ------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.6vw + 0.75rem, 1.125rem);  /* 16–18px */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

/* ---- top nav ------------------------------------------------------------ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1.5rem var(--gutter);
  background: var(--bg);
  background: linear-gradient(to bottom, var(--bg) 80%, rgba(31, 94, 138, 0));
}

.site-nav nav {
  display: flex;
  justify-content: center;
  gap: clamp(1.75rem, 5vw, 4rem);
  font-size: clamp(0.75rem, 0.4vw + 0.6rem, 0.875rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  font-weight: 500;
}

/* ---- layout ------------------------------------------------------------- */

main {
  padding: 0 var(--gutter);
}

main > section,
main > .filigree {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

section {
  padding: 0;
  text-align: center;
}

.prose {
  max-width: var(--max-prose);
  margin: 0 auto;
}

.prose p {
  margin: 0 0 1em;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ---- hero --------------------------------------------------------------- */

.hero {
  padding-top: clamp(3rem, 7vw, 7.5rem);   /* 120px below nav at desktop */
}

.logo-wrap {
  margin: 0 auto clamp(3rem, 7vw, 7.5rem); /* 120px between logo and headline */
  width: 100%;
  max-width: 70.4rem;          /* 1127px */
}

.logo {
  width: 100%;
  height: auto;
}

.hero-copy {
  margin: 0 0 clamp(2.5rem, 6vw, 4rem);
}

.display {
  font-family: var(--font-display);
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.95;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 8rem);   /* up to 128px */
}

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

.display--md {
  font-size: clamp(3rem, 9vw, 8rem);
}

.display--lg {
  font-size: clamp(3.25rem, 9.5vw, 8.5rem);
}

.display-block {
  display: block;
}

.hero-prose {
  font-size: clamp(1rem, 0.5vw + 0.85rem, 1.25rem);
  line-height: 1.7;
  color: var(--cream);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.hero-prose strong {
  font-weight: 600;
}

.hero-prose em {
  font-style: italic;
  color: var(--cream);
}

/* ---- filigree ----------------------------------------------------------- */

.filigree {
  width: clamp(12rem, 27vw, 25.625rem);   /* up to 410px */
  margin: var(--section-gap) auto;        /* 120px above and below at desktop */
  opacity: 0.95;
}

/* ---- section headings --------------------------------------------------- */

.section-heading {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 4rem);   /* up to 64px */
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
  color: var(--cream);
}

/* ---- about -------------------------------------------------------------- */

.about .prose {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  text-align: left;
  max-width: 44rem;          /* 704px */
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}

.col-heading {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.125rem);
  margin: 0 0 0.625rem;
  color: var(--cream);
}

.two-col ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.125rem);
  line-height: 1.55;
}

.two-col li {
  margin-bottom: 0.25rem;
}

.tickets {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  font-size: clamp(1rem, 0.5vw + 0.85rem, 1.25rem);
}

/* ---- invite / form ----------------------------------------------------- */

.envelope-wrap {
  max-width: clamp(20rem, 35vw, 32rem);
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}

.envelope {
  width: 100%;
  filter: drop-shadow(0 0.5rem 1.25rem rgba(0, 0, 0, 0.18));
}

.invite-form {
  max-width: 44rem;          /* 704px */
  margin: 0 auto;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.125rem;
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.field {
  display: block;
  position: relative;
}

.field > label {
  display: block;
}

.field input,
.field select {
  width: 100%;
  background: var(--field);
  color: var(--field-text);
  border: 0;
  border-radius: 0.3125rem;
  padding: 0.9375rem 1.125rem;
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 0.4vw + 0.85rem, 1.0625rem);
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: box-shadow 0.18s ease;
}

.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231f5e8a' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.field input::placeholder {
  color: var(--field-placeholder);
}

.field input:focus,
.field select:focus {
  box-shadow: 0 0 0 2px var(--cream);
}

/* ---- field errors ------------------------------------------------------ */

.field-error {
  margin: 0.375rem 0.25rem 0;
  min-height: 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: #ffd1d1;
}

.field-error:empty {
  display: none;
}

.field.has-error input,
.field.has-error select,
.field.has-error .multiselect-trigger {
  box-shadow: 0 0 0 2px #ff8a8a;
}

/* ---- multiselect ------------------------------------------------------- */

.field-multiselect {
  position: relative;
}

.multiselect-trigger {
  width: 100%;
  background: var(--field);
  color: var(--field-text);
  border: 0;
  border-radius: 0.3125rem;
  padding: 0.9375rem 2.75rem 0.9375rem 1.125rem;
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 0.4vw + 0.85rem, 1.0625rem);
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.18s ease;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multiselect-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--cream);
}

.multiselect-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multiselect-label.is-placeholder {
  color: var(--field-placeholder);
}

.multiselect-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.75rem;
  height: 0.5rem;
  fill: var(--field-text);
  pointer-events: none;
  transition: transform 0.18s ease;
}

.is-open .multiselect-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.multiselect-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  background: var(--field);
  color: var(--field-text);
  border-radius: 0.4375rem;
  padding: 0.375rem 0;
  max-height: 18rem;
  overflow-y: auto;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.28);
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: 0.6875rem;
  padding: 0.5rem 1.125rem;
  font-size: clamp(0.875rem, 0.3vw + 0.8rem, 1rem);
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.12s ease;
}

.multiselect-option:hover,
.multiselect-option:focus-within {
  background: rgba(31, 94, 138, 0.1);
}

.multiselect-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
  border-radius: 0.1875rem;
  background: transparent;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
  transition: background 0.12s ease;
}

.multiselect-option input[type="checkbox"]:checked {
  background: var(--field-text);
}

.multiselect-option input[type="checkbox"]:checked::after {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  background: var(--field);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.multiselect-option input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--field-text);
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.pill-button {
  display: inline-block;
  padding: 0.875rem 2.25rem;
  background: var(--cream);
  color: var(--bg);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.9375rem, 0.3vw + 0.875rem, 1.0625rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.pill-button:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.pill-button:active {
  transform: translateY(0);
}

.pill-button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-status {
  text-align: center;
  margin: 1.25rem 0 0;
  min-height: 1.4em;
  font-size: 0.9375rem;
  color: var(--cream-dim);
}

.form-status.is-error {
  color: #ffd1d1;
}

.form-status.is-success {
  color: var(--cream);
}

/* ---- partner ------------------------------------------------------------ */

.partner .centered-list {
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
}

.partner .centered-list li {
  margin: 0;
}

.partner .form-actions {
  margin-top: clamp(0.75rem, 2vw, 1.25rem);
}

/* ---- footer ------------------------------------------------------------- */

.site-footer {
  margin-top: var(--section-gap);          /* 120px gap before footer */
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(1.5rem, 4vw, 2.25rem);
  background: var(--bg-deep);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo {
  width: clamp(14rem, 30vw, 22rem);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: clamp(0.875rem, 0.3vw + 0.8rem, 1rem);
  text-align: right;
}

.copyright {
  max-width: var(--max-w);
  margin: clamp(1.5rem, 4vw, 2.25rem) auto 0;
  text-align: right;
  font-size: 0.75rem;
  color: var(--cream-soft);
  letter-spacing: 0.04em;
}

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 600px) {
  .site-nav nav {
    gap: 1.125rem;
    font-size: 0.6875rem;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
    text-align: left;
    max-width: 22rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    text-align: center;
  }

  .copyright {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
