/* SPDX-FileCopyrightText: 2026 Curtis Galloway */
/* SPDX-License-Identifier: Apache-2.0 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Sans+Condensed:ital,wght@0,400;0,600;0,700;1,400&family=IBM+Plex+Serif:ital,wght@0,400;0,600;1,400&display=swap');

/* ══════════════════════════════════════════════════════════════
   ARGENTA INVITATION SYSTEM
   Document stylesheet · DOC AI-0002 · REV A
   Derived from the Argenta Instruments corporate sheet, DOC AI-0001.
   ══════════════════════════════════════════════════════════════ */

:root {
  --ground:       #00347B;
  --ground-deep:  #001B41;
  --ground-lift:  #073F8F;
  --paper:        #E9E4D8;
  --paper-dim:    rgba(233, 228, 216, 0.60);
  --paper-faint:  rgba(233, 228, 216, 0.30);
  --accent:       #16F7F7;
  --signal:       #1567F8;
  --stamp:        #E2543B;
  --affirm:       #16F7F7;
  --hold:         #F5B841;
  --rule:         rgba(22, 247, 247, 0.26);
  --rule-faint:   rgba(233, 228, 216, 0.12);

  --cond:  'IBM Plex Sans Condensed', sans-serif;
  --mono:  'IBM Plex Mono', monospace;
  --serif: 'IBM Plex Serif', Georgia, serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 34rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--ground);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
  position: relative;
  min-height: 100dvh;
}

/* ── Engineering paper: coarse grid, fine grid, vignette, grain ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--rule-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-faint) 1px, transparent 1px),
    linear-gradient(rgba(233, 228, 216, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 228, 216, 0.05) 1px, transparent 1px),
    radial-gradient(ellipse 120% 80% at 50% 0%, transparent 40%, rgba(0, 12, 34, 0.55) 100%);
  background-size: 108px 108px, 108px 108px, 18px 18px, 18px 18px, 100% 100%;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ══ Document chrome ══════════════════════════════════════════ */

.doc-bar {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-faint);
  padding: 0.7rem var(--gutter);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  background: rgba(0, 20, 55, 0.42);
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 40;
}

.doc-bar .classification { color: var(--stamp); }

.shell {
  position: relative;
  z-index: 2;
  width: min(100% - (2 * var(--gutter)), 66rem);
  margin-inline: auto;
  padding-block: clamp(1.75rem, 5vw, 3.25rem);
}

.shell--narrow { width: min(100% - (2 * var(--gutter)), 44rem); }

/* ══ Masthead ═════════════════════════════════════════════════ */

.masthead {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.masthead__mark {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--paper);
}

.masthead__mark img { width: clamp(132px, 15vw, 168px); height: auto; display: block; }

.masthead__sub {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  border-left: 1px solid var(--rule);
  padding-left: 0.9rem;
  max-width: 9rem;
  line-height: 1.6;
}

/* ══ Typography ═══════════════════════════════════════════════ */

h1, h2, h3 {
  font-family: var(--cond);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); text-transform: uppercase; }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); text-transform: uppercase; }
h3 { font-size: clamp(1.05rem, 1.9vw, 1.3rem); }

p { max-width: var(--measure); margin-bottom: 1.15rem; color: var(--paper-dim); }
p:last-child { margin-bottom: 0; }
p strong { color: var(--paper); font-weight: 600; }

a { color: var(--accent); text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
a:hover { color: var(--paper); }

.section-label, .eyebrow {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin: 0;
}

.muted { color: var(--paper-dim); }
.faint { color: var(--paper-faint); }
.small { font-size: 0.8rem; }

.rule {
  height: 1px;
  background: var(--rule);
  margin: clamp(1.5rem, 3.5vw, 2.5rem) 0;
  position: relative;
  border: 0;
}
.rule::after {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 6.5rem; height: 3px;
  background: var(--accent);
}

/* ══ Layout helpers ═══════════════════════════════════════════ */

.stack > * + * { margin-top: clamp(1.25rem, 3vw, 2rem); }
.stack-sm > * + * { margin-top: 0.85rem; }
.stack-xs > * + * { margin-top: 0.4rem; }

.row { display: flex; gap: 0.85rem; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.push { margin-left: auto; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}

/* ══ Panels (with corner registration marks) ══════════════════ */

.panel, .card {
  border: 1px solid var(--rule);
  background: linear-gradient(160deg, rgba(0, 27, 65, 0.62), rgba(0, 27, 65, 0.24));
  padding: clamp(1.4rem, 3vw, 2.25rem);
  position: relative;
}

.panel::before, .panel::after,
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 11px; height: 11px;
  border: 1px solid var(--accent);
  opacity: 0.55;
}
.panel::before, .card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after,  .card::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.card--tight { padding: 1.1rem 1.35rem; }

/* ══ The invitation, set as a controlled document ═════════════ */

.invitation {
  border: 1px solid var(--rule);
  background: linear-gradient(160deg, rgba(0, 27, 65, 0.72), rgba(0, 27, 65, 0.3));
  padding: clamp(1.75rem, 5vw, 3.25rem);
  position: relative;
}

/* Full corner brackets — this is the hero document. */
.invitation::before, .invitation::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 1px solid var(--accent);
  opacity: 0.7;
}
.invitation::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.invitation::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.invitation__head { text-align: center; }

