/* SOFT MED — design system
   Colors come from the logo blue (#0170C8). Layout uses logical properties
   (inline-start / inline-end) so the same CSS works for Arabic (RTL) and English (LTR). */

/* Cairo (SIL Open Font License, see assets/fonts/OFL.txt) — self-hosted, variable weight 400–800 */
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/cairo-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/cairo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --blue: #0170c8;        /* brand blue from the logo — 5.0:1 on white */
  --blue-dark: #01569a;   /* hover / pressed */
  --navy: #0a3560;        /* headings, footer */
  --ink: #1e2a36;         /* body text */
  --muted: #4f6072;       /* secondary text */
  --sky: #eaf4fc;         /* light-blue section background */
  --sky-2: #d4e8f8;       /* borders, dividers */
  --white: #ffffff;
  --wa: #128c4a;          /* WhatsApp-style green, AA with white text */
  --todo-bg: #fff6d6;
  --todo-ink: #6b4e00;

  /* Theme roles (light). Dark values are below. --white stays white: it is text on blue. */
  --bg: #ffffff;
  --surface: #ffffff;
  --brand: #0170c8;       /* filled buttons and badges (white text on it) */
  --brand-dark: #01569a;
  --hero-bg: #0170c8;
  --hero-strip: #01569a;
  --header-bg: rgba(255, 255, 255, 0.97);
  --footer-bg: #0a3560;
  --field-border: #9bb4cc;
  --danger: #b42318;
  --ok-bg: #e6f6ec; --ok-ink: #135c32;
  --err-bg: #fdecea; --err-ink: #8a1c13;
  color-scheme: light;

  --font: "Cairo", "Segoe UI", Tahoma, system-ui, -apple-system, "Noto Sans Arabic", Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(10, 53, 96, 0.08);
  --container: 1140px;
  --gutter: 16px;
  --header-h: 68px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { color: var(--navy); line-height: 1.35; margin: 0 0 0.6em; font-weight: 800; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; 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: 12px; top: -100px; z-index: 100;
  background: var(--footer-bg); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: var(--white); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: 56px; }
.section--sky { background: var(--sky); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head p { color: var(--muted); }
.eyebrow { display: inline-block; font-weight: 700; color: var(--blue); font-size: 0.9rem; margin-bottom: 6px; }

/* TODO placeholders are highlighted so they are easy to spot before launch */
.todo { background: var(--todo-bg); color: var(--todo-ink); border-radius: 6px; padding: 0 6px; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); color: var(--white); }
.btn-outline { background: var(--surface); color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--sky); color: var(--blue-dark); }
.btn-wa { background: var(--wa); color: var(--white); }
.btn-wa:hover { background: #0d6f3a; color: var(--white); }
.btn-sm { min-height: 42px; padding: 6px 18px; font-size: 0.95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg);
  border-bottom: 1px solid var(--sky-2); backdrop-filter: saturate(1.4) blur(6px);
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(10, 53, 96, 0.08); border-bottom-color: transparent; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.1rem; font-weight: 800; }
.brand-text small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border: 1px solid var(--sky-2); background: var(--surface); border-radius: var(--radius-sm); color: var(--navy); cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; inset-inline: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--sky-2); box-shadow: var(--shadow); padding: 8px var(--gutter) 20px;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a {
  display: block; padding: 12px 8px; text-decoration: none; color: var(--ink); font-weight: 600; border-radius: var(--radius-sm);
}
.site-nav li a:hover { background: var(--sky); color: var(--blue-dark); }
.site-nav li a[aria-current="page"] { color: var(--blue); background: var(--sky); }
.nav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.lang-switch {
  display: inline-flex; align-items: center; min-height: 42px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--sky-2); text-decoration: none; color: var(--navy); font-weight: 700; font-size: 0.95rem;
}
.lang-switch:hover { background: var(--sky); }

@media (min-width: 992px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open {
    display: flex; align-items: center; gap: 18px; position: static; padding: 0; box-shadow: none; border: 0; background: none;
  }
  .site-nav ul { display: flex; gap: 2px; }
  .site-nav li a { padding: 8px 12px; }
  .nav-actions { margin-top: 0; }
}

