/* =========================================================================
   Telugu wedding invitation - theme
   Mobile first. Everything is a single centred column, like a tall card.
   ========================================================================= */

:root {
  --cream: #f7f0dd;
  --cream-deep: #efe4c8;
  --card: #fbf6e8;
  --maroon: #7b2d26;
  --maroon-soft: #9a463c;
  --green-deep: #3e5622;
  --green-leaf: #6a8f3f;
  --green-light: #9cb85e;
  --gold: #b98a2f;
  /* Darkened gold, used only where gold must carry TEXT (contrast 4.6:1 on cream). */
  --gold-deep: #8a6414;
  --brown: #5a3a24;
  --ink: #4a3b2f;
  --marigold: #e08a1e;
  --kumkum: #c0392b;

  --page-max: 540px;
  /* .thoranam height (86px) + its margin-bottom (6px). */
  --thoranam-space: 92px;
  --radius: 14px;
  --shadow-soft: 0 10px 30px -18px rgba(90, 58, 36, 0.55);

  --font-te: 'Noto Serif Telugu', 'Nirmala UI', serif;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-ui: 'Jost', 'Segoe UI', system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--cream);
  /* Subtle hand-made paper grain: a few very soft blotches over the cream. */
  background-image:
    radial-gradient(circle at 12% 8%, rgba(185, 138, 47, 0.1), transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(106, 143, 63, 0.09), transparent 40%),
    radial-gradient(circle at 20% 62%, rgba(123, 45, 38, 0.05), transparent 45%),
    radial-gradient(circle at 78% 88%, rgba(185, 138, 47, 0.09), transparent 44%),
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.6), transparent 60%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ---------- layout ------------------------------------------------------ */

.page {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 20px 56px;
}

.section {
  margin: 0 0 44px;
}

.decor-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.decor-topleft {
  position: absolute;
  top: 90px;
  left: -78px;
  width: 230px;
  transform: rotate(-8deg);
}

.decor-midright {
  position: absolute;
  top: 46%;
  right: -96px;
  width: 250px;
  transform: rotate(168deg);
}

@media (min-width: 760px) {
  .decor-topleft {
    left: calc(50% - 460px);
  }
  .decor-midright {
    right: calc(50% - 470px);
  }
}

/* ---------- typography -------------------------------------------------- */

.display {
  font-family: var(--font-display);
  color: var(--maroon);
  font-weight: 600;
}

.label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.muted {
  color: var(--brown);
  font-size: 0.9rem;
}

.center {
  text-align: center;
}

/* ---------- reveal on scroll -------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 700ms ease-out,
    transform 700ms cubic-bezier(0.22, 0.68, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- thoranam (mango leaf garland) ------------------------------- */

.thoranam {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 86px;
  overflow: hidden;
  margin-bottom: 6px;
}

.thoranam-string {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 18px;
}

.thoranam-leaf {
  position: absolute;
  transform: translateX(-50%);
  transform-origin: top center;
}

.thoranam-leaf-sway {
  display: block;
  transform-origin: top center;
  animation: sway 6s ease-in-out infinite alternate;
}

