:root {
  --red-900: #5a0e0e;
  --red-800: #6f1313;
  --red-700: #8b1a1a;
  --red-600: #a52121;
  --red-500: #c0392b;
  --red-100: #f7e2e2;
  --red-50:  #fcf1f1;
  --ink:     #1f1a1a;
  --ink-2:   #4a3f3f;
  --paper:   #ffffff;
  --bg:      #fbf7f5;
  --line:    #ead7d7;
  --shadow:  0 6px 20px rgba(90, 14, 14, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red-700); }
a:hover { color: var(--red-900); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ===== Top bar ===== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 10px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-family: 'Playfair Display', serif; font-size: 18px; letter-spacing: .04em; color: var(--red-800); }
.brand-text em { font-style: italic; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-2); }
.topnav a {
  margin-left: 18px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink-2);
}
.topnav a:hover { color: var(--red-800); }
@media (max-width: 760px) { .topnav { display: none; } }

/* ===== Hero ===== */
.hero {
  position: relative;
  color: #fff;
  min-height: 78vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #4a0c0c 0%, #8b1a1a 55%, #b8312a 100%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg .diag {
  position: absolute; left: -10%; right: -10%; height: 220px;
  transform: rotate(-12deg);
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hero-bg .d1 { top: 8%; opacity: .35; }
.hero-bg .d2 { top: 42%; opacity: .25; height: 180px; }
.hero-bg .d3 { top: 72%; opacity: .35; }
.hero-content { position: relative; text-align: center; padding: 60px 24px; }
.hero-year {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: clamp(40px, 8vw, 88px); margin: 0 0 8px;
  letter-spacing: .04em; opacity: .35;
  writing-mode: vertical-rl; transform: rotate(180deg); position: absolute;
  right: 6%; top: 50%; translate: 0 -50%;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: clamp(40px, 7vw, 80px);
  margin: 0 0 8px;
  letter-spacing: .01em;
}
.hero h1 .year { font-style: italic; opacity: .9; }
.hero-sub {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: clamp(22px, 3.5vw, 36px); margin: 6px 0 28px; opacity: .95;
}
.hero-foot { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin: 0; }

/* ===== Section basics ===== */
section { padding: 72px 0; }
.section-title {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-weight: 700; color: var(--red-800);
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 16px;
}
.section-title.centered { text-align: center; }
.centered { text-align: center; }
.lede { font-size: 17px; color: var(--ink-2); max-width: 720px; margin: 0 auto 32px; }
.subhead { font-family: 'Playfair Display', serif; font-style: italic; color: var(--red-800); margin: 32px 0 12px; font-size: 22px; }

/* ===== Glance / Pillars ===== */
.glance { background: var(--paper); border-bottom: 1px solid var(--line); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.pillar {
  background: var(--red-50);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.pillar:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pillar-num {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--red-600); opacity: .55; font-size: 36px; line-height: 1;
}
.pillar h3 { color: var(--red-800); margin: 6px 0 8px; font-size: 22px; }
.pillar p { margin: 0; color: var(--ink-2); }
@media (max-width: 800px) { .pillars { grid-template-columns: 1fr; } }

/* ===== About / two-col ===== */
.about { background: var(--bg); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: start; }
.callout {
  border-left: 4px solid var(--red-700);
  background: var(--red-50);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  color: var(--red-900);
  font-size: 17px;
  margin-top: 18px;
}
.callout em { font-family: 'Playfair Display', serif; font-style: italic; }
.content-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.content-eyebrow {
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--red-700); margin: 0 0 12px;
}
.content-list { list-style: none; padding: 0; margin: 0; counter-reset: c; }
.content-list li { counter-increment: c; padding: 12px 0; border-top: 1px dashed var(--line); display: flex; gap: 14px; }
.content-list li:first-child { border-top: 0; }
.content-list li::before {
  content: counter(c, decimal-leading-zero);
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--red-700); font-weight: 700;
}
.content-list a { text-decoration: none; color: var(--ink); }
.content-list a:hover { color: var(--red-800); }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* ===== Categories ===== */
.categories { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin: 24px 0 40px; }
.cat-card {
  background: linear-gradient(180deg, #fff 0%, var(--red-50) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  color: var(--red-800);
  transition: transform .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-icon { color: var(--red-700); display: inline-flex; margin-bottom: 8px; }
.cat-card h3 { font-family: 'Playfair Display', serif; font-style: italic; font-size: 26px; margin: 6px 0; }
.cat-card p { color: var(--ink-2); margin: 0; }
@media (max-width: 720px) { .cat-grid { grid-template-columns: 1fr; } }

.countries { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.countries li {
  display: flex; align-items: center; gap: 10px;
  background: var(--red-50);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.countries strong { display: block; color: var(--red-800); font-size: 15px; }
.countries span { color: var(--ink-2); font-size: 13px; }
.flag {
  display: inline-block; width: 32px; height: 22px; border-radius: 3px; flex: 0 0 32px;
  background-color: #f3e3e3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.fl-my { background-image: url("https://flagcdn.com/my.svg"); }
.fl-id { background-image: url("https://flagcdn.com/id.svg"); }
.fl-th { background-image: url("https://flagcdn.com/th.svg"); }
.fl-ph { background-image: url("https://flagcdn.com/ph.svg"); }
.fl-vn { background-image: url("https://flagcdn.com/vn.svg"); }

@media (max-width: 920px) { .countries { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .countries { grid-template-columns: 1fr; } }

/* ===== Timeline ===== */
.timeline { background: var(--bg); }
.tline {
  list-style: none; padding: 24px 0 0; margin: 0;
  position: relative;
  max-width: 880px; margin: 0 auto;
}
.tline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--red-700), var(--red-500));
  border-radius: 2px;
  transform: translateX(-50%);
}
.tline li {
  position: relative;
  display: grid; grid-template-columns: 1fr 24px 1fr;
  align-items: center;
  padding: 18px 0;
}
.tline li::before {
  content: ""; grid-column: 2; justify-self: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red-700);
  box-shadow: 0 0 0 5px var(--bg), 0 0 0 6px var(--red-700);
}
.tline-date {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--red-800); font-weight: 700; font-size: 20px;
}
.tline-body h3 { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.tline-body p { margin: 0; color: var(--ink-2); font-size: 15px; }
.tline li:nth-child(odd) .tline-date { grid-column: 1; text-align: right; padding-right: 26px; }
.tline li:nth-child(odd) .tline-body { grid-column: 3; padding-left: 26px; }
.tline li:nth-child(even) .tline-body { grid-column: 1; text-align: right; padding-right: 26px; }
.tline li:nth-child(even) .tline-date { grid-column: 3; padding-left: 26px; }

@media (max-width: 720px) {
  .tline::before { left: 18px; }
  .tline li { grid-template-columns: 36px 1fr; gap: 6px; }
  .tline li::before { grid-column: 1; justify-self: start; margin-left: 9px; }
  .tline li:nth-child(odd) .tline-date,
  .tline li:nth-child(even) .tline-date,
  .tline li:nth-child(odd) .tline-body,
  .tline li:nth-child(even) .tline-body { grid-column: 2; text-align: left; padding: 0; }
  .tline-date { font-size: 16px; margin-bottom: 2px; }
}

/* ===== Presentation / tables ===== */
.presentation { background: var(--paper); border-top: 1px solid var(--line); }
.bullet-list { padding-left: 20px; }
.bullet-list li { margin: 6px 0; }
.table-wrap { overflow-x: auto; border-radius: 14px; box-shadow: var(--shadow); }
.data-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--paper);
  border-radius: 14px; overflow: hidden;
}
.data-table th {
  background: var(--red-800); color: #fff;
  text-align: left; padding: 14px 18px;
  font-family: 'Playfair Display', serif; font-style: italic;
  font-weight: 700; font-size: 16px; letter-spacing: .02em;
}
.data-table td { padding: 14px 18px; border-top: 1px solid var(--line); color: var(--ink); }
.data-table tbody tr:nth-child(odd) { background: var(--red-50); }
.data-table tbody tr:hover { background: var(--red-100); }