/* ---------- Hero: the one bold element ----------
   Solid logo blue with the logo's airway lines drawn large; the trunk runs down into the category strip. */
.hero { background: var(--hero-bg); color: var(--white); overflow: hidden; }
.hero-grid { display: grid; align-items: end; gap: 8px; padding-top: 48px; }
.hero-copy { padding-bottom: 32px; }
.hero h1 { color: var(--white); font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); line-height: 1.3; max-width: 20ch; text-wrap: balance; }
.hero p.lead { font-size: 1.125rem; max-width: 34em; color: var(--white); }
.hero-airway { color: var(--white); width: min(100%, 420px); height: auto; justify-self: center; margin-bottom: -2px; }
.hero-airway .aw-main { stroke-width: 16; }
.hero-airway .aw-flow { stroke-width: 3; opacity: 0.55; }
.hero-airway .aw-flow--2 { opacity: 0.3; }
/* One load moment: the airway rises into the category strip (transform/opacity only, GPU-composited) */
@media (prefers-reduced-motion: no-preference) {
  .hero-airway { animation: aw-rise 1s cubic-bezier(.2,.7,.2,1) .15s both; }
}
@keyframes aw-rise { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
.hero-cats { border-top: 2px solid rgba(255, 255, 255, 0.85); background: var(--hero-strip); }
.hero-cats ul { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); }
.hero-cats li:nth-child(3) { border-inline-start: 0; }
.hero-cats li:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, 0.35); }
@media (min-width: 768px) { .hero-cats ul { grid-template-columns: repeat(4, 1fr); } .hero-cats li:nth-child(3) { border-inline-start: 1px solid rgba(255, 255, 255, 0.35); } .hero-cats li:nth-child(n+3) { border-top: 0; } }
.hero-cats li + li { border-inline-start: 1px solid rgba(255, 255, 255, 0.35); }
.hero-cats a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; min-height: 48px;
  color: var(--white); text-decoration: none; font-weight: 700; font-size: 0.9rem; text-align: center; line-height: 1.4;
}
.hero-cats a:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.hero-cats svg { width: 28px; height: 28px; }
.hero :focus-visible { outline-color: var(--white); }

@media (min-width: 768px) {
  .hero-cats a { flex-direction: row; justify-content: center; gap: 10px; padding: 18px 12px; font-size: 1rem; }
}
@media (min-width: 992px) {
  .hero-grid { grid-template-columns: 1.3fr 1fr; padding-top: 80px; }
  .hero-copy { padding-bottom: 80px; }
}
@media (max-width: 991px) { .hero-airway { width: 240px; } .hero h1 { max-width: 20ch; } }

