/* ==========================================================================
   URCypher
   A URDesk sub-brand. Newsprint ground, Mic Check Blue voice, Ink type.
   The dot replaces URDesk's slash. The 16-bar meter is the graphic device.
   No circles as decoration.
   ========================================================================== */

/* Self-hosted fonts (SIL Open Font License, see /assets/fonts/OFL.txt) */
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --ink: #121211;
  --paper: #E8E6DF;      /* Newsprint */
  --sheet: #F3F2EC;      /* form panel */
  --field: #FFFFFF;
  --blue: #2B4BF2;       /* Mic Check Blue: 5.3:1 with paper text */
  --overcast: #C9D3F2;
  --hot: #E8421C;        /* URDesk slash only */
  --muted: #55544F;      /* 6:1 on paper */
  --err: #A3260B;        /* 6.6:1 on paper */

  --f-sans: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --maxw: 75rem;
}

@media (min-width: 48em) { :root { --gutter: max(48px, env(safe-area-inset-left, 0px)); --gutter-r: max(48px, env(safe-area-inset-right, 0px)); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-sans); font-size: 1.125rem; line-height: 1.5; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.hero :focus-visible { outline-color: var(--paper); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.mono { margin: 0; font-family: var(--f-mono); font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 10; }
.skip:focus { left: 16px; top: 16px; }

/* Wordmark pieces */
.tag { display: inline-block; padding: 6px 10px; font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: 1.25rem; line-height: 1; }
.tag--paper { background: var(--paper); color: var(--ink); }
.slash { color: var(--hot); }
.mark { font-weight: 900; font-stretch: 115%; text-transform: uppercase; line-height: 0.86; letter-spacing: -0.015em; white-space: nowrap; }
.mark--sm { font-size: 1.5rem; line-height: 1; }
.mark--foot { font-size: clamp(2.5rem, 6vw, 4rem); }
.dot { display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; margin-left: 0.06em; vertical-align: baseline; }
.dot--ink { background: var(--ink); }
.dot--blue { background: var(--blue); }

/* Buttons */
.btn { display: inline-block; border: 0; border-radius: 0; cursor: pointer; text-decoration: none; font-family: var(--f-sans); font-weight: 900; font-stretch: 115%; text-transform: uppercase; line-height: 1; min-height: 44px; }
.btn--sm { padding: 13px 18px; font-size: 1.1rem; }
.btn--lg { padding: 20px 30px; font-size: clamp(1.35rem, 2.4vw, 1.9rem); }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--paper:hover { background: #FFFFFF; }
.btn--blue { background: var(--blue); color: var(--paper); }
.btn--blue:hover { background: #1F38C4; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #000; }

/* Main call to action: a label block plus an arrow block, like a mixing-desk key */
.cta { display: inline-flex; align-items: stretch; border: 0; border-radius: 0; padding: 0; cursor: pointer; text-decoration: none; background: var(--ink); color: var(--paper); font-family: var(--f-sans); min-height: 64px; }
.cta__label { display: flex; align-items: center; padding: 18px 26px; font-weight: 900; font-stretch: 115%; text-transform: uppercase; font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1; letter-spacing: -0.005em; }
.cta__arrow { display: flex; align-items: center; justify-content: center; width: 64px; flex: 0 0 64px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-sizing: border-box; }
.cta__arrow svg { transition: transform .18s ease; }
.cta:hover .cta__arrow svg { transform: translateY(4px); }
.cta--blue { background: var(--blue); }
.cta--blue .cta__arrow { border-color: var(--blue); }
.cta--blue:hover .cta__arrow svg, .hero__body .cta[href^="/"]:hover .cta__arrow svg { transform: translateX(4px); }
.cta[disabled] { opacity: 0.7; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .cta__arrow svg { transition: none; } }

/* Hero */
.hero { background: var(--blue); color: var(--paper); padding-top: env(safe-area-inset-top, 0px); }
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--paper); }
.bar__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero__body { display: flex; flex-direction: column; gap: 32px; padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero__title { margin: 0; font-weight: 900; font-stretch: 115%; font-size: clamp(2.25rem, calc((100vw - var(--gutter) - var(--gutter-r)) / 7.4), 9.25rem); line-height: 0.86; letter-spacing: -0.015em; text-transform: uppercase; }
.hero__title .dot { width: 0.32em; height: 0.32em; }
.hero__row { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: flex-end; }
.hero__lede { margin: 0; flex: 1 1 420px; min-width: 0; max-width: 38rem; font-weight: 500; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.4; }

.meter { display: flex; flex-direction: column; gap: 10px; }
.meter__bars { height: 88px; display: flex; align-items: flex-end; gap: clamp(4px, 0.8vw, 10px); }
.meter__bars i { flex: 1 1 0; background: var(--paper); height: 50%; }
.meter__bars i:nth-child(1) { height: 34%; }  .meter__bars i:nth-child(2) { height: 58%; }
.meter__bars i:nth-child(3) { height: 80%; }  .meter__bars i:nth-child(4) { height: 46%; }
.meter__bars i:nth-child(5) { height: 92%; }  .meter__bars i:nth-child(6) { height: 64%; }
.meter__bars i:nth-child(7) { height: 100%; } .meter__bars i:nth-child(8) { height: 40%; }
.meter__bars i:nth-child(9) { height: 72%; }  .meter__bars i:nth-child(10) { height: 88%; }
.meter__bars i:nth-child(11) { height: 50%; } .meter__bars i:nth-child(12) { height: 96%; }
.meter__bars i:nth-child(13) { height: 60%; } .meter__bars i:nth-child(14) { height: 36%; }
.meter__bars i:nth-child(15) { height: 82%; } .meter__bars i:nth-child(16) { height: 68%; }
.meter__legend { display: flex; justify-content: space-between; font-size: 0.85rem; }

/* Sections */
.h2 { margin: 0; font-weight: 900; font-stretch: 115%; text-transform: uppercase; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 0.95; letter-spacing: -0.01em; text-wrap: balance; }
.steps { padding-top: clamp(48px, 7vw, 88px); display: flex; flex-direction: column; gap: 28px; }
.steps__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; border-top: 2px solid var(--ink); }
.steps__list li { flex: 1 1 280px; min-width: 0; padding: 24px 24px 24px 0; display: flex; flex-direction: column; gap: 12px; border-bottom: 2px solid var(--ink); }
.steps__num { color: var(--blue); }
.steps__title { font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: 2.5rem; line-height: 0.95; }
.steps__text { max-width: 30rem; }

.rsvp { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); display: flex; flex-direction: column; gap: 32px; scroll-margin-top: 16px; }
.rsvp__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }

