/* ==========================================================================
   Kylie & Brandon — address collection
   ========================================================================== */

/* --- Fonts (self-hosted, latin + latin-ext subsets) ---------------------- */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Oswald ships as a variable font — one file covers weights 200–700. */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('fonts/oswald-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('fonts/oswald-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens -------------------------------------------------------------- */

:root {
  --paper: #f3f0f6;
  --ink: #1a1817;
  --plum: #6f5f86;
  --lilac: #8a77a3;
  --mono-label: #6f6663;
  --body-muted: #5d5553;
  --footer-muted: #8d8481;
  --placeholder: #a49a97;
  --photo-bg: #ddd6e2;
  --rule: rgba(26, 24, 23, 0.16);
  --field-line: rgba(26, 24, 23, 0.3);
  --danger: #a2403a;

  --display: Oswald, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
}

/* --- Base ---------------------------------------------------------------- */

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--plum);
}
a:hover {
  color: var(--ink);
}

input {
  font: inherit;
}
input::placeholder {
  color: var(--placeholder);
}

:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
}

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

/* --- Layout -------------------------------------------------------------- */

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 0 clamp(18px, 4vw, 24px) clamp(56px, 9vw, 90px);
}

.sheet {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
}

/* --- Ticket stub header -------------------------------------------------- */

.stub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: clamp(9px, 1.6vw, 11px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mono-label);
}

.stub__accent {
  color: var(--plum);
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  padding: clamp(34px, 6vw, 52px) 0 clamp(28px, 5vw, 40px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(14px, 3vw, 28px);
}

.hero__names {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--plum);
}

.hero__name {
  font-size: clamp(58px, 12vw, 132px);
  line-height: 0.82;
  font-weight: 700;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  margin: 0;
}

.hero__row {
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 2vw, 24px);
  flex-wrap: wrap;
}

.hero__amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(40px, 8vw, 86px);
  line-height: 0.9;
  color: var(--lilac);
}

.hero__when {
  text-align: right;
}

.hero__date {
  font-size: clamp(40px, 5.5vw, 62px);
  line-height: 0.85;
  font-weight: 600;
}

.hero__day {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--plum);
}

/* --- Perforated rule ----------------------------------------------------- */

.perf {
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    rgba(26, 24, 23, 0.32) 0 8px,
    transparent 8px 16px
  );
}

/* --- Address collection -------------------------------------------------- */

.collect {
  padding: clamp(36px, 6vw, 58px) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 56px);
  align-items: flex-start;
}

.collect__photo {
  flex: 1 1 250px;
  max-width: 420px;
  background: var(--photo-bg);
}

.collect__photo img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0.85) contrast(1.06);
}

.collect__body {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.collect__intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collect__heading {
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.02;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0;
}

.collect__note {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
  color: var(--body-muted);
  max-width: 48ch;
  text-wrap: pretty;
}

/* --- Form ---------------------------------------------------------------- */

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--mono-label);
}

.field__input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--field-line);
  border-radius: 0;
  color: var(--ink);
  font-size: 17px;
  padding: 9px 2px;
  outline: none;
  transition: border-bottom-color 140ms ease;
}

.field__input:focus {
  border-bottom-color: var(--plum);
}

.field__input--upper {
  text-transform: uppercase;
}

/* Only flag invalid fields after a submit attempt, never while first typing. */
.form.is-validated .field__input:invalid {
  border-bottom-color: var(--danger);
}

/* Honeypot — hidden from people, reachable by naive bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 8px;
}

.form__error {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--danger);
  text-align: right;
}

.form__error:empty {
  display: none;
}

.btn {
  background: var(--ink);
  color: var(--paper);
  border: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 17px 30px;
  cursor: pointer;
  min-height: 52px;
  transition: background 140ms ease;
}

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

.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}

/* Also used on an <a> on the no-JavaScript thank-you page. */
.btn--ghost {
  display: inline-block;
  text-decoration: none;
  margin-top: 8px;
  background: none;
  border: 1px solid var(--field-line);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.22em;
  padding: 13px 20px;
  min-height: 0;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* --- Confirmation -------------------------------------------------------- */

.confirmed {
  padding: clamp(40px, 7vw, 62px) 0 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.confirmed__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--plum);
}

.confirmed__headline {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0;
}

.confirmed__detail {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--body-muted);
  max-width: 46ch;
}

/* --- Footer -------------------------------------------------------------- */

.footer {
  margin-top: clamp(48px, 8vw, 72px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--footer-muted);
  text-align: center;
}

/* --- State toggling ------------------------------------------------------ */

[hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  .form {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__when {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