.thoranam-bead {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

@keyframes sway {
  from {
    transform: rotate(-1deg);
  }
  to {
    transform: rotate(1deg);
  }
}

/* ---------- hero -------------------------------------------------------- */

.hero {
  text-align: center;
  padding-top: 8px;
}

.hero-greeting {
  margin: 0 auto 22px;
  padding: 10px 16px;
  max-width: 420px;
  border-top: 1px solid rgba(185, 138, 47, 0.5);
  border-bottom: 1px solid rgba(185, 138, 47, 0.5);
}

.hero-greeting .te {
  font-size: 1.05rem;
  margin: 0;
}

.hero-greeting .muted {
  margin: 2px 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.hero-blessing {
  font-family: var(--font-te);
  color: var(--gold-deep);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}

/* English replacement for the old Telugu hero heading: letter-spaced small caps
   so it frames the names rather than competing with them. */
.hero-title {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(0.82rem, 3.4vw, 1rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-deep);
  /* Balances the trailing letter-space so the text is optically centred. */
  text-indent: 0.42em;
  line-height: 1.4;
  margin: 0 0 22px;
}

.hero-invite-line {
  margin: 0 0 26px;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brown);
}

.hero-names {
  margin: 0;
}

.hero-name-en {
  font-family: var(--font-display);
  color: var(--maroon);
  font-size: clamp(2.4rem, 14vw, 3.4rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
}

.hero-parents {
  font-size: 0.78rem;
  color: var(--brown);
  margin: 8px 0 0;
  line-height: 1.5;
}

.hero-amp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 20px 0;
}

.hero-amp-rule {
  height: 1px;
  width: 56px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero-amp-rule.right {
  background: linear-gradient(270deg, transparent, var(--gold));
}

.hero-amp-glyph {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--gold-deep);
}

/* ---------- countdown --------------------------------------------------- */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.countdown-tile {
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: rgba(251, 246, 232, 0.72);
  padding: 12px 4px 10px;
  text-align: center;
}

.countdown-value {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--maroon);
  font-variant-numeric: tabular-nums;
}

.countdown-unit {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 7px;
}

.countdown-done {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--maroon);
  font-size: 1.5rem;
}

/* ---------- section heading --------------------------------------------- */

.section-title {
  text-align: center;
  margin: 0 0 20px;
}

/* The English small-caps label is now the heading itself. */
.section-title h2 {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--maroon);
  text-indent: 0.3em;
  margin: 0;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 46px;
  height: 1px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

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

.card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(185, 138, 47, 0.55);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px 20px;
}

.event-card {
  text-align: center;
}

/* Keeps the maroon serif weight the Telugu heading used to carry. */
.event-name {
  font-family: var(--font-display);
  color: var(--maroon);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.event-date {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--green-deep);
  margin: 0;
}

.event-time {
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 2px 0 0;
}

.event-note {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 12px 0 0;
}

.event-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(185, 138, 47, 0.5);
}

.link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 10px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--maroon);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid rgba(123, 45, 38, 0.35);
  border-radius: 2px;
}

.link-btn:hover {
  color: var(--green-deep);
  border-bottom-color: var(--green-leaf);
}

.kolam-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
}

.kolam-divider::before,
.kolam-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 120px;
  background: linear-gradient(90deg, transparent, rgba(185, 138, 47, 0.75));
}

.kolam-divider::after {
  background: linear-gradient(270deg, transparent, rgba(185, 138, 47, 0.75));
}

/* ---------- venue ------------------------------------------------------- */

.venue-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.venue-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--maroon);
  margin: 0;
  line-height: 1.25;
}

.venue-address {
  margin: 8px auto 0;
  max-width: 330px;
  font-size: 0.9rem;
  color: var(--ink);
}

.btn-outline {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: transparent;
  color: var(--maroon);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    color 200ms ease;
}

.btn-outline:hover:not(:disabled) {
  background: rgba(185, 138, 47, 0.14);
}

.btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- rsvp form --------------------------------------------------- */

.rsvp-card {
  border: 1px solid var(--maroon);
  padding: 26px 20px 24px;
}

.rsvp-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  color: var(--gold);
  pointer-events: none;
}

.rsvp-corner.tl {
  top: 7px;
  left: 7px;
}
.rsvp-corner.tr {
  top: 7px;
  right: 7px;
  transform: scaleX(-1);
}
.rsvp-corner.bl {
  bottom: 7px;
  left: 7px;
  transform: scaleY(-1);
}
.rsvp-corner.br {
  bottom: 7px;
  right: 7px;
  transform: scale(-1, -1);
}

.rsvp-deadline {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0 0 12px;
}

.field {
  margin-bottom: 16px;
}

