/* =========================================================================
   AITA — Design tokens
   Palette extracted directly from the chosen brand mark (bridge / mountains /
   river illustration): forest greens, sky + river blue, warm cream, and a
   deepened gold accent for calls to action. All text/background pairings
   below are verified for WCAG AA contrast (see build notes in README).
   ========================================================================= */
:root {
  /* Brand palette */
  --forest-900: #0A2E26;
  --forest-800: #10382E;
  --forest-700: #145446;
  --forest-600: #1F6B57;
  --forest-500: #3C7A5C;
  --sky-500: #5FB1DD;
  --sky-600: #3E93C2;
  --river-600: #2E8FB8;
  --cream-50:  #FBF7EE;
  --cream-100: #F7F1E1;
  --cream-200: #F2E2C4;
  --gold-600: #A9793C;
  --gold-700: #8A6428;
  --white: #FFFFFF;
  --error-700: #A23B2E;
  --error-100: #F7E4E0;

  /* Semantic */
  --color-bg: var(--cream-50);
  --color-bg-alt: var(--white);
  --color-ink: var(--forest-900);
  --color-ink-muted: var(--forest-500);
  --color-border: #E4D9BE;
  --color-focus: var(--sky-600);

  /* Type scale */
  --font-heading: "Noto Serif", "Noto Serif SC", "Noto Naskh Arabic", serif;
  --font-body: "Noto Sans", "Noto Sans SC", "Noto Sans Arabic", sans-serif;
  --step-0: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --step-2: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.1vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.85rem + 1.9vw, 3.5rem);

  /* Layout */
  --wrap: 1160px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 10px 30px -12px rgba(10, 46, 38, 0.25);
  --transition: 220ms cubic-bezier(.4,0,.2,1);
}

/* Per-language type stacks so every script renders in its own optimized
   Noto companion while keeping one coherent type family. */
[data-lang="zh"] { --font-heading: "Noto Serif SC", serif; --font-body: "Noto Sans SC", sans-serif; }
[data-lang="ar"] { --font-heading: "Noto Naskh Arabic", serif; --font-body: "Noto Sans Arabic", sans-serif; }

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--space-3); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-2);
  top: -60px;
  background: var(--forest-900);
  color: var(--white);
  padding: 0.75em 1.25em;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-2); }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8125rem;
  color: var(--forest-600);
  margin: 0 0 0.75em;
}
.eyebrow-light { color: var(--cream-200); }

.body-lg { font-size: var(--step-1); color: var(--color-ink); max-width: 62ch; }
.body-lg { line-height: 1.7; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--forest-700); color: var(--white); }
.btn-primary:hover { background: var(--forest-600); }

.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }

.btn-accent { background: var(--gold-700); color: var(--white); width: 100%; }
.btn-accent:hover { background: var(--gold-600); }
.btn-accent:disabled { opacity: 0.65; cursor: progress; transform: none; }

/* =========================================================================
   Header / nav
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: 0.6rem;
}
.brand { display: inline-flex; }
.brand-logo { height: 44px; width: auto; }

.main-nav ul { list-style: none; display: flex; gap: var(--space-4); margin: 0; padding: 0; }
.main-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--forest-800);
  padding: 0.5em 0.2em;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}
.main-nav a:hover { border-color: var(--gold-600); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.lang-switch select {
  appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%230A2E26' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.85em center;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5em 2.2em 0.5em 1.1em;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 44px;
  color: var(--forest-900);
  cursor: pointer;
}
[dir="rtl"] .lang-switch select {
  background-position: left 0.85em center;
  padding: 0.5em 1.1em 0.5em 2.2em;
}
.lang-switch select:hover { border-color: var(--gold-600); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; margin-inline: auto; background: var(--forest-900); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { border-top: 1px solid var(--color-border); background: var(--cream-50); }
.mobile-nav ul { list-style: none; margin: 0; padding: var(--space-2) var(--space-3); display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav a { display: block; padding: 0.85em 0.2em; font-weight: 600; text-decoration: none; color: var(--forest-800); min-height: 44px; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}
@media (min-width: 861px) {
  .mobile-nav { display: none !important; }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--white);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,46,38,0.55) 0%, rgba(10,46,38,0.45) 35%, rgba(10,46,38,0.88) 100%);
}
.hero-inner { position: relative; z-index: 1; padding-block: var(--space-6) var(--space-5); max-width: 900px; }
.hero h1 { margin-bottom: 0.4em; }
.hero-subtitle { font-size: var(--step-1); max-width: 56ch; color: var(--cream-100); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }

.scroll-hint {
  position: absolute;
  z-index: 1;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  bottom: var(--space-3);
  color: var(--cream-100);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
}
.scroll-hint span { width: 1px; height: 28px; background: currentColor; animation: scrollpulse 1.8s ease-in-out infinite; }
@keyframes scrollpulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* =========================================================================
   Sections (shared)
   ========================================================================= */
.section { padding-block: var(--space-6); }

.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms ease, transform 700ms ease;
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* =========================================================================
   About
   ========================================================================= */
.about-section { background: var(--color-bg-alt); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow-card); }
.about-copy h2 { color: var(--forest-900); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .about-media { order: -1; }
}

/* =========================================================================
   Share your story
   ========================================================================= */
