/* The Credence par Mwesigwa — site styles
   Layout: full-bleed bands (navy / gold / ivory / sand) with centred content wrappers.
   The brand commits to one look, so there is no separate dark theme. */

:root {
  --navy: #17223B;
  --navy-deep: #0F1729;
  --navy-line: #2E3A57;
  --gold: #C9A961;       /* gold on navy */
  --gold-deep: #9A7535;  /* gold on light, large text and ornament */
  --gold-ink: #7D5E28;   /* gold on light, small text */
  --ivory: #F7F2E7;
  --paper: #FFFDF8;
  --sand: #EFE6D2;
  --rule: #D9CFBA;
  --mist: #D6D2C6;       /* soft text on navy */
  --ink: #17223B;
  --ink-soft: #3B465E;
  --danger: #8E2B21;

  --f-display: "Cormorant Garamond", "Noto Serif Thai", Georgia, serif;
  --f-label: "Cinzel", "Noto Serif Thai", Georgia, serif;
  --f-body: "Source Serif 4", "Noto Serif Thai", Georgia, serif;

  --gutter-l: max(clamp(16px, 4vw, 48px), env(safe-area-inset-left, 0px));
  --gutter-r: max(clamp(16px, 4vw, 48px), env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}
:lang(th) body, body:lang(th) { line-height: 1.85; }
img { max-width: 100%; display: block; }
a { color: var(--gold); }
a:hover { color: var(--ivory); }
.light a { color: var(--ink); }
.light a:hover { color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.light :focus-visible { outline-color: var(--gold-ink); }
h1, h2, h3 { text-wrap: balance; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--gold); color: var(--navy); padding: 10px 16px;
  font-family: var(--f-label); font-size: 12px; font-weight: 600; letter-spacing: .2em;
}
.skip:focus { top: 16px; color: var(--navy); }

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.wrap-narrow { max-width: 820px; }

/* Labels: Cinzel capitals with tracking */
.label {
  margin: 0;
  font-family: var(--f-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  line-height: 1.5;
}
:lang(th) .label { letter-spacing: .04em; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav lang";
  align-items: center;
  gap: 8px 28px;
  padding-block: 14px;
  border-bottom: 1px solid var(--navy-line);
}
.brand {
  grid-area: brand;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px;
  font-family: var(--f-label); font-size: 13px; font-weight: 600; letter-spacing: .32em;
  color: var(--ivory); text-decoration: none;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.brand:hover { color: var(--gold); }
.nav {
  grid-area: nav;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 24px;
}
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--f-label); font-size: 12px; font-weight: 600; letter-spacing: .24em;
  color: var(--ivory); text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
:lang(th) .nav a { letter-spacing: .02em; font-size: 14px; }

.lang-switch { grid-area: lang; display: flex; gap: 4px; }
.lang-switch button {
  min-width: 44px; height: 44px; padding: 0 8px;
  border: 1px solid var(--navy-line); background: transparent; color: var(--mist);
  font-family: var(--f-label); font-size: 12px; font-weight: 600; letter-spacing: .08em;
  cursor: pointer;
}
.lang-switch button[lang="th"] { font-family: "Noto Serif Thai", var(--f-label); font-size: 14px; letter-spacing: 0; }
.lang-switch button:hover { border-color: var(--gold); color: var(--ivory); }
.lang-switch button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--navy); }

@media (max-width: 860px) {
  .site-header { grid-template-columns: 1fr auto; grid-template-areas: "brand lang" "nav nav"; }
  .nav { justify-content: flex-start; gap: 0 18px; }
  .nav a { letter-spacing: .16em; }
}
@media (max-width: 420px) {
  .brand-word { display: none; }
}

/* ---------- Seal ---------- */
.seal { display: block; }
.seal .ring-text { transform-origin: 200px 200px; animation: cpmSpin 90s linear infinite; }
@keyframes cpmSpin { to { transform: rotate(360deg); } }

