/* Youths Aglow shared chrome: tokens, buttons, nav, footer, modal.
   Values: brand orange #FF3D00 on a neutral white canvas, Clash Display + General Sans.
   Spacing ramp 4 8 12 16 24 32 48 64 96 128. */

:root {
  --bg: #FFFFFF;
  --surface: #F4F5F6;
  --surface-2: #EBEDEF;
  --ink: #0F1012;
  --ink-2: #3A3D42;
  --muted: #62666D;
  --line: rgba(15, 16, 18, 0.08);
  --dark: #0B0C0E;
  --dark-2: #14161A;
  --dark-3: #1D2026;
  --on-dark: #F4F5F6;
  --on-dark-muted: rgba(244, 245, 246, 0.64);

  --accent-50: #FFF1EB;
  --accent-100: #FFDCCC;
  --accent: #FF3D00;
  --accent-600: #E03600;
  --accent-700: #B82C00;

  --display: 'Clash Display', 'General Sans', system-ui, sans-serif;
  --sans: 'General Sans', system-ui, -apple-system, sans-serif;

  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 9999px;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(64px, 9vw, 128px);
  --nav-h: 72px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 160ms;
  --base: 240ms;
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100000;
  background: var(--ink); color: #fff; padding: 8px 16px; border-radius: var(--r-pill);
  font-size: 14px; text-decoration: none; transform: translateY(-160%);
  transition: transform var(--base) var(--ease);
}
.skip-link:focus { transform: none; }
#main { scroll-margin-top: var(--nav-h); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }

/* Buttons: one solid primary, one quiet secondary. Padding keeps a 1:2 ratio. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: var(--r-pill);
  font-family: var(--sans); font-size: 15px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer; border: 0;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn-sm { height: 40px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-600); }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(15,16,18,0.18); }
.btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.on-dark .btn-secondary, .btn-secondary.is-light { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.32); }
.on-dark .btn-secondary:hover, .btn-secondary.is-light:hover { box-shadow: inset 0 0 0 1px #fff; }

/* Arrow chip: on hover the arrow turns to point up and the chip fills, it never slides forward. */
.arrow-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; color: inherit; text-decoration: none;
}
.arrow-link .chip {
  width: 28px; height: 28px; border-radius: var(--r-pill); display: inline-grid; place-items: center;
  box-shadow: inset 0 0 0 1px currentColor; font-size: 14px;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.arrow-link .chip i { transition: transform var(--base) var(--ease); transform: rotate(45deg); }
.arrow-link:hover .chip { background: var(--accent); color: #fff; box-shadow: none; }
.arrow-link:hover .chip i { transform: rotate(0deg); }

.u-link { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--base) var(--ease); }
.u-link:hover { background-size: 100% 1px; }

/* Loader: short, white, no progress theatre. */
#page-loader {
  position: fixed; inset: 0; z-index: 99999; background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 240ms var(--ease), visibility 240ms var(--ease);
}
#page-loader.loaded { opacity: 0; visibility: hidden; }
.loader-word { font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: -0.02em; color: var(--ink); }
.loader-word span { color: var(--accent); }

/* ── Story card (home news + news page) ── */
.news-card { display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; background: var(--bg); color: var(--ink); text-decoration: none; transition: transform var(--base) var(--ease), box-shadow var(--base) var(--ease); }
.news-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.news-media img { object-position: 50% 0; transition: transform 600ms var(--ease); }
.news-card:hover { transform: translateY(-2px); box-shadow: 0 24px 48px rgba(15,16,18,0.08); }
.news-card:hover .news-media img { transform: scale(1.03); }
.news-body { flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.news-body time { font-size: 13px; color: var(--muted); }
.news-title { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.15; letter-spacing: -0.015em; margin-bottom: auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; font-weight: 500; }
.news-more .chip { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; box-shadow: inset 0 0 0 1px currentColor; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.news-more .chip i { transform: rotate(45deg); transition: transform var(--base) var(--ease); }
.news-card:hover .news-more .chip { background: var(--accent); color: #fff; box-shadow: none; }
.news-card:hover .news-more .chip i { transform: rotate(0); }

/* ── Nav ── */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h);
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
  transition: background-color var(--base) var(--ease), box-shadow var(--base) var(--ease), color var(--base) var(--ease);
  color: var(--ink);
}
.nav-wrap { height: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 32px; box-sizing: border-box; }
.nav-brand { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; color: inherit; text-decoration: none; margin-right: auto; }
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500; color: inherit; text-decoration: none; opacity: 0.8; transition: background-color var(--fast) var(--ease), opacity var(--fast) var(--ease); }
.nav-link:hover { opacity: 1; background: rgba(15,16,18,0.06); }
.nav-link[aria-current="page"] { opacity: 1; background: rgba(15,16,18,0.08); }
.site-nav.is-over .nav-link:hover { background: rgba(255,255,255,0.14); }
.site-nav.is-over .nav-link[aria-current="page"] { background: rgba(255,255,255,0.18); }

/* Over the home hero photo: transparent, white type, until the page scrolls. */
.site-nav.is-over { background: transparent; box-shadow: none; color: #fff; }

.nav-burger { display: none; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: inherit; cursor: pointer; position: relative; }
.nav-burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform var(--base) var(--ease), top var(--base) var(--ease); }
.nav-burger span:first-child { top: 17px; }
.nav-burger span:last-child { top: 25px; }
.nav-open .nav-burger span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .nav-burger span:last-child { top: 21px; transform: rotate(-45deg); }
.nav-open .site-nav { background: var(--bg); color: var(--ink); box-shadow: 0 1px 0 var(--line); }

