/* ==========================================================================
   MIO Diamond Jubilee — Tribute Wall
   tributes.css  ·  v30.5.2
   ========================================================================== */

:root {
  --mio-wine-1000: #180104;
  --mio-wine-950: #230307;
  --mio-wine-900: #33050c;
  --mio-wine-850: #3f0710;
  --mio-wine-800: #520d1b;
  --mio-wine-700: #6a1528;
  --mio-wine-600: #7f1d34;
  --mio-gold-600: #b98d37;
  --mio-gold-500: #d1ab56;
  --mio-gold-400: #e4c77f;
  --mio-gold-300: #f2dfad;
  --mio-ivory: #fffaf0;
  --mio-cream: #f8f0e3;
  --mio-paper: #fffdf8;
  --mio-ink: #2a1d1e;
  --mio-muted: #786967;
  --mio-line: rgba(81, 32, 39, 0.13);
  --mio-serif: "Playfair Display", Georgia, serif;
  --mio-display: "Italiana", Georgia, serif;
  --mio-sans:
    "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --mio-shadow-sm: 0 12px 34px rgba(44, 4, 11, 0.07);
  --mio-shadow-md: 0 28px 74px rgba(44, 4, 11, 0.14);
  --mio-shadow-lg: 0 44px 120px rgba(23, 1, 5, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body:is(.tribute-page, .tributes-page) {
  margin: 0;
  min-width: 320px;
  color: var(--mio-ink);
  background: var(--mio-ivory);
  font-family: var(--mio-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open,
body.dialog-open,
body.reader-open {
  overflow: hidden;
}

:is(.tribute-page, .tributes-page) a {
  color: inherit;
  text-decoration: none;
}

:is(.tribute-page, .tributes-page) button,
:is(.tribute-page, .tributes-page) input,
:is(.tribute-page, .tributes-page) textarea,
:is(.tribute-page, .tributes-page) select {
  font: inherit;
}

:is(.tribute-page, .tributes-page) button {
  cursor: pointer;
}

:is(.tribute-page, .tributes-page) img {
  display: block;
  max-width: 100%;
}

:is(.tribute-page, .tributes-page) [hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Accessibility utilities
   -------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: -90px;
  left: 18px;
  z-index: 10000;
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--mio-wine-950);
  background: white;
  box-shadow: var(--mio-shadow-sm);
}

.skip-link:focus {
  top: 18px;
}

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

/* --------------------------------------------------------------------------
   Shared primitives
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 17px;
  color: var(--mio-gold-300);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 38px;
  height: 1px;
  background: currentColor;
}

.eyebrow.dark {
  color: var(--mio-wine-700);
}

.button {
  min-height: 50px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.015em;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.featured-read-more:focus-visible,
.reader-done:focus-visible,
.filter-chips button:focus-visible,
.load-more:focus-visible,
.dialog-close:focus-visible {
  outline: 3px solid var(--mio-gold-400);
  outline-offset: 4px;
}

.button svg {
  width: 16px;
  height: 16px;
}

.button-gold {
  color: #321008;
  background: linear-gradient(135deg, var(--mio-gold-300), var(--mio-gold-500));
  box-shadow:
    0 15px 38px rgba(209, 171, 86, 0.19),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.button-gold:hover {
  box-shadow:
    0 20px 44px rgba(209, 171, 86, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.button-ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.045);
}

.button-ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.09);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.tribute-hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(72px, 9vw, 132px) clamp(18px, 6vw, 100px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  align-items: center;
  gap: clamp(42px, 7vw, 110px);
  color: white;
  background:
    radial-gradient(
      circle at 82% 12%,
      rgba(242, 223, 173, 0.14),
      transparent 23rem
    ),
    radial-gradient(
      circle at 8% 72%,
      rgba(127, 29, 52, 0.28),
      transparent 30rem
    ),
    linear-gradient(135deg, #1d0105 0%, #3f0710 48%, #230307 100%);
}

.tribute-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.18;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0 1px,
    transparent 1.4px
  );
  background-size: 34px 34px;
  mask-image: linear-gradient(to right, transparent, black 58%);
}

.tribute-hero::after {
  content: "◇";
  position: absolute;
  right: -95px;
  bottom: -190px;
  z-index: -1;
  color: rgba(255, 255, 255, 0.025);
  font-family: var(--mio-serif);
  font-size: 34rem;
  line-height: 1;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.hero-glow.glow-one {
  width: min(72vw, 520px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle,
    rgba(228, 199, 127, 0.19),
    rgba(127, 29, 52, 0.08) 47%,
    transparent 72%
  );
}

.hero-glow.glow-two {
  width: min(88vw, 650px);
  aspect-ratio: 1;
  border: 1px solid rgba(242, 223, 173, 0.09);
  box-shadow: 0 0 90px rgba(209, 171, 86, 0.08);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 790px;
}

.hero-script,
.share-script {
  margin: 0 0 -7px;
  color: var(--mio-gold-400);
  font-family: var(--mio-serif);
  font-size: clamp(27px, 3vw, 44px);
  font-style: italic;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0;
  font-family: var(--mio-serif);
  font-size: clamp(48px, 5.9vw, 88px);
  font-weight: 600;
  line-height: 0.99;
  letter-spacing: -0.045em;
}

.hero-copy h1 em,
.section-heading h2 em,
.share-intro h2 em,
.legacy-cta h2 em {
  color: var(--mio-gold-400);
  font-weight: 600;
}

.hero-lead {
  max-width: 690px;
  margin: 29px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 34px;
}

.hero-stats {
  max-width: 660px;
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-stats div {
  min-width: 0;
  padding: 20px 18px 0 0;
}

.hero-stats div + div {
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stats strong {
  display: block;
  color: var(--mio-gold-300);
  font-family: var(--mio-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.hero-stats span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  line-height: 1.45;
}

/* Hero visual (seal) — matches current HTML */

.tribute-hero__visual {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 26px;
  isolation: isolate;
}

.legacy-seal--tribute {
  width: min(100%, 520px);
  max-width: 520px;
  aspect-ratio: 1;
  margin-inline: auto;
  filter: drop-shadow(0 36px 70px rgba(0, 0, 0, 0.34));
}

.hero-seal-caption {
  width: min(100%, 500px);
  display: grid;
  gap: 5px;
  padding-top: 20px;
  border-top: 1px solid rgba(242, 223, 173, 0.18);
  text-align: center;
}

.hero-seal-caption small {
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-seal-caption strong {
  color: var(--mio-gold-300);
  font-family: var(--mio-serif);
  font-size: clamp(15px, 1.7vw, 20px);
  font-weight: 600;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Wall
   -------------------------------------------------------------------------- */

.wall-section {
  position: relative;
  padding: clamp(82px, 9vw, 138px) clamp(18px, 6vw, 100px);
  background: var(--mio-ivory);
}

.section-heading {
  width: min(100%, 1300px);
  margin: 0 auto 43px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: end;
  gap: 42px;
}

.section-heading h2,
.share-intro h2,
.legacy-cta h2 {
  margin: 0;
  color: var(--mio-wine-900);
  font-family: var(--mio-serif);
  font-size: clamp(40px, 5vw, 70px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.section-heading > p {
  max-width: 520px;
  margin: 0;
  color: var(--mio-muted);
  font-size: 14px;
  line-height: 1.8;
}

.wall-toolbar {
  width: min(100%, 1300px);
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--mio-line);
  border-radius: 999px;
  color: var(--mio-muted);
  background: white;
  font-size: 11px;
  font-weight: 800;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.filter-chips button:hover {
  transform: translateY(-1px);
  border-color: rgba(106, 21, 40, 0.28);
}

.filter-chips button.active {
  color: white;
  border-color: var(--mio-wine-800);
  background: linear-gradient(135deg, var(--mio-wine-700), var(--mio-wine-950));
  box-shadow: 0 9px 22px rgba(72, 7, 20, 0.14);
}

.search-box {
  min-width: min(100%, 300px);
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid var(--mio-line);
  border-radius: 999px;
  background: white;
  box-shadow: 0 8px 24px rgba(44, 4, 11, 0.04);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.search-box:focus-within {
  border-color: rgba(106, 21, 40, 0.38);
  box-shadow: 0 0 0 4px rgba(106, 21, 40, 0.06);
}

.search-box svg {
  width: 16px;
  color: var(--mio-muted);
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  border: 0;
  outline: 0;
  color: var(--mio-ink);
  background: transparent;
}

.tribute-grid {
  width: min(100%, 1300px);
  margin-inline: auto;
  columns: 3 310px;
  column-gap: 22px;
}

.tribute-card {
  position: relative;
  break-inside: avoid;
  overflow: hidden;
  margin: 0 0 22px;
  padding: 27px;
  border: 1px solid var(--mio-line);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 13px 42px rgba(44, 4, 11, 0.055);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.tribute-card:hover {
  transform: translateY(-4px);
  border-color: rgba(209, 171, 86, 0.45);
  box-shadow: 0 24px 60px rgba(44, 4, 11, 0.11);
}

.tribute-card::after {
  content: "◇";
  position: absolute;
  top: 13px;
  right: 18px;
  color: rgba(106, 21, 40, 0.055);
  font-size: 44px;
  pointer-events: none;
}

.tribute-card.featured {
  border-color: rgba(209, 171, 86, 0.52);
  background: linear-gradient(145deg, white, #fff7e7);
}

.tribute-photo {
  width: calc(100% + 54px);
  max-width: none;
  aspect-ratio: 4 / 3;
  margin: -27px -27px 24px;
  object-fit: cover;
}

/* Keep generated tribute photographs full-width */
.tribute-card .tribute-photo {
  width: calc(100% + 54px);
  height: auto;
  max-width: none;
  aspect-ratio: 4 / 3;
  margin: -27px -27px 24px;
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

.card-type {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mio-wine-700);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-type svg {
  width: 13px;
  height: 13px;
}

.tribute-rich-text {
  position: relative;
  z-index: 1;
  margin: 19px 0 24px;
  color: #534643;
  font-size: 14px;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.tribute-rich-text p {
  margin: 0 0 0.85em;
}

.tribute-rich-text p:last-child {
  margin-bottom: 0;
}

.tribute-rich-text h3,
.tribute-rich-text h4 {
  margin: 1em 0 0.45em;
  color: var(--mio-wine-800);
  font-family: var(--mio-serif);
  line-height: 1.2;
}

.tribute-rich-text blockquote {
  margin: 1em 0;
  padding: 0.8em 1em;
  border-left: 3px solid var(--mio-gold-500);
  color: var(--mio-wine-800);
  background: rgba(209, 171, 86, 0.08);
  font-family: var(--mio-serif);
}

.tribute-rich-text ul,
.tribute-rich-text ol {
  padding-left: 1.35em;
}

.tribute-rich-text a {
  color: var(--mio-wine-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-author {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 18px;
  border-top: 1px solid var(--mio-line);
}

.author-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--mio-gold-300);
  background: linear-gradient(145deg, var(--mio-wine-700), var(--mio-wine-950));
  font-size: 10px;
  font-weight: 800;
}

.card-author div {
  display: grid;
  min-width: 0;
}

.card-author b {
  color: var(--mio-wine-950);
  font-size: 12px;
}

.card-author small {
  margin-top: 2px;
  color: var(--mio-muted);
  font-size: 9px;
  line-height: 1.4;
}

.empty-state {
  max-width: 700px;
  margin: 54px auto 0;
  padding: 54px 24px;
  border: 1px dashed rgba(106, 21, 40, 0.22);
  border-radius: 24px;
  color: var(--mio-muted);
  text-align: center;
}

.empty-state span {
  color: var(--mio-gold-500);
  font-size: 42px;
}

.empty-state h3 {
  margin: 10px 0 6px;
  color: var(--mio-wine-800);
  font-family: var(--mio-serif);
  font-size: 27px;
  font-weight: 600;
}

.empty-state p {
  margin: 0;
}

.load-more {
  min-height: 46px;
  margin: 40px auto 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--mio-line);
  border-radius: 999px;
  color: var(--mio-wine-800);
  background: white;
  box-shadow: var(--mio-shadow-sm);
  font-size: 11px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.load-more:hover {
  transform: translateY(-2px);
  border-color: rgba(106, 21, 40, 0.28);
  box-shadow: 0 16px 36px rgba(44, 4, 11, 0.1);
}

.load-more svg {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   Memory gallery
   -------------------------------------------------------------------------- */

.memory-section {
  position: relative;
  overflow: hidden;
  padding: clamp(82px, 9vw, 138px) clamp(18px, 6vw, 100px);
  color: white;
  background:
    radial-gradient(
      circle at 84% 14%,
      rgba(209, 171, 86, 0.13),
      transparent 24rem
    ),
    linear-gradient(145deg, #230307, #4c0b18);
}

.section-heading.light h2 {
  color: white;
}

.section-heading.light > p {
  color: rgba(255, 255, 255, 0.56);
}

.memory-section__shell {
  width: min(100%, 1300px);
  margin-inline: auto;
}

.memory-grid {
  width: min(100%, 1300px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 130px;
  gap: 16px;
}

.memory-card {
  position: relative;
  overflow: hidden;
  grid-column: span 4;
  grid-row: span 3;
  border: 1px solid rgba(242, 223, 173, 0.14);
  border-radius: 20px;
  background: var(--mio-wine-800);
}

.memory-card:nth-child(1),
.memory-card:nth-child(6n + 1) {
  grid-column: span 7;
  grid-row: span 4;
}

.memory-card:nth-child(2),
.memory-card:nth-child(6n + 2) {
  grid-column: span 5;
  grid-row: span 4;
}

.memory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.memory-card:hover img {
  transform: scale(1.045);
}

.memory-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 58px 22px 20px;
  display: grid;
  background: linear-gradient(transparent, rgba(20, 1, 5, 0.9));
}

.memory-overlay b {
  font-family: var(--mio-serif);
  font-size: 17px;
}

.memory-overlay small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

/* --------------------------------------------------------------------------
   Share / form
   -------------------------------------------------------------------------- */

.share-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(82px, 9vw, 138px) clamp(18px, 6vw, 100px);
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(520px, 1.18fr);
  align-items: start;
  gap: clamp(46px, 7vw, 105px);
  color: white;
  background:
    radial-gradient(
      circle at 9% 8%,
      rgba(209, 171, 86, 0.1),
      transparent 23rem
    ),
    linear-gradient(135deg, #1d0105, #33050c 65%, #230307);
}

.share-section__background {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 88% 10%,
      rgba(242, 223, 173, 0.09),
      transparent 22rem
    ),
    linear-gradient(
      115deg,
      transparent 0 62%,
      rgba(255, 255, 255, 0.018) 62% 63%,
      transparent 63%
    );
}

.share-intro {
  position: sticky;
  top: 125px;
}

.share-intro h2 {
  color: white;
}

.share-intro > p:not(.eyebrow):not(.share-script) {
  color: rgba(255, 255, 255, 0.61);
  font-size: 14px;
  line-height: 1.8;
}

.share-assurances {
  margin-top: 8px;
}

.review-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.review-note:first-of-type {
  margin-top: 34px;
}

.review-note svg {
  width: 20px;
  flex-shrink: 0;
  color: var(--mio-gold-400);
}

.review-note span {
  display: grid;
}

.review-note b {
  color: white;
  font-size: 13px;
}

.review-note small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  line-height: 1.5;
}

.tribute-form {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(242, 223, 173, 0.2);
  border-radius: 28px;
  color: var(--mio-ink);
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(209, 171, 86, 0.11),
      transparent 20rem
    ),
    var(--mio-ivory);
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.32);
}

.tribute-form::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(209, 171, 86, 0.14);
  border-radius: 20px;
  pointer-events: none;
}

.form-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 29px;
}

.form-heading > span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--mio-gold-300);
  background: linear-gradient(145deg, var(--mio-wine-700), var(--mio-wine-950));
  box-shadow: inset 0 0 0 5px rgba(242, 223, 173, 0.05);
  font-size: 21px;
}

.form-heading div {
  display: grid;
}

.form-heading small {
  color: var(--mio-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.form-heading h3 {
  margin: 3px 0 0;
  color: var(--mio-wine-900);
  font-family: var(--mio-serif);
  font-size: 31px;
  font-weight: 600;
}

.form-progress {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
  margin: -10px 0 27px;
}

.form-progress span {
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: rgba(81, 32, 39, 0.12);
  transition: width 240ms ease, background 240ms ease;
}

.form-progress span.active {
  width: 58px;
  background: linear-gradient(90deg, var(--mio-wine-700), var(--mio-gold-500));
}

.form-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 17px;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

.tribute-form label:not(.upload-field):not(.consent) {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-bottom: 17px;
}

.tribute-form label > span {
  color: #4e403f;
  font-size: 11px;
  font-weight: 800;
}

.tribute-form label > span small {
  color: var(--mio-muted);
  font-weight: 500;
}

.tribute-form input,
.tribute-form select,
.tribute-form textarea {
  width: 100%;
  border: 1px solid rgba(81, 32, 39, 0.15);
  border-radius: 13px;
  outline: 0;
  color: var(--mio-ink);
  background: white;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.tribute-form input,
.tribute-form select {
  min-height: 51px;
  padding: 0 14px;
}

.tribute-form textarea {
  padding: 14px;
  resize: vertical;
  line-height: 1.65;
}

.tribute-form input:focus,
.tribute-form select:focus,
.tribute-form textarea:focus {
  border-color: var(--mio-gold-500);
  box-shadow: 0 0 0 4px rgba(209, 171, 86, 0.11);
}

.message-field {
  position: relative;
}

.character-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--mio-muted);
  background: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  pointer-events: none;
}

.upload-field {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  margin: 8px 0 18px;
  padding: 19px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px dashed rgba(106, 21, 40, 0.25);
  border-radius: 16px;
  background: #fffdf8;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease;
}

.upload-field:hover {
  border-color: rgba(106, 21, 40, 0.4);
  background: #fff9f0;
}

.upload-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 12px;
  color: var(--mio-wine-700);
  background: #f3e7d3;
}

.upload-icon svg {
  width: 20px;
}

.upload-copy {
  display: grid;
  flex: 1;
  min-width: 0;
}

.upload-field b {
  color: var(--mio-wine-800);
  font-size: 12px;
}

.upload-field small {
  margin-top: 3px;
  color: var(--mio-muted);
  font-size: 10px;
  line-height: 1.45;
}

.upload-action {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(106, 21, 40, 0.18);
  border-radius: 999px;
  color: var(--mio-wine-700) !important;
  background: rgba(255, 255, 255, 0.8);
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.upload-field button {
  border: 0;
  color: var(--mio-wine-700);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.consent {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--mio-muted);
  font-size: 10px;
  line-height: 1.55;
}

.consent input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
  accent-color: var(--mio-wine-700);
  flex-shrink: 0;
}

.honeypot {
  position: absolute !important;
  left: -9999px;
}

.form-message {
  position: relative;
  z-index: 1;
  min-height: 22px;
  margin: 13px 0;
  color: var(--mio-wine-700);
  font-size: 11px;
}

.form-message.error {
  color: #a22f45;
}

.form-message.success {
  color: #1d7558;
}

.submit-button {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 0;
}

.form-privacy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 13px 0 0;
  color: var(--mio-muted);
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

.form-privacy svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--mio-gold-600);
}

/* --------------------------------------------------------------------------
   Legacy CTA + success dialog
   -------------------------------------------------------------------------- */

.legacy-cta {
  padding: clamp(70px, 8vw, 110px) clamp(18px, 6vw, 100px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 40px;
  color: white;
  background: linear-gradient(125deg, #651327, #250307);
}

.legacy-cta h2 {
  color: white;
}

.cta-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.success-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.dialog-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(17, 0, 3, 0.82);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

.dialog-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 52px 40px 42px;
  border: 1px solid rgba(209, 171, 86, 0.3);
  border-radius: 26px;
  background: var(--mio-ivory);
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.45);
  text-align: center;
  animation: readerIn 260ms ease both;
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(81, 32, 39, 0.13);
  border-radius: 50%;
  color: var(--mio-wine-950);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 9px 24px rgba(44, 4, 11, 0.08);
}

.dialog-close svg {
  width: 18px;
  height: 18px;
}

.dialog-gem {
  display: block;
  color: var(--mio-gold-500);
  font-size: 40px;
}

.dialog-card > small {
  color: var(--mio-wine-700);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dialog-card h2 {
  margin: 10px 0 15px;
  color: var(--mio-wine-900);
  font-family: var(--mio-serif);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.15;
}

.dialog-card p {
  margin-bottom: 25px;
  color: var(--mio-muted);
  line-height: 1.7;
}

.dialog-assurance {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 25px;
  padding: 14px 16px;
  border: 1px solid rgba(81, 32, 39, 0.1);
  border-radius: 14px;
  background: rgba(209, 171, 86, 0.07);
  text-align: left;
}

.dialog-assurance svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: var(--mio-gold-600);
}

.dialog-assurance span {
  display: grid;
  gap: 2px;
}

.dialog-assurance b {
  color: var(--mio-wine-900);
  font-size: 11px;
}

.dialog-assurance small {
  color: var(--mio-muted);
  font-size: 9px;
  line-height: 1.4;
}

.noscript-notice {
  margin: 0;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  color: white;
  background: #8b2037;
  text-align: center;
}

.noscript-notice p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Reveal (progressive enhancement — never a visibility dependency)
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 1;
  transform: none;
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

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

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .tribute-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    display: grid;
    justify-items: center;
    margin-inline: auto;
  }

  .hero-copy .eyebrow {
    justify-content: center;
  }

  .tribute-hero__visual {
    width: min(100%, 760px);
    margin-inline: auto;
  }

  .share-section {
    grid-template-columns: 1fr;
  }

  .share-intro {
    position: static;
  }

  .legacy-cta {
    grid-template-columns: 1fr;
  }

  .cta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .wall-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    max-width: 430px;
  }

  .memory-grid {
    grid-auto-rows: 110px;
  }

  .memory-card,
  .memory-card:nth-child(n) {
    grid-column: span 6;
    grid-row: span 3;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 74px;
  }

  .tribute-hero {
    min-height: auto;
    padding: 88px 16px 72px;
    gap: 48px;
  }

  .hero-copy h1 {
    font-size: clamp(43px, 12.5vw, 63px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-stats {
    width: 100%;
  }

  .hero-stats div {
    padding-right: 8px;
  }

  .hero-stats div + div {
    padding-left: 10px;
  }

  .hero-stats strong {
    font-size: 25px;
  }

  .hero-stats span {
    font-size: 8px;
  }

  .legacy-seal--tribute {
    width: min(92vw, 430px);
  }

  .hero-seal-caption {
    width: min(92%, 430px);
  }

  .featured-section,
  .wall-section,
  .memory-section,
  .share-section {
    padding-inline: 16px;
  }

  .section-heading h2,
  .share-intro h2,
  .legacy-cta h2 {
    font-size: clamp(36px, 10vw, 52px);
  }

  .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
  }

  .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .filter-chips button {
    flex: 0 0 auto;
  }

  .tribute-grid {
    columns: 1;
  }

  .memory-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .memory-card,
  .memory-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .tribute-form {
    padding: 27px 18px;
  }

  .upload-field {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .upload-copy {
    flex-basis: calc(100% - 64px);
  }

  .upload-action {
    margin-left: 59px;
  }

  .legacy-cta {
    padding-inline: 18px;
  }

  .cta-actions {
    display: grid;
  }

  .cta-actions .button {
    width: 100%;
  }

  .dialog-card {
    padding: 48px 22px 34px;
  }
}

@media (max-width: 420px) {
  .upload-action {
    width: calc(100% - 59px);
    text-align: center;
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}