/* Form */
.form { display: flex; flex-direction: column; gap: 28px; background: var(--sheet); border: 2px solid var(--ink); padding: clamp(20px, 4vw, 48px); }
.row { display: flex; flex-wrap: wrap; gap: 28px 24px; }
.row > .field { flex: 1 1 280px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
label { font-family: var(--f-mono); font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; }
.opt { background: var(--overcast); padding: 2px 8px; margin-left: 6px; letter-spacing: 0.04em; }
input, select, textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--field); color: var(--ink); font-family: var(--f-sans); font-size: 1.125rem; line-height: 1.3; }
textarea { line-height: 1.45; resize: vertical; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
::placeholder { color: #7A7972; opacity: 1; }
[aria-invalid="true"] { border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err); }
.prefix { display: flex; }
.prefix span { display: flex; align-items: center; padding: 0 14px; background: var(--ink); color: var(--paper); font-family: var(--f-mono); font-size: 1.125rem; }
.prefix input { flex: 1 1 auto; min-width: 0; border-left: 0; }
.hint { margin: 0; font-size: 0.95rem; color: var(--muted); }
.err { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--err); }
.form__summary { border: 2px solid var(--err); color: var(--err); background: var(--field); padding: 16px 18px; font-weight: 600; }
.form__summary p { margin: 0; }
.form__summary p + p { margin-top: 6px; font-weight: 500; color: var(--ink); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; border-top: 2px solid var(--ink); padding-top: 28px; }
.form__note { margin: 0; flex: 1 1 300px; font-size: 1rem; color: var(--muted); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.done { background: var(--blue); color: var(--paper); padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; gap: 20px; }
.done:focus { outline: none; }
.done__title { margin: 0; font-weight: 900; font-stretch: 115%; text-transform: uppercase; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.92; letter-spacing: -0.01em; }
.done__text { margin: 0; max-width: 39rem; font-size: 1.25rem; }

.help { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; border: 2px dashed var(--ink); padding: 20px 24px; }
.help p { margin: 0; }
.help > p:first-child { flex: 1 1 320px; }
.help__email { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-family: var(--f-mono); font-weight: 500; overflow-wrap: anywhere; }
.help__email span { user-select: all; }
.copy { min-height: 44px; padding: 8px 14px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--f-mono); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; border-radius: 0; }
.copy:hover { background: var(--ink); color: var(--paper); }

.foot { background: var(--ink); color: var(--paper); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.foot__meta { text-align: right; line-height: 1.6; font-size: 0.85rem; }
.nojs { margin: 0; padding: 16px; background: var(--ink); color: var(--paper); text-align: center; }

[hidden] { display: none !important; }

/* Small phones: the hero's own button does the job of the header RSVP link */
@media (max-width: 32.5em) { .bar > .btn { display: none; } }

/* Phones: keep the CTA on one line, full width */
@media (max-width: 32.5em) {
  .cta { display: flex; width: 100%; }
  .cta__label { flex: 1 1 auto; white-space: nowrap; padding: 18px 18px; font-size: 1.15rem; }
  .cta__arrow { width: 56px; flex-basis: 56px; }
}
@media (max-width: 22.5em) { .cta__label { padding: 16px 14px; font-size: 1rem; } .cta__arrow { width: 50px; flex-basis: 50px; } }
