/* =====================================================================
   Amharic Keyboard — marketing site
   Palette is taken 1:1 from the app (Color.kt / colors.xml / Theme.kt)
   ===================================================================== */

:root {
  /* ---- Brand core (from Color.kt) ---- */
  --brand:        #5B4BE8;  /* BrandViolet — primary */
  --brand-bright: #6D5CFF;  /* gradient start */
  --brand-deep:   #4A36D6;  /* gradient end  */
  --brand-soft:   #EAE7FF;  /* tonal container */
  --accent:       #FF8A5B;  /* BrandCoral */
  --accent-deep:  #F2663A;

  /* ---- Light neutrals ---- */
  --bg:           #F5F5FC;
  --surface:      #FFFFFF;
  --surface-2:    #EFEFF8;
  --ink:          #16141F;
  --muted:        #6B6880;
  --outline:      #E2E1EE;

  /* ---- Category accents (feature tiles) ---- */
  --cat-themes:   #7C6CFF;
  --cat-fonts:    #FFB020;
  --cat-test:     #1FC7A9;
  --cat-settings: #3D8BFF;
  --cat-enable:   #FF9A3D;
  --cat-choose:   #FF5E6C;

  /* ---- Semantic ---- */
  --success: #22C55E;
  --warning: #F59E0B;
  --error:   #EF4444;

  /* ---- Hero gradient (light) ---- */
  --hero-1: #E9E4FF;
  --hero-2: #F7E8F2;

  /* ---- Derived ---- */
  --brand-grad: linear-gradient(135deg, var(--brand-bright), var(--brand-deep));
  --card-shadow: 0 10px 30px -12px rgba(28, 23, 71, .18);
  --card-shadow-lg: 0 30px 60px -20px rgba(28, 23, 71, .28);
  --ring: rgba(91, 75, 232, .45);

  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1140px;
  --nav-h: 66px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
          Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
          "Apple Color Emoji", "Segoe UI Emoji";

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:        #0E0D15;
  --surface:   #17161F;
  --surface-2: #211F2B;
  --ink:       #F3F2FA;
  --muted:     #A09DB4;
  --outline:   #302E3C;
  --brand:     #6D5CFF;
  --brand-soft:#241F3D;
  --hero-1:    #2A2350;
  --hero-2:    #3A2466;
  --card-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
  --card-shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0E0D15;
    --surface:   #17161F;
    --surface-2: #211F2B;
    --ink:       #F3F2FA;
    --muted:     #A09DB4;
    --outline:   #302E3C;
    --brand:     #6D5CFF;
    --brand-soft:#241F3D;
    --hero-1:    #2A2350;
    --hero-2:    #3A2466;
    --card-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
    --card-shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); }
h3 { font-size: 1.22rem; }
p  { margin: 0 0 1rem; color: var(--muted); }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { color: var(--muted); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft);
  padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1rem;
}
.lead { font-size: 1.12rem; max-width: 56ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* skip link */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

:where(a, button, input, textarea, summary):focus-visible {
  outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 12px 28px -10px var(--ring); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--outline); box-shadow: var(--card-shadow); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled { border-bottom-color: var(--outline); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--card-shadow); }
