/* Noir Date — dark luxury. Self-hosted fonts, no external requests. */

@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/jost-latin-500-normal.woff2") format("woff2"); }

:root {
  --ink: #0a090b;
  --ink-2: #110f13;
  --panel: #16131a;
  --panel-2: #1c1822;
  --line: rgba(201, 169, 110, 0.2);
  --line-strong: rgba(201, 169, 110, 0.45);
  --gold: #c9a96e;
  --gold-hi: #ecd7a5;
  --wine: #7a1f2b;
  --wine-hi: #a22a3b;
  --text: #ece6dc;
  --muted: #a1978c;
  --danger: #e57b86;
  --ok: #86c9a0;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(70rem 40rem at 85% -10%, rgba(122, 31, 43, 0.35), transparent 60%),
    radial-gradient(60rem 36rem at -10% 110%, rgba(201, 169, 110, 0.12), transparent 60%),
    var(--ink);
  background-attachment: fixed;
}

.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url("/assets/grain.svg"); opacity: 0.06; mix-blend-mode: screen;
}
.topbar, main, .gate { position: relative; z-index: 1; }

::selection { background: var(--wine-hi); color: #fff; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
code { font-family: ui-monospace, Consolas, monospace; background: var(--panel-2); padding: 0 0.35em; border-radius: 2px; color: var(--gold-hi); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- wordmark & chrome ---------- */

.mark {
  font-family: var(--sans); font-weight: 500; font-size: 0.78rem;
  letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold);
}
.mark i { font-style: normal; color: var(--wine-hi); margin: 0 0.15em; }
.mark-lg { font-size: 0.95rem; margin: 0 0 2.2rem; }
.mark-lg .mark { font-size: inherit; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.link {
  background: none; border: 0; padding: 0.25rem 0; cursor: pointer;
  font: inherit; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); transition: color 0.25s var(--ease);
}
.link:hover { color: var(--gold-hi); }

.wrap { max-width: 68rem; margin: 0 auto; padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem) 6rem; }
.wrap-narrow { max-width: 40rem; }

/* ---------- type ---------- */

.display {
  font-family: var(--serif); font-weight: 500; line-height: 0.98; letter-spacing: -0.01em;
  font-size: clamp(3rem, 2rem + 6vw, 6.2rem); margin: 0.2rem 0 1rem;
}
.display-sm { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); line-height: 1.05; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.8rem; }
.tagline { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--gold-hi); margin: 0 0 1.4rem; }
.prose { color: var(--text); max-width: 34rem; white-space: pre-line; }
.price-note { display: inline-block; margin-top: 0.6rem; padding: 0.35rem 0.9rem; border: 1px solid var(--line-strong); color: var(--gold-hi); font-size: 0.9rem; letter-spacing: 0.04em; }
.hint, .fineprint { color: var(--muted); font-size: 0.85rem; }
.empty { color: var(--muted); font-style: italic; padding: 1rem 0; }

/* ---------- gate ---------- */

.gate {
  min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center;
  padding: 2rem 1.2rem;
}
.gate-title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(2.8rem, 2rem + 5vw, 5.4rem);
  line-height: 1; margin: 0 0 2.4rem; animation: rise 1s var(--ease) both;
}
.gate-title em { color: var(--gold-hi); font-weight: 400; }
.gate-form { display: grid; gap: 1rem; width: min(24rem, 100%); animation: rise 1s 0.15s var(--ease) both; }
.fineprint { margin-top: 2rem; max-width: 22rem; }

