/* ==================================================================
   FOCUS Thailand v3.0.1 - design system r2
   Type:    IBM Plex Sans Thai (display) + IBM Plex Sans Thai Looped (body)
   Palette: ink navy / river blue / lantern amber / warm paper
   Motion:  pure CSS - runs with JavaScript blocked; reduced-motion
            falls back to opacity-only fades
   ================================================================== */

:root {
  --ink: #152238;
  --ink-2: #1d3054;
  --brand: #1f5fa8;
  --brand-deep: #14406f;
  --sky: #3f83d2;
  --accent: #f4a93b;
  --accent-deep: #de8e14;
  --paper: #f8f7f3;
  --mist: #edf2f8;
  --card: #ffffff;
  --text: #31405c;
  --text-soft: #5e6e8a;
  --line: #dee6f0;
  --white: #ffffff;

  --font-display: "IBM Plex Sans Thai", "IBM Plex Sans Thai Looped", sans-serif;
  --font-body: "IBM Plex Sans Thai Looped", "IBM Plex Sans Thai", sans-serif;

  --wrap: 1180px;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(21, 34, 56, 0.07);
  --shadow: 0 12px 34px rgba(21, 34, 56, 0.12);
  --shadow-lg: 0 24px 60px rgba(21, 34, 56, 0.18);
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
/* Image lift protection (deterrence layer; see main.js for context menu) */
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

a { color: var(--brand); }
a:hover { color: var(--brand-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 0.55em;
  font-weight: 600;
}
h1 { font-size: clamp(2.15rem, 4.6vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.7vw, 2.1rem); font-weight: 600; letter-spacing: -0.012em; }
h3 { font-size: 1.22rem; font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(18px, 4vw, 36px); }
img, iframe, svg, video { max-width: 100%; }
.contact-map iframe { width: 100%; display: block; }
.contact-grid > * { min-width: 0; }
body { overflow-x: clip; }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: var(--white); padding: 10px 18px; border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; color: var(--white); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--ink); }