.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links a {
  color: var(--ink); font-weight: 600; font-size: .95rem; padding: .5rem .8rem; border-radius: 10px;
}
.nav-links a:hover { background: var(--surface-2); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; border: 1px solid var(--outline); background: var(--surface);
  color: var(--ink); cursor: pointer; transition: background .2s ease, transform .15s ease;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.hamburger { display: none; }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99;
  background: var(--surface); border-bottom: 1px solid var(--outline);
  box-shadow: var(--card-shadow-lg);
  transform: translateY(-120%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  padding: .5rem 20px 1.2rem;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  display: block; color: var(--ink); font-weight: 600; font-size: 1.05rem;
  padding: .9rem .4rem; border-bottom: 1px solid var(--outline);
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu .btn { width: 100%; margin-top: .8rem; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .hamburger { display: inline-grid; }
  .nav-actions > .btn-primary { display: none; } /* redundant with mobile menu */
}
@media (max-width: 400px) {
  .brand span { font-size: .98rem; }
}
@media (min-width: 821px) {
  .mobile-menu { display: none; } /* never show the mobile drawer on desktop */
}

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding-top: clamp(2.5rem, 6vw, 4rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 15% 0%, color-mix(in srgb, var(--hero-1) 85%, transparent), transparent 70%),
    radial-gradient(55% 50% at 100% 20%, color-mix(in srgb, var(--hero-2) 80%, transparent), transparent 70%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero h1 .grad {
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 1.18rem; margin-bottom: 1.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.store-badge { display: inline-flex; }
.store-badge img { height: 56px; width: auto; transition: transform .15s ease; }
.store-badge:hover img { transform: translateY(-2px); }
.hero-note { font-size: .85rem; color: var(--muted); margin: .9rem 0 0; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.6rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.hero-trust svg { width: 18px; height: 18px; color: var(--success); }

/* phone mockup */
.device {
  --w: min(300px, 76vw);
  width: var(--w); margin: 0 auto; position: relative;
  padding: 10px; border-radius: 42px;
  background: linear-gradient(160deg, #2b2838, #141220);
  box-shadow: var(--card-shadow-lg), inset 0 0 0 1.5px rgba(255,255,255,.08);
}
.device::before { /* notch */
  content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 22px; background: #0b0a12; border-radius: 0 0 16px 16px; z-index: 3;
}
.device .screen {
  position: relative; border-radius: 33px; overflow: hidden; background: var(--surface);
  aspect-ratio: 1080 / 2166;
}
.device .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero .device { --w: min(320px, 80vw); transform: rotate(1.5deg); }
.hero .device:hover { transform: rotate(0); transition: transform .4s ease; }
.device-float { position: relative; }
.device-float .chip {
  position: absolute; background: var(--surface); border: 1px solid var(--outline);
  border-radius: 14px; box-shadow: var(--card-shadow-lg); padding: .6rem .8rem;
  display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .85rem;
}
.device-float .chip svg { width: 18px; height: 18px; }
.chip.c1 { top: 12%; left: -8%; color: var(--brand); }
.chip.c2 { bottom: 16%; right: -6%; color: var(--accent-deep); }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .hero-media { order: -1; margin-bottom: 1rem; }
  .chip.c1 { left: 2%; } .chip.c2 { right: 2%; }
}

/* ---------------------------------------------------------------- marquee strip */
.strip { border-top: 1px solid var(--outline); border-bottom: 1px solid var(--outline); background: var(--surface); }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; justify-content: center; padding: 1.1rem 20px; }
.strip span { color: var(--muted); font-weight: 700; font-size: .95rem; display: inline-flex; gap: .5rem; align-items: center; }
.strip b { color: var(--ink); }

/* ---------------------------------------------------------------- features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--card-shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-lg); }
.feature .ico {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  margin-bottom: 1rem; color: #fff;
}
.feature .ico svg { width: 26px; height: 26px; }
.feature h3 { margin-bottom: .35rem; }
.feature p { margin: 0; font-size: .96rem; }
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- privacy promise */
.promise {
  position: relative; overflow: hidden; color: #fff;
  background: var(--brand-grad); border-radius: calc(var(--radius) + 6px);
  padding: clamp(2rem, 5vw, 3.2rem); box-shadow: var(--card-shadow-lg);
}
.promise::after {
  content: ""; position: absolute; width: 360px; height: 360px; right: -80px; top: -120px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); border-radius: 50%;
}
.promise .eyebrow { background: rgba(255,255,255,.18); color: #fff; }
.promise h2 { color: #fff; max-width: 24ch; }
.promise p { color: rgba(255,255,255,.9); max-width: 60ch; }
.promise .shield { width: 56px; height: 56px; margin-bottom: 1rem; color: #fff; }
.promise-points { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 1.8rem; }
.promise-points li {
  list-style: none; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm); padding: 1rem 1.1rem; color: #fff; font-weight: 600; font-size: .95rem;
  display: flex; gap: .6rem; align-items: flex-start;
}
.promise-points svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.promise-points { padding-left: 0; }
@media (max-width: 760px) { .promise-points { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--card-shadow); position: relative;
}
.step .num {
  width: 44px; height: 44px; border-radius: 13px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; margin-bottom: 1rem;
}
.step h3 { margin-bottom: .3rem; }
.step p { margin: 0; font-size: .96rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- screenshots gallery */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
  gap: 1.2rem; overflow-x: auto; padding: .5rem 2px 1.5rem; scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.shot {
  scroll-snap-align: center; cursor: zoom-in; border: none; background: none; padding: 0;
  border-radius: 30px; transition: transform .2s ease;
}
.shot:hover { transform: translateY(-4px); }
.shot .device { --w: 100%; }
.shot figcaption { margin-top: .8rem; text-align: center; font-weight: 600; font-size: .92rem; color: var(--muted); }
@media (min-width: 980px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; }
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none; place-items: center;
  background: rgba(8, 6, 20, .82); backdrop-filter: blur(6px); padding: 4vh 4vw;
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 90vh; width: auto; border-radius: 26px; box-shadow: var(--card-shadow-lg); }
.lightbox .close {
  position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 1.5rem; cursor: pointer;
}
.lightbox .close:hover { background: rgba(255,255,255,.26); }

/* ---------------------------------------------------------------- download cta */
.cta-final { text-align: center; }
.cta-card {
  background: var(--surface); border: 1px solid var(--outline); border-radius: calc(var(--radius) + 6px);
  padding: clamp(2.2rem, 5vw, 3.5rem); box-shadow: var(--card-shadow-lg); max-width: 760px; margin: 0 auto;
}
.cta-card .app-icon { width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 1.2rem; box-shadow: var(--card-shadow); }
.cta-card .hero-cta { justify-content: center; margin-top: 1.4rem; }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--surface); border-top: 1px solid var(--outline); padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer .brand { margin-bottom: .8rem; }
.footer p { font-size: .92rem; max-width: 38ch; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .8rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .55rem; }
.footer a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.footer a:hover { color: var(--brand); }
.footer-bottom {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--outline);
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: space-between; align-items: center;
}
.footer-bottom p { margin: 0; font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---------------------------------------------------------------- legal / doc pages */
.doc { padding-top: 2.5rem; }
.doc-hero { background: var(--surface-2); border-bottom: 1px solid var(--outline); padding: 2.6rem 0; }
.doc-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .3rem; }
.doc-hero .updated { color: var(--muted); font-weight: 600; font-size: .95rem; }
.doc-body { max-width: 820px; }
.doc-body h2 { font-size: 1.5rem; margin-top: 2.4rem; scroll-margin-top: 90px; }
.doc-body h3 { font-size: 1.12rem; margin-top: 1.6rem; }
.doc-body p, .doc-body li { color: var(--ink); opacity: .9; }
.doc-body ul { padding-left: 1.2rem; }
.doc-body li { margin-bottom: .5rem; }
.doc-body a { font-weight: 600; }
.callout {
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-left: 5px solid var(--brand); border-radius: var(--radius-sm);
  padding: 1.3rem 1.5rem; margin: 1.8rem 0;
}
.callout strong { color: var(--brand); }
:root[data-theme="dark"] .callout strong { color: var(--brand-bright); }
.callout p:last-child { margin-bottom: 0; }
.toc {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem; margin: 1.6rem 0 2rem;
}
.toc h4 { margin: 0 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: .35rem; }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.contact-card {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--card-shadow);
}
.contact-card .ico { width: 50px; height: 50px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 1rem; }
.contact-card .ico svg { width: 24px; height: 24px; }
.contact-card a { font-weight: 700; font-size: 1.05rem; }
@media (max-width: 680px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

.section-head { max-width: 640px; margin: 0 auto 2.6rem; }
