/* Tempo Esculpido: warm paper, walnut ink, brass accent. Mobile first, no web fonts
   (system serif/sans stacks keep the site free of third-party font requests). */

:root {
  --bg: #f4efe6;
  --surface: #fbf8f2;
  --surface-2: #efe7da;
  --ink: #1e1b17;
  --muted: #675e53;
  --line: #ddd2c1;
  --brass: #94712f;
  --accent: #5b3a24;
  --button-bg: #1e1b17;
  --button-ink: #fbf8f2;
  --button-hover: #5b3a24;
  --focus: #b0822f;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f;
    --surface: #1d1a15;
    --surface-2: #26221b;
    --ink: #efe8dc;
    --muted: #ab9f8f;
    --line: #3a332a;
    --brass: #cfab6c;
    --accent: #e0c08a;
    --button-bg: #efe8dc;
    --button-ink: #15130f;
    --button-hover: #cfab6c;
    --focus: #e0c08a;
  }
}

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

/* Elements styled with display:flex/grid must still disappear when hidden. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 780px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; top: 0; background: var(--button-bg); color: var(--button-ink); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 16px; top: 12px; }

.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-family: var(--serif); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.95rem; }
.brand img { display: block; border-radius: 7px; }
.site-header nav { display: flex; gap: 1.1rem; font-size: 0.95rem; }
.site-header nav a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { white-space: nowrap; }
@media (max-width: 459px) {
  .brand { letter-spacing: 0.1em; font-size: 0.88rem; }
  /* The hero button already leads to the involvement section on small screens. */
  .site-header nav .nav-involved { display: none; }
}
.site-header nav a:hover { color: var(--accent); text-decoration: underline; }

.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; color: var(--muted); font-size: 0.88rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-top: 1.5rem; padding-bottom: 2rem; }
.footer-row p { margin: 0; }
.footer-row a { color: var(--muted); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.7rem 1.35rem;
  border: 1px solid var(--button-bg); border-radius: 999px;
  background: var(--button-bg); color: var(--button-ink);
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button:hover { background: var(--button-hover); border-color: var(--button-hover); text-decoration: none; }
.button-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button-secondary:hover { background: var(--surface-2); color: var(--ink); border-color: var(--brass); }
.button-small { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.93rem; }
.button .size { font-weight: 400; opacity: 0.75; font-size: 0.88em; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }

/* Hero */
.hero { padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .hero { padding: 6rem 0 5rem; } }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); margin-bottom: 1.4rem; display: flex; align-items: center; gap: 0.8rem; }
.eyebrow::before { content: ""; width: 2.5rem; height: 1px; background: var(--brass); }
.wordmark { font-size: clamp(2rem, 9.5vw, 6.5rem); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 400; line-height: 1.02; margin-bottom: 1.6rem; overflow-wrap: anywhere; }
@media (min-width: 720px) { .wordmark { letter-spacing: 0.16em; } }
.wordmark span { display: block; }
.wordmark span + span { color: var(--accent); }
.tagline { font-family: var(--serif); font-size: clamp(1.45rem, 4vw, 2.1rem); line-height: 1.25; margin-bottom: 0.8rem; }
.lead { font-size: 1.12rem; max-width: 42rem; color: var(--muted); margin-bottom: 2rem; }

/* Paths */
.paths { padding: 3.5rem 0 1rem; }
.path-grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .path-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .path-grid { grid-template-columns: repeat(4, 1fr); } }
.path-grid li { border-top: 2px solid var(--brass); padding-top: 1rem; }
.path-grid p { color: var(--muted); margin: 0; }
.path-num { display: block; font: 500 0.85rem/1 var(--sans); letter-spacing: 0.15em; color: var(--brass); margin-bottom: 0.8rem; }

