/* ifes.app: tokens, type, header, footer, buttons. Shared by every page.
 * Same palette and fonts as telvorylive.com (Telvory Live brand): navy + blue,
 * Inter for Latin, Noto Sans Arabic for Arabic, both self-hosted (no third
 * party requests; the CSP in _headers allows only 'self').
 * Direction-neutral: logical properties only, so /ar/ (dir=rtl) needs no
 * separate stylesheet. */
@font-face { font-family: Inter; src: url(../fonts/InterVariable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Sans Arabic"; src: url(../fonts/NotoSansArabic-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans Arabic"; src: url(../fonts/NotoSansArabic-Bold.woff2) format("woff2"); font-weight: 600 900; font-display: swap; }

:root {
  color-scheme: light dark;
  --navy: #0B1739; --navy-2: #13234F; --navy-3: #1B2F66;
  --primary: #2563EB; --primary-hover: #1D4ED8; --highlight: #3B82F6; --sky: #93C5FD;
  --teal: #0EA5A4;
  --bg: #FFFFFF; --bg-2: #F5F8FF; --card: #FFFFFF; --card-hover: #EEF4FF;
  --text: #0B1739; --muted: #475569; --line: #D8E2F2;
  --link: #1D4ED8; --on-primary: #FFFFFF;
  --font: Inter, "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px; --radius-sm: 12px; --wrap: 1200px; --gutter: 20px;
  --shadow: 0 2px 4px rgba(11,23,57,.04), 0 12px 32px -8px rgba(11,23,57,.14);
  --shadow-lg: 0 24px 64px -16px rgba(5,12,34,.45);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070D22; --bg-2: #0B1739; --card: #101C3F; --card-hover: #15254F;
    --text: #EAF0FB; --muted: #A7B4CC; --line: #22335F; --link: #93C5FD;
    --shadow: 0 2px 4px rgba(0,0,0,.3), 0 12px 32px -8px rgba(0,0,0,.5);
  }
}
html:lang(ar) { --font: "Noto Sans Arabic", Inter, system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
html:lang(ar) body { line-height: 1.8; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
html:lang(ar) :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--highlight); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--navy) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); color: #fff; border-bottom: 1px solid rgba(147,197,253,.14); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--sky); letter-spacing: .02em; }
.nav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: #DCE6FA; text-decoration: none; font-size: .93rem; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav .lang { border: 1px solid rgba(147,197,253,.4); }
.nav .cta-sm { background: var(--primary); color: #fff; font-weight: 600; margin-inline-start: 6px; }
.nav .cta-sm:hover { background: var(--primary-hover); }
.menu { display: none; margin-inline-start: auto; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid rgba(147,197,253,.4); border-radius: 10px; color: #fff; font-weight: 600; font-size: .95rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-list { display: grid; }
.menu-list { display: none; position: absolute; inset-inline: 0; top: 64px; background: var(--navy); padding: 8px var(--gutter) 18px; gap: 2px; border-bottom: 1px solid rgba(147,197,253,.2); box-shadow: var(--shadow-lg); }
.menu-list a { color: #fff; text-decoration: none; padding: 12px 4px; border-bottom: 1px solid rgba(147,197,253,.12); font-weight: 500; }
@media (max-width: 1020px) { .nav { display: none; } .menu { display: block; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 12px; font-weight: 650; font-size: 1rem; text-decoration: none; border: 1px solid transparent; transition: background .16s, border-color .16s, transform .16s; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-ghost { color: #fff; border-color: rgba(147,197,253,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-line { color: var(--text); border-color: var(--line); background: var(--card); }
.btn-line:hover { border-color: var(--teal); }

/* Footer */
.site-foot { background: var(--navy); color: #C9D5EE; padding: 48px 0 28px; font-size: .95rem; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sky); margin-bottom: .8em; }
html:lang(ar) .foot-grid h2 { letter-spacing: 0; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.foot-legal { border-top: 1px solid rgba(147,197,253,.16); margin-top: 32px; padding-top: 20px; font-size: .85rem; color: #9FB0CF; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }
