/* ==========================================================================
   2026 Basel Art Week — Taiwan
   Shared stylesheet · museum-minimal · serif editorial
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Noto+Serif+TC:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: oklch(0.97 0.005 70);
  --bg-soft: oklch(0.94 0.008 70);
  --ink: oklch(0.18 0.01 60);
  --ink-soft: oklch(0.38 0.01 60);
  --ink-muted: oklch(0.55 0.008 60);
  --rule: oklch(0.85 0.008 60);
  --rule-soft: oklch(0.9 0.006 60);
  --accent: oklch(0.52 0.17 28);
  --accent-deep: oklch(0.42 0.15 28);

  --serif-en: 'Cormorant Garamond', 'Times New Roman', serif;
  --serif-zh: 'Noto Serif TC', 'Songti TC', serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --col-max: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif-zh);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

/* Typography ----------------------------------------------------------------*/
.en { font-family: var(--serif-en); font-feature-settings: "liga", "kern"; }
.zh { font-family: var(--serif-zh); }
.mono { font-family: var(--mono); font-size: 0.78em; letter-spacing: 0.04em; text-transform: uppercase; }

h1, h2, h3, h4 { font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  width: 100%;
}

a { color: inherit; text-decoration: none; }

/* Layout primitives --------------------------------------------------------*/
.wrap {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.col-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* Top bar (inner pages) ----------------------------------------------------*/
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  gap: 24px;
}
.topbar .brand {
  font-family: var(--serif-en);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.topbar .brand .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  transform: translateY(-1px);
}
.topbar nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.topbar nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 3px;
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a.active { color: var(--ink); }
.topbar nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--accent);
}

@media (max-width: 720px) {
  .topbar nav { display: none; }
  .topbar nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    padding: 24px var(--gutter);
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    gap: 18px;
  }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
  }
  .nav-toggle span {
    width: 22px; height: 1px; background: var(--ink);
  }
}
.nav-toggle { display: none; background: none; border: 0; }

/* Buttons ------------------------------------------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '→';
  font-family: var(--serif-en);
  font-size: 14px;
  letter-spacing: 0;
  transform: translateX(0);
  transition: transform 0.25s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:hover::after { transform: translateX(4px); }

.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-ghost {
  border-color: var(--rule);
  color: var(--ink-soft);
}

/* Placeholder image --------------------------------------------------------*/
.ph {
  position: relative;
  background-color: var(--bg-soft);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0 14px,
      color-mix(in oklch, var(--ink) 4%, transparent) 14px 15px
    );
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ph::before {
  content: attr(data-label);
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px;
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  border-top: 1px solid var(--rule);
}
.ph[data-ratio="4-5"] { aspect-ratio: 4 / 5; }
.ph[data-ratio="3-4"] { aspect-ratio: 3 / 4; }
.ph[data-ratio="4-3"] { aspect-ratio: 4 / 3; }
.ph[data-ratio="1-1"] { aspect-ratio: 1 / 1; }
.ph[data-ratio="16-9"] { aspect-ratio: 16 / 9; }
.ph[data-ratio="3-2"] { aspect-ratio: 3 / 2; }
.ph[data-ratio="2-3"] { aspect-ratio: 2 / 3; }

/* Reveal animations --------------------------------------------------------*/
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--rev-delay, 0s);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* Footer -------------------------------------------------------------------*/
.footer {
  margin-top: 60px;
  padding: 48px var(--gutter) 36px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.footer .col h5 {
  font-family: var(--serif-en);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer .col p, .footer .col a { color: var(--ink-muted); display: block; line-height: 1.9; }
.footer .col a:hover { color: var(--ink); }
.footer .footer-copy {
  grid-column: 1 / -1;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.footer .footer-copy a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.footer .footer-copy a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer .footer-copy .right { font-style: italic; font-family: var(--serif-en); text-transform: none; letter-spacing: 0; font-size: 12px; }
@media (max-width: 720px) {
  .footer .footer-copy { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .footer { grid-template-columns: 1fr; gap: 28px; }
  .footer { margin-top: 80px; }
}

/* Section heading pattern --------------------------------------------------*/
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 56px;
}
.section-head .idx {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}
.section-head h2 {
  font-family: var(--serif-en);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
}

/* Form ---------------------------------------------------------------------*/
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  font-family: var(--serif-zh);
  font-size: 16px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--accent);
}
.field .hint {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: none;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.radio-row {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  cursor: pointer;
  align-items: flex-start;
  transition: border-color 0.2s, background 0.2s;
}
.radio-row:hover { border-color: var(--ink-soft); }
.radio-row input { margin-top: 5px; accent-color: var(--accent); }
.radio-row .label-zh { font-family: var(--serif-zh); font-size: 16px; }
.radio-row .label-en { font-family: var(--serif-en); font-style: italic; font-size: 14px; color: var(--ink-muted); }
.radio-row .meta { font-family: var(--mono); font-size: 10px; color: var(--ink-muted); margin-top: 4px; letter-spacing: 0.1em; text-transform: uppercase; }
.radio-row input:checked ~ .radio-body { color: var(--accent); }
.radio-row:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent) 4%, transparent);
}

/* Util ---------------------------------------------------------------------*/
.divider-thin { height: 1px; background: var(--rule); margin: 24px 0; }
.text-muted { color: var(--ink-muted); }
.text-accent { color: var(--accent); }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; letter-spacing: 0.16em; }
.center { text-align: center; }

.tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tag-accent { border-color: var(--accent); color: var(--accent); }
