/* RIA mockup v2 — matches live riauk.org design exactly + adds sub-pages */

/* ─── MOCK MARKERS ───────────────────────────────────────────────
   Any element with data-mock="..." is placeholder content awaiting
   real copy from RIA. Shows a dashed outline + corner "MOCK" tag.
   To hide all markers (e.g. when demoing): add class "hide-mock" to <body>.
   To find everything still mock: grep the codebase for  data-mock  */
[data-mock] {
  position: relative;
  outline: 1px dashed rgba(198, 80, 40, 0.5);
  outline-offset: 4px;
}
[data-mock]::after {
  content: 'MOCK';
  position: absolute;
  top: -7px;
  right: 0;
  background: #C65028;
  color: #fff;
  font-family: 'Quicksand', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  padding: 1px 6px;
  border-radius: 2px;
  z-index: 60;
  pointer-events: none;
}
[data-mock][data-mock-label]::after { content: attr(data-mock-label); }
body.hide-mock [data-mock] { outline: none; }
body.hide-mock [data-mock]::after { display: none; }

:root {
  --bg: #F2EFE8;
  --ink: #1A1814;
  --mute: #7A7670;
  --hairline: rgba(26,24,20,0.12);
  --serif: 'Quicksand', system-ui, sans-serif;
  --display: 'Quicksand', system-ui, sans-serif;  /* hero headlines — matches logo wordmark */
  --sans: 'Quicksand', system-ui, sans-serif;
}

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

html, body {
  min-height: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Home (canvas backdrop + scrollable content) */
body.home {
  cursor: crosshair;
}
/* Home hero takes full viewport, then content below */
body.home main {
  display: block;
}
body.home .hero {
  min-height: calc(100vh - 7rem - 5rem); /* viewport minus header & footer */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* keep .hero at 880 max-width, centred in viewport → textZone is centred too,
     canvas particles form a ring around the text on both sides (matches live) */
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
/* Sections transparent — let canvas show through naturally */
.section { background: transparent; position: relative; z-index: 2; }
footer { background: transparent; }

/* Home sections tighter than default sub-page sections */
body.home .section { padding: 4rem 2rem; }
body.home .section-header { margin-bottom: 2.5rem; }
body.home .grid { gap: 1.5rem; }
body.home .article-row { padding: 1.5rem 0; }
body.home .article-excerpt { display: none; } /* hide excerpts on home, full text on /journal /news */

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.home { cursor: crosshair; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ─── BACKGROUND CANVAS ─── (only on index) */
#field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
body.canvas-faded #field { opacity: 0; pointer-events: none; }
body.canvas-faded { cursor: default; }

/* ─── HEADER ─── */
header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 2.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  max-width: 100%;
  background: transparent;
}

.wordmark {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  line-height: 1;
  text-align: left;
}
.wordmark-mark {
  height: 40px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.wordmark-letters {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}

.wordmark-sub {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--mute);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--mute);
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}
.topnav a {
  color: var(--mute);
  transition: color 0.25s ease;
}
.topnav a:hover,
.topnav a:focus-visible,
.topnav a.active { color: var(--ink); }
.topnav a:focus-visible { outline: 1px dotted var(--ink); outline-offset: 3px; }

/* Home page-reveal sequence:
   1. Canvas plays alone for ~1.8s (only canvas visible)
   2. Hero + header + footer fade in together (1.4s)
   3. Lower sections wait offscreen and reveal individually as user scrolls in */
body.home > header,
body.home > footer,
body.home > .corner,
body.home > main > .hero {
  opacity: 0;
  animation: page-reveal 1.4s 1.8s ease-out forwards;
}
@keyframes page-reveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Below-hero sections hidden until they scroll into view */
body.home > main > section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
body.home > main > section.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ─── MAIN ─── */
main {
  flex: 1;
  position: relative;
  z-index: 1;
}
/* (removed duplicate body.home main flex centering — superseded by display:block above) */

/* ─── HERO (index single-screen) ─── */
.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
  max-width: 880px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 2.5rem;
}

.eyebrow span {
  display: inline-block;
  padding: 0 1rem;
  position: relative;
}
.eyebrow span::before, .eyebrow span::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 2.5rem;
  height: 1px;
  background: var(--hairline);
}
.eyebrow span::before { right: 100%; }
.eyebrow span::after { left: 100%; }

.headline {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.headline .setup {
  display: block;
  font-weight: 300;
  color: var(--mute);
  margin-bottom: 0.1em;
}
.headline .key {
  display: block;
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}

.subhead {
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--mute);
  margin-top: 2.5rem;
  max-width: 24rem;
  margin-left: auto;
  margin-right: auto;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── FOOTER ─── */
footer {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.5rem 2.5rem;
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--mute);
  text-align: center;
}
footer a { transition: color 0.25s ease; }
footer a:hover, footer a:focus-visible { color: var(--ink); }
footer a:focus-visible { outline: 1px dotted var(--ink); outline-offset: 3px; }
.footer-legal {
  font-size: 0.62rem;
  line-height: 1.6;
  color: var(--mute);
  opacity: 0.8;
  max-width: 46rem;
  margin: 0.3rem auto;
}

/* ─── DECORATIVE CORNERS ─── */
.corner {
  position: fixed;
  width: 14px;
  height: 14px;
  border-color: var(--hairline);
  z-index: 5;
  pointer-events: none;
}
.corner.tl { top: 1rem; left: 1rem; border-top: 1px solid; border-left: 1px solid; border-color: var(--hairline); }
.corner.tr { top: 1rem; right: 1rem; border-top: 1px solid; border-right: 1px solid; border-color: var(--hairline); }
.corner.bl { bottom: 1rem; left: 1rem; border-bottom: 1px solid; border-left: 1px solid; border-color: var(--hairline); }
.corner.br { bottom: 1rem; right: 1rem; border-bottom: 1px solid; border-right: 1px solid; border-color: var(--hairline); }

/* ─── SUB-PAGE STYLES ─── */

/* Sub-page hero (smaller than index, allows scroll below) */
.page-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 2rem 5rem;
  max-width: 880px;
  margin: 0 auto;
}
.page-hero .eyebrow { margin-bottom: 1.75rem; }
.page-hero .headline {
  font-size: clamp(2rem, 4vw, 3.6rem);
}
.page-hero .subhead {
  margin-top: 1.5rem;
  max-width: 32rem;
}

/* Section blocks for sub-pages */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: 1120px;
  margin: 0 auto;
}
.section.bordered { border-top: 1px solid var(--hairline); }
.section-eyebrow {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1.5rem;
  display: block;
}
.section h2 {
  font-family: var(--sans);
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1.5rem;
  max-width: 28ch;
}
.section h2 .key {
  font-style: normal;
  font-weight: 500;
}
.section h3 {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin-bottom: 0.5rem;
}
.section h3 .key { font-style: normal; font-weight: 500; }
.section p {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.75;
  max-width: 60ch;
  margin-bottom: 1rem;
  font-weight: 400;
}
.section p.lead {
  font-size: 1.05rem;
  color: var(--ink);
}
.section p.muted { color: var(--mute); }
.section .center { text-align: center; margin-left: auto; margin-right: auto; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { max-width: none; margin-left: auto; margin-right: auto; }
.section-header p { margin-left: auto; margin-right: auto; text-align: center; }

/* Exhibition page: let Fees body copy and FAQ answers fill the container width.
   Scoped to body.exhibition so other pages keep their narrow reading measure. */
body.exhibition .section > p { max-width: none; }
body.exhibition .faq-a { max-width: none; }

/* Grid */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 1.5rem; }
  .page-hero { padding: 2.5rem 1.5rem 3.5rem; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Cards */
.card {
  padding: 2rem 1.75rem;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.card:hover {
  border-color: var(--mute);
  background: rgba(255, 255, 255, 0.5);
}
.card-eyebrow {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1rem;
}
.card h3 {
  margin-bottom: 0.75rem;
}
.card p {
  font-size: 0.82rem;
  color: var(--mute);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.card-link {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  align-self: flex-start;
  text-transform: uppercase;
}

/* Person card */
.person { display: flex; flex-direction: column; }
.person-portrait {
  aspect-ratio: 1;
  background: rgba(26, 24, 20, 0.04);
  border: 1px solid var(--hairline);
  margin-bottom: 1.25rem;
  position: relative;
}
.person-portrait::after {
  content: 'PORTRAIT';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.55rem;
  color: var(--mute);
  letter-spacing: 0.18em;
  opacity: 0.35;
  font-family: var(--sans);
  font-weight: 500;
}
.person-portrait { overflow: hidden; }
.person-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 2;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}
.person-portrait:hover img { filter: grayscale(0%); }
.person-portrait:has(img)::after { display: none; }

/* Feature image (home Currently / Exhibition) */
.feature-image {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(26, 24, 20, 0.04);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 900px) {
  .feature-layout { grid-template-columns: 1fr; gap: 2rem; }
}
.person h3 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.person h3 .key { font-style: normal; font-weight: 500; }
.person .en {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--mute);
  margin-bottom: 1rem;
  font-style: normal;
}
.person ul {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--ink);
}
.person ul li { padding: 1px 0; }
.person .role { font-weight: 600; color: var(--ink); }
.person .location {
  font-family: var(--sans);
  font-size: 0.6rem;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}