.nav-sheet {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 59; background: var(--bg);
  padding: 32px var(--gutter) 32px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease), visibility var(--base);
}
.nav-open .nav-sheet { opacity: 1; visibility: visible; transform: none; }
.nav-sheet-links { display: flex; flex-direction: column; }
.nav-sheet-links a { font-family: var(--display); font-weight: 500; font-size: 40px; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; padding: 8px 0; }
.nav-sheet-links a[aria-current="page"] { color: var(--accent); }

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: block; }
}
@media (min-width: 861px) { .nav-sheet { display: none; } }

/* ── Footer ── */
.site-footer { background: var(--dark); color: var(--on-dark); overflow: hidden; position: relative; z-index: 10; }
.site-footer a { color: inherit; }
.foot-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding-top: 64px; flex-wrap: wrap; }
.foot-brand { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.foot-brand span { color: var(--accent); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.foot-nav a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--on-dark-muted); transition: color var(--fast) var(--ease); }
.foot-nav a:hover { color: #fff; }

.foot-mark { position: relative; margin-top: 48px; padding: 48px 0; text-align: center; }
.foot-word {
  font-family: var(--display); font-weight: 600; color: var(--accent);
  font-size: clamp(56px, 13.6vw, 200px); line-height: 0.86; letter-spacing: -0.04em;
  white-space: nowrap; margin: 0; user-select: none;
}
.foot-photo {
  position: absolute; left: 50%; top: 50%; width: clamp(140px, 21vw, 300px); aspect-ratio: 4 / 3; transition: transform 600ms var(--ease);
  transform: translate(-50%, -50%); border-radius: var(--r-md); overflow: hidden;
}
.foot-photo img { width: 100%; height: 100%; object-fit: cover; }

.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 48px 0 32px; }
.foot-text { font-size: 15px; line-height: 1.6; color: var(--on-dark-muted); max-width: 44ch; margin: 0; }
.foot-news { margin-top: 24px; display: flex; gap: 8px; max-width: 440px; }
.foot-news label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.foot-news input {
  flex: 1; min-width: 0; height: 48px; padding: 0 20px; border-radius: var(--r-pill); border: 0;
  background: var(--dark-3); color: #fff; font: 15px var(--sans); outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); transition: box-shadow var(--fast) var(--ease);
}
.foot-news input::placeholder { color: rgba(244,245,246,0.48); }
.foot-news input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.foot-news .btn .spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; animation: ya-spin 700ms linear infinite; }
.foot-news .btn.is-loading .spin { display: inline-block; }
@keyframes ya-spin { to { transform: rotate(360deg); } }
.foot-msg { min-height: 24px; margin: 8px 0 0; font-size: 14px; }
.foot-msg.is-ok { color: var(--accent-100); }
.foot-msg.is-error { color: #FF8A80; }

.foot-right { display: flex; flex-direction: column; align-items: flex-end; gap: 24px; }
.foot-social { display: flex; gap: 8px; }
.foot-social a {
  width: 44px; height: 44px; border-radius: var(--r-pill); display: grid; place-items: center;
  background: var(--dark-3); color: var(--on-dark); font-size: 20px; text-decoration: none;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.foot-social a:hover { background: var(--accent); color: #fff; }

.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0 32px; box-shadow: 0 -1px 0 rgba(255,255,255,0.08); font-size: 13px; color: rgba(244,245,246,0.48); }
.foot-bottom nav { display: flex; gap: 24px; }
.foot-bottom a { text-decoration: none; transition: color var(--fast) var(--ease); }
.foot-bottom a:hover { color: #fff; }

@media (max-width: 760px) {
  .foot-cols { grid-template-columns: 1fr; gap: 32px; }
  .foot-right { align-items: flex-start; }
  .foot-photo { width: 22vw; }
  .foot-mark { padding: 32px 0; }
}

/* ── Ambassador modal ── */
.ya-modal { position: fixed; inset: 0; z-index: 10000; }
.ya-modal.hidden { display: none; }
.ya-modal-overlay { position: absolute; inset: 0; background: rgba(11,12,14,0.72); animation: ya-fade var(--base) var(--ease); }
.ya-modal-scroll { position: relative; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; }
.ya-modal-card {
  position: relative; width: 100%; max-width: 760px; max-height: 92dvh; overflow: auto;
  background: var(--bg); border-radius: var(--r-lg); display: grid; grid-template-columns: 5fr 6fr;
  box-shadow: 0 32px 80px rgba(0,0,0,0.24); animation: ya-rise 280ms var(--ease);
}
@keyframes ya-fade { from { opacity: 0; } }
@keyframes ya-rise { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.ya-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 2; width: 40px; height: 40px; border-radius: var(--r-pill); border: 0;
  background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; font-size: 18px;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.ya-modal-close:hover { background: var(--ink); color: #fff; }
.ya-modal-media { min-height: 360px; background: var(--surface); }
.ya-modal-media img { width: 100%; height: 100%; object-fit: cover; }
.ya-modal-body { padding: 48px 40px 40px; display: flex; flex-direction: column; justify-content: center; }
.ya-modal-title { font-family: var(--display); font-weight: 500; font-size: 40px; line-height: 1.08; letter-spacing: -0.025em; margin: 0; color: var(--ink); }
.ya-modal-title span { color: var(--accent); }
.ya-modal-text { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 16px 0 0; }
.ya-modal-actions { display: flex; align-items: center; gap: 24px; margin-top: 32px; flex-wrap: wrap; }
.ya-modal-link { font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; }
.ya-modal-link:hover { color: var(--ink); }
@media (max-width: 640px) {
  .ya-modal-card { grid-template-columns: 1fr; max-width: 440px; }
  .ya-modal-media { min-height: 180px; height: 180px; }
  .ya-modal-body { padding: 32px 24px 24px; }
  .ya-modal-title { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
