/* ============================================================
   Soihtu DTx — shared multi-page components (loaded after styles.css)
   ============================================================ */

/* ---------- Buttons (extends .btn / .btn-primary) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 10px 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Sub-page hero + breadcrumb ---------- */
.page-hero {
  padding: 54px 0 40px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 88% -10%, var(--bloom-soft) 0%, rgba(231,239,221,0) 60%),
    var(--bg);
}
.breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border); }
.page-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  max-width: 18ch;
}
.page-title em { font-style: italic; color: var(--accent); }
.page-hero .lede { max-width: 60ch; }

/* ---------- Generic cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--bloom); }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin: 0 0 10px; }
.card p { margin: 0; color: var(--muted); }
.card .eyebrow { margin-bottom: 10px; }

/* ---------- Stats / count-up ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 28px 24px;
}
.stat-num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.4vw, 3rem);
  color: var(--accent);
  line-height: 1;
  display: block;
}
.stat-label { color: var(--muted); margin: 10px 0 0; font-size: 0.96rem; }

/* ---------- Accordion / FAQ ---------- */
.accordion { border-top: 1px solid var(--border); max-width: 820px; }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-trigger {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.18rem;
  color: var(--ink);
  padding: 22px 44px 22px 0;
  position: relative;
  cursor: pointer;
}
.acc-trigger::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform .25s ease;
}
.acc-trigger[aria-expanded="true"]::after { content: "–"; }
.acc-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}
.acc-panel-inner { padding: 0 0 22px; color: var(--muted); max-width: 70ch; }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.tab-btn {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: all .18s ease;
}
.tab-btn:hover { border-color: var(--accent); color: var(--accent); }
.tab-btn[aria-selected="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-panel[hidden] { display: none; }

/* ---------- Data table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.data-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.data-table th, .data-table td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--border); }
.data-table th { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td strong { color: var(--accent); }

/* ---------- Timeline ---------- */
.timeline { border-left: 2px solid var(--border); margin: 0; padding: 0 0 0 26px; display: grid; gap: 28px; }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -33px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg);
}
.tl-year { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; color: var(--accent); }
.tl-item h3 { font-family: var(--serif); font-weight: 500; margin: 6px 0 6px; font-size: 1.25rem; }
.tl-item p { margin: 0; color: var(--muted); }

/* ---------- Filter chips + lists ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 15px; border-radius: 999px; border: 1px solid var(--border); background: #fff;
  color: var(--muted); cursor: pointer; transition: all .16s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.post-list { display: grid; gap: 18px; }
.post {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 22px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 22px 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--bloom); }
.post-meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.post h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; margin: 4px 0 4px; }
.post p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.post[hidden] { display: none; }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 34px; }
.pager button {
  font-family: var(--mono); font-size: 13px; min-width: 42px; height: 42px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--ink); cursor: pointer;
  transition: all .16s ease;
}
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pager button[aria-current="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form { max-width: 640px; display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,93,67,.12); }
.form-note { font-size: 0.86rem; color: var(--muted); }
.form-status { font-family: var(--mono); font-size: 13px; color: var(--accent); min-height: 18px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--accent-deep); color: #fff; border-radius: calc(var(--radius) + 6px);
  padding: clamp(34px, 6vw, 64px); text-align: center;
  background-image: radial-gradient(120% 120% at 50% -20%, rgba(201,214,185,.18), transparent 60%);
}
.cta-band h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0 0 14px; }
.cta-band h2 em { font-style: italic; color: var(--bloom); }
.cta-band p { color: rgba(255,255,255,.82); max-width: 52ch; margin: 0 auto 26px; }
.cta-band .btn-primary { background: #fff; color: var(--accent-deep); }
.cta-band .btn-primary:hover { background: var(--bloom-soft); }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.cta-band .btn-ghost:hover { border-color: #fff; color: #fff; }

/* ---------- Section helpers ---------- */
.narrow { max-width: 760px; }
.section-head { margin-bottom: 34px; }
.prose p { max-width: 68ch; color: var(--muted); }
.prose h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin: 32px 0 12px; color: var(--ink); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(247,246,241,.9); backdrop-filter: blur(8px);
  color: var(--ink); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .25s ease; z-index: 90;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Active nav state ---------- */
.nav a.active, .nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .form-row { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 10px; }
  .post .btn { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .card:hover, .post:hover { transform: none; }
  .acc-panel { transition: none; }
}