/* CTA button */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.85rem 2rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.ghost { border-color: var(--mute); color: var(--mute); }
.btn.ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* Dates */
.dates { border-top: 1px solid var(--hairline); }
.date-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}
.date-row .label { font-family: var(--sans); font-size: 0.85rem; color: var(--mute); }
.date-row .value { font-family: var(--sans); font-size: 1.1rem; font-weight: 400; }
.date-row .value a { color: var(--ink); border-bottom: 1px solid transparent; }
.date-row .value a:hover { border-bottom-color: var(--ink); }

/* Tier grid (Awards) */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-top: 2rem;
}
.tier {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--hairline);
  text-align: center;
}
.tier:last-child { border-right: none; }
.tier .tier-label {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.tier .tier-date {
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}
.tier .tier-fee {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink);
}
@media (max-width: 700px) {
  .tier-grid { grid-template-columns: 1fr; }
  .tier { border-right: none; border-bottom: 1px solid var(--hairline); }
  .tier:last-child { border-bottom: none; }
}

/* FAQ */
.faq-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--hairline);
}
.faq-item:first-child { border-top: 1px solid var(--hairline); }
.faq-q {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.6rem;
  letter-spacing: -0.005em;
}
.faq-q .key { font-style: normal; font-weight: 500; }
.faq-a {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--mute);
  line-height: 1.75;
  max-width: 70ch;
}

/* Article list */
.article-list { display: flex; flex-direction: column; }
.article-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
  min-width: 0;
}
.article-row > div { min-width: 0; }
.article-row:first-child { border-top: 1px solid var(--hairline); }
.article-meta {
  font-family: var(--sans);
  font-size: 0.6rem;
  color: var(--mute);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
}
.article-title {
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}
.article-title .key { font-style: normal; font-weight: 500; }
.article-excerpt {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--mute);
  line-height: 1.75;
  max-width: 64ch;
}
.article-link {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  display: inline-block;
  margin-top: 1rem;
  text-transform: uppercase;
}
@media (max-width: 700px) {
  .article-row { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* Bullet list */
.bullet-list {
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 2;
  color: var(--ink);
}
.bullet-list li::before {
  content: '·';
  display: inline-block;
  width: 1.5em;
  color: var(--mute);
}

/* Steps (numbered) */
.steps { counter-reset: step-counter; display: flex; flex-direction: column; gap: 2rem; }
.step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  align-items: baseline;
}
.step::before {
  counter-increment: step-counter;
  content: counter(step-counter, decimal-leading-zero);
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 300;
  color: var(--mute);
  letter-spacing: -0.01em;
}
.step h3 { margin-bottom: 0.4rem; }
.step p { margin-bottom: 0; font-size: 0.88rem; color: var(--mute); }

/* Form */
.form { display: flex; flex-direction: column; gap: 1.4rem; max-width: 28rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-family: var(--sans);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute);
  font-weight: 500;
}
.field input,
.field textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--mute);
  padding: 0.5rem 0;
  outline: none;
  width: 100%;
}
.field input:focus,
.field textarea:focus { border-bottom-color: var(--ink); }
.field textarea { resize: vertical; min-height: 7.5rem; }

/* Utility */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-32 { margin-top: 2rem; }
.mt-48 { margin-top: 3rem; }
.mt-64 { margin-top: 4rem; }

/* Sub-page footer (single line in centred footer) */
body:not(.hero-only) footer {
  padding: 3rem 2.5rem 2rem;
  border-top: 1px solid var(--hairline);
  margin-top: 3rem;
}

@media (max-width: 720px) {
  header { padding: 1.25rem; flex-wrap: wrap; gap: 1rem; }
  footer { padding: 1.25rem; }
  .topnav { gap: 1rem; font-size: 0.7rem; justify-content: flex-start; }
  .wordmark-letters { font-size: 1.3rem; }
  .wordmark-sub { font-size: 0.7rem; }
  .headline { font-size: clamp(2rem, 9vw, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
  body { cursor: default; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .wordmark, .topnav, .corner, .eyebrow,
  .headline .setup, .headline .key, .subhead, footer {
    opacity: 1;
    transform: none;
  }
}
