:root {
  --bg: #121113;
  --surface: #1b1a1d;
  --surface-2: #232126;
  --line: #312e34;
  --text: #ece7df;
  --muted: #a8a198;
  --accent: #c7362c;
  --accent-soft: rgba(199, 54, 44, 0.14);
  --ok: #6fae7f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --radius: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
/* Side gutter never drops below 16px, and clears the notch on landscape phones. */
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 560px) { .wrap { padding-inline: 20px; } }
.narrow { max-width: 720px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; overflow-wrap: break-word; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--accent); margin: 0 0 .6em; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(18, 17, 19, .92);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; text-decoration: none; margin-right: auto; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 18px; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { background: none; border: 0; color: var(--muted); padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* Hero */
.hero { padding-block: clamp(56px, 10vw, 110px) 40px; text-align: center; }
.hero h1 { font-size: clamp(2.8rem, 8vw, 5rem); letter-spacing: -.01em; margin-bottom: .2em; }
.hero h1 span { color: var(--accent); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 40ch; margin: 0 auto 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 600;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger { background: transparent; color: #f08a80; border-color: #6b2a25; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.small { padding: 6px 14px; font-size: .88rem; }

/* Tribute: portrait and video on one row, the remembrance spanning beneath them */
section { padding-block: 48px; }
.feature { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 40px; align-items: center; }
.feature-media { background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 9 / 16; max-width: 360px; width: 100%; }
.feature-media video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.feature-media[hidden] + .feature-text { grid-column: 1 / -1; }
.feature-id { display: flex; align-items: center; gap: 16px; margin-bottom: 1em; }
.feature-portrait { flex: none; width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.6rem; color: #5b555f; }
.feature-portrait img { width: 100%; height: 100%; object-fit: cover; }
.feature-text h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .1em; }
.feature-tagline { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--text); margin: 0; }
.feature-text .muted { max-width: 46ch; margin-bottom: 1.4em; }

.remembrance { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 28px; }
.remembrance-body { max-width: 68ch; font-family: var(--serif); font-size: 1.05rem; line-height: 1.75; }
.remembrance-body p { margin: 0 0 1em; }
.remembrance-src { margin: 4px 0 0; font-size: .92rem; }
.remembrance-src a { color: var(--accent); }

@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature-media { margin-inline: auto; max-width: 320px; }
  .feature-text .muted { margin-inline: auto; }
}

/* Wall */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 14px; font: inherit; font-size: .88rem; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.wall { columns: 3 300px; column-gap: 18px; }
.tribute { break-inside: avoid; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 20px 22px; margin: 0 0 18px; }
.tribute .kind { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.tribute h3 { font-size: 1.2rem; margin: .35em 0 .5em; }
.tribute .body { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--serif); font-size: 1.02rem; line-height: 1.7; }
.tribute.is-poem .body { font-style: italic; }
.tribute .body.clamped { max-height: 22em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.tribute .more { background: none; border: 0; color: var(--accent); padding: 6px 0 0; font: inherit; cursor: pointer; }
.tribute figure { margin: 14px 0 0; }
.tribute figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.tribute img { border-radius: 6px; }
.tribute footer { margin-top: 14px; font-size: .9rem; color: var(--muted); }
.tribute footer .for { display: block; font-size: .8rem; margin-top: 2px; }
.tribute footer .source { display: block; font-size: .8rem; margin-top: 4px; color: var(--accent); }
/* A line lifted from a longer piece: no kind chip, bigger type, quieter frame. */
.tribute.is-quote { background: var(--accent-soft); border-left-width: 3px; }
.tribute.is-quote .body { margin: 0; font-size: 1.15rem; line-height: 1.55; font-style: italic; }
.tribute.is-quote .body::before { content: "“"; }
.tribute.is-quote .body::after { content: "”"; }
.empty { color: var(--muted); padding: 30px 0; }

/* Form */
.contribute { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.guide { background: var(--accent-soft); border: 1px solid rgba(199, 54, 44, .35); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0 28px; }
.guide h3 { font-size: 1rem; font-family: var(--sans); margin-bottom: .4em; }
.guide ul { margin: 0; padding-left: 1.2em; }
.guide li { margin: .25em 0; }
.field { margin: 0 0 22px; }
.field > label, .field > legend, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { font-size: .86rem; color: var(--muted); margin: 4px 0 0; }
input[type=text], input[type=email], select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font: inherit;
}
textarea { min-height: 14em; resize: vertical; font-family: var(--serif); line-height: 1.7; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: .92rem; }
.radios input { accent-color: var(--accent); margin: 0 6px 0 0; }
.radios label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.counter { float: right; font-weight: 400; font-size: .82rem; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.check input { accent-color: var(--accent); margin-top: 5px; width: 18px; height: 18px; flex: none; }
.photo-list { display: grid; gap: 12px; margin-top: 12px; }
.photo-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.photo-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; }
.file-btn { position: relative; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin-top: 14px; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line); }
.status.ok { border-color: var(--ok); color: var(--ok); }
.status.bad { border-color: var(--accent); color: #f08a80; }
.ts { min-height: 70px; margin: 8px 0 16px; }

/* Footer */
.site-foot { padding-block: 40px 60px; color: var(--muted); font-size: .92rem; }
.site-foot p { margin: .4em 0; max-width: 70ch; }

@media (max-width: 560px) {
  /* Nav drops to its own row under the brand instead of disappearing. */
  .site-head .wrap { gap: 6px 12px; padding-block: 10px; }
  .nav { order: 3; width: 100%; justify-content: space-between; gap: 10px; font-size: .9rem; }
  .lang button { padding: 8px 14px; }        /* comfortable tap target */
  section { padding-block: 36px; }
  .hero { padding-block: 40px 32px; }
  .hero .cta { flex-direction: column; align-items: stretch; }
  .hero .cta .btn { justify-content: center; }
  .tribute { padding: 16px 18px; }
  .tribute.is-quote .body { font-size: 1.05rem; }
  .feature-id { gap: 12px; }
  .feature-portrait { width: 60px; height: 60px; font-size: 1.3rem; }
  .remembrance { padding-top: 22px; }
  .remembrance-body { font-size: 1rem; }
  .photo-item { grid-template-columns: 72px 1fr; }
  .photo-item img { width: 72px; height: 72px; }
  .photo-item .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Side music player */
.player { position: fixed; z-index: 20; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: 320px;
  max-height: calc(100vh - 120px); display: flex; flex-direction: column;
  background: rgba(27, 26, 29, .97); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45); backdrop-filter: blur(8px); }
@media (min-width: 1500px) { .player { top: 90px; bottom: auto; } }
.player.is-playing { border-color: rgba(199, 54, 44, .6); }
.pl-bar { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; }
.pl-now { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pl-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pl-track { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-btn { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--text); cursor: pointer; padding: 0; }
.pl-btn:hover { border-color: var(--muted); }
.pl-btn svg { width: 18px; height: 18px; fill: currentColor; }
.pl-main, .pl-big { background: var(--accent); border-color: var(--accent); color: #fff; }
.pl-main:hover, .pl-big:hover { filter: brightness(1.08); border-color: var(--accent); }
.pl-big { width: 48px; height: 48px; }
.pl-big svg { width: 22px; height: 22px; }
.pl-body { border-top: 1px solid var(--line); padding: 12px 14px 14px; overflow-y: auto; }
.pl-progress input { width: 100%; accent-color: var(--accent); margin: 0; }
.pl-time { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-controls { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 8px 0 12px; }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pl-item { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; background: none; border: 0; color: inherit;
  font: inherit; padding: 8px 8px; border-radius: 8px; cursor: pointer; }
.pl-item:hover { background: var(--surface-2); }
.pl-num { width: 1.4em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
.pl-meta { display: flex; flex-direction: column; min-width: 0; }
.pl-t { font-size: .95rem; }
.pl-a { font-size: .8rem; color: var(--muted); }
.is-current .pl-item { background: var(--accent-soft); }
.is-current .pl-num, .is-current .pl-t { color: var(--text); }
.is-current .pl-num { color: var(--accent); }
.pl-note { font-size: .78rem; color: var(--muted); margin: 10px 4px 0; }
@media (max-width: 560px) {
  .player { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 70vh; }
  body.has-player { padding-bottom: 84px; }
}

/* Hero banner with Rocha's portrait (overrides the centered hero above) */
.hero-banner { padding-block: 0; text-align: left; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 55% 70% at 72% 55%, rgba(199, 54, 44, .28), transparent 70%),
    linear-gradient(180deg, #161416 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: end; gap: 24px;
  min-height: min(78vh, 640px); }
.hero-text { align-self: center; padding-block: clamp(48px, 8vw, 96px); }
.hero-banner .lead { margin: 0 0 28px; max-width: 34ch; }
.hero-banner .cta { justify-content: flex-start; }
.hero-art { align-self: end; display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 520px; height: auto; display: block;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .45)); }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hero-text { text-align: center; padding-block: 40px 8px; }
  .hero-banner .lead { margin-inline: auto; }
  .hero-banner .cta { justify-content: center; }
  .hero-art img { max-width: 340px; }
}