/* ================= Motion (CSS-only, JS-independent) ================= */
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes glowpulse { 0%, 100% { box-shadow: 0 8px 22px rgba(244, 169, 59, 0.4); } 50% { box-shadow: 0 8px 34px rgba(244, 169, 59, 0.75); } }
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gradpan { 0% { background-position: 0% 50%, 0% 50%, 0% 0%, 0% 0%, 0% 50%; } 100% { background-position: 30% 60%, 20% 40%, 0% 0%, 0% 0%, 100% 50%; } }
@keyframes dotpulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(244, 169, 59, 0.35); } 50% { box-shadow: 0 0 0 9px rgba(244, 169, 59, 0.12); } }
@keyframes shine { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(230%) skewX(-18deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawline { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.reveal { animation: rise 0.75s var(--ease) both; }
@supports (animation-timeline: view()) {
  .reveal, .pillars .pillar, .cards .card, .tl-item, .content-block {
    animation-name: rise; animation-fill-mode: both;
    animation-duration: 1ms; animation-delay: 0s;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}
.reveal:nth-of-type(2) { animation-delay: 0.08s; }
.reveal:nth-of-type(3) { animation-delay: 0.16s; }

.hero-copy > * { animation: rise 0.7s var(--ease) both; }
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.23s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.32s; }
.hero-media { animation: rise 0.85s var(--ease) 0.2s both; }
.stats .stat { animation: rise 0.7s var(--ease) both; }
.stats .stat:nth-child(1) { animation-delay: 0.35s; }
.stats .stat:nth-child(2) { animation-delay: 0.43s; }
.stats .stat:nth-child(3) { animation-delay: 0.51s; }
.stats .stat:nth-child(4) { animation-delay: 0.59s; }

.hero-thread path, .foot-thread path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawline 1.6s var(--ease) 0.5s forwards;
}

.pillars .pillar:nth-child(2) { animation-delay: 0.12s; }
.pillars .pillar:nth-child(3) { animation-delay: 0.24s; }
.cards .card:nth-child(2) { animation-delay: 0.1s; }
.cards .card:nth-child(3) { animation-delay: 0.2s; }
.pillars .pillar, .cards .card { animation: rise 0.75s var(--ease) both; }

/* Client directive: animation runs even when the OS/browser signals
   reduced motion - softened (shorter travel, slower loops), never off. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .marquee-track { animation-duration: 70s; }
  .logo-track { animation-duration: 90s; }
}

/* ================= Topbar ================= */
.topbar { background: var(--ink); color: #c3d1e6; font-size: 0.85rem; position: relative; z-index: 60; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar-note { opacity: 0.85; }
.topbar-help { color: var(--white); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; font-weight: 500; }
.topbar-help strong { color: var(--accent); font-weight: 600; }
.topbar-help .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(244, 169, 59, 0.22); animation: floaty 3s ease-in-out infinite; }

/* ================= Header ================= */
.site-head { background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 72px; width: auto; object-fit: contain; }

.site-nav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { display: block; padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 0.97rem; transition: background 0.16s, color 0.16s; }
.site-nav a:hover { background: var(--mist); color: var(--brand-deep); }
.site-nav a[aria-current="page"] { background: var(--mist); color: var(--brand-deep); font-weight: 600; }
.site-nav .nav-donate { background: var(--accent); color: var(--ink); font-weight: 600; box-shadow: 0 4px 14px rgba(244, 169, 59, 0.35); }
.site-nav .nav-donate:hover { background: var(--accent-deep); color: var(--ink); }
.nav-lang a { border: 1.5px solid var(--line); display: inline-flex; align-items: center; padding: 9px 12px; }
.nav-lang img { display: block; width: 27px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(21, 34, 56, 0.12); }

@media (max-width: 1240px) and (min-width: 881px) {
  .site-nav a { padding: 8px 10px; font-size: 0.88rem; }
  .brand img { height: 60px; }
  .head-in { gap: 14px; }
}

/* CSS-only mobile nav toggle: works with JavaScript disabled */
.nav-check { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle { display: none; background: var(--white); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 13px; cursor: pointer; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; display: block; width: 21px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.22s var(--ease), opacity 0.15s; }
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }
.nav-check:checked ~ .nav-toggle .nav-toggle-bar { transform: rotate(45deg); }
.nav-check:checked ~ .nav-toggle .nav-toggle-bar::before { opacity: 0; }
.nav-check:checked ~ .nav-toggle .nav-toggle-bar::after { transform: rotate(-90deg) translateX(6px); }
.nav-check:focus-visible ~ .nav-toggle { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ================= Hero (homepage) ================= */
.hero {
  position: relative;
  color: var(--white);
  background-color: var(--ink-2);
  background:
    repeating-linear-gradient(58deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(-58deg, rgba(255, 255, 255, 0.022) 0 2px, transparent 2px 14px),
    radial-gradient(900px 420px at 85% -10%, rgba(63, 131, 210, 0.35), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(244, 169, 59, 0.16), transparent 55%),
    linear-gradient(135deg, #152238 0%, #1d3054 52%, #14406f 100%);
  padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
  background-size: 100% 100%, 100% 100%, 160% 160%, 160% 160%, 200% 200%;
  animation: gradpan 26s ease-in-out infinite alternate;
}
@keyframes aurora1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 30px) scale(1.15); } }
@keyframes aurora2 { 0%, 100% { transform: translate(0, 0) scale(1.1); } 50% { transform: translate(-50px, -24px) scale(0.95); } }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none;
}
.hero::before {
  width: 480px; height: 480px; right: -120px; top: -140px;
  background: radial-gradient(circle, rgba(244, 169, 59, 0.32), transparent 65%);
  animation: aurora1 18s ease-in-out infinite;
}
.hero::after {
  width: 420px; height: 420px; left: -140px; bottom: -160px;
  background: radial-gradient(circle, rgba(63, 131, 210, 0.4), transparent 65%);
  animation: aurora2 22s ease-in-out infinite;
}
.hero .wrap { position: relative; z-index: 1; }
/* film grain on dark surfaces for depth */
.hero, .section-navy, .donate-band, .site-foot { position: relative; }
.grainy::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.section-navy > .wrap, .donate-band > .wrap { position: relative; z-index: 1; }
.hero-photo { position: relative; }
.hero-photo::before {
  content: ""; position: absolute; inset: 0;
  transform: translate(20px, 20px);
  border: 2.5px solid var(--accent); border-radius: var(--r-lg);
  opacity: 0.75; pointer-events: none;
}
.hero-badge {
  display: flex; flex-direction: column; gap: 2px;
  margin: 26px 0 0;
  background: var(--white); color: var(--ink);
  border-left: 5px solid var(--accent);
  border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
  padding: 14px 20px;
  animation: rise 0.8s var(--ease) 0.55s both;
}
.hero-badge strong { font-family: var(--font-display); font-size: 1.02rem; color: var(--brand-deep); }
.hero-badge span { font-size: 0.78rem; color: var(--text-soft); line-height: 1.5; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 18px;
  padding: 7px 15px; border: 1px solid rgba(244, 169, 59, 0.45); border-radius: 999px;
  background: rgba(244, 169, 59, 0.1);
}
.hero h1 { color: var(--white); margin-bottom: 22px; text-wrap: balance; }
.hero .lede { font-size: 1.16rem; color: rgba(230, 238, 250, 0.85); max-width: 33em; line-height: 1.85; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

.hero-media { margin: 0; position: relative; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.045); } }
.hero-media img {
  position: relative; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3; object-fit: cover; width: 100%;
  animation: rise 0.85s var(--ease) 0.2s both, kenburns 14s ease-in-out 1.2s infinite alternate;
}
.hero-thread { color: var(--accent); width: 100%; height: 40px; display: block; }
.hero-thread-main { position: absolute; left: -6%; bottom: 6px; width: 112%; height: 70px; pointer-events: none; }