.code-input {
  width: 100%; padding: 1.1rem 1rem; text-align: center; font: 500 1.15rem var(--sans);
  letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold-hi);
  background: rgba(255, 255, 255, 0.03); border: 0; border-bottom: 1px solid var(--line-strong);
  border-radius: 0; transition: background 0.3s var(--ease), border-color 0.3s;
}
.code-input::placeholder { color: rgba(236, 230, 220, 0.28); letter-spacing: 0.3em; }
.code-input:focus { outline: none; background: rgba(201, 169, 110, 0.07); border-bottom-color: var(--gold-hi); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; cursor: pointer; text-align: center; text-decoration: none;
  font: 500 0.82rem var(--sans); letter-spacing: 0.2em; text-transform: uppercase;
  padding: 1rem 1.8rem; color: var(--text); background: transparent;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, color 0.3s;
}
.btn:hover { border-color: var(--gold-hi); color: var(--gold-hi); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-gold {
  color: #1a1206; border-color: transparent;
  background: linear-gradient(135deg, #e9d3a0, #c9a96e 55%, #b08d52);
  box-shadow: 0 0 0 0 rgba(201, 169, 110, 0);
}
.btn-gold:hover { color: #1a1206; transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(201, 169, 110, 0.55); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.7rem; letter-spacing: 0.14em; }

/* ---------- profile ---------- */

.profile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; margin-bottom: 5rem; }
.portrait { margin: 0; position: relative; aspect-ratio: 4 / 5; }
.portrait::before { content: ""; position: absolute; inset: 0; transform: translate(16px, 16px); border: 1px solid var(--line-strong); }
.portrait::after { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; aspect-ratio: 1; background: radial-gradient(circle, rgba(162, 42, 59, 0.45), transparent 65%); z-index: -1; }
.portrait img, .portrait-letter { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--panel); }
.portrait-letter { display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 9rem; color: var(--gold); background: linear-gradient(160deg, var(--panel-2), var(--ink-2)); }
.intro { animation: rise 0.9s var(--ease) both; }

/* ---------- booking form ---------- */

.booking { display: grid; gap: 2.8rem; }
.step { border: 0; padding: 0; margin: 0; min-width: 0; }
.step legend { font-family: var(--serif); font-size: 2rem; font-weight: 500; padding: 0; margin-bottom: 1.2rem; display: flex; align-items: baseline; gap: 0.9rem; }
.step-no { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.2em; color: var(--gold); border: 1px solid var(--line-strong); padding: 0.1rem 0.55rem; }
.day { margin-bottom: 1.6rem; }
.day-title { margin: 0 0 0.7rem; font: 500 0.85rem var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: block; padding: 0.7rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02); font-size: 1.05rem; letter-spacing: 0.04em;
  transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.chip span small { color: var(--muted); font-size: 0.85em; }
.chip:hover span { border-color: var(--gold); transform: translateY(-1px); }
.chip input:checked + span { background: linear-gradient(135deg, #e9d3a0, #c9a96e); color: #1a1206; border-color: transparent; }
.chip input:checked + span small { color: rgba(26, 18, 6, 0.65); }
.chip input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.chip-wide span { padding: 0.9rem 1.4rem; }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.2rem; }
.field { display: grid; gap: 0.4rem; margin: 0; }
.field > span { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.field input:not([type="checkbox"]):not([type="file"]), .field textarea, .field select {
  width: 100%; font: inherit; color: var(--text); padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.25s, background 0.25s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: rgba(201, 169, 110, 0.06); }
.field input[type="file"] { color: var(--muted); font-size: 0.9rem; }
.field-grow { flex: 1 1 14rem; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; cursor: pointer; font-size: 0.95rem; }
.check input { accent-color: var(--gold); margin-top: 0.3rem; width: 1.05rem; height: 1.05rem; flex: none; }
.actions { display: grid; gap: 0.6rem; justify-items: start; margin: 0; }

/* ---------- flash ---------- */

.flash { margin: 0 0 1rem; padding: 0.8rem 1rem; border-left: 3px solid; background: rgba(255, 255, 255, 0.04); font-size: 0.95rem; }
.flash-error { border-color: var(--danger); color: #f6c4c9; }
.flash-ok { border-color: var(--ok); color: #cdeed9; }

/* ---------- booking ticket & payment ---------- */

.ticket .display { font-size: clamp(2.4rem, 1.6rem + 4vw, 4.2rem); }
.hold { color: var(--muted); }
.hold strong { color: var(--gold-hi); font-weight: 500; }
.pay {
  position: relative; margin: 2rem 0; padding: 1.8rem; background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
}
.pay::before { content: ""; position: absolute; inset: 6px; border: 1px dashed var(--line); pointer-events: none; }
.pay-title { margin: 0 0 1rem; font: 500 0.78rem var(--sans); letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
.pay-number, .amount-value, .code-big { font-variant-numeric: lining-nums tabular-nums; }
.pay-number { font-family: var(--serif); font-size: clamp(2rem, 1.4rem + 3vw, 3rem); margin: 0 0 1rem; letter-spacing: 0.04em; user-select: all; }
.pay-qr { display: block; width: min(17.5rem, 100%); height: auto; margin: 0 0 1.2rem; padding: 0.8rem; background: #fff; border-radius: 2px; }
.amount { display: flex; align-items: baseline; gap: 0.8rem; margin: 0 0 1rem; }
.amount-label { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.amount-value { font-family: var(--serif); font-size: 2rem; color: var(--gold-hi); }
.instruction { white-space: pre-line; margin: 0 0 1rem; padding-left: 1rem; border-left: 2px solid var(--wine-hi); }
.ref-line { margin: 0; color: var(--muted); font-size: 0.9rem; }
.ref { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.08em; color: var(--gold-hi); user-select: all; white-space: nowrap; }
.ticket form.actions { margin-top: 1rem; }

/* ---------- admin ---------- */

.admin-bar { flex-wrap: wrap; }
.admin-nav { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.admin-nav a { color: var(--muted); text-decoration: none; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; padding-bottom: 0.2rem; border-bottom: 1px solid transparent; transition: color 0.25s, border-color 0.25s; }
.admin-nav a:hover, .admin-nav a.is-active { color: var(--gold-hi); border-color: var(--gold); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.head-row .display { margin: 0; }

.panel { margin: 0 0 1.6rem; padding: clamp(1.1rem, 3vw, 2rem); background: linear-gradient(170deg, var(--panel), var(--ink-2)); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-title { margin: 0 0 1rem; font-family: var(--serif); font-weight: 500; font-size: 1.7rem; display: flex; align-items: center; gap: 0.8rem; }
.count { font: 500 0.75rem var(--sans); letter-spacing: 0.1em; color: #1a1206; background: var(--gold); border-radius: 99px; padding: 0.1rem 0.6rem; }
.stack { display: grid; gap: 1.1rem; }
.danger { border-color: rgba(229, 123, 134, 0.35); }

.method { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.3rem; margin: 0; display: grid; gap: 1rem; }
.method legend { font-family: var(--serif); font-size: 1.35rem; padding: 0 0.5rem; color: var(--gold-hi); }
.qr-preview, .photo-preview { display: block; object-fit: cover; background: #fff; border: 1px solid var(--line-strong); margin-bottom: 0.5rem; }
.photo-preview { background: var(--panel); }

.inline-form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-bottom: 1.5rem; }
.inline-form .field { flex: 1 1 11rem; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; font: 500 0.7rem var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 0.85rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table small { color: var(--muted); }
.table tbody tr { transition: background 0.2s; }
.table tbody tr:hover { background: rgba(201, 169, 110, 0.05); }
.status-claimed td:first-child { box-shadow: inset 3px 0 var(--gold); }
.row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.row-actions form { margin: 0; }

.badge { display: inline-block; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.2rem 0.6rem; border: 1px solid currentColor; border-radius: 99px; white-space: nowrap; }
.badge-pending { color: var(--muted); }
.badge-claimed { color: var(--gold-hi); }
.badge-confirmed { color: var(--ok); }
.badge-cancelled, .badge-expired { color: var(--danger); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.card { display: grid; gap: 0.3rem; padding: 1.4rem; text-decoration: none; background: linear-gradient(170deg, var(--panel), var(--ink-2)); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s, transform 0.3s var(--ease); }
.card:hover { border-color: var(--gold); transform: translateY(-3px); }
.card-name { font-family: var(--serif); font-size: 1.8rem; color: var(--text); }
.card-meta { color: var(--muted); font-size: 0.85rem; }

.slot-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.slot-admin { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.95rem; }
.slot-admin small { color: var(--muted); }
.slot-admin form { margin: 0; display: inline; }
.slot-confirmed { border-color: var(--ok); }
.slot-claimed, .slot-pending { border-color: var(--gold); }
.x { background: none; border: 0; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; transition: color 0.2s; }
.x:hover { color: var(--danger); }

.code-reveal { border-color: var(--gold); box-shadow: 0 0 60px -20px rgba(201, 169, 110, 0.5); }
.code-big { font-family: ui-monospace, Consolas, monospace; font-size: clamp(1.5rem, 1rem + 3vw, 2.6rem); letter-spacing: 0.15em; color: var(--gold-hi); margin: 0; user-select: all; word-break: break-all; }

/* ---------- motion & responsive ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .profile { grid-template-columns: 1fr; margin-bottom: 3rem; }
  .portrait { max-width: 22rem; margin-right: 16px; }
  .admin-nav { gap: 1rem; }
  .step legend { font-size: 1.6rem; }
}

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