/* fixed colors: these sit on the blue hero in both themes */
.btn-light { background: #ffffff; color: #01569a; }
.btn-light:hover { background: #eaf4fc; color: #0a3560; }
.btn-ghost-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }

/* Home hero: real product photos on white tiles (the client's own products) */
.hero-kicker { font-weight: 800; letter-spacing: .04em; margin: 0 0 6px; opacity: .9; }
.hero-photos { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hero-photos li { background: #ffffff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0, 30, 70, .25); }
.hero-photos img { display: block; width: 100%; height: auto; }
@media (min-width: 992px) {
  .hero-grid { align-items: center; }
  .hero-photos { grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 56px; }
  .hero-photos li:nth-child(even) { transform: translateY(28px); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-photos li { animation: aw-rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero-photos li:nth-child(2) { animation-delay: .08s; } .hero-photos li:nth-child(3) { animation-delay: .16s; } .hero-photos li:nth-child(4) { animation-delay: .24s; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 992px) {
  .hero-photos li:nth-child(even) { animation-name: aw-rise-even; }
}
@keyframes aw-rise-even { from { opacity: 0; transform: translateY(76px); } to { opacity: 1; transform: translateY(28px); } }

/* Facts bar under the hero */
.stats { background: var(--surface); border-bottom: 1px solid var(--sky-2); }
.stats ul { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); }
.stats li { display: flex; flex-direction: column; gap: 2px; padding: 18px 8px; text-align: center; border-bottom: 1px solid var(--sky-2); }
.stats strong { font-size: 1.6rem; font-weight: 800; color: var(--blue); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: .95rem; }
.stats li:nth-child(5) { grid-column: 1 / -1; }
.stats .stats-made { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: center; gap: 10px; border-bottom: 0; }
.stats .stats-made span { color: var(--navy); font-weight: 800; font-size: 1.05rem; }
@media (min-width: 768px) {
  .stats ul { grid-template-columns: repeat(6, 1fr); }
  .stats li { border-bottom: 0; padding-block: 24px; }
  .stats li + li { border-inline-start: 1px solid var(--sky-2); }
  .stats .stats-made, .stats li:nth-child(5) { grid-column: auto; }
}
.flag { width: 30px; height: 20px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.made-tag { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--white); margin: 4px 0 0; }
.made-tag--dark { color: var(--navy); margin-top: 16px; }

/* ---------- Ruled lists instead of identical cards ---------- */
.cat-list, .feature-list { list-style: none; margin: 0; padding: 0; }
.cat-row {
  display: grid; grid-template-columns: 96px 1fr; gap: 10px 18px; align-items: start;
  padding-block: 22px; border-top: 1px solid var(--sky-2);
}
.cat-row:last-child { border-bottom: 1px solid var(--sky-2); }
.cat-row h3 { font-size: 1.3rem; margin-bottom: 4px; }
.cat-row p { margin: 0; color: var(--muted); max-width: 52ch; }
.cat-row .btn { grid-column: 2; justify-self: start; }
.cat-photo { display: block; background: #ffffff; border: 1px solid var(--sky-2); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.cat-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cat-photo--icon { display: grid; place-items: center; background: var(--sky); color: var(--blue); }
.cat-photo--icon svg { width: 44%; height: auto; }
@media (min-width: 768px) {
  .cat-row { grid-template-columns: 168px 1fr auto; gap: 10px 32px; align-items: center; }
  .cat-row .btn { grid-column: auto; }
  .cat-row { grid-template-columns: 128px 1fr auto; }
}

.card.card--cat { padding: 0; overflow: hidden; }
.card--cat > :not(.cat-media) { margin-inline: 24px; }
.card--cat > .btn { margin-bottom: 24px; }
.cat-media { background: #ffffff; border-bottom: 1px solid var(--sky-2); margin-bottom: 18px; aspect-ratio: 1; }
.cat-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cat-media--icon { display: grid; place-items: center; background: var(--sky); color: var(--blue); }
.cat-media--icon svg { width: 34%; height: auto; }
.cat-count { color: var(--blue) !important; font-weight: 700; margin: -6px 0 6px; }

.feature-list { display: grid; gap: 0 48px; }
.feature-list li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding-block: 20px; border-top: 1px solid var(--sky-2); }
.feature-list h3 { margin-bottom: 4px; }
.feature-list p { margin: 0; color: var(--muted); }
.feature-icon { color: var(--blue); padding-top: 4px; }
.feature-icon svg { width: 28px; height: 28px; }
@media (min-width: 768px) { .feature-list { grid-template-columns: 1fr 1fr; } .feature-list--single { grid-template-columns: 1fr; } }
.feature-list--single { margin-bottom: 20px; }

.page-hero { background: var(--sky); padding-block: 40px; overflow: hidden; border-bottom: 3px solid var(--blue); }
.page-hero-grid { display: grid; gap: 16px; align-items: end; }
.page-airway { display: none; color: var(--blue); }
.page-airway .aw-main { stroke-width: 14; opacity: .16; }
.page-airway .aw-flow { stroke-width: 3; opacity: .22; }
.page-airway .aw-flow--2 { opacity: .14; }
.page-hero-art { color: var(--blue); max-width: 200px; }
.page-hero-photo { background: #ffffff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--sky-2); max-width: 160px; }
.page-hero-photo img { display: block; width: 100%; height: auto; }
@media (min-width: 768px) {
  .page-hero-grid { grid-template-columns: 1fr auto; }
  .page-airway { display: block; width: 220px; margin-block: -40px; align-self: end; }
  .page-hero-art { width: 260px; max-width: none; }
  .page-hero-photo { width: 220px; }
}
.page-hero p { color: var(--muted); max-width: 680px; margin: 0; }
.breadcrumb { font-size: 0.9rem; margin-bottom: 8px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--sky-2); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column;
}
.card p { color: var(--muted); }
.card .btn, .card .card-link { margin-top: auto; align-self: flex-start; }
.card-link { font-weight: 700; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.icon-circle {
  width: 56px; height: 56px; border-radius: 50%; background: var(--sky); color: var(--blue);
  display: grid; place-items: center; margin-bottom: 14px; flex: none;
}
.icon-circle svg { width: 28px; height: 28px; }

.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1.4fr 1fr; } }

.check-list { list-style: none; margin: 0 0 1em; padding: 0; }
.check-list li { position: relative; padding-inline-start: 30px; margin-bottom: 10px; }
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.45em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 16px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--sky-2); border-radius: var(--radius); padding: 20px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: var(--white); font-weight: 800; margin-bottom: 10px;
}
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }

.notice {
  border-inline-start: 4px solid var(--blue); background: var(--sky); padding: 14px 18px; border-radius: var(--radius-sm);
  color: var(--navy); font-size: 0.95rem;
}
.notice p:last-child { margin: 0; }

/* ---------- Products ---------- */
.product { padding: 0; overflow: hidden; }
.product-media { background: #ffffff; border-bottom: 1px solid var(--sky-2); position: relative; }
.product-photo, .product-photo img { display: block; width: 100%; height: auto; }
.product-thumbs { list-style: none; margin: 0; padding: 0; position: absolute; inset-block-end: 12px; inset-inline-end: 12px; display: flex; gap: 8px; }
.product-thumbs a { display: block; width: 64px; border-radius: 10px; overflow: hidden; border: 2px solid #ffffff; box-shadow: 0 4px 14px rgba(0, 30, 70, .25); }
.product-thumbs img { display: block; width: 100%; height: auto; }
.product-thumbs a:hover, .product-thumbs a:focus-visible { border-color: var(--brand); }
.more-note { color: var(--muted); margin: 24px 0 0; }
.products-grid { margin-top: 24px; }
.facts { margin: 0 0 4px; display: grid; gap: 12px; }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0; color: var(--muted); }
.product-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.spec-table { width: 100%; border-collapse: collapse; margin: 4px 0 18px; font-size: 0.95rem; }
.spec-table th, .spec-table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--sky-2); vertical-align: top; }
.spec-table th { color: var(--navy); width: 38%; font-weight: 700; }

.terms { display: grid; gap: 0; margin: 0; border: 1px solid var(--sky-2); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.terms div { display: grid; gap: 4px; padding: 14px 18px; border-bottom: 1px solid var(--sky-2); }
.terms div:last-child { border-bottom: 0; }
@media (min-width: 640px) { .terms div { grid-template-columns: 220px 1fr; } }
.terms dt { font-weight: 700; color: var(--navy); }
.terms dd { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--sky); border-inline-start: 6px solid var(--blue); border-radius: var(--radius-sm);
  padding: 28px 24px; display: grid; gap: 4px 32px; align-items: center;
}
.cta-band h2 { margin-bottom: 4px; }
.cta-band p { color: var(--muted); margin: 0 0 12px; max-width: 46ch; }
@media (min-width: 900px) {
  .cta-band { grid-template-columns: 1fr auto; padding: 32px 40px; }
  .cta-band p { margin: 0; }
  .cta-band .btn-row { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; color: var(--navy); }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--field-border); border-radius: var(--radius-sm); padding: 10px 14px; min-height: 48px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(1,112,200,.35); outline-offset: 0; border-color: var(--blue); }