/* Stats: glass cards on the navy hero */
/* Editorial stat row: big numerals over amber slashes, no boxes */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin: clamp(44px, 6vw, 72px) 0 0; padding: clamp(24px, 3vw, 36px) 0 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.stat { position: relative; padding-left: 22px; }
.stat::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 8px; width: 4px; border-radius: 4px; background: var(--accent); transform: skewY(-14deg); }
.stat dt { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 3.4vw, 2.9rem); color: var(--white); line-height: 1.05; }
.stat dd { margin: 6px 0 0; font-size: 0.9rem; color: rgba(200, 214, 234, 0.8); line-height: 1.55; }

/* ================= Sections ================= */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-mist { background: var(--mist); }
.kicker { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: var(--brand); margin: 0 0 10px; }
.kicker-amber { color: var(--accent); }
.on-dark { color: var(--white) !important; }
.section-intro.on-dark { color: #aebfd9 !important; }
.on-dark-link { color: var(--accent); }
.on-dark-link:hover { color: var(--white); }
.section-navy {
  background-color: var(--ink-2);
  background:
    repeating-linear-gradient(58deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 14px),
    radial-gradient(700px 320px at 90% 0%, rgba(63, 131, 210, 0.3), transparent 60%),
    linear-gradient(130deg, #152238, #1d3054 60%, #14406f);
}
.section-title { margin-bottom: 14px; position: relative; padding-bottom: 14px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: var(--accent); transform-origin: left; animation: underline 0.9s var(--ease) 0.25s both; }
@supports (animation-timeline: view()) {
  .section-title::after { animation-timeline: view(); animation-range: entry 0% entry 70%; animation-duration: 1ms; animation-delay: 0s; }
}
.center .section-title::after, .section-title.center::after { left: 50%; transform: translateX(-50%); }
.section-intro { color: var(--text-soft); max-width: 46em; margin-top: 10px; font-size: 1.05rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }

/* Mission marquee (CSS-only infinite scroll) */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { background: var(--accent); color: var(--ink); overflow: hidden; padding: 13px 0; border-block: 3px solid var(--ink);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 26px; width: max-content; animation: marquee 34s linear infinite; }
.marquee-item { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; white-space: nowrap; }
.marquee-dot { font-size: 0.5rem; opacity: 0.55; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* Partner logo marquee */
.logo-marquee { overflow: hidden; margin: 36px 0 26px; padding: 22px 0; background: var(--card); border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.logo-track { display: flex; align-items: center; gap: 56px; width: max-content; animation: marquee 46s linear infinite; }
.logo-cell { flex: none; }
.logo-cell img { height: 52px; width: auto; object-fit: contain; filter: grayscale(50%); opacity: 0.85; transition: filter 0.2s, opacity 0.2s; }
.logo-cell img:hover { filter: none; opacity: 1; }
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.partners-home .wrap { text-align: center; }
.partners-home .section-title::after { left: 50%; transform: translateX(-50%); }
.partners-home .section-intro { margin-inline: auto; }

/* Marquee tracks never wrap: the duplicate copy exists only for the
   seamless loop and must stay off-screen. */
.marquee-track, .logo-track { flex-wrap: nowrap; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 36px; }
.pillar {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.pillar img { aspect-ratio: 3/2; object-fit: cover; width: 100%; transition: transform 0.5s var(--ease); }
.pillar:hover img { transform: scale(1.045); }
.pillar-media { position: relative; overflow: hidden; }
.pillar-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(185deg, rgba(21, 34, 56, 0) 38%, rgba(21, 34, 56, 0.88) 100%); }
.pillar-media h3 { position: absolute; left: 22px; right: 22px; bottom: 16px; z-index: 2; margin: 0; color: var(--white); font-size: 1.22rem; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
.pillar p { padding: 18px 24px 24px; margin: 0; color: var(--text-soft); font-size: 0.96rem; }

/* Story */
.story-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.story-media { position: relative; margin: 0; }
.story-media::before { content: ""; position: absolute; inset: 0; transform: translate(-16px, 16px); border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(244, 169, 59, 0.28), rgba(31, 95, 168, 0.22)); }
.story-media img { position: relative; border-radius: var(--r-lg); box-shadow: var(--shadow); aspect-ratio: 3/2; object-fit: cover; }

/* Timeline: the thread as the story spine */
.timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: clamp(36px, 5vw, 56px) 0 28px; padding: 34px 0 0; position: relative; }
@keyframes threadflow { from { background-position: 0 0; } to { background-position: 44px 0; } }
.timeline::before { content: ""; position: absolute; top: 7px; left: 8px; right: 8px; height: 3px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 22px, rgba(244, 169, 59, 0.28) 22px 44px);
  animation: threadflow 1.6s linear infinite; }
.tl-item { position: relative; animation: rise 0.7s var(--ease) both; }
.timeline .tl-item:nth-child(2) { animation-delay: 0.12s; }
.timeline .tl-item:nth-child(3) { animation-delay: 0.24s; }
.timeline .tl-item:nth-child(4) { animation-delay: 0.36s; }
.tl-dot { position: absolute; top: -34px; left: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); border: 3.5px solid var(--ink-2); animation: dotpulse 3s ease-in-out infinite; }
.tl-item:nth-child(2) .tl-dot { animation-delay: 0.4s; }
.tl-item:nth-child(3) .tl-dot { animation-delay: 0.8s; }
.tl-item:nth-child(4) .tl-dot { animation-delay: 1.2s; }
.tl-year { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; color: var(--accent); }
.tl-title { color: var(--white); font-size: 1.08rem; margin: 6px 0 6px; }
.tl-text { margin: 0; font-size: 0.92rem; color: #a7b9d4; line-height: 1.65; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(244, 169, 59, 0.5); color: inherit; }
.card { position: relative; }
.card::after { content: ""; position: absolute; top: 0; bottom: 0; width: 42%; left: 0; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: translateX(-130%) skewX(-18deg); pointer-events: none; }
.card:hover::after { animation: shine 0.85s var(--ease); }
.card > img { aspect-ratio: 8/5; object-fit: cover; width: 100%; transition: transform 0.5s var(--ease); }
.card:hover > img { transform: scale(1.04); }
.card-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body h3, .card-title { font-size: 1.12rem; margin-bottom: 4px; }
.card-body p { margin: 0 0 10px; color: var(--text-soft); font-size: 0.93rem; flex: 1; }
.cards-bento { grid-template-columns: repeat(3, 1fr); }
.card-featured { grid-column: span 2; grid-row: span 2; }
.card-featured > img { aspect-ratio: auto; flex: 1; min-height: 280px; }
.card-featured .card-body { padding: 26px 30px 30px; }
.card-featured h3 { font-size: 1.55rem; }
.card-featured p { font-size: 1rem; }
.card-kicker { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--accent-deep); margin: 0 0 6px !important; flex: none !important; }
.text-link { font-weight: 600; text-decoration: none; color: var(--brand);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  padding-bottom: 2px; transition: background-size 0.3s var(--ease), padding-left 0.2s var(--ease); }
.text-link:hover { background-size: 100% 2px; padding-left: 4px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Partner logos */
.logo-strip { display: flex; flex-wrap: wrap; gap: 26px 44px; align-items: center; justify-content: center; margin: 36px 0 24px; padding: 30px; background: var(--card); border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.logo-strip img { height: 58px; width: auto; object-fit: contain; filter: grayscale(45%); opacity: 0.85; transition: filter 0.2s, opacity 0.2s; }
.logo-strip img:hover { filter: none; opacity: 1; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.partner { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-sm); transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.partner:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.partner a, .partner > span, .partner { text-decoration: none; color: var(--text); }
.partner a { display: block; padding: 18px; height: 100%; }
.partner > img, .partner > span { padding: 18px; }
.partner img { height: 68px; width: auto; margin: 0 auto 12px; object-fit: contain; }
.partner span { display: block; text-align: center; font-size: 0.86rem; line-height: 1.5; }

/* ================= Bands ================= */
.donate-band { background-color: var(--brand-deep); background: radial-gradient(700px 320px at 90% 0%, rgba(63, 131, 210, 0.4), transparent 60%), linear-gradient(120deg, var(--brand-deep), var(--brand)); color: var(--white); padding: clamp(44px, 6vw, 76px) 0; }
.donate-band h2, .help-band h2 { color: var(--white); margin-bottom: 10px; }
.donate-band h2::after, .help-band h2::after { display: none; }
.donate-band p { margin: 0; color: rgba(230, 238, 250, 0.88); max-width: 44em; }
.donate-band-in, .help-band-in { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.donate-inline { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin: 20px 0 0 !important; padding: 13px 22px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: var(--r-sm); }
.donate-inline span { font-size: 0.88rem; color: rgba(230, 238, 250, 0.85); }
.donate-inline strong { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; letter-spacing: 0.06em; color: var(--white); user-select: all; }
.help-band { background: var(--ink); color: #c3d1e6; padding: clamp(38px, 5vw, 64px) 0; }
.help-band p { margin: 0; }

/* ================= Inner pages ================= */
.page-hero {
  position: relative; color: var(--white); overflow: hidden;
  background-color: var(--ink-2);
  background:
    radial-gradient(700px 300px at 90% -20%, rgba(63, 131, 210, 0.35), transparent 60%),
    linear-gradient(130deg, #152238, #1d3054 60%, #14406f);
  padding: clamp(48px, 7vw, 84px) 0 clamp(34px, 5vw, 56px);
}
.page-hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.page-hero.has-media .page-hero-grid { grid-template-columns: 1.05fr 0.95fr; }
.crumbs { font-size: 0.82rem; color: #8fa4c4; margin-bottom: 14px; display: flex; gap: 8px; align-items: center; animation: rise 0.6s var(--ease) both; }
.crumbs a { color: #b9c8dd; text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.page-hero h1 { color: var(--white); margin: 0; animation: rise 0.7s var(--ease) 0.06s both; }
.page-hero-intro { color: #aebfd9; max-width: 40em; margin: 14px 0 0; font-size: 1.08rem; animation: rise 0.7s var(--ease) 0.14s both; }
@keyframes clipin { from { clip-path: inset(0 100% 0 0 round var(--r)); } to { clip-path: inset(0 0 0 0 round var(--r)); } }
.page-hero-media { margin: 0; position: relative; animation: rise 0.8s var(--ease) 0.18s both; }
.page-hero-media img { animation: clipin 0.9s var(--ease) 0.25s both; }
.page-hero-media::before { content: ""; position: absolute; inset: 0; transform: translate(14px, 14px); border: 2px solid var(--accent); border-radius: var(--r); opacity: 0.7; pointer-events: none; }
.page-hero-media img { position: relative; width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--r); box-shadow: var(--shadow-lg); }
.page-hero .page-thread { position: absolute; left: 0; bottom: -4px; width: 100%; height: 30px; opacity: 0.5; }

.content-page { padding: clamp(44px, 6vw, 76px) 0 clamp(52px, 7vw, 92px); }
.content-narrow { max-width: 840px; }
.content-block { margin-bottom: clamp(40px, 6vw, 68px); }
.content-block:last-child { margin-bottom: 0; }
.content-block h2 { position: relative; padding-bottom: 12px; }
.content-block h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 4px; border-radius: 4px; background: var(--accent); }

.prose { max-width: 74ch; }
.prose p { margin: 0 0 1.1em; }
.content-block:first-of-type .prose > p:first-child { font-size: 1.13rem; line-height: 1.85; color: var(--ink-2); }
.prose img.content-img { border-radius: var(--r-sm); margin: 12px auto; box-shadow: var(--shadow-sm); }
.prose table { width: 100%; border-collapse: collapse; }
.prose td { vertical-align: top; padding: 10px; }
.prose td img { margin: 0 auto 10px; }
.content-table { overflow-x: auto; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.cert-grid img { border-radius: var(--r-sm); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* Donate page */
.donate-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(28px, 4vw, 44px); border-top: 5px solid var(--accent); }
.donate-details { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0; }
.donate-details dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-soft); font-weight: 600; }
.donate-details dd { margin: 5px 0 0; font-weight: 600; color: var(--ink); }
.donate-acct { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; color: var(--brand-deep) !important; letter-spacing: 0.05em; }
.donate-note { margin: 26px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-soft); font-size: 0.96rem; }

/* Helpline page */
.helpline-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(30px, 5vw, 48px); text-align: center; border-top: 5px solid var(--accent); }
.helpline-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--text-soft); font-weight: 600; margin: 22px 0 4px; }
.helpline-number { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 5.5vw, 3rem); color: var(--brand-deep); text-decoration: none; display: inline-block; }
.helpline-number:hover { color: var(--brand); }
.helpline-card hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.helpline-emergency { color: var(--ink); background: var(--mist); border-radius: var(--r-sm); padding: 16px 20px; font-size: 0.96rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: start; }
.contact-map iframe { border: 0; border-radius: var(--r); box-shadow: var(--shadow); }
address { font-style: normal; }
address p { margin: 0 0 12px; }

/* ================= Buttons ================= */
.btn {
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.28);
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; text-decoration: none; font-size: 1rem;
  border: 2px solid transparent;
  transition: background 0.16s, color 0.16s, border-color 0.16s, transform 0.16s var(--ease), box-shadow 0.16s;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 16px 34px; font-size: 1.08rem; }
.btn-amber { background: var(--accent); color: var(--ink); box-shadow: 0 8px 22px rgba(244, 169, 59, 0.4); animation: glowpulse 3.6s ease-in-out infinite; }
.btn-amber:hover { background: var(--accent-deep); color: var(--ink); }
.btn-blue { background: var(--sky); color: var(--white); box-shadow: 0 8px 22px rgba(31, 95, 168, 0.35); }
.btn-blue:hover { background: var(--brand); color: var(--white); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.4); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.is-inner .btn-ghost, .section .btn-ghost { border-color: var(--line); color: var(--ink-2); background: var(--card); }
.is-inner .btn-ghost:hover, .section .btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }

/* ================= Footer ================= */
.site-foot { background: var(--ink); color: #b4c4dc; }
.foot-thread { display: block; width: 100%; height: 60px; color: var(--accent); background: var(--paper); }
.is-home .foot-thread { display: none; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 0.7fr 1fr; gap: 44px; padding-top: 56px; padding-bottom: 36px; }
.foot-col h2 { color: var(--white); font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.foot-col h2::after { display: none; }
.foot-about img { margin-bottom: 18px; width: 171px; height: 80px; object-fit: contain; object-position: left; }
.foot-about p { font-size: 0.93rem; line-height: 1.75; }
.foot-note { font-size: 0.8rem !important; opacity: 0.65; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links a, .site-foot address a { color: #d3dff0; text-decoration: none; transition: color 0.15s; }
.foot-links a:hover, .site-foot address a:hover { color: var(--accent); }
.foot-links li { margin-bottom: 8px; }
.site-foot address p { font-size: 0.93rem; }
.foot-social { list-style: none; display: flex; gap: 10px; margin: 18px 0 0; padding: 0; }
.foot-social a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; color: #d3dff0; text-decoration: none; font-size: 0.86rem; transition: border-color 0.15s, color 0.15s, transform 0.15s var(--ease); }
.foot-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.foot-base { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 20px; padding-bottom: 26px; font-size: 0.85rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-base p { margin: 0; }
.foot-version { opacity: 0.5; font-size: 0.76rem; }

/* Fixed mobile action bar: one tap to the helpline from anywhere */
.call-bar { display: none; }
@media (max-width: 880px) {
  /* ---- Header ---- */
  .nav-toggle { display: block; }
  .brand img { height: 56px; }
  .head-in { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .site-nav { display: none; width: 100%; }
  .nav-check:checked ~ .site-nav { display: block; animation: rise 0.28s var(--ease) both; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 0 16px; border-top: 1px solid var(--line); margin-top: 8px; }
  .site-nav a { border-radius: var(--r-sm); padding: 14px 16px; font-size: 1.08rem; }
  .site-nav a[aria-current="page"] { border-left: 4px solid var(--accent); }
  .nav-lang a { justify-content: center; }
  .topbar { display: none; }

  /* ---- Hero: copy first, photo second ---- */
  .hero { padding: 30px 0 36px; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-media { order: 2; max-width: none; }
  .hero-copy { order: 1; }
  .hero .eyebrow { border: 0; background: none; padding: 0; letter-spacing: 0.12em; font-size: 0.72rem; margin-bottom: 10px; }
  .hero h1 { font-size: clamp(2.05rem, 8.6vw, 2.5rem); margin-bottom: 14px; }
  .hero .lede { font-size: 1.02rem; line-height: 1.75; }
  .hero-ctas { margin-top: 22px; gap: 10px; }
  .hero-ctas .btn { width: 100%; text-align: center; }
  .hero-ctas .btn-ghost { width: auto; margin-inline: auto; border: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; padding: 8px 4px; box-shadow: none; }
  .hero-photo::before { display: none; }
  .hero-photo img { aspect-ratio: 16/10; border-radius: var(--r); }
  .hero-thread-main { display: none; }
  .hero-badge { margin-top: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; margin-top: 30px; padding-top: 22px; }
  .stat { padding-left: 16px; }
  .stat::before { width: 3px; }
  .stat dt { font-size: 1.7rem; }
  .stat dd { font-size: 0.82rem; }

  /* ---- Sections ---- */
  .section { padding: 44px 0; }
  .kicker { font-size: 0.72rem; }
  .section-title { font-size: 1.6rem; }
  .section-intro { font-size: 0.98rem; }
  .section-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 22px; }
  .section-head .btn { text-align: center; }
  .marquee { padding: 9px 0; border-block-width: 2px; }
  .marquee-item { font-size: 0.9rem; }
  .cards, .pillars { grid-template-columns: 1fr; gap: 18px; }
  .cards-bento { grid-template-columns: 1fr; }
  .card-featured { grid-column: auto; grid-row: auto; }
  .card-featured .card-body { padding: 20px 22px 22px; }
  .card-featured h3 { font-size: 1.3rem; }
  .pillar-media h3 { font-size: 1.1rem; left: 18px; right: 18px; bottom: 13px; }
  .timeline { grid-template-columns: 1fr; gap: 24px; padding: 0 0 0 26px; }
  .timeline::before { top: 6px; bottom: 6px; left: 7px; right: auto; width: 3px; height: auto; background: linear-gradient(180deg, var(--accent), rgba(244, 169, 59, 0.25)); }
  .tl-dot { position: absolute; top: 4px; left: -26px; }
  .tl-year { font-size: 1.4rem; }
  .logo-track { gap: 38px; }
  .logo-cell img { height: 42px; }
  .story-grid { grid-template-columns: 1fr; }
  .story-media::before { display: none; }

  /* ---- Bands ---- */
  .donate-band-in, .help-band-in { flex-direction: column; align-items: stretch; text-align: left; gap: 20px; }
  .donate-band-in .btn, .help-band-in .btn { text-align: center; }
  .donate-inline { width: 100%; justify-content: flex-start; }
  .donate-inline strong { font-size: 1.2rem; }

  /* ---- Inner pages ---- */
  .page-hero { padding: 30px 0 30px; }
  .page-hero.has-media .page-hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .page-hero-media::before { display: none; }
  .page-hero-media img { aspect-ratio: 16/9; }
  .page-hero h1 { font-size: 1.85rem; }
  .page-hero-intro { font-size: 0.98rem; }
  .page-hero .page-thread { display: none; }
  .crumbs { margin-bottom: 10px; }
  .content-page { padding: 34px 0 48px; }
  .content-block { margin-bottom: 36px; }
  .content-block h2 { font-size: 1.45rem; }
  .prose { font-size: 1rem; }
  .prose img.content-img { border-radius: 10px; }
  .prose td { display: block; width: 100% !important; padding: 8px 0; }
  .prose td img { width: 100% !important; }
  .helpline-number { font-size: clamp(1.7rem, 8.4vw, 2.2rem); }
  .donate-details { grid-template-columns: 1fr; gap: 18px; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-map iframe { height: 340px; }
  .form-grid { grid-template-columns: 1fr; }

  /* ---- Footer ---- */
  .foot-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .foot-links { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
  .foot-about img { width: 150px; height: 70px; }
  .foot-base { flex-direction: column; text-align: center; gap: 8px; }
  .foot-social { flex-wrap: wrap; }

  /* ---- Floating help-line button (replaces the full-width bar) ---- */
  .call-bar {
    position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 90;
    display: block;
  }
  .call-bar-phone {
    display: inline-flex; align-items: center; justify-content: center; gap: 0;
    width: 58px; height: 58px; border-radius: 50%; overflow: hidden;
    background: var(--accent); color: var(--ink);
    text-decoration: none; font-size: 0;
    box-shadow: 0 10px 26px rgba(21, 34, 56, 0.35);
    animation: glowpulse 3.6s ease-in-out infinite;
  }
  .call-bar-phone svg { width: 24px; height: 24px; }
  .call-bar-phone span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .call-bar-donate { display: none; }
  body.page-helpline .call-bar { display: none; }

}

@media (min-width: 881px) {
  .call-bar { display: none; }
}

/* ================= Contact form (v3.0.3) ================= */
.contact-form-wrap { margin-top: clamp(36px, 5vw, 56px); max-width: 720px; }
.contact-form-wrap h2 { position: relative; padding-bottom: 12px; }
.contact-form-wrap h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 4px; border-radius: 4px; background: var(--accent); }
.contact-form { display: flex; flex-direction: column; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: clamp(20px, 3.5vw, 30px); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; color: var(--ink-2); font-size: 0.94rem; }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--text);
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; background: var(--paper);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.15); }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .btn { align-self: flex-start; }
.form-privacy { margin: 0; font-size: 0.85rem; color: var(--text-soft); }
.hp { position: absolute; left: -9999px; top: -9999px; }
.form-status { border-radius: 10px; padding: 13px 16px; font-weight: 500; }
.form-status.is-ok { background: #e7f6ec; color: #14532d; border: 1px solid #b7e2c5; }
.form-status.is-err { background: #fdecec; color: #7f1d1d; border: 1px solid #f5c2c2; }

/* ================= Brand social buttons (contact page) ================= */
.contact-social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; padding: 0; }
.soc { display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--white); transition: transform 0.15s var(--ease), box-shadow 0.15s; box-shadow: var(--shadow-sm); }
.soc:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--white); }
.soc-fb { background: #1877f2; }
.soc-yt { background: #ff0000; }
.soc-tt { background: #111111; }
.soc-line { background: #06c755; }

/* ================= Donate bank row ================= */
.bank-row { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.bank-row img { height: 44px; width: auto; }
.bank-mark { display: inline-grid; place-items: center; width: 52px; height: 44px; border-radius: 10px; background: #00a4e4; color: var(--white); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.03em; }
.bank-name { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.05rem; }

/* ================= Beauty pass: progress bar + scrollbar ================= */
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.scroll-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    display: block; position: fixed; top: 0; left: 0; right: 0; height: 3.5px; z-index: 200;
    background: linear-gradient(90deg, var(--accent), #f7c56d);
    transform-origin: left; transform: scaleX(0);
    animation: growx linear both; animation-timeline: scroll();
    pointer-events: none;
  }
}
html { scrollbar-color: var(--brand) var(--paper); scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 8px; border: 2.5px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--brand-deep); }

/* Section wave transitions (navy story section) */
.wave { position: absolute; left: 0; right: 0; line-height: 0; pointer-events: none; z-index: 1; }
.wave svg { display: block; width: 100%; height: 42px; }
.wave-top { top: -1px; }
.wave-bottom { bottom: -1px; transform: scaleY(-1); }
.timeline-section { position: relative; padding-top: calc(clamp(48px, 6vw, 84px) + 30px); padding-bottom: calc(clamp(48px, 6vw, 84px) + 30px); }

/* Aurora orbs depend on filter blur; hide cleanly where unsupported */
@supports not (filter: blur(10px)) {
  .hero::before, .hero::after { display: none; }
}

/* Movaci attribution (v3.0.7) */
.foot-credit { margin: 0; }
.foot-credit a { color: #9fb2cc; text-decoration: none; font-size: 0.85rem; transition: color 0.15s; }
.foot-credit a:hover { color: var(--accent); }

/* ================= FOCUS Assistant (v3.0.9) ================= */
#focus-bot { position: fixed; right: 18px; bottom: 84px; z-index: 95; }
@media (min-width: 881px) { #focus-bot { bottom: 24px; } }

.bot-launcher {
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: var(--white); border: 0; border-radius: 999px; cursor: pointer;
  padding: 14px 22px; font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  box-shadow: 0 12px 30px rgba(31, 95, 168, 0.4);
  transition: transform 0.18s var(--ease), box-shadow 0.18s;
}
.bot-launcher:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(31, 95, 168, 0.5); }
.bot-launcher.is-open { transform: scale(0.9); opacity: 0.9; }
.bot-launcher svg { flex: none; }

@keyframes botrise { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: none; } }
.bot-panel {
  position: absolute; right: 0; bottom: calc(100% + 14px);
  width: min(392px, calc(100vw - 32px)); height: min(560px, 72vh);
  display: flex; flex-direction: column;
  background: var(--white); border-radius: 20px;
  box-shadow: 0 30px 70px rgba(21, 34, 56, 0.32), 0 0 0 1px rgba(21, 34, 56, 0.06);
  overflow: hidden; animation: botrise 0.32s var(--ease) both;
}
.bot-panel[hidden] { display: none; }

.bot-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; color: var(--white);
  background: linear-gradient(135deg, #1d3054 0%, #14406f 100%);
  position: relative;
}
.bot-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.bot-head-title { display: flex; align-items: center; gap: 10px; }
.bot-head-title svg { color: var(--accent); }
.bot-head strong { font-family: var(--font-display); font-size: 1.08rem; }
.bot-x { background: rgba(255,255,255,0.12); border: 0; color: var(--white); font-size: 1.4rem; line-height: 1; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; transition: background 0.15s; }
.bot-x:hover { background: rgba(255,255,255,0.25); }

.bot-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--paper); scroll-behavior: smooth; }
.bot-log::-webkit-scrollbar { width: 8px; }
.bot-log::-webkit-scrollbar-thumb { background: rgba(21,34,56,0.18); border-radius: 8px; }

@keyframes msgin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bot-msg { max-width: 90%; padding: 12px 15px; border-radius: 16px; font-size: 0.94rem; line-height: 1.6; animation: msgin 0.25s var(--ease) both; }
.bot-bot { align-self: flex-start; background: var(--white); box-shadow: 0 2px 10px rgba(21,34,56,0.06); border-bottom-left-radius: 5px; color: var(--text); }
.bot-user { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: var(--white); border-bottom-right-radius: 5px; }

.bot-typing { display: inline-flex; gap: 4px; padding: 15px; }
.bot-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-soft); opacity: 0.5; animation: botdot 1.2s infinite; }
.bot-dot:nth-child(2) { animation-delay: 0.2s; } .bot-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes botdot { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

.bot-answer { margin: 0; }
.bot-answer-wrap { display: flex; flex-direction: column; gap: 10px; }

.bot-crisis { background: linear-gradient(135deg, #fff4e6, #ffe9cc); border: 1.5px solid var(--accent); border-radius: 14px; padding: 14px; }
.bot-crisis-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bot-crisis-head svg { color: #c77700; flex: none; }
.bot-crisis-head span { font-weight: 700; color: var(--ink); font-size: 0.9rem; }
.bot-crisis-call { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--ink); font-family: var(--font-display); font-weight: 700; text-decoration: none; padding: 11px 18px; border-radius: 999px; font-size: 0.98rem; box-shadow: 0 4px 14px rgba(244,169,59,0.5); }
.bot-crisis-call:hover { background: var(--accent-deep, #e5952a); }

.bot-sources { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.bot-sources-label { font-size: 0.72rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; width: 100%; }
.bot-source-link { display: inline-flex; align-items: center; gap: 3px; font-size: 0.86rem; color: var(--brand); text-decoration: none; font-weight: 600; background: rgba(31,95,168,0.08); padding: 6px 12px; border-radius: 999px; transition: background 0.15s; }
.bot-source-link:hover { background: rgba(31,95,168,0.16); }
.bot-source-link svg { flex: none; }

.bot-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px; }
.bot-chips-label { width: 100%; font-size: 0.74rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 2px; }
.bot-chip { background: var(--white); border: 1.5px solid var(--line); color: var(--brand-deep); font: inherit; font-size: 0.86rem; font-weight: 500; padding: 9px 14px; border-radius: 999px; cursor: pointer; transition: all 0.15s var(--ease); }
.bot-chip:hover { border-color: var(--brand); background: var(--brand); color: var(--white); transform: translateY(-1px); }

.bot-input { display: flex; gap: 9px; padding: 13px; border-top: 1px solid var(--line); background: var(--white); }
.bot-input input { flex: 1; font: inherit; border: 1.5px solid var(--line); border-radius: 999px; padding: 11px 16px; background: var(--paper); }
.bot-input input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,95,168,0.15); background: var(--white); }
.bot-send-btn { flex: none; width: 44px; height: 44px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: var(--white); border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: transform 0.15s; }
.bot-send-btn:hover { transform: scale(1.08); }
.bot-disc { margin: 0; padding: 9px 14px 13px; font-size: 0.73rem; color: var(--text-soft); text-align: center; background: var(--white); }

@media (max-width: 880px) {
  #focus-bot { right: 14px; bottom: 76px; }
  .bot-launcher span { display: none; }
  .bot-launcher { padding: 16px; border-radius: 50%; box-shadow: 0 10px 26px rgba(31,95,168,0.45); }
  /* Full-height sheet on phones so the keyboard doesn't crush it */
  .bot-panel {
    position: fixed; right: 0; left: 0; bottom: 0; top: auto;
    width: 100%; height: 88vh; height: 88dvh;
    border-radius: 20px 20px 0 0;
  }
  body.bot-open-body { overflow: hidden; }
}