/* ---------- Buttons and inline forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px;
  border: 1px solid var(--gold); background: var(--gold); color: var(--navy);
  font-family: var(--f-label); font-size: 12px; font-weight: 600; letter-spacing: .24em;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ivory); border-color: var(--ivory); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-ghost:hover { background: transparent; color: var(--ivory); border-color: var(--ivory); }
:lang(th) .btn { letter-spacing: .02em; font-size: 15px; }
.btn[disabled] { opacity: .6; cursor: progress; }

.subscribe { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.subscribe input {
  flex: 1 1 220px; min-width: 0; height: 52px; padding: 0 16px;
  border: 1px solid var(--gold); background: transparent; color: var(--ivory);
  font-family: var(--f-body); font-size: 16px;
}
.subscribe input::placeholder { color: #A7AAB3; }
.form-msg { flex-basis: 100%; margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--mist); min-height: 0; }
.form-msg:empty { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--navy-line); }
/* The current letter's cover, faint and distant behind the hero */
.hero-bg {
  position: absolute; inset: -16px -16px -16px 30%; z-index: -1;
  background-size: cover; background-position: 68% 50%; background-repeat: no-repeat;
  opacity: 0; transition: opacity .9s ease;
  filter: blur(2px) saturate(.85);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 22%, #000 48%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 22%, #000 48%);
}
.hero-bg.on { opacity: .3; }
@media (max-width: 1100px) {
  .hero-bg {
    inset: -16px;
    background-position: 76% 50%;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .35) 45%, #000 80%);
            mask-image: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .35) 45%, #000 80%);
  }
}
.hero-text {
  flex: 1 1 560px; min-width: 0;
  padding-block: 56px 72px;
  padding-left: max(clamp(16px, 5vw, 72px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 56px), env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; justify-content: center;
}
.hero .seal { width: clamp(132px, 14vw, 176px); height: auto; aspect-ratio: 1; }
.salute {
  margin: 28px 0 0;
  font-family: var(--f-display); font-style: italic; font-weight: 600;
  font-size: clamp(58px, 7.4vw, 108px); line-height: 1; color: var(--gold);
}
:lang(th) .salute { font-style: normal; font-size: clamp(40px, 5.4vw, 76px); line-height: 1.3; }
.tagline {
  margin: 18px 0 0; max-width: 22ch;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(26px, 3vw, 40px); line-height: 1.2;
}
:lang(th) .tagline { font-size: clamp(21px, 2.3vw, 30px); line-height: 1.55; max-width: 26ch; }
.motto { margin-top: 16px; color: var(--mist); }
.hero .subscribe { margin-top: 32px; }

.rise { animation: cpmRise .9s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .2s; } .d3 { animation-delay: .35s; } .d4 { animation-delay: .5s; } .d5 { animation-delay: .65s; }
@keyframes cpmRise { from { opacity: .35; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Cover (right half of hero) */
.cover {
  flex: 1 1 520px; min-width: 0;
  min-height: clamp(380px, 52vw, 720px);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background-color: var(--navy-deep);
  border-left: 1px solid var(--navy-line);
  color: var(--ivory); text-decoration: none;
}
.cover:hover { color: var(--ivory); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-plain {
  flex: 1; position: relative;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: 48px clamp(24px, 5vw, 64px) 120px;
  background-image:
    repeating-radial-gradient(circle at 78% 34%, transparent 0 26px, rgba(201, 169, 97, .09) 26px 27px),
    radial-gradient(circle at 78% 34%, rgba(201, 169, 97, .10), transparent 60%);
}
.cover-plain .cover-seal {
  position: absolute; right: -60px; top: -40px; width: 340px; height: 340px; opacity: .14;
}
.cover-title {
  margin: 0; max-width: 16ch;
  font-family: var(--f-display); font-style: italic; font-weight: 600;
  font-size: clamp(38px, 4.6vw, 64px); line-height: 1.02;
}
:lang(th) .cover-title { font-style: normal; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.4; }
.cover-meta { margin: 0; color: var(--mist); font-size: 16px; }
.cover-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px;
  padding: 18px clamp(20px, 3vw, 28px);
  background: var(--navy);
}
.cover-credit { font-size: 13px; color: var(--mist); }
.cover:hover .cover-cta { color: var(--gold); }
.cover.has-image { background-color: transparent; border-left-color: rgba(46, 58, 87, .6); }
.cover.has-image .cover-plain { background-image: radial-gradient(ellipse at 40% 50%, rgba(15, 23, 41, .55), transparent 70%); }
.cover.has-image .cover-title, .cover.has-image .cover-meta { text-shadow: 0 2px 18px rgba(15, 23, 41, .85); }
.cover.has-image .cover-foot { background: rgba(23, 34, 59, .9); }
.letter-cover img { object-position: 60% 45%; }

/* ---------- Ticker ---------- */
.ticker-band { background: var(--gold); color: var(--navy); overflow: hidden; padding-block: 16px; }
.ticker {
  display: flex; width: max-content;
  font-family: var(--f-label); font-size: 14px; font-weight: 600; letter-spacing: .32em; white-space: nowrap;
  animation: cpmTicker 50s linear infinite;
}
.ticker span { padding-right: 40px; }
@keyframes cpmTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Bands ---------- */
.band-ivory { background: var(--ivory); color: var(--ink); }
.band-sand { background: var(--sand); color: var(--ink); border-top: 1px solid var(--rule); }
.band-deep { background: var(--navy-deep); color: var(--ivory); }
.band-navy { background: var(--navy); color: var(--ivory); }
.band-ivory .label, .band-sand .label { color: var(--ink); }
.section { padding-block: clamp(64px, 9vw, 96px); }

.h2 {
  margin: 14px 0 0;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(38px, 4.6vw, 58px); line-height: 1.04;
}
:lang(th) .h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.4; }
.lede { margin: 18px 0 0; font-size: 19px; line-height: 1.65; max-width: 60ch; }
.band-ivory .lede, .band-sand .lede { color: var(--ink-soft); }
.band-deep .lede, .band-navy .lede { color: var(--mist); }

.textlink {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--f-label); font-size: 13px; font-weight: 600; letter-spacing: .2em;
  text-decoration: none; border-bottom: 1px solid currentColor;
}
.light .textlink { border-bottom-color: var(--gold-deep); }
:lang(th) .textlink { letter-spacing: .02em; font-size: 15px; }

.pulse-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-deep); margin-right: 10px; vertical-align: 1px; animation: cpmPulse 2.4s ease-in-out infinite; }
@keyframes cpmPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: .4; } }