.story-section {
  background: var(--forest-900);
  color: var(--cream-100);
  background-image: radial-gradient(1200px 600px at 15% -10%, rgba(95,177,221,0.18), transparent 60%);
}
.story-section h2 { color: var(--white); }
.story-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-5); align-items: start; }
.story-copy .body-lg { color: var(--cream-100); }

.story-form {
  background: var(--white);
  color: var(--color-ink);
  padding: var(--space-4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.form-required-note { font-size: 0.85rem; color: var(--color-ink-muted); margin-bottom: var(--space-3); }

.field { margin-bottom: var(--space-3); display: flex; flex-direction: column; gap: 0.4em; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input[type="text"],
.field input[type="email"],
.field textarea {
  font: inherit;
  padding: 0.85em 1em;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--cream-50);
  color: var(--color-ink);
  min-height: 48px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: var(--sky-600);
  outline: none;
  box-shadow: 0 0 0 3px rgba(62,147,194,0.25);
}
.field input:invalid:not(:placeholder-shown) { border-color: var(--error-700); }

.field-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

.field-consent { flex-direction: row; align-items: flex-start; gap: 0.75em; }
.field-consent input[type="checkbox"] { width: 22px; height: 22px; min-width: 22px; margin-top: 2px; accent-color: var(--forest-700); }
.field-consent label { font-weight: 400; font-size: 0.9rem; }

.btn-submit { margin-top: var(--space-2); }

.form-status { margin-top: var(--space-3); padding: 1em 1.1em; border-radius: var(--radius-sm); }
.form-status[data-state="success"] { background: #E4F0EA; border: 1.5px solid var(--forest-600); }
.form-status[data-state="error"] { background: var(--error-100); border: 1.5px solid var(--error-700); }
.form-status-title { font-weight: 700; margin-bottom: 0.25em; }
.form-status[data-state="success"] .form-status-title { color: var(--forest-700); }
.form-status[data-state="error"] .form-status-title { color: var(--error-700); }
.form-status-body { margin: 0; font-size: 0.925rem; }
.form-status a { color: inherit; font-weight: 700; }

@media (max-width: 960px) {
  .story-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Team
   ========================================================================= */
.team-section { background: var(--cream-100); }
.team-heading { max-width: 70ch; margin-bottom: var(--space-5); }
.team-intro { font-weight: 600; color: var(--forest-800); }

.team-members {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.team-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  display: flex;
  gap: var(--space-3);
}
.team-card img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--cream-200);
}
.team-card-name { font-family: var(--font-heading); font-weight: 700; font-size: var(--step-1); margin: 0; color: var(--forest-900); }
.team-card-role { color: var(--gold-700); font-weight: 600; font-size: 0.9rem; margin: 0.15em 0 0.75em; }
.team-card-bio { font-size: 0.95rem; color: var(--color-ink); margin: 0; line-height: 1.65; }

@media (max-width: 760px) {
  .team-members { grid-template-columns: 1fr; }
  .team-card { flex-direction: column; }
  .team-card img { width: 84px; height: 84px; }
}

.partners { text-align: center; border-top: 1px solid var(--color-border); padding-top: var(--space-4); }
.partners-title { font-weight: 700; color: var(--forest-800); margin-bottom: var(--space-3); }

/* One continuous white fascia holds every partner mark, side by side on a
   single line on wide screens (wrapping only if the viewport is too narrow).
   Logos are never stretched or recolored — height-constrained with
   object-fit:contain so each mark keeps its own proportions, per FBK's brand
   guidelines (structure/ratio fixed, size only). A hairline divider between
   marks reads as one lockup rather than a set of separate cards. */
.partners-list {
  list-style: none;
  margin: 0;
  padding: var(--space-3) var(--space-5);
  background: var(--white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
}
.partner-logo:not(:first-child) { border-inline-start: 1px solid var(--color-border); }
.partner-logo img {
  height: 40px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
}
.partner-logo--fbk img { height: 48px; }

@media (max-width: 700px) {
  .partners-list { padding: var(--space-2) var(--space-3); }
  .partner-logo { padding: var(--space-2) var(--space-3); }
  .partner-logo:not(:first-child) { border-inline-start: none; }
  .partner-logo img { height: 32px; }
  .partner-logo--fbk img { height: 38px; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--forest-900); color: var(--cream-100); padding-block: var(--space-5); }
.footer-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.footer-logo {
  height: 72px;
  width: 72px;
  border-radius: 50%;
  box-shadow: var(--shadow-card);
}
.footer-tagline { max-width: 50ch; color: var(--cream-100); }

.footer-connect { margin-block: var(--space-2) var(--space-1); }
.footer-connect-label {
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cream-200);
  margin-bottom: var(--space-2);
}
.footer-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6em;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.5em 1em;
  border-radius: 999px;
  border: 1.5px solid rgba(247,241,225,0.3);
  color: var(--cream-100);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.footer-social a:hover {
  border-color: var(--gold-600);
  background: rgba(169,121,60,0.15);
  color: var(--white);
}
.footer-social svg { flex-shrink: 0; }

.footer-rights {
  font-size: 0.8125rem;
  color: rgba(247,241,225,0.65);
  margin-block: var(--space-2) 0;
}
.back-to-top { margin-top: var(--space-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   Responsive scale-down for smaller phones
   ========================================================================= */
@media (max-width: 400px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
}