.warn {
  margin-top: 22px; padding: 18px;
  display: flex; align-items: flex-start; gap: 14px;
  border: 1px solid var(--line); border-left: 4px solid var(--red-700);
  background: #fff8f6; border-radius: 0 12px 12px 0;
}
.warn-icon { color: var(--red-700); flex: 0 0 32px; }

/* ===== Judging ===== */
.judging { background: var(--bg); }
.process {
  margin-top: 36px;
  display: grid; grid-template-columns: 1fr 60px 1fr 60px 1fr;
  align-items: center;
  background: #efe7e7;
  border-radius: 14px;
  padding: 28px 20px;
}
.proc-step { text-align: center; color: var(--red-800); }
.proc-step p { margin: 12px 0 0; color: var(--ink); font-size: 14px; }
.proc-circle {
  width: 76px; height: 76px; border-radius: 50%;
  border: 2px solid var(--red-700);
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--red-700);
}
.proc-line { display: block; height: 2px; background: var(--red-700); opacity: .6; }
@media (max-width: 720px) {
  .process { grid-template-columns: 1fr; gap: 14px; }
  .proc-line { width: 2px; height: 24px; margin: 0 auto; }
}

/* ===== Entitlements ===== */
.entitlements { background: var(--paper); border-top: 1px solid var(--line); }
.ent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ent-card {
  background: var(--red-50);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.ent-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ent-card h4 { margin: 6px 0 6px; color: var(--red-800); font-size: 18px; }
.ent-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.ent-badge {
  display: inline-block; background: var(--red-700); color: #fff;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; font-weight: 600;
}
.ent-card.winner { background: linear-gradient(180deg, #fff 0%, #fff5e8 100%); border-color: #f0d9b6; }
.ent-card.winner .ent-badge { background: #b8861b; }
.ent-card.winner h4 { color: #8a6313; }
.ent-media {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #f3e3e3;
  border: 1px solid var(--line);
}
.ent-media img, .ent-media video, .ent-media iframe {
  width: 100%; height: 100%; border: 0;
  object-fit: cover; display: block;
}
.ent-media a {
  display: block;
  width: 100%; height: 100%;
}
.ent-media-stack > * + * { margin-top: 8px; }

/* Gallery of 2+ images */
.ent-media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 4px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}
.ent-media-gallery-tile {
  position: relative;
  aspect-ratio: 1;
  display: block;
  overflow: hidden;
  background: #f3e3e3;
  border-radius: 6px;
}
.ent-media-gallery-tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .25s ease;
  display: block;
}
.ent-media-gallery-tile:hover img { transform: scale(1.05); }

/* Website link card (when Collateral is a non-media URL) */
.ent-media-link-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red-700);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.ent-media-link-card:hover {
  background: var(--red-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.ent-media-link-host {
  font-weight: 600;
  color: var(--red-800);
  word-break: break-all;
}
.ent-media-link-arrow {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--red-700);
  font-weight: 600;
}
@media (max-width: 900px) { .ent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ent-grid { grid-template-columns: 1fr; } }

.ent-link {
  display: inline-block; margin-top: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  color: #b8861b;
}
.ent-link:hover { color: #8a6313; }

/* ===== Country badge (country.html only) ===== */
.country-badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.nav-back {
  font-size: 13px;
  opacity: .8;
  margin-left: 10px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
}
.nav-back:hover { opacity: 1; }

/* ===== Onsite Agenda (country.html) ===== */
.agenda { background: var(--paper); border-top: 1px solid var(--line); }
.agenda-list { list-style: none; padding: 0; margin: 0; max-width: 880px; margin-left: auto; margin-right: auto; }
.agenda-section-header {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--red-800);
  font-size: 22px;
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--red-100);
}
.agenda-section-header:first-child { margin-top: 0; }
.agenda-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 10px;
  transition: background .15s;
}
.agenda-item:hover { background: var(--red-50); }
.agenda-item + .agenda-item { border-top: 1px solid var(--line); }
.agenda-time {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--red-800);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
  padding-top: 1px;
}
.agenda-body h4 { margin: 0 0 4px; font-size: 17px; color: var(--ink); }
.agenda-meta {
  margin: 4px 0 0; color: var(--ink-2); font-size: 14px;
}
.agenda-meta .agenda-tag {
  display: inline-block;
  background: var(--red-50);
  color: var(--red-800);
  font-size: 12px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  letter-spacing: .02em;
}
.agenda-empty {
  text-align: center; padding: 30px;
  color: var(--ink-2); font-style: italic;
  list-style: none;
}
@media (max-width: 560px) {
  .agenda-item { grid-template-columns: 1fr; gap: 4px; }
  .agenda-time { font-size: 16px; }
}