/* ---------- This week's letter ---------- */
.teaser { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(36px, 5vw, 64px); }
.teaser-copy { flex: 1 1 340px; min-width: 0; }
.paper {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 40px rgba(23, 34, 59, .10);
  padding: clamp(28px, 4vw, 48px);
}
.teaser .paper { flex: 1 1 420px; min-width: 0; }
.paper-salute { margin: 22px 0 0; font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 34px; color: var(--gold-deep); }
:lang(th) .paper-salute { font-style: normal; font-size: 26px; }
.paper p.body { margin: 12px 0 0; font-size: 18px; line-height: 1.7; }
.paper-sign { margin: 26px 0 0; font-family: var(--f-display); font-style: italic; font-size: 22px; color: var(--ink-soft); }

.read-in { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.read-in .label { margin-right: 4px; color: var(--ink-soft); font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 19px; letter-spacing: 0; }
:lang(th) .read-in .label { font-style: normal; font-size: 16px; }
.read-in button {
  min-height: 44px; padding: 0 2px; border: 0; background: none; cursor: pointer;
  font-family: var(--f-body); font-size: 17px; color: var(--ink);
  border-bottom: 1px solid transparent;
}
.read-in button[lang="th"] { font-family: "Noto Serif Thai", var(--f-body); }
.read-in button:hover { border-bottom-color: var(--gold-deep); }
.read-in button[aria-pressed="true"] { font-weight: 600; border-bottom-color: var(--gold-deep); }

/* ---------- Map ---------- */
.map { text-align: center; }
.map-art { position: relative; margin: 32px 0 0; }
.map svg.world { display: block; width: 100%; height: auto; }
.world .sea-bg { fill: var(--sand); }
.world .land { fill: #DCCDAE; }
.world .borders { fill: none; stroke: #C7B691; stroke-width: .6; }
.world .region { fill: var(--navy); }
.world .region-nile { fill: #56668A; stroke: var(--gold); stroke-opacity: .5; stroke-width: .7; }
.world .nile-borders { stroke: #F7F2E7; stroke-opacity: .55; stroke-width: .8; }
.world .region-borders { fill: none; stroke: var(--gold); stroke-opacity: .55; stroke-width: .7; }
.world .lake { fill: #4A86C5; }
.world .river { fill: none; stroke: #3E7CB8; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.world .river-minor { stroke-width: 1.3; }
.world .route { fill: none; stroke: var(--gold-deep); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.world .equator { stroke: #A99D82; stroke-width: 1; stroke-dasharray: 3 6; }
.world .cap { fill: var(--gold); stroke: var(--navy); stroke-width: .8; }
.world .node { fill: var(--gold); stroke: var(--navy); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: cpmPulse 2.4s ease-in-out infinite; }
.map.animate .route { animation: cpmDraw 3.2s ease-in-out .2s both; }
@keyframes cpmDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.map-tag { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; line-height: 1.2; pointer-events: none; }
.t-region { font-family: var(--f-label); font-weight: 600; font-size: clamp(9px, 1.25vw, 14px); letter-spacing: .2em; color: var(--ink); }
.t-river { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: clamp(12px, 1.7vw, 19px); color: #2F6399; text-shadow: 0 0 3px var(--sand), 0 0 6px var(--sand); }
.t-ocean { font-family: var(--f-display); font-style: italic; font-size: clamp(10px, 1.4vw, 16px); letter-spacing: .18em; color: #6B6553; }
.t-country { font-family: var(--f-label); font-weight: 600; font-size: clamp(7px, .8vw, 10px); letter-spacing: .08em; color: #F7F2E7; }
.t-eq { transform: translate(0, -130%); font-family: var(--f-label); font-size: clamp(8px, .9vw, 10px); font-weight: 600; letter-spacing: .22em; color: #6B6553; }
:lang(th) .t-region, :lang(th) .t-eq, :lang(th) .t-ocean, :lang(th) .t-country { letter-spacing: 0; }
@media (max-width: 560px) { .t-country { display: none; } }
.t-river.on-shade { color: #E3ECF7; text-shadow: 0 1px 3px rgba(23, 34, 59, .7); }
:lang(th) .t-river, :lang(th) .t-ocean { font-style: normal; }

.region-lists {
  margin: 28px auto 0; max-width: 1080px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px 40px;
  text-align: left;
}
.region-lists > div { min-width: 0; border-top: 1px solid var(--rule); padding-top: 14px; }
.region-lists .label { font-size: 12px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.swatch { flex: none; width: 12px; height: 12px; background: var(--navy); }
.swatch-nile { background: #56668A; }
.region-lists p { margin: 8px 0 0; font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.map-caption { margin: 32px auto 0; max-width: 600px; font-size: 18px; color: var(--ink-soft); }

/* ---------- Exchange of Notes ---------- */
.exchange { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(40px, 6vw, 80px); }
.exchange-copy { flex: 1 1 420px; min-width: 0; }
.exchange .label { color: var(--gold); }
.exchange-title { margin: 14px 0 0; font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: clamp(44px, 6vw, 84px); line-height: 1; color: var(--ivory); }
:lang(th) .exchange-title { font-style: normal; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.35; }
.steps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: baseline; }
.numeral { font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 34px; line-height: 1; color: var(--gold); }
.steps h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 26px; line-height: 1.2; }
:lang(th) .steps h3 { font-size: 21px; line-height: 1.5; }
.steps p { margin: 4px 0 0; font-size: 17px; line-height: 1.6; color: var(--mist); }
.light .steps p { color: var(--ink-soft); }
.light .numeral { color: var(--gold-deep); }
.cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

/* The two notes, exchanged */
.notes { flex: 1 1 380px; min-width: 0; max-width: 520px; position: relative; aspect-ratio: 5 / 4.4; margin-inline: auto; }
.note {
  position: absolute; width: 68%; aspect-ratio: 3 / 3.6;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule);
  box-shadow: 0 22px 44px rgba(0, 0, 0, .32);
  padding: 7% 8%;
  display: flex; flex-direction: column; gap: 6px;
}
.note-a { left: 0; top: 4%; transform: rotate(-4deg); }
.note-b { right: 0; bottom: 0; transform: rotate(3deg); }
.note-head { font-family: var(--f-label); font-size: 13px; font-weight: 600; letter-spacing: .26em; }
.note-sub { font-family: var(--f-display); font-style: italic; font-size: 17px; color: var(--gold-ink); }
.note-lines {
  flex: 1; margin-top: 10px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 21px, var(--rule) 21px 22px);
}
.stamp {
  position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px;
  border-radius: 50%; border: 2px solid var(--gold-deep);
  background: rgba(255, 253, 248, .9);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: rotate(-12deg);
  font-family: var(--f-label); font-weight: 600; color: var(--gold-ink); text-align: center; line-height: 1;
  box-shadow: 0 0 0 5px rgba(255, 253, 248, .9), 0 0 0 6px var(--gold-deep);
}
.stamp b { font-size: 34px; display: block; margin-top: 4px; }
.stamp small { font-size: 11px; letter-spacing: .24em; }

/* ---------- Writer ---------- */
.founders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  justify-content: center;
  gap: 56px 64px;
}
.founders.solo { grid-template-columns: minmax(0, 680px); }
.writer { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; min-width: 0; }
.cofounder[hidden] { display: none; }
.writer img, .monogram {
  width: 180px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%;
  border: 1px solid var(--gold); padding: 6px; flex-shrink: 0;
}
.writer img { filter: grayscale(1) sepia(.2) contrast(1.05); }
.monogram {
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-deep); background-clip: content-box;
  font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 64px; color: var(--gold);
}
.writer-copy { flex: 1 1 260px; min-width: 0; }
.writer-copy .label { color: var(--gold); }
.writer-name { margin: 12px 0 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(34px, 3.6vw, 46px); line-height: 1.05; }
.writer-copy p.bio { margin: 12px 0 0; font-size: 18px; line-height: 1.65; color: var(--mist); max-width: 56ch; }

/* ---------- Subscribe band ---------- */
.sub-band { border-top: 1px solid var(--navy-line); }
.sub-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding-block: 64px; }
.sub-title { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(36px, 4vw, 52px); line-height: 1.05; }
:lang(th) .sub-title { font-size: clamp(28px, 3vw, 40px); line-height: 1.4; }
.sub-row .subscribe { flex: 0 1 520px; min-width: 0; }
.sub-note { margin: 8px 0 0; font-size: 17px; color: var(--mist); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--navy-line); font-size: 14px; color: var(--mist); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px; padding-block: 20px; }
.footer-row p { margin: 0; }
.footer-right { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.footer-dash { color: var(--gold); }
.footer-right a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); text-underline-offset: 3px; }
.footer-right a:hover { color: var(--ivory); }

/* ---------- Ethics page ---------- */
.ethics { max-width: 860px; margin-inline: auto; }
.ethics-title { margin: 0; font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: clamp(52px, 8vw, 96px); line-height: 1; color: var(--ink); }
:lang(th) .ethics-title { font-style: normal; font-size: clamp(38px, 5.4vw, 64px); line-height: 1.35; }
.ethics .lede { max-width: 58ch; }
.ethics .paper { margin-top: 36px; }
.ethics .paper .checklist li { color: var(--ink); }
.ethics-cols { margin-top: clamp(40px, 6vw, 64px); }
.ethics-cols .checklist strong { color: var(--ink); font-weight: 600; }
.ethics-contact { margin-top: clamp(40px, 6vw, 64px); padding-top: 28px; border-top: 1px solid var(--rule); }
.ethics-contact p { margin: 12px 0 0; font-size: 18px; line-height: 1.65; color: var(--ink-soft); max-width: 62ch; }
.ethics-close { margin: 32px 0 0; font-family: var(--f-display); font-style: italic; font-size: 24px; color: var(--gold-deep); }
:lang(th) .ethics-close { font-style: normal; font-size: 19px; }

/* ---------- Letter page ---------- */
.letter-page { background: var(--ivory); color: var(--ink); padding-block: clamp(40px, 7vw, 80px); }
.letter-paper { max-width: 760px; margin-inline: auto; padding: clamp(28px, 6vw, 72px); }
.letter-paper .label { color: var(--ink); }
.letter-title { margin: 18px 0 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(40px, 5.6vw, 64px); line-height: 1.02; }
:lang(th) .letter-title { font-size: clamp(30px, 4vw, 44px); line-height: 1.4; }
.letter-meta { margin: 14px 0 0; font-size: 16px; color: var(--ink-soft); }
.notice { margin: 22px 0 0; padding: 12px 16px; border: 1px solid var(--rule); background: var(--ivory); font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.letter-cover { margin: 28px 0 0; }
.letter-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.letter-cover figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.letter-body { margin-top: 30px; }
.letter-body .paper-salute { margin-top: 0; }
.letter-body p, .letter-body li { font-size: 19px; line-height: 1.75; }
:lang(th) .letter-body p, :lang(th) .letter-body li { font-size: 18px; line-height: 1.95; }
.letter-body p { margin: 16px 0 0; }
.letter-body h2 { margin: 40px 0 0; font-family: var(--f-display); font-weight: 600; font-size: 30px; line-height: 1.2; }
:lang(th) .letter-body h2 { font-size: 24px; line-height: 1.5; }
.letter-body ol { margin: 14px 0 0; padding-left: 1.4em; }
.letter-body li { margin-top: 6px; }
.letter-body li::marker { font-family: var(--f-display); font-weight: 600; color: var(--gold-deep); }
.letter-body a { color: var(--ink); text-decoration-color: var(--gold-deep); text-underline-offset: 3px; }
.closing { margin-top: 34px !important; font-style: italic; }
:lang(th) .closing { font-style: normal; }
.signature { margin-top: 26px !important; }
.signature strong { font-family: var(--f-display); font-size: 24px; font-weight: 600; }
.disclaimer { margin-top: 30px !important; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 15px !important; font-style: italic; color: var(--ink-soft); }
.sources { margin-top: 36px; }
.sources h2 { margin: 0; font-family: var(--f-label); font-size: 13px; font-weight: 600; letter-spacing: .3em; }
:lang(th) .sources h2 { letter-spacing: .04em; font-size: 15px; }
.sources ul { list-style: none; margin: 12px 0 0; padding: 0; }
.sources li { margin-top: 10px; padding-left: 2em; text-indent: -2em; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.sources a { color: var(--ink-soft); }
.letter-next { max-width: 760px; margin: 28px auto 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- Exchange page ---------- */
.ex-hero { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(40px, 6vw, 80px); padding-block: clamp(56px, 8vw, 96px); }
.ex-hero .exchange-title { font-size: clamp(52px, 8vw, 112px); }
:lang(th) .ex-hero .exchange-title { font-size: clamp(38px, 5.4vw, 68px); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(32px, 5vw, 64px); align-items: start; }
.two-col > * { min-width: 0; }
.prose p { margin: 16px 0 0; font-size: 19px; line-height: 1.7; color: var(--ink-soft); max-width: 62ch; }
.sdg-card { border: 1px solid var(--rule); background: var(--paper); padding: clamp(24px, 3vw, 36px); }
.sdg-card .sdg-num { font-family: var(--f-display); font-weight: 600; font-size: 72px; line-height: 1; color: var(--gold-deep); }
.sdg-card h3 { margin: 8px 0 0; font-family: var(--f-display); font-size: 28px; font-weight: 600; line-height: 1.2; }
:lang(th) .sdg-card h3 { font-size: 22px; line-height: 1.5; }
.sdg-card p { margin: 12px 0 0; font-size: 17px; line-height: 1.65; color: var(--ink-soft); }

.steps-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 32px; margin-top: 36px; }
.steps-wide li { grid-template-columns: 1fr; gap: 8px; border-top: 1px solid var(--rule); padding-top: 18px; }
.steps-wide .numeral { font-size: 44px; }

.themes { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.themes li {
  display: flex; align-items: center; gap: 14px; min-height: 64px;
  padding: 14px 18px; border: 1px solid var(--rule); background: var(--paper);
  font-family: var(--f-display); font-size: 22px; font-weight: 600; line-height: 1.25;
}
:lang(th) .themes li { font-size: 18px; line-height: 1.5; }
.themes li::before { content: ""; flex: none; width: 9px; height: 9px; background: var(--gold-deep); transform: rotate(45deg); }

.checklist { list-style: none; margin: 18px 0 0; padding: 0; }
.checklist li { position: relative; margin-top: 12px; padding-left: 26px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.checklist li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; background: var(--gold-deep); transform: rotate(45deg); }
.checklist strong { color: var(--ink); font-weight: 600; }
.about-cols { margin-top: clamp(36px, 5vw, 56px); }
.h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 32px; line-height: 1.15; }
:lang(th) .h3 { font-size: 25px; line-height: 1.5; }

/* Registration form */
.register { max-width: 860px; margin-inline: auto; }
.register .paper { margin-top: 32px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend {
  font-family: var(--f-label); font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--ink); padding: 0;
}
:lang(th) .field label, :lang(th) .field legend { letter-spacing: 0; font-size: 15px; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid #B9AE95; border-radius: 0; background: #fff; color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.5;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold-ink); outline-offset: 0; border-color: var(--gold-ink); }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
fieldset.field { border: 0; margin: 0; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.field label.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--f-body); font-size: 17px; font-weight: 400; letter-spacing: 0; color: var(--ink); cursor: pointer; }
.field label.check span[lang="th"] { font-family: "Noto Serif Thai", var(--f-body); }
.check input { width: 20px; height: 20px; accent-color: var(--navy); margin: 0; flex: none; }
.field label.consent { align-items: flex-start; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.consent input { margin-top: 3px; }
.hint { font-size: 14px; color: var(--ink-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.light .btn { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.light .btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: var(--paper); }
.status { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.status:empty { display: none; }
.status.ok { padding: 12px 16px; border: 1px solid var(--gold-deep); background: var(--ivory); }
.status.err { color: var(--danger); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .ticker, .seal .ring-text, .map .node, .pulse-dot { animation: none !important; }
  .map.animate .route { animation: none; }
}

/* ---------- Team page ---------- */
.team-head { max-width: 760px; }
.team-head .ethics-title { margin-top: 12px; }
.team-grid {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 48px 40px;
  align-items: start;
}
.member { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.member img {
  width: 100%; max-width: 280px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%;
  filter: grayscale(1) sepia(.2) contrast(1.05);
  border: 1px solid var(--gold-deep); padding: 6px; background: var(--paper);
}
.member-role { color: var(--gold-ink) !important; letter-spacing: .2em; min-height: 3em; }
@media (max-width: 700px) { .member-role { min-height: 0; } }
.member-name { margin: 8px 0 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 2.6vw, 34px); line-height: 1.1; color: var(--ink); }
.member-bio { margin: 12px 0 0; font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
:lang(th) .member-bio, .member-bio:lang(th) { font-size: 16px; line-height: 1.9; }
.team-note { margin: clamp(48px, 6vw, 72px) 0 0; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 15px; font-style: italic; color: var(--ink-soft); max-width: 70ch; }
:lang(th) .team-note { font-style: normal; }
.team-join { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.team-join p { margin: 0; font-family: var(--f-display); font-size: 24px; font-weight: 600; color: var(--ink); }
:lang(th) .team-join p { font-size: 20px; }
.founders-more { grid-column: 1 / -1; margin: 8px 0 0; text-align: center; }

/* ---------- Partnership-first front page ---------- */
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.partner-panel .panel-stamp {
  left: auto; top: clamp(28px, 5vw, 56px); right: clamp(24px, 5vw, 64px); margin: 0;
  width: 96px; height: 96px; z-index: 2;
}
.partner-panel .panel-stamp b { font-size: 30px; }
.partner-panel .cover-title { max-width: 12ch; }
.partner-panel .cover-meta { max-width: 34ch; font-size: 18px; line-height: 1.5; }

/* Letters section */
.letters-head { padding-bottom: clamp(28px, 4vw, 44px); }
.teaser-title { margin-top: 14px; font-size: clamp(32px, 3.6vw, 46px); }
.teaser .subscribe { margin-top: 24px; }
.light .subscribe input { color: var(--ink); border-color: var(--gold-deep); background: var(--paper); }
.light .subscribe input::placeholder { color: #8A8578; }
.light .subscribe .btn { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.light .subscribe .btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.light .form-msg { color: var(--ink-soft); }

/* Take part band */
.take-copy { flex: 1 1 320px; min-width: 0; }
.take-actions { flex: 0 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.take-actions > .btn { align-self: flex-start; }
.take-actions .subscribe { max-width: none; }

/* About: aims and fundamentals */
.about-grid {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px 64px; align-items: start;
}
.about-grid > div { min-width: 0; }
.rule-title { position: relative; padding-bottom: 14px; }
.rule-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 2px; background: var(--gold-deep); transform-origin: left; }

.aim-list { list-style: none; margin: 24px 0 0; padding: 0 0 0 4px; position: relative; display: grid; gap: 22px; }
.aim-list::before { content: ""; position: absolute; left: 25px; top: 10px; bottom: 10px; width: 1px; background: var(--gold-deep); opacity: .45; transform-origin: top; }
.aim-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: baseline; position: relative; }
.aim-num {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--sand); border: 1px solid var(--gold-deep); position: relative; z-index: 1;
  font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 19px; color: var(--gold-deep);
  align-self: start;
}
.aim-list p, .fund-list p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.aim-list li p { padding-top: 8px; }
.aim-list strong, .fund-list strong { color: var(--ink); font-weight: 600; }

.fund-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.fund-list li {
  display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start;
  background: var(--paper); border: 1px solid var(--rule); padding: 16px 18px;
}
.fund-mark { width: 10px; height: 10px; margin: 9px 0 0 5px; background: var(--gold-deep); transform: rotate(45deg); }
:lang(th) .aim-list p, :lang(th) .fund-list p { font-size: 17px; line-height: 1.8; }

/* Reveal animation, armed by script only when motion is allowed */
.reveal-armed [data-reveal] .aim-list li,
.reveal-armed [data-reveal] .fund-list li {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i) * 130ms + 250ms);
}
.reveal-armed [data-reveal] .fund-list li { transform: translateY(22px) scale(.98); }
.reveal-armed [data-reveal] .fund-mark { transform: rotate(-135deg) scale(.2); transition: transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i) * 130ms + 450ms); }
.reveal-armed [data-reveal] .aim-list::before { transform: scaleY(0); transition: transform 1.6s cubic-bezier(.4, 0, .2, 1) .2s; }
.reveal-armed [data-reveal] .rule-title::after { transform: scaleX(0); transition: transform .9s cubic-bezier(.4, 0, .2, 1); }
.reveal-armed [data-reveal].in-view .aim-list li,
.reveal-armed [data-reveal].in-view .fund-list li { opacity: 1; transform: none; }
.reveal-armed [data-reveal].in-view .fund-mark { transform: rotate(45deg) scale(1); }
.reveal-armed [data-reveal].in-view .aim-list::before { transform: scaleY(1); }
.reveal-armed [data-reveal].in-view .rule-title::after { transform: scaleX(1); }
.fund-list li { transition-property: opacity, transform, border-color; }
.fund-list li:hover { border-color: var(--gold-deep); }
.take-actions .subscribe { flex: none; }
.partner-panel .cover-plain .label { text-transform: uppercase; }
@media (max-width: 560px) { .partner-panel .panel-stamp { width: 76px; height: 76px; top: 20px; right: 16px; } .partner-panel .panel-stamp b { font-size: 24px; } }
