@import url("theme.css");
@import url("animations.css");

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fz-base);
  line-height: var(--lh-base);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg { display: block; max-width: 100%; height: auto; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

button {
  cursor: pointer;
  border: 0;
  background: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

h1,
h2,
h3,
h4 {
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
  line-height: var(--lh-tight);
}

html[lang="am"] h1,
html[lang="am"] h2,
html[lang="am"] h3,
html[lang="am"] h4,
html[lang="ti"] h1,
html[lang="ti"] h2,
html[lang="ti"] h3,
html[lang="ti"] h4 {
  font-family: var(--font-ethiopic);
}

html[lang="ar"] body,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4 {
  font-family: var(--font-ar);
}

html[dir="rtl"] body {
  text-align: right;
}

h1 { font-size: var(--fz-display); }
h2 { font-size: var(--fz-3xl); }
h3 { font-size: var(--fz-xl); }
h4 { font-size: var(--fz-lg); }

p {
  color: var(--fg-muted);
  line-height: var(--lh-relaxed);
  max-width: var(--max-w-prose);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.skip {
  position: absolute;
  top: -48px;
  left: 10px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--c-green-900);
  color: var(--c-white);
  font-weight: 700;
}

.skip:focus { top: 10px; }

.gov-bar {
  background: var(--c-green-950);
  color: #fff7df;
  font-size: var(--fz-xs);
}

.gov-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.gov-bar strong {
  color: var(--accent);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  transition: box-shadow var(--d-base), background var(--d-base);
}

.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  gap: 0;
}

.brand-lockup {
  width: clamp(150px, 13vw, 188px);
  height: auto;
  flex: 0 0 auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}

.brand-name {
  display: block;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-line {
  display: block;
  margin-top: 3px;
  color: var(--fg-muted);
  font-size: var(--fz-xs);
  font-weight: 600;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-5);
}

.nav-links a {
  color: var(--fg-muted);
  font-size: var(--fz-sm);
  font-weight: 650;
  transition: color var(--d-fast);
}

.nav-links a:hover,
.nav-links a.active { color: var(--fg); }

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

.icon-btn,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--fg-muted);
  transition: color var(--d-fast), border-color var(--d-fast), background var(--d-fast);
}

.icon-btn:hover,
.nav-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.icon-btn svg,
.nav-toggle svg { width: 19px; height: 19px; }

.lang-dd {
  position: relative;
}

.lang-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 74px;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--fg);
  font-size: var(--fz-xs);
  font-weight: 800;
}

.lang-dd-btn svg { width: 16px; height: 16px; }

.lang-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  min-width: 210px;
  max-height: 360px;
  overflow-y: auto;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
}

html[dir="rtl"] .lang-dd-menu {
  right: auto;
  left: 0;
}

.lang-dd.open .lang-dd-menu {
  display: grid;
  gap: 2px;
}

.lang-dd-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: var(--fz-sm);
  text-align: left;
}

html[dir="rtl"] .lang-dd-menu button {
  text-align: right;
}

.lang-dd-menu button:hover,
.lang-dd-menu button.active {
  background: var(--accent-soft);
  color: var(--c-coffee-950);
}

.nav-mobile {
  display: none;
  position: absolute;
  inset: 100% 0 auto 0;
  padding: var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
}

.nav-mobile.open {
  display: grid;
  gap: var(--space-2);
}

.nav-mobile a {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-weight: 650;
}

