/* Oregon Falun Dafa Association — shared styles for all pages.
   No build step, no external fonts or libraries. */

:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --ink: #1f2933;
  --muted: #52606d;
  --line: #e6dcc6;
  --gold: #c99a2e;
  --gold-text: #7f5400;
  --sky: #e3f3fa;
  --sky-2: #cde8f4;
  --glow: rgba(255, 246, 220, .95);
  --btn-bg: #17324d;
  --btn-ink: #ffffff;
  --focus: #1a5fd0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 50, 77, .06), 0 8px 24px rgba(23, 50, 77, .08);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", 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: #0e1923;
    --surface: #16232f;
    --ink: #e8edf2;
    --muted: #a9b6c3;
    --line: #2b3b49;
    --gold: #d4a53a;
    --gold-text: #e6bb58;
    --sky: #14303f;
    --sky-2: #1a3d50;
    --glow: rgba(212, 165, 58, .16);
    --btn-bg: #e6bb58;
    --btn-ink: #14202b;
    --focus: #7db1ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;                  /* keeps the footer at the bottom on short pages */
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
}
body > main { flex: 1 0 auto; }

[hidden] { display: none !important; }      /* keep `hidden` stronger than any display: rule below */

img { max-width: 100%; height: auto; }

a { color: var(--gold-text); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
a[href^="tel:"], .nb { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }

.skip {
  position: absolute; left: .5rem; top: -4rem; z-index: 10;
  background: var(--btn-bg); color: var(--btn-ink);
  padding: .6rem 1rem; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: .5rem; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 100%);
  border-bottom: 3px solid var(--gold);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .75rem 2rem; padding-block: .9rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--gold-text);
  font: 700 clamp(1.15rem, 3.2vw, 1.55rem)/1.15 var(--serif);
}
.brand img { width: 2.1rem; height: 2.1rem; flex: none; }

