/* ==========================================================================
   Elaine & Brian — romantic modern
   Porcelain and linen grounds, blush and champagne-gold accents, a deep
   claret for action; a light high-contrast serif with a clean geometric
   sans; frosted glass over photography. Tailwind handles layout; this file
   owns materials, type voices, components, states and motion.
   ========================================================================== */

:root {
  --porcelain: #FBF8F5;
  --linen: #F4EDE7;
  --linen-deep: #EFE7E1;
  --blush: #F6E7E3;
  --blush-deep: #EBCFC8;
  --rose: #C98B84;
  --claret: #6B2D3A;
  --claret-deep: #57222E;
  --gold: #B8935A;
  --gold-soft: #DCC6A2;
  --sheet: #FFFFFF;
  --rule: #EFE4DD;
  --rule-strong: #E0D0C6;
  --ink: #2B2224;
  --ink-2: #5C5053;
  --ink-3: #74676A;
  --danger: #A63A3A;
  /* data (validated: 2px gaps + direct labels as second signal) */
  --paid: #2E8552;
  --owed: #C4862F;
  --track: #EFE7E1;
  --declined: #3F6FB8;
  --genus: var(--claret);
  /* aliases used by templates */
  --leaf: var(--paid);
  --ochre: var(--owed);
  --slate: var(--declined);
  --paper-deep: var(--track);
  --folder: var(--claret);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 150ms;
  --t-med: 260ms;
  --t-slow: 600ms;

  --font-display: "Noto Serif Display", "Times New Roman", serif;
  --font-sans: "Jost", system-ui, sans-serif;

  --shadow-card: 0 1px 2px rgba(91, 45, 50, .04), 0 14px 34px -22px rgba(91, 45, 50, .28);
  --shadow-lift: 0 2px 4px rgba(91, 45, 50, .05), 0 26px 50px -26px rgba(91, 45, 50, .42);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--porcelain);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1;
}
::selection { background: var(--blush-deep); color: var(--ink); }
input, textarea { caret-color: var(--claret); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--claret); }
:focus-visible { outline: 2px solid var(--claret); outline-offset: 3px; border-radius: 6px; }
[x-cloak] { display: none !important; }
a { text-underline-offset: .22em; text-decoration-thickness: 1px; }
.tnum { font-variant-numeric: tabular-nums lining-nums; }
h1, h2, h3 { text-wrap: balance; }

* { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

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

.font-display, .display { font-family: var(--font-display); font-weight: 300; letter-spacing: -0.015em; }
.printed {
  font-family: var(--font-sans);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.typed { font-family: var(--font-sans); }
.amp { font-family: var(--font-display); font-style: italic; font-weight: 300; color: var(--gold); }

/* ------------------------------------------------------------- cards --- */

.sheet {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}
a.sheet, button.sheet, .sheet--interactive {
  transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), border-color var(--t-med);
}
@media (hover: hover) {
  a.sheet:hover, .sheet--interactive:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
}
.sheet-foot { background: #FDFAF8; border-top: 1px solid var(--rule); border-radius: 0 0 20px 20px; }

/* Key/value facts. */
.label-fields { display: grid; grid-template-columns: max-content 1fr; column-gap: 1rem; row-gap: .55rem; align-items: baseline; }
.label-fields dt { font-size: .6875rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.label-fields dd { font-size: .9375rem; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.label-fields dd.is-blank { color: var(--ink-3); font-style: italic; }

.kv { display: grid; gap: .2rem; }
.kv > span:first-child { font-size: .6875rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* ---------------------------------------------------------- status --- */

.stamp {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-sans); font-size: .75rem; font-weight: 500; letter-spacing: .02em; line-height: 1;
  padding: .38rem .7rem; border-radius: 999px; white-space: nowrap;
}
.stamp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.stamp--go   { background: #E4F1E8; color: #1F6B3F; }
.stamp--hold { background: #FBEFD9; color: #85560F; }
.stamp--stop { background: #F7E1E1; color: #963232; }
.stamp--idle { background: #F1ECE8; color: #64585B; }

.tag {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8125rem; font-weight: 400; color: var(--ink-2);
  background: var(--porcelain); border: 1px solid var(--rule);
  border-radius: 999px; padding: .25rem .65rem; white-space: nowrap;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 1.25rem;
  font-family: var(--font-sans); font-size: .9375rem; font-weight: 500; letter-spacing: .01em; line-height: 1;
  border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease,
              box-shadow var(--t-med) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary, .btn-genus { background: var(--claret); color: #FFF8F6; box-shadow: 0 8px 18px -10px rgba(107, 45, 58, .7); }
.btn-primary:hover:not(:disabled), .btn-genus:hover:not(:disabled) { background: var(--claret-deep); box-shadow: 0 12px 22px -12px rgba(107, 45, 58, .8); }
.btn-ghost, .btn-on-folder { background: var(--sheet); color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover:not(:disabled), .btn-on-folder:hover:not(:disabled) { border-color: var(--rose); background: #FFFCFB; }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover:not(:disabled) { background: var(--blush); color: var(--claret); }
.btn-danger { background: var(--sheet); color: var(--danger); border-color: #EBC7C4; }
.btn-danger:hover:not(:disabled) { background: #FCF0EF; border-color: var(--danger); }
.btn-solid-danger { background: var(--danger); color: #fff; }
.btn-solid-danger:hover:not(:disabled) { background: #8C2E2E; }
.btn-sm { min-height: 36px; padding: 0 .9rem; font-size: .875rem; }
.btn-icon { width: 44px; padding: 0; }
.btn-sm.btn-icon { width: 36px; }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } .btn-sm.btn-icon { width: 44px; } }

/* ------------------------------------------------------------- forms --- */

.field { display: grid; gap: .4rem; }
.field > label, .field-label { font-size: .75rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.field .hint { font-size: .8125rem; color: var(--ink-3); }
.field .error { font-size: .875rem; color: var(--danger); font-weight: 500; }

.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  background-color: var(--sheet);
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  padding: .65rem .85rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.select {
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%2374676A%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27m6 9 6 6 6-6%27/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 16px;
}
.textarea { min-height: 100px; line-height: 1.55; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #A3979A; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--rose); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--claret); box-shadow: 0 0 0 4px rgba(107, 45, 58, .12); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(166, 58, 58, .1); }
.money-input { position: relative; }
.money-input > span { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.money-input > .input { padding-left: 1.75rem; font-variant-numeric: tabular-nums; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

.check { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; cursor: pointer; font-size: .9375rem; }
.check input[type="checkbox"] { width: 1.15rem; height: 1.15rem; }

.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--linen); border-radius: 999px; padding: 4px; gap: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 38px; padding: 0 1rem; border-radius: 999px;
  font-size: .875rem; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-med) var(--ease-out);
}
.seg input:checked + span { background: var(--sheet); color: var(--claret); box-shadow: 0 2px 8px -3px rgba(91, 45, 50, .3); }
.seg input:focus-visible + span { outline: 2px solid var(--claret); outline-offset: 1px; }

/* Star rating input and display. */
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars svg { width: 16px; height: 16px; }
.stars .on { fill: currentColor; }
.stars .off { color: var(--rule-strong); }
.star-input { display: inline-flex; gap: 2px; }
.star-input button { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; color: var(--rule-strong); transition: color var(--t-fast), transform var(--t-fast) var(--ease-out), background-color var(--t-fast); }
.star-input button.on { color: var(--gold); }
.star-input button:hover { background: var(--blush); transform: scale(1.06); }
.star-input svg { width: 24px; height: 24px; }
.star-input button.on svg { fill: currentColor; }

/* Section heading inside a form. */
.form-section { display: grid; gap: 1.1rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section > h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: var(--claret); }

/* ------------------------------------------------------------ portal --- */

.rail {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-right: 1px solid var(--rule);
  color: var(--ink);
}
.rail-tab {
  display: flex; align-items: center; gap: .8rem;
  min-height: 44px; padding: 0 1rem;
  border-radius: 999px;
  font-size: .9688rem; font-weight: 400; color: var(--ink-2);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.rail-tab svg { color: var(--ink-3); transition: color var(--t-fast); }
.rail-tab:hover { background: var(--porcelain); color: var(--ink); }
.rail-tab[aria-current="page"] { background: var(--blush); color: var(--claret); font-weight: 500; }
.rail-tab[aria-current="page"] svg { color: var(--claret); }

.folder-band {
  position: relative;
  color: var(--ink);
  background: linear-gradient(180deg, #F6E9E4 0%, rgba(251, 248, 245, 0) 100%);
}
.folder-band .sub { color: var(--ink-2); }
.folder-band h1 { font-family: var(--font-display); font-weight: 300; }

.bottom-bar {
  background: rgba(255, 255, 255, .84);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-top: 1px solid var(--rule);
  padding-bottom: var(--safe-bottom);
}
.bottom-tab {
  display: grid; place-items: center; gap: 3px; min-height: 58px;
  font-size: .75rem; font-weight: 500; color: var(--ink-3);
  transition: color var(--t-fast);
}
.bottom-tab svg { transition: transform var(--t-med) var(--ease-out); }
.bottom-tab[aria-current="page"] { color: var(--claret); }
.bottom-tab[aria-current="page"] svg { transform: translateY(-1px); }
.bottom-tab:active svg { transform: scale(.9); }

/* Frosted glass: sign-in, drawers, the holding page panel. */
.glassine, .glass {
  background: rgba(255, 252, 250, .66);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 30px 70px -30px rgba(60, 25, 30, .45);
}
.scrim { background: rgba(43, 34, 36, .32); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* --------------------------------------------------------------- tables --- */

.ledger { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9375rem; }
.ledger th {
  text-align: left; font-size: .6875rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); padding: .9rem 1rem; border-bottom: 1px solid var(--rule); background: #FDFAF8;
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
.ledger th button { display: inline-flex; align-items: center; gap: .3rem; text-transform: inherit; letter-spacing: inherit; font: inherit; color: inherit; }
.ledger th button:hover { color: var(--claret); }
.ledger td { padding: .9rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger tbody tr { transition: background-color var(--t-fast); }
.ledger tbody tr:hover { background: #FDF8F6; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger tfoot td { font-weight: 600; border-top: 1px solid var(--rule-strong); border-bottom: 0; }

@media (max-width: 767.98px) {
  .ledger--stack thead { display: none; }
  .ledger--stack, .ledger--stack tbody, .ledger--stack tr, .ledger--stack td { display: block; width: 100%; }
  .ledger--stack tbody tr { padding: 1rem 1.1rem; border-bottom: 1px solid var(--rule); }
  .ledger--stack tbody tr:last-child { border-bottom: 0; }
  .ledger--stack td { border: 0; padding: .22rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .ledger--stack td[data-label]::before {
    content: attr(data-label); font-size: .6875rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding-top: .2rem;
  }
  .ledger--stack td.cell-primary { display: block; text-align: left; padding-bottom: .45rem; }
  .ledger--stack td.cell-primary::before { display: none; }
  .ledger--stack td.cell-actions { justify-content: flex-end; padding-top: .5rem; }
  .ledger--stack td.cell-actions::before { display: none; }
  .ledger--stack tfoot { display: block; }
  .ledger--stack tfoot tr { display: flex; justify-content: space-between; padding: .9rem 1.1rem; }
  .ledger--stack tfoot td { display: inline; width: auto; padding: 0; border: 0; }
}

/* ------------------------------------------------------- data bars --- */

.bar { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; min-width: 0; }
.bar > i:first-child { border-radius: 999px 0 0 999px; }
.bar > i:last-child { border-radius: 0 999px 999px 0; }
.bar > i:only-child { border-radius: 999px; }
.bar .paid, .bar .yes { background: var(--paid); }
.bar .owed { background: var(--owed); }
.bar .free, .bar .wait { background: var(--track); }
.bar .over { background: var(--danger); }
.bar .no { background: var(--declined); }
.bar--lg { height: 22px; }
.bar--sm { height: 7px; }
.key-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ------------------------------------------------------ dialogs --- */

.dialog-panel { max-height: min(90vh, 920px); border-radius: 24px; }
@media (max-width: 639.98px) {
  .dialog-panel { max-height: 93vh; border-radius: 24px 24px 0 0 !important; padding-bottom: var(--safe-bottom); }
}
.grabber { width: 40px; height: 4px; border-radius: 4px; background: var(--rule-strong); margin: .6rem auto 0; }

/* ---------------------------------------------------------- toasts --- */

.toast {
  display: flex; align-items: flex-start; gap: .75rem;
  background: var(--ink); color: #FBF3F1;
  border-radius: 16px; padding: .9rem 1.1rem; font-size: .9375rem;
  box-shadow: 0 20px 44px -18px rgba(43, 34, 36, .6);
}
.toast--error { background: #7D2A2A; }

/* ----------------------------------------------------------- seating --- */

.seat-table { position: relative; display: grid; place-items: center; }
.seat-round { width: 150px; height: 150px; }
.seat-round .top { width: 92px; height: 92px; border-radius: 50%; }
.seat-long { width: 100%; min-height: 120px; }
.seat-long .top { width: calc(100% - 44px); height: 56px; border-radius: 14px; }
.seat-table .top {
  display: grid; place-items: center; text-align: center;
  background: var(--porcelain); border: 1px solid var(--blush-deep);
  font-family: var(--font-display); font-size: .9375rem; line-height: 1.1; padding: .25rem;
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-med) var(--ease-out);
}
.seat {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: var(--sheet); border: 1.5px dashed var(--rule-strong);
  display: grid; place-items: center; font-size: .5625rem; font-weight: 600; color: #fff;
  transition: background-color var(--t-med), border-color var(--t-med), transform var(--t-med) var(--ease-out);
}
.seat.is-taken { background: var(--claret); border: 1.5px solid var(--claret); }
.seat.is-over { background: var(--danger); border-color: var(--danger); }
.drop-ready .seat-table .top { border-color: var(--rose); border-style: dashed; }
.is-target .seat-table .top { background: var(--blush); border-color: var(--claret); box-shadow: 0 0 0 5px rgba(107, 45, 58, .1); }

.guest-chip {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 38px;
  padding: 0 .85rem; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--sheet);
  font-size: .875rem; cursor: grab; user-select: none;
  transition: background-color var(--t-fast), border-color var(--t-fast), transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.guest-chip:active { cursor: grabbing; }
.guest-chip.is-picked { background: var(--claret); border-color: var(--claret); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 22px -12px rgba(107, 45, 58, .8); }
@media (pointer: coarse) { .guest-chip { min-height: 44px; } }

/* --------------------------------------------------------- timeline --- */

.axis { position: relative; }
.axis::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px; background: var(--gold-soft); }
.axis-node {
  position: absolute; left: 0; top: .3rem; width: 23px; height: 23px; border-radius: 50%;
  background: var(--porcelain); border: 1px solid var(--gold); display: grid; place-items: center;
}
.axis-node.is-done { background: var(--paid); border-color: var(--paid); color: #fff; }
.axis-node.is-now { background: var(--claret); border-color: var(--claret); box-shadow: 0 0 0 5px rgba(107, 45, 58, .12); }

.task-check {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--rule-strong); background: var(--sheet);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.task-check:hover { border-color: var(--rose); }
.task-check:active { transform: scale(.9); }
.task-check:checked { background: var(--paid); border-color: var(--paid); }
.task-check:checked::after {
  content: ""; width: 10px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0;
  transform: translateY(-1px) rotate(-45deg); animation: tick var(--t-med) var(--ease-out);
}
@keyframes tick { from { opacity: 0; transform: translateY(-1px) rotate(-45deg) scale(.4); } }
.task-done-text { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule-strong); }

/* ------------------------------------------------------------ motion --- */

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.rise { animation: rise var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   Holding page: a photograph, and a frosted panel laid over it.
   ========================================================================= */

.holding { background: var(--porcelain); color: var(--ink); min-height: 100vh; min-height: 100dvh; }
.hero-photo { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #EDE2DA; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero-photo::after {
  /* Soft porcelain light from the panel side so type always reads. */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(251, 248, 245, .55) 0%, rgba(251, 248, 245, .15) 45%, rgba(251, 248, 245, 0) 70%);
}
@media (max-width: 1023.98px) {
  .hero-photo { position: absolute; height: 58vh; height: 58svh; }
  .hero-photo img { object-position: 70% 40%; }
  .hero-photo::after { background: linear-gradient(180deg, rgba(251, 248, 245, 0) 55%, rgba(251, 248, 245, .9) 100%); }
}

.names { font-family: var(--font-display); font-weight: 300; line-height: .95; letter-spacing: -0.025em; }
.names .amp { display: inline-block; padding-right: .06em; }
.lead-line { font-size: .8125rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--claret); }

.count-cell {
  display: grid; place-items: center; gap: .35rem;
  min-width: 4.6rem; padding: .85rem .6rem .7rem;
  background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .85); border-radius: 18px;
}
.count-cell b { font-family: var(--font-display); font-weight: 300; font-size: 2.35rem; line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.count-cell span { font-size: .6875rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

.rule-gold { height: 1px; width: 56px; background: var(--gold); }

.pill-link {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; padding: 0 1.1rem;
  border-radius: 999px; font-size: .875rem; font-weight: 500; letter-spacing: .04em; color: var(--ink);
  background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out), opacity 200ms ease;
}
.pill-link:hover { background: rgba(255, 255, 255, .9); color: var(--claret); }
.pill-link:active { transform: scale(.97); }

/* The one authored entrance: the photograph settles, the glass panel
   clears, then the words arrive. Content is visible without JS. */
@keyframes settle-photo { from { transform: scale(1.07); filter: saturate(.85); } }
@keyframes clear-glass { from { opacity: 0; transform: translateY(18px); } }
@keyframes word-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
.js .hero-photo img { animation: settle-photo 2600ms var(--ease-out) both; }
.js .hero-panel { animation: clear-glass 1100ms var(--ease-out) 250ms backwards; }
.js .in { animation: word-in 900ms var(--ease-out) both; animation-delay: calc(500ms + var(--d, 0) * 110ms); }
@keyframes tick-in { from { opacity: 0; transform: translateY(-40%); } }
.count-cell b.ticked { animation: tick-in 380ms var(--ease-out); }

/* ---------------------------------------------------- holding: depth ---
   Petals fall behind the glass (a few drift in front, out of focus); the
   panel tilts toward the pointer and catches a sheen; the photograph drifts
   the other way. JS only drives custom properties. */

.petals { position: fixed; inset: 0; pointer-events: none; }
.petals--back { z-index: 1; }
.petals--front { z-index: 40; }

.hero-photo img { translate: var(--px, 0) var(--py, 0); scale: 1.05; }

.tilt {
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt > * { transform: translateZ(28px); }
.sheen {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(520px circle at var(--mx, 30%) var(--my, 20%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%);
  mix-blend-mode: soft-light;
}
.hero-panel::after {
  /* a hairline of light along the glass edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0) 65%, rgba(220, 198, 162, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}

/* Names written in: a soft ink edge wipes across each line. */
@property --ink { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@keyframes write { from { --ink: -15%; } to { --ink: 100%; } }
.js .ink {
  -webkit-mask-image: linear-gradient(90deg, #000 var(--ink), transparent calc(var(--ink) + 15%));
  mask-image: linear-gradient(90deg, #000 var(--ink), transparent calc(var(--ink) + 15%));
  animation: write 1500ms cubic-bezier(.45, .05, .25, 1) both;
  animation-delay: calc(550ms + var(--d, 0) * 520ms);
}

/* The ampersand in moving gold foil. */
@keyframes foil { to { background-position: -200% 0; } }
.foil {
  background: linear-gradient(110deg, #B8935A 0%, #E9D3A4 18%, #A57E45 36%, #C9A66B 54%, #F2E2BE 70%, #B8935A 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: foil 7s linear infinite;
}

/* Front petals are out of focus (blurred on the GPU, not per frame). */
.petals--front { filter: blur(3px); }

@media (prefers-reduced-motion: reduce) {
  .tilt { transform: none; }
  .tilt > * { transform: none; }
  .foil { animation: none; }
  .js .ink { -webkit-mask-image: none; mask-image: none; }
  .petals { display: none; }
}