.nav-mobile a:hover {
  background: var(--bg-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  transition: transform var(--d-base) var(--ease-out), box-shadow var(--d-base), border-color var(--d-base), background var(--d-base);
}

.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.btn-primary {
  background: var(--g-brand);
  color: var(--c-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-gold {
  background: var(--g-accent);
  color: var(--c-coffee-950);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.btn-lg {
  min-height: 52px;
  padding: var(--space-4) var(--space-6);
  font-size: var(--fz-lg);
}

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(251, 248, 239, 0.98) 0%, rgba(251, 248, 239, 0.92) 36%, rgba(251, 248, 239, 0.62) 56%, rgba(251, 248, 239, 0.16) 100%),
              url("../img/hero-tamagnet-ethiopia.png") center right / cover no-repeat,
              var(--g-hero);
}

html[dir="rtl"] .hero {
  background: linear-gradient(270deg, rgba(251, 248, 239, 0.98) 0%, rgba(251, 248, 239, 0.92) 36%, rgba(251, 248, 239, 0.62) 56%, rgba(251, 248, 239, 0.16) 100%),
              url("../img/hero-tamagnet-ethiopia.png") center left / cover no-repeat,
              var(--g-hero);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(23, 133, 84, 0.08) 25%, transparent 25%),
    linear-gradient(225deg, rgba(183, 43, 39, 0.06) 25%, transparent 25%);
  background-position: 0 0, 18px 18px;
  background-size: 36px 36px;
  opacity: 0.42;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: var(--g-flag);
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}

.hero-copy {
  max-width: 720px;
}

html[dir="rtl"] .hero-copy {
  margin-left: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--brand);
  font-size: var(--fz-sm);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 3px;
  background: var(--g-flag);
}

.hero h1 {
  margin-top: var(--space-4);
  max-width: 780px;
  color: var(--c-coffee-950);
}

.accent {
  color: var(--c-green-800);
}

.hero-sub {
  margin-top: var(--space-4);
  color: #4d463c;
  font-size: var(--fz-base);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(58, 39, 26, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--c-coffee-950);
  font-size: 0.84rem;
  font-weight: 700;
}

.trust-pill svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.hero-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  width: min(100%, 900px);
  margin-top: var(--space-7);
}

#metrics .hero-status {
  margin-top: 0;
}

.status-item {
  min-height: 104px;
  padding: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.status-value {
  display: block;
  color: var(--c-green-800);
  font-family: var(--font-display);
  font-size: var(--fz-2xl);
  font-weight: 800;
  line-height: 1;
}

.status-label {
  display: block;
  margin-top: var(--space-2);
  color: var(--fg-muted);
  font-size: var(--fz-sm);
  font-weight: 650;
}

.section {
  padding: var(--space-9) 0;
}

.section-tight {
  padding: var(--space-7) 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-dark {
  background: var(--c-green-950);
  color: var(--c-white);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--c-white);
}

.section-dark p,
.section-dark .section-head p {
  color: rgba(255, 250, 240, 0.78);
}

.section-dark .eyebrow {
  color: var(--accent);
}

.section-head {
  max-width: 790px;
  margin: 0 auto var(--space-7);
  text-align: center;
}

.section-head h2 {
  margin-top: var(--space-3);
}

.section-head p {
  margin: var(--space-4) auto 0;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--space-5);
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  height: 100%;
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition: transform var(--d-base) var(--ease-out), box-shadow var(--d-base), border-color var(--d-base);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--c-green-100), var(--c-gold-100));
  color: var(--c-green-800);
}

.card-icon svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.8;
}

.card h3 {
  margin-bottom: var(--space-3);
}

.card p {
  font-size: var(--fz-sm);
}

.stripe-top {
  position: relative;
  overflow: hidden;
}

.stripe-top::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--g-flag);
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-4);
}

.language-card {
  min-height: 138px;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.language-card strong {
  display: block;
  color: var(--fg);
  font-size: var(--fz-lg);
}

.language-card span {
  display: block;
  margin-top: var(--space-2);
  color: var(--fg-muted);
  font-size: var(--fz-sm);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
  counter-reset: step;
}

.step {
  counter-increment: step;
  position: relative;
  padding: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--c-coffee-950);
  font-family: var(--font-display);
  font-weight: 800;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}

.source-card {
  min-height: 190px;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  text-align: center;
}

.source-card img {
  height: 46px;
  width: 100%;
  object-fit: contain;
  margin-bottom: var(--space-4);
}