.field input[type="tel"], .field input[type="email"] { direction: ltr; text-align: start; }
[dir="rtl"] .field input[type="tel"], [dir="rtl"] .field input[type="email"] { text-align: right; }
.form-note { font-size: 0.9rem; color: var(--muted); margin: 0; }
.hp { position: absolute; inset-inline-start: -9999px; }
.form-status { border-radius: var(--radius-sm); padding: 0; font-weight: 600; }
.form-status:not(:empty) { padding: 12px 16px; }
.form-status.is-success { background: var(--ok-bg); color: var(--ok-ink); }
.form-status.is-error { background: var(--err-bg); color: var(--err-ink); }

.info-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.info-list li { display: flex; gap: 12px; align-items: flex-start; }
.info-list svg { width: 22px; height: 22px; color: var(--blue); flex: none; margin-top: 4px; }
.info-list strong { display: block; color: var(--navy); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- Prose (privacy) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose ul { padding-inline-start: 1.3em; }
.prose li { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #d5e4f3; margin-top: 56px; padding-block: 48px 24px; font-size: 0.95rem; }
.site-footer h2 { color: var(--white); font-size: 1.05rem; margin-bottom: 12px; }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--white); font-weight: 800; font-size: 1.1rem; }
.footer-brand img { width: 40px; height: 40px; background: var(--white); border-radius: 50%; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer .todo { background: #fff3c4; color: #5c4300; }

/* ---------- Dark theme ----------
   Follows the device setting; the header button can force light or dark (saved per visitor). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1724; --surface: #11202f; --sky: #0f2233; --sky-2: #1f3a55;
    --ink: #dbe6f1; --muted: #a3b6c9; --navy: #f0f6fc;
    --blue: #5fb2f5; --blue-dark: #8cc8f8;
    --brand: #0170c8; --brand-dark: #0a63ad;
    --hero-bg: #0a4c8a; --hero-strip: #083c6d;
    --header-bg: rgba(11, 23, 36, 0.96); --footer-bg: #07111b;
    --field-border: #6386a8; --danger: #ff8a80;
    --ok-bg: #0f3321; --ok-ink: #9fe3b8; --err-bg: #3a1512; --err-ink: #ffb4ab;
    --todo-bg: #3d3210; --todo-ink: #ffd970;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1724; --surface: #11202f; --sky: #0f2233; --sky-2: #1f3a55;
  --ink: #dbe6f1; --muted: #a3b6c9; --navy: #f0f6fc;
  --blue: #5fb2f5; --blue-dark: #8cc8f8;
  --brand: #0170c8; --brand-dark: #0a63ad;
  --hero-bg: #0a4c8a; --hero-strip: #083c6d;
  --header-bg: rgba(11, 23, 36, 0.96); --footer-bg: #07111b;
  --field-border: #6386a8; --danger: #ff8a80;
  --ok-bg: #0f3321; --ok-ink: #9fe3b8; --err-bg: #3a1512; --err-ink: #ffb4ab;
  --todo-bg: #3d3210; --todo-ink: #ffd970;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* Theme toggle button (header) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none;
  border: 1px solid var(--sky-2); border-radius: 999px; background: var(--surface); color: var(--navy); cursor: pointer;
}
.theme-toggle:hover { background: var(--sky); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.is-dark .theme-toggle .icon-sun { display: block; }
.is-dark .theme-toggle .icon-moon { display: none; }

/* ---------- Floating WhatsApp (mobile only) ---------- */
.wa-float {
  position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); color: var(--white); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.wa-float svg { width: 28px; height: 28px; }
.wa-float:hover { background: #0d6f3a; color: var(--white); }
@media (min-width: 768px) { .wa-float { display: none; } }

/* ---------- 404 ---------- */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 64px; }
.error-code { font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 800; color: var(--sky-2); line-height: 1; margin: 0 0 12px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Header tools: theme button + menu button sit together on mobile; on desktop the theme button follows the nav */
.header-tools { display: flex; align-items: center; gap: 8px; }
@media (min-width: 992px) { .header-tools { order: 3; } .header-inner { gap: 12px; } .site-nav, .site-nav.is-open { margin-inline-start: auto; } }

/* Catalog download button */
.file-meta { font-size: .8rem; font-weight: 700; border: 1px solid currentColor; border-radius: 6px; padding: 0 6px; margin-inline-start: 4px; }