.field > label,
.fieldset-legend {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
  padding: 0;
}

.req {
  color: var(--kumkum);
}

input[type='text'],
input[type='tel'],
input[type='number'],
input[type='password'],
textarea {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(90, 58, 36, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: rgba(90, 58, 36, 0.5);
}

input[aria-invalid='true'],
textarea[aria-invalid='true'] {
  border-color: var(--kumkum);
}

.field-error {
  display: block;
  margin-top: 5px;
  font-size: 0.8rem;
  color: var(--kumkum);
  letter-spacing: 0.02em;
}

fieldset {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
  min-width: 0;
}

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  flex: 1 1 46%;
  position: relative;
}

.pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pill span {
  display: block;
  text-align: center;
  padding: 11px 10px;
  border: 1px solid rgba(123, 45, 38, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.pill input:checked + span {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fdf8ea;
}

.pill input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.num-row {
  display: flex;
  gap: 12px;
}

.num-row .field {
  flex: 1;
  margin-bottom: 0;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  cursor: pointer;
}

.check input {
  margin: 4px 0 0;
  width: 17px;
  height: 17px;
  accent-color: var(--maroon);
  flex: none;
}

.check .check-en {
  color: var(--ink);
  font-size: 0.95rem;
}

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--maroon);
  color: #fdf8ea;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.btn-primary:hover:not(:disabled) {
  background: #6a251f;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.form-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--kumkum);
  border-radius: 8px;
  background: rgba(192, 57, 43, 0.08);
  color: #8e2b20;
  font-size: 0.88rem;
}

.rsvp-success {
  text-align: center;
  padding: 12px 4px 6px;
}

.rsvp-success svg,
.footer svg,
.kolam-divider svg {
  margin-inline: auto;
}

.rsvp-thanks {
  font-family: var(--font-display);
  color: var(--maroon);
  font-weight: 600;
  font-size: 1.7rem;
  margin: 16px 0 6px;
}

.rsvp-success p {
  margin: 0;
}

/* ---------- footer ------------------------------------------------------ */

.footer {
  text-align: center;
  margin-top: 42px;
}

.footer-love {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--brown);
  margin: 14px 0 4px;
}

.footer-te {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--maroon);
  font-size: 1.05rem;
  margin: 0;
}

.footer-admin {
  display: inline-block;
  margin-top: 22px;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(90, 58, 36, 0.55);
  text-decoration: none;
}

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

.admin {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px 60px;
  position: relative;
  z-index: 1;
}

.admin-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-head h1 {
  font-family: var(--font-display);
  color: var(--maroon);
  font-size: 1.8rem;
  margin: 0;
}

.admin-gate {
  max-width: 380px;
  margin: 40px auto;
}

.admin-gate .btn-primary {
  margin-top: 14px;
}

.totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.total-tile {
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: rgba(251, 246, 232, 0.8);
  padding: 12px;
  text-align: center;
}

.total-value {
  font-size: 1.6rem;
  color: var(--maroon);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.total-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 5px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(185, 138, 47, 0.55);
  border-radius: var(--radius);
  background: var(--card);
}

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

th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(185, 138, 47, 0.28);
  vertical-align: top;
  white-space: nowrap;
}

td.wrap {
  white-space: normal;
  min-width: 200px;
}