.source-volume {
  display: block;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: var(--fz-xl);
  font-weight: 800;
}

.source-label {
  display: block;
  margin-top: var(--space-2);
  color: var(--fg-muted);
  font-size: var(--fz-sm);
}

.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: var(--fz-sm);
}

html[dir="rtl"] .compare-table th,
html[dir="rtl"] .compare-table td {
  text-align: right;
}

.compare-table th {
  background: var(--bg-soft);
  color: var(--fg);
  font-weight: 800;
}

.compare-table tr:last-child td {
  border-bottom: 0;
}

.compare-table .yes {
  color: var(--c-green-800);
  font-weight: 800;
}

.compare-table .partial {
  color: var(--c-gold-900);
  font-weight: 800;
}

.compare-table .no {
  color: var(--c-red-700);
  font-weight: 800;
}

.cta-band {
  position: relative;
  overflow: hidden;
  padding: var(--space-8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffaf0 0%, #eef6ed 100%);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: var(--g-flag);
  background-size: 160px 8px;
  animation: stripeMove 12s linear infinite;
}

.cta-band h2 {
  margin-top: var(--space-3);
}

.cta-band p {
  margin: var(--space-4) auto var(--space-6);
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.faq-list {
  display: grid;
  gap: var(--space-3);
  max-width: 850px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  list-style: none;
  cursor: pointer;
  color: var(--fg);
  font-weight: 800;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.45rem;
  line-height: 1;
}

.faq-item[open] summary::after { content: "-"; }

.faq-body {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--fg-muted);
  font-size: var(--fz-sm);
  line-height: var(--lh-relaxed);
}

.footer {
  padding: var(--space-8) 0 var(--space-6);
  background: var(--c-coffee-950);
  color: #efe6d6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-6);
}

.footer .brand-name,
.footer h4 {
  color: #fffaf0;
}

.footer .brand-lockup {
  width: min(100%, 214px);
}

.footer p,
.footer a,
.footer small {
  color: #d4c8b8;
  font-size: var(--fz-sm);
}

.footer a:hover { color: var(--accent); }

.footer h4 {
  margin-bottom: var(--space-4);
  font-size: var(--fz-sm);
  text-transform: uppercase;
}

.footer ul {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

@media (max-width: 1100px) {
  .hero-status,
  .pipeline,
  .source-grid,
  .language-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root {
    --fz-display: 2.15rem;
    --fz-3xl: 2rem;
    --fz-2xl: 1.45rem;
  }

  .gov-bar .container {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-1);
  }

  .brand-lockup { width: 140px; }
  .brand-line { display: none; }
  .nav-inner { min-height: 68px; }
  .nav-actions .btn { display: none; }

  .hero {
    min-height: 72vh;
    align-items: flex-end;
    background: linear-gradient(180deg, rgba(251, 248, 239, 0.88) 0%, rgba(251, 248, 239, 0.96) 56%, rgba(251, 248, 239, 1) 100%),
                url("../img/hero-tamagnet-ethiopia.png") center top / cover no-repeat,
                var(--g-hero);
  }

  html[dir="rtl"] .hero {
    background: linear-gradient(180deg, rgba(251, 248, 239, 0.88) 0%, rgba(251, 248, 239, 0.96) 56%, rgba(251, 248, 239, 1) 100%),
                url("../img/hero-tamagnet-ethiopia.png") center top / cover no-repeat,
                var(--g-hero);
  }

  .hero .container {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }

  .hero-sub {
    font-size: var(--fz-sm);
  }

  .hero-trust {
    display: none;
  }

  .hero-status,
  .pipeline,
  .source-grid,
  .language-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .status-item {
    min-height: auto;
  }

  .section {
    padding: var(--space-7) 0;
  }

  .cta-band {
    padding: var(--space-7) var(--space-5);
  }

  .footer-bottom {
    flex-direction: column;
  }
}