.invitation__title {
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  margin: 0.5em 0 0.3em;
}

.invitation__host {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent);
}

.invitation__body {
  max-width: var(--measure);
  margin-inline: auto;
  white-space: pre-wrap;
  color: var(--paper-dim);
}

/* ══ Specification rows (dot leaders) ═════════════════════════ */

.specs {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 2.05;
  max-width: var(--measure);
  margin-inline: auto;
}

.spec-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0 0.6ch;
}

.spec-row dt { color: var(--paper-dim); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.68rem; }
.spec-row dd { color: var(--paper); text-align: right; margin: 0; }
.spec-row .lead-dots {
  border-bottom: 1px dotted rgba(233, 228, 216, 0.32);
  transform: translateY(-0.3em);
  min-width: 1.5rem;
}
.spec-row dd .sub {
  display: block;
  font-size: 0.72rem;
  color: var(--paper-dim);
  line-height: 1.5;
}

@media (max-width: 34rem) {
  .spec-row { grid-template-columns: 1fr; gap: 0; }
  .spec-row .lead-dots { display: none; }
  .spec-row dd { text-align: left; margin-bottom: 0.7rem; }
}

/* ══ Forms ════════════════════════════════════════════════════ */

label { display: block; }

.field > label, .field-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

input[type='text'],
input[type='email'],
input[type='number'],
input[type='datetime-local'],
select,
textarea {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--paper);
  background: rgba(0, 12, 34, 0.45);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.6rem 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

textarea { resize: vertical; min-height: 5.5rem; line-height: 1.6; font-family: var(--serif); font-size: 1rem; }

select { appearance: none; background-image: none; }

input::placeholder, textarea::placeholder { color: rgba(233, 228, 216, 0.28); }

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 12, 34, 0.7);
  box-shadow: 0 0 0 1px var(--accent), 0 0 14px -4px var(--accent);
}

input[type='checkbox'] { width: auto; accent-color: var(--accent); }

.field-hint {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--paper-faint);
  margin: 0.35rem 0 0;
}

/* Verification code entry — a single wide keyed field. */
.code-input {
  font-family: var(--mono) !important;
  font-size: clamp(1.5rem, 6vw, 2.1rem) !important;
  letter-spacing: 0.4em;
  text-align: center;
  text-indent: 0.4em;
  max-width: 12ch;
  margin-inline: auto;
  padding: 0.6rem 0.5rem !important;
}

/* ══ RSVP choices ═════════════════════════════════════════════ */

.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }

@media (max-width: 30rem) { .choices { grid-template-columns: 1fr; } }

.choice { position: relative; }

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  width: 100%;
}

.choice span {
  display: block;
  text-align: center;
  padding: 0.8rem 0.5rem;
  border: 1px solid var(--rule);
  background: rgba(0, 12, 34, 0.35);
  font-family: var(--cond);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
  transition: all 0.15s;
}

.choice:hover span { color: var(--paper); border-color: var(--paper-faint); }

.choice input:focus-visible + span {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.choice input:checked + span {
  background: rgba(0, 12, 34, 0.75);
  color: var(--ground-deep);
  font-weight: 700;
}

.choice--yes   input:checked + span { background: var(--affirm); border-color: var(--affirm); box-shadow: 0 0 18px -5px var(--affirm); }
.choice--maybe input:checked + span { background: var(--hold);   border-color: var(--hold); }
.choice--no    input:checked + span { background: var(--stamp);  border-color: var(--stamp); color: var(--paper); }

/* ══ Buttons ══════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  padding: 0.72rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s, border-color 0.16s;
}

.btn:hover {
  background: var(--accent);
  color: var(--ground-deep);
  box-shadow: 0 0 20px -5px var(--accent);
}
.btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

.btn--accent { background: var(--accent); color: var(--ground-deep); font-weight: 600; }
.btn--accent:hover { background: var(--paper); border-color: var(--paper); color: var(--ground-deep); }

.btn--ghost { border-color: var(--rule); color: var(--paper-dim); }
.btn--ghost:hover { background: transparent; border-color: var(--paper-dim); color: var(--paper); box-shadow: none; }

.btn--danger { border-color: var(--stamp); color: var(--stamp); }
.btn--danger:hover { background: var(--stamp); color: var(--paper); box-shadow: none; }

.btn--sm { padding: 0.4rem 0.8rem; font-size: 0.62rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ══ Status pips ══════════════════════════════════════════════ */

.pip {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 0.16rem 0.5rem;
  display: inline-block;
  white-space: nowrap;
  line-height: 1.5;
}

.pip--yes     { color: var(--affirm); }
.pip--maybe   { color: var(--hold); }
.pip--no      { color: var(--stamp); }
.pip--pending { color: var(--paper-faint); }

/* ══ Tally ════════════════════════════════════════════════════ */

.tally {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  border: 1px solid var(--rule);
  background: rgba(0, 27, 65, 0.35);
}

.tally__cell { padding: 1rem 1.15rem; border-right: 1px solid var(--rule-faint); }
.tally__cell:last-child { border-right: 0; }

.tally__num {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  display: block;
}

.tally__label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-top: 0.45rem;
  display: block;
}