th {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: rgba(239, 228, 200, 0.6);
  position: sticky;
  top: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.tag-yes {
  color: var(--green-deep);
  font-weight: 500;
}

.tag-no {
  color: var(--kumkum);
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.admin-actions .btn-outline {
  margin-top: 0;
}

/* ---------- a11y -------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- no-framework additions -------------------------------------
   React removed inactive nodes from the tree; here both views live in the
   document and are toggled instead. These rules are the only difference
   between this file and the React theme.css it was ported from.
   ----------------------------------------------------------------------- */

/* Several classes set `display`, which would win over the UA `[hidden]` rule. */
[hidden] {
  display: none !important;
}

/* role="alert" regions stay in the DOM and in the accessibility tree at all
   times - screen readers announce far more reliably when the live region
   already exists than when it is inserted or un-hidden. They collapse out of
   the layout while empty instead. */
.field-error:empty,
.form-error:empty {
  display: none;
}

/* An event with an unparseable dateISO cannot produce a calendar file. */
.link-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-bottom-color: transparent;
}

/* Reveal-on-scroll starts hidden only when scripting is available to reveal it,
   so the invitation is still readable with JavaScript switched off. */
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

/* Route switch. `data-route` is set by an inline script in <head> before first
   paint, so the correct view is showing from the very first frame. */
html[data-route='admin'] #invite-view,
html[data-route='admin'] #thoranam,
html[data-route='admin'] #decor-layer {
  display: none;
}

html:not([data-route='admin']) #admin-view {
  display: none;
}

/* =========================================================================
   Cover gate + full-screen hero
   ========================================================================= */

/* ---------- the cover ---------------------------------------------------- */

/* Hidden by default: it only appears once app.js has confirmed it can run, so
   a scripting failure leaves the invitation readable instead of sealed shut. */
#invite-cover {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 20px 44px;
  text-align: center;
  /* Watercolour cover art. `center top` keeps Ganesha in frame when a portrait
     phone crops the sides off this landscape image. Cream shows through until
     the image lands, so there is never a white flash. */
  background-color: var(--cream);
  background-image: url('./BG.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: translateY(0);
  transition: transform 900ms cubic-bezier(0.6, 0.02, 0.32, 1);
}

html.js:not([data-route='admin']):not(.cover-opened) #invite-cover {
  display: flex;
}

/* Scroll stays locked for as long as the cover is up. */
html.js:not([data-route='admin']):not(.cover-opened),
html.js:not([data-route='admin']):not(.cover-opened) body {
  overflow: hidden;
}

#invite-cover.is-opening {
  transform: translateY(-100%);
}

/* Translucent cream panel: the art behind it is busy, so the maroon text needs
   a calm surface to sit on. `margin-top: auto` parks the panel low so the
   Ganesha at the top of the artwork stays uncovered; if the panel is ever
   taller than the viewport the auto margin collapses and the cover scrolls. */
.cover-inner {
  width: 100%;
  max-width: 440px;
  margin: auto auto 0;
  padding: 28px 24px 32px;
  border: 1px solid rgba(185, 138, 47, 0.55);
  border-radius: 18px;
  background: rgba(247, 240, 221, 0.9);
  box-shadow: 0 18px 50px -22px rgba(74, 59, 47, 0.75);
}