.learn { display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.learn a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: .45rem .8rem; border-radius: 999px;
}
.learn a::after { content: " \2197"; content: " \2197" / ""; font-weight: 400; opacity: .6; }
.learn a:hover { background: rgba(255, 255, 255, .55); }
@media (prefers-color-scheme: dark) { .learn a:hover { background: rgba(255, 255, 255, .1); } }
@media (max-width: 600px) {          /* phones: tidy 2x2 grid instead of a ragged wrap */
  .learn { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: .4rem; }
  .learn a { text-align: center; background: rgba(255, 255, 255, .55); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
}
@media (max-width: 600px) and (prefers-color-scheme: dark) { .learn a { background: rgba(255, 255, 255, .06); } }

/* ---------- Hero ---------- */
.hero { padding: clamp(1.25rem, 4vw, 2.5rem) 0 .5rem; }
.hero-panel {
  position: relative;
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: 1fr;
  padding: clamp(1.5rem, 5vw, 3.25rem);
  background:
    radial-gradient(60% 90% at 100% 0%, var(--glow), transparent 70%),
    linear-gradient(135deg, var(--sky) 0%, var(--sky-2) 100%);
  border: 1px solid var(--gold);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.hero-panel::before {              /* thin inner rule, echoing the old gold-framed banner */
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  border-radius: calc(var(--radius) + 1px);
}
.hero h1 { color: var(--gold-text); margin-bottom: .35em; }
.hero .lead { font-size: 1.2rem; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.4rem; border-radius: 999px; border: 2px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-ink);
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(23, 50, 77, .25); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }

/* ---------- Sections ---------- */
section { padding: clamp(2rem, 5vw, 3.5rem) 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.pill {
  display: inline-block; padding: .2rem .8rem; border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--gold-text);
  font: 700 .85rem/1.6 var(--sans);
}

.two-col { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col h2 { font-size: 1.5rem; }

.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 1.7rem; margin: .3rem 0; }
.checks li::before {
  content: ""; position: absolute; left: .15rem; top: .62em; width: .6rem; height: .6rem;
  border-radius: 50%; background: var(--gold);
}

.grid { display: grid; gap: 1.1rem; align-items: start; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.35rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .15rem;
}
.card h3 { margin: 0 0 .35rem; color: var(--gold-text); }
.card p { margin: 0; }
.card .venue { font-weight: 600; }
.card .addr, .card .note { color: var(--muted); font-size: .96rem; }
.card .time { margin-top: .5rem; font-weight: 700; }
.card .links { margin-top: auto; padding-top: .9rem; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-weight: 600; }
.card .contact { margin-top: .5rem; }
.card .map { display: block; }
.card .map img { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.card .map span { display: block; font-size: .88rem; color: var(--muted); margin-top: .3rem; }

/* Featured card (Downtown Portland): full width, details beside the map */
.card.feature { grid-column: 1 / -1; display: grid; gap: 1.25rem 2rem; align-items: center; }
.card.feature .feature-text { display: flex; flex-direction: column; gap: .15rem; }
.card.feature .links { padding-top: .6rem; }
@media (min-width: 760px) { .card.feature { grid-template-columns: 1fr 1.25fr; } }

.band {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--gold);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-top: 1.1rem; box-shadow: var(--shadow);
}
.band h2, .band h3 { margin: 0 0 .25rem; color: var(--gold-text); font-size: 1.25rem; }
.band p { margin: 0; }

.grid .empty { grid-column: 1 / -1; margin: 0; color: var(--muted); }

/* Notice banner at the top of the page (edited from /admin) */
.notice { margin-top: 1rem; padding: .9rem 1.2rem; border: 1px solid var(--gold); border-left-width: 6px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--gold) 14%, var(--surface)); box-shadow: var(--shadow); }
.notice-warning { border-color: #b3261e; background: color-mix(in srgb, #b3261e 9%, var(--surface)); }
@media (prefers-color-scheme: dark) { .notice-warning { border-color: #f28b82; background: color-mix(in srgb, #f28b82 12%, var(--surface)); } }

/* Seasonal event block (edited from /admin) */
.event img { display: block; width: 100%; height: auto; border-radius: 10px; }
.event { display: grid; gap: 1.25rem 2rem; align-items: start;
  background: var(--surface); border: 1px solid var(--gold); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
@media (min-width: 760px) { .event { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.event .eyebrow { font: 700 .8rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(2.5rem, 6vw, 4rem); padding: 1.5rem 0 2rem;
  background: var(--sky); border-top: 3px solid var(--gold); color: var(--muted); font-size: .92rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.site-footer a { color: var(--gold-text); }

/* ---------- Article pages (organ_harvesting.html) ---------- */
.article-hero { padding: clamp(1.25rem, 4vw, 2.5rem) 0 0; }
.article-hero .panel {
  display: grid; gap: 1.5rem 2.25rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.25rem, 4vw, 2.25rem); box-shadow: var(--shadow);
}
@media (min-width: 700px) { .article-hero .panel { grid-template-columns: 230px 1fr; } }
.article-hero img { display: block; width: 100%; max-width: 230px; margin-inline: auto; border-radius: 8px; }
.article-hero h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); margin-bottom: .4em; }

article.story { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
article.story section { padding-top: clamp(1.75rem, 4vw, 2.75rem); }
article.story h2 { font-size: clamp(1.4rem, 3.2vw, 1.85rem); color: var(--gold-text); }
article.story h3 { font-size: 1.15rem; margin-top: 1.4em; }
.story .callout {
  border-left: 5px solid var(--gold); background: var(--surface);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; font-weight: 600;
}
.story .callout p:last-child { margin-bottom: 0; }

figure { margin: 1.5rem 0; }
figure a { display: block; }
figure img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
figure.narrow { max-width: 440px; margin-inline: auto; }
figcaption { font-size: .88rem; color: var(--muted); margin-top: .45rem; }

.table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .98rem; }
th, td { text-align: left; vertical-align: top; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
th { background: color-mix(in srgb, var(--gold) 16%, transparent); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

@media (max-width: 600px) {          /* phones: stack each table row as a card instead of scrolling sideways */
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  table, thead, tbody, tr, td { display: block; min-width: 0; }
  thead { position: absolute; left: -9999px; }
  tr { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .8rem; padding: .3rem 0; }
  td { border: 0; padding: .5rem 1rem; }
  td::before {
    content: attr(data-label); display: block; margin-bottom: .15rem;
    font: 700 .72rem/1.2 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  }
}

.transcript { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 0; }
.transcript p { margin: 0; padding: .45rem 0; }
.transcript .who { font-weight: 700; color: var(--gold-text); }

/* ---------- Print ---------- */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .learn, .actions, .fb, .skip, .site-footer .wrap > :not(:first-child) { display: none !important; }
  .site-header, .hero-panel, .article-hero .panel, .card, .band { box-shadow: none; background: #fff; }
  figure, .card, tr { break-inside: avoid; }
  a { color: inherit; }
}