/* ══ Guest manifest ═══════════════════════════════════════════ */

.guests { list-style: none; margin: 0; padding: 0; }

.guests li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule-faint);
}
.guests li:last-child { border-bottom: 0; }

.guest__name { font-family: var(--cond); font-weight: 600; font-size: 1.02rem; }

/* ══ Tables ═══════════════════════════════════════════════════ */

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); background: rgba(0, 27, 65, 0.35); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule-faint); vertical-align: middle; color: var(--paper-dim); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(7, 63, 143, 0.22); }

/* ══ Notices ══════════════════════════════════════════════════ */

.notice {
  border-left: 3px solid var(--accent);
  background: rgba(0, 27, 65, 0.5);
  padding: 0.9rem 1.15rem;
  font-size: 0.94rem;
  color: var(--paper-dim);
}
.notice strong { color: var(--paper); }
.notice--good { border-left-color: var(--affirm); }
.notice--warn { border-left-color: var(--stamp); }
.notice ul { margin: 0.5rem 0 0 1.2rem; }
.notice code { font-family: var(--mono); font-size: 0.82rem; color: var(--paper); }

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--paper-faint);
  font-family: var(--serif);
  font-style: italic;
  max-width: none;
}

/* ══ Event cards ══════════════════════════════════════════════ */

.event-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--rule-faint);
  background: rgba(0, 27, 65, 0.35);
  padding: 1.1rem 1.3rem;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.event-card:hover {
  background: rgba(7, 63, 143, 0.28);
  border-color: var(--rule);
  transform: translateX(3px);
  color: inherit;
}

.event-card__title {
  font-family: var(--cond);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  margin: 0 0 0.25rem;
}

.event-card__meta { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--paper-faint); margin: 0; }
.event-card--past { opacity: 0.55; }

/* ══ Copyable link ════════════════════════════════════════════ */

.linkbox { display: flex; gap: 0.4rem; align-items: center; }

.linkbox input {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.32rem 0.5rem;
  min-width: 0;
}

.note-entry { padding-bottom: 0.8rem; border-bottom: 1px solid var(--rule-faint); }
.note-entry:last-child { padding-bottom: 0; border-bottom: 0; }

/* ══ Stamp ════════════════════════════════════════════════════ */

.stamp {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stamp);
  border: 2px solid var(--stamp);
  padding: 0.45rem 0.9rem;
  display: inline-block;
  transform: rotate(-7deg);
  opacity: 0.8;
  line-height: 1.35;
  text-align: center;
}

/* ══ Footer ═══════════════════════════════════════════════════ */

footer.site {
  margin-top: 3rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--rule-faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--paper-faint);
}
footer.site p { color: var(--paper-faint); max-width: none; }

/* ══ Entrance choreography ════════════════════════════════════ */

.reveal { opacity: 0; transform: translateY(14px); animation: reveal 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.reveal:nth-child(1) { animation-delay: 0.05s; }
.reveal:nth-child(2) { animation-delay: 0.14s; }
.reveal:nth-child(3) { animation-delay: 0.23s; }
.reveal:nth-child(4) { animation-delay: 0.32s; }
.reveal:nth-child(5) { animation-delay: 0.41s; }

@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* ══ Utility ══════════════════════════════════════════════════ */

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

@media print {
  body { background: #fff; color: #111; }
  body::before, body::after { display: none; }
  .no-print { display: none !important; }
  .panel, .card, .invitation { border-color: #999; background: none; }
  .panel::before, .panel::after, .card::before, .card::after,
  .invitation::before, .invitation::after { display: none; }
  a { color: #111; }
  h1, h2, h3, .guest__name, p, td { color: #111; }
}