/* Progressive enhancement: where blur is supported the panel can be lighter. */
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .cover-inner {
    background: rgba(247, 240, 221, 0.78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.cover-kolam {
  margin: 0 auto 24px;
}

.cover-blessing {
  font-family: var(--font-te);
  color: var(--gold-deep);
  font-size: 0.95rem;
  margin: 0 0 22px;
}

.cover-greeting {
  margin: 0 auto 22px;
  padding: 10px 16px;
  max-width: 380px;
  border-top: 1px solid rgba(185, 138, 47, 0.5);
  border-bottom: 1px solid rgba(185, 138, 47, 0.5);
}

.cover-greeting .te {
  font-size: 1rem;
  margin: 0;
}

.cover-greeting .muted {
  margin: 2px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.cover-lead {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0 0 14px;
}

.cover-names {
  font-family: var(--font-display);
  color: var(--maroon);
  font-weight: 600;
  font-size: clamp(2rem, 10vw, 2.9rem);
  line-height: 1.2;
  margin: 0;
}

.cover-amp {
  font-style: italic;
  color: var(--gold-deep);
  padding: 0 6px;
}

.cover-when {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 16px 0 0;
}

/* Solid maroon so the call to action reads against the artwork, not just the panel. */
.cover-open {
  margin-top: 34px;
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fdf8ea;
  animation: coverGlow 2.5s ease-in-out infinite;
}

.cover-open:hover:not(:disabled) {
  background: #6a251f;
  border-color: #6a251f;
}

@keyframes coverGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(185, 138, 47, 0);
  }
  50% {
    box-shadow: 0 0 20px 3px rgba(185, 138, 47, 0.42);
  }
}

/* ---------- full-screen hero -------------------------------------------- */

.hero {
  /* Fill what is left of the viewport under the thoranam strip.
     svh (small viewport height) keeps the scroll cue clear of mobile
     browser chrome; the earlier declarations are the fallbacks. */
  min-height: calc(100vh - var(--thoranam-space));
  min-height: calc(100dvh - var(--thoranam-space));
  min-height: calc(100svh - var(--thoranam-space));
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
}

.hero-inner {
  width: 100%;
}

.hero-when {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 26px 0 0;
}

/* ---------- entrance choreography --------------------------------------- */

/* Applied by app.js only when motion is welcome, so nothing is ever left
   invisible if the animation does not run. */
.hero-step {
  opacity: 0;
}

.hero-step.is-entering {
  animation: heroRise 500ms cubic-bezier(0.22, 0.68, 0.36, 1) both;
}

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

/* ---------- scroll cue --------------------------------------------------- */

.scroll-cue {
  appearance: none;
  background: none;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 28px auto 4px;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--gold-deep);
}

.scroll-cue span {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-indent: 0.2em;
  color: var(--maroon);
}

.scroll-cue svg {
  animation: cueBob 2.4s ease-in-out infinite;
}

.scroll-cue:hover span {
  color: var(--green-deep);
}

@keyframes cueBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

.countdown-lead {
  margin: 0 0 14px;
}

/* =========================================================================
   Per-event venue, per-card RSVP, form context line, admin filters
   ========================================================================= */

.event-venue {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--green-deep);
  margin: 10px 0 0;
}

.event-address {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--brown);
  margin: 2px 0 0;
}

/* Same shape as the other card actions, but filled so it reads as the
   primary thing to do on the card. */
.event-rsvp {
  background: var(--maroon);
  border: 1px solid var(--maroon);
  border-bottom-color: var(--maroon);
  border-radius: 999px;
  color: #fdf8ea;
  padding: 7px 18px;
}

.event-rsvp:hover {
  background: #6a251f;
  border-color: #6a251f;
  color: #fdf8ea;
}

/* ---------- "you came here from a card" note ---------------------------- */

.rsvp-context {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(185, 138, 47, 0.6);
  border-radius: 8px;
  background: rgba(185, 138, 47, 0.1);
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.45;
}

.rsvp-context-dismiss {
  appearance: none;
  background: none;
  border: 0;
  flex: none;
  margin-left: auto;
  padding: 0 2px;
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--brown);
  cursor: pointer;
  border-radius: 4px;
}

.rsvp-context-dismiss:hover {
  color: var(--maroon);
}

/* ---------- admin: filter by event -------------------------------------- */

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-pill {
  appearance: none;
  cursor: pointer;
  padding: 7px 15px;
  border: 1px solid rgba(123, 45, 38, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.filter-pill:hover {
  border-color: var(--maroon);
}

.filter-pill[aria-pressed='true'] {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fdf8ea;
}

.filter-note {
  font-size: 0.78rem;
  color: var(--brown);
  margin: 0 0 14px;
}

/* Smooth in-page scrolling for the cue; the reduced-motion guard turns it off. */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  /* The blanket rule above already zeroes these, but be explicit: the cover
     still appears (it is content), it just opens instantly with no slide,
     no glow, no choreography and no smooth scrolling. */
  #invite-cover {
    transition: none !important;
  }

  .cover-open,
  .scroll-cue svg {
    animation: none !important;
  }

  .hero-step,
  .hero-step.is-entering {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
}