/* ===== FAQ ===== */
.faq { background: var(--bg); border-top: 1px solid var(--line); }
.faq-list { display: grid; gap: 12px; margin-top: 8px; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red-700);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: var(--shadow); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--red-900);
  font-size: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: 'Playfair Display', serif;
  font-size: 24px; line-height: 1;
  color: var(--red-700);
  transition: transform .2s;
  flex: 0 0 auto;
}
.faq-item[open] summary::after { content: "−"; }
.faq-body {
  padding: 0 20px 18px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.65;
}
.faq-body p { margin: 0 0 8px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body a { color: var(--red-700); }

/* ===== Retreat embed ===== */
.retreat { background: var(--bg); border-top: 1px solid var(--line); }
.embed-wrap {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 600px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
  margin-top: 8px;
}
.embed-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; display: block;
}
.embed-fallback {
  margin-top: 12px; font-size: 14px; color: var(--ink-2);
}

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--red-800), var(--red-600));
  color: #fff; text-align: center;
}
.cta h2 { font-family: 'Playfair Display', serif; font-style: italic; font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; }
.cta p { margin: 0 0 22px; opacity: .9; }
.btn {
  display: inline-block; background: #fff; color: var(--red-800);
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
  font-weight: 600; letter-spacing: .03em;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.18); color: var(--red-900); }

/* ===== Footer ===== */
.site-foot { background: #2a0808; color: #f4dada; padding-top: 56px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; padding-bottom: 36px; }
.brand-foot .brand-text strong { color: #fff; }
.brand-foot .brand-text em { color: #f4c8c8; }
.foot-blurb { color: #f0d4d4; margin-top: 14px; max-width: 64ch; }
.foot-contact h4 { color: #fff; margin: 4px 0 10px; font-family: 'Playfair Display', serif; font-style: italic; font-size: 20px; }
.foot-contact p { margin: 4px 0; color: #f0d4d4; }
.foot-contact a { color: #ffd2d2; }
.foot-bar {
  border-top: 1px solid rgba(255,255,255,.1); padding: 14px 0;
  font-size: 13px; color: #d6a8a8;
}
.foot-bar .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* ===== freshness stamp ===== */
.data-fresh {
  position: fixed; bottom: 14px; right: 14px; z-index: 40;
  background: rgba(42, 8, 8, .9); color: #f7e2e2;
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  letter-spacing: .04em;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

/* ===== reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