/* Involvement roles */
.involved { padding: 3.5rem 0 1rem; scroll-margin-top: 1rem; }
.section-intro { color: var(--muted); max-width: 42rem; }
.roles { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.role { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 1rem; }
.role-head { padding: 1.25rem 1.25rem 0.75rem; }
.role-head h3 { margin-bottom: 0.35rem; }
.role-head p { margin: 0 0 0.5rem; }
.role-note { font-size: 0.9rem; color: var(--muted); }

.role-more > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin: 0.25rem 1.25rem 1.25rem; padding: 0.65rem 1rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; color: var(--ink); background: var(--bg);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.role-more > summary::-webkit-details-marker { display: none; }
.role-more > summary::after {
  content: ""; width: 0.55rem; height: 0.55rem; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease;
}
.role-more[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.role-more > summary:hover { border-color: var(--brass); }
.role-more[open] > summary { background: var(--surface-2); border-color: var(--brass); }
.role-panel { border-top: 1px solid var(--line); padding: 1.25rem; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

@media (min-width: 760px) {
  .role-head { padding: 1.5rem 15rem 1.5rem 1.5rem; }
  .role-more > summary { position: absolute; top: 1.5rem; right: 1.5rem; margin: 0; min-width: 12rem; }
  .role-panel { padding: 1.5rem; }
}

.deck-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 900px) { .deck-list { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.deck { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem 1.2rem; }
.deck h4 { margin-bottom: 0.4rem; }
.deck h4 a { color: var(--ink); text-decoration: none; }
.deck h4 a:hover { color: var(--accent); text-decoration: underline; }
.deck p { margin-bottom: 0.9rem; }
.deck-meta { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); margin-bottom: 0.5rem; }

.notice { margin: 1.5rem 0 0; padding: 1rem 1.2rem; border-left: 3px solid var(--brass); background: var(--surface); border-radius: 0 10px 10px 0; }
.disclaimer { padding: 2.5rem 0 0; }
.disclaimer p { font-size: 0.88rem; color: var(--muted); max-width: 52rem; border-top: 1px solid var(--line); padding-top: 1.25rem; margin: 0; }

/* Deck pages */
.crumbs { margin: 1.5rem 0 0; font-size: 0.93rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.deck-hero { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.deck-hero h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 0.3rem; }
.deck-hero .lead { margin-bottom: 1.5rem; }

.viewer { margin-bottom: 2rem; }
.viewer .muted { margin: 0.6rem 0 0; }
.viewer-frame { margin-top: 1rem; }
.viewer-frame iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
@media (min-width: 720px) { .viewer-frame iframe { aspect-ratio: 16 / 10; } }

.caveats { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: 0 12px 12px 0; padding: 1.2rem 1.3rem 0.4rem; margin-bottom: 2.5rem; }
.caveats h2 { font-size: 1.3rem; }
.caveats ul { padding-left: 1.1rem; margin: 0 0 1rem; }
.caveats li { margin-bottom: 0.5rem; }

.slides h2 { margin-bottom: 0.3rem; }
.slide-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1rem; }
.slide { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem 0.5rem; }
.slide-num { font: 600 0.75rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; }
.slide-body p { margin-bottom: 0.55rem; }
.slide-label { font-size: 0.78rem; letter-spacing: 0.14em; color: var(--brass); }
.slide-title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.25; }
.slide-sources { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.end-cta { margin: 2.5rem 0 0; }

/* Prose pages */
.prose { padding-top: 2.5rem; }
.prose h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }

.not-found { padding-top: 3rem; display: grid; gap: 2.5rem; }

/* Registration form */
.register { margin-top: 1.5rem; }
.roles-fieldset, .form-block, .radios, .updates { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-legend { font: 600 0.8rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); padding: 0; margin-bottom: 0.25rem; }
.role-title { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.35rem; }
.role-title h3 { margin: 0; }
.role-title label { cursor: pointer; }
.role-check { width: 1.35rem; height: 1.35rem; flex: none; accent-color: var(--accent); cursor: pointer; }
.role:has(.role-check:checked) { border-color: var(--brass); box-shadow: inset 3px 0 0 var(--brass); }

.form-panel { margin-top: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
@media (min-width: 760px) { .form-panel { padding: 2rem; } }
.form-panel > .section-intro { margin-bottom: 1.5rem; }
.form-block { margin-bottom: 1.75rem; }
.form-block > legend { font-family: var(--serif); font-size: 1.3rem; padding: 0; margin-bottom: 0.3rem; }
.hint { color: var(--muted); font-size: 0.88rem; margin: 0.3rem 0 0.8rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 0.5rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 0.93rem; line-height: 1.3; transition: background-color 0.15s ease, border-color 0.15s ease; }
.chip input:checked + span { background: var(--button-bg); border-color: var(--button-bg); color: var(--button-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.field { margin-bottom: 1rem; }
.field > label, .radios > legend, .updates > legend { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; padding: 0; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.register input[type="text"], .register input[type="email"], .register input[type="tel"], .register textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.85rem; min-height: 46px;
}
.register textarea { resize: vertical; min-height: 6rem; }
.register input:focus-visible, .register textarea:focus-visible { border-color: var(--brass); }
.field-row .hint { margin-bottom: 0; }

.check { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--accent); }
.check.inline { display: inline-flex; align-items: center; margin: 0 1.2rem 0.4rem 0; }
.check.inline input { margin: 0; }
.consents { display: grid; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.updates .check.inline { margin-top: 0.2rem; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: 0 0 1rem; }
.form-status { display: grid; gap: 0.35rem; margin: 0 0 1rem; padding: 0.9rem 1.1rem; border-left: 3px solid #b3261e; background: var(--bg); border-radius: 0 10px 10px 0; color: var(--ink); }
.form-actions { margin: 0 0 1rem; }
.form-actions .button { min-width: 14rem; }
.form-actions .button:disabled { opacity: 0.6; cursor: progress; }
.form-note { font-size: 0.88rem; color: var(--muted); margin: 0; }
.form-done { margin-top: 2rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--brass); border-left-width: 3px; border-radius: 0 var(--radius) var(--radius) 0; }
.form-done:focus { outline: none; }
.result-page { padding-top: 3rem; }
