/* ============================================================
   3FB Trade — stylesheet  (v0.1.0)
   Palette: deep navy + brand red · Trust & Authority
   ============================================================ */

/* ============ TOKENS ============ */
:root {
  color-scheme: light;
  --navy-900: #0B1120;
  --navy-800: #0F172A;
  --navy-700: #152036;
  --navy-600: #1E3A8A;
  --red: #C8102E;
  --red-soft: #E23D4D;
  --red-ink: #A80F24;

  --bg: #F7F8FA;
  --bg-alt: #EEF1F5;
  --surface: #FFFFFF;
  --surface-2: #F2F5F9;
  --ink: #0F172A;
  --ink-muted: #475569;
  --ink-faint: #64748B;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --hero-bg: var(--navy-800);
  --hero-ink: #F1F5F9;
  --hero-muted: #94A3B8;
  --hero-border: rgba(255,255,255,.10);
  --hero-surface: rgba(255,255,255,.04);

  --up: #15803D;
  --up-ink: #166534;
  --down: #B91C1C;
  --down-ink: #991B1B;
  --up-hero: #4ADE80;
  --down-hero: #F87171;

  --accent: var(--red);
  --accent-ink: var(--red-ink);

  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.06);
  --shadow-lg: 0 18px 40px -16px rgba(15,23,42,.28);

  --maxw: 1200px;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: "Lexend", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* Light-only site: dark-mode token overrides intentionally removed so the page
   stays light even when the viewer's system prefers dark. */

/* ============ BASE ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); display: inline-block; }
.tnum { font-variant-numeric: tabular-nums; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 300; }
.skip-link:focus { left: 0; }

section { padding-block: clamp(56px, 8vw, 104px); }
.sec-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head.mbz { margin-bottom: 0; }
.sec-head.mb28 { margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 600; margin-top: 16px; }
.sec-head p { color: var(--ink-muted); font-size: clamp(16px, 1.4vw, 18px); margin-top: 16px; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; font-size: 20px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(145deg, var(--navy-600), var(--navy-800));
  display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.brand .mark svg { width: 19px; height: 19px; }
.brand b { color: var(--accent-ink); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-muted); padding: 9px 13px; border-radius: 8px;
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-right { display: flex; align-items: center; gap: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 500; font-size: 14.5px; cursor: pointer;
  padding: 11px 20px; border-radius: 9px; border: 1px solid transparent;
  transition: transform .15s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; padding: 13px; }
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--red-ink); }
:root[data-theme="dark"] .btn-primary, :root:not([data-theme="light"]) .btn-primary { color: #fff; }
.btn-ghost { color: var(--ink); border-color: var(--border-strong); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-hero-primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(200,16,46,.5); }
.btn-hero-primary:hover { background: var(--red-ink); }
.btn-hero-ghost { color: var(--hero-ink); border-color: var(--hero-border); background: var(--hero-surface); }
.btn-hero-ghost:hover { border-color: rgba(255,255,255,.3); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-muted); transition: color .18s, border-color .18s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

/* ============ TICKER ============ */
.ticker { background: var(--navy-900); color: #E8EEF9; border-bottom: 1px solid rgba(255,255,255,.07); overflow: hidden; position: relative; }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--navy-900), transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, var(--navy-900), transparent); }
.ticker-track { display: flex; gap: 0; width: max-content; animation: scroll-x 46s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick { display: inline-flex; align-items: baseline; gap: 10px; padding: 11px 26px; border-right: 1px solid rgba(255,255,255,.07); font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.tick .sym { color: #AEBBD4; font-weight: 500; letter-spacing: .04em; }
.tick .px { color: #fff; font-weight: 600; }
.tick .chg { font-weight: 500; font-size: 12px; }
.tick .chg.up { color: var(--up-hero); }
.tick .chg.down { color: var(--down-hero); }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ HERO ============ */
.hero { background: var(--hero-bg); color: var(--hero-ink); position: relative; overflow: hidden; }
.hero canvas#net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 78% -5%, rgba(30,58,138,.5), transparent 60%),
    radial-gradient(700px 500px at 12% 110%, rgba(200,16,46,.16), transparent 60%);
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(64px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(34px, 5.6vw, 64px); font-weight: 600; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; color: var(--red-soft); }
.hero-lead { margin-top: 22px; font-size: clamp(16px, 1.6vw, 19px); color: var(--hero-muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { margin-top: 20px; font-size: 13px; color: var(--hero-muted); display: flex; align-items: center; gap: 9px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up-hero); box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(74,222,128,.55);} 70%{box-shadow:0 0 0 9px rgba(74,222,128,0);} 100%{box-shadow:0 0 0 0 rgba(74,222,128,0);} }

.hero-panel { background: rgba(255,255,255,.045); border: 1px solid var(--hero-border); border-radius: 18px; padding: 20px; backdrop-filter: blur(6px); box-shadow: var(--shadow-lg); }
.hero-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hero-panel-head .t { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.live-badge { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--up-hero); display: inline-flex; align-items: center; gap: 6px; }
.live-badge.badge-mk { color: var(--up-ink); font-size: 12px; letter-spacing: .1em; }
.mini-list { display: flex; flex-direction: column; }
.mini-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 11px 2px; border-top: 1px solid rgba(255,255,255,.06); }
.mini-row:first-child { border-top: none; }
.mini-row .nm { font-size: 13.5px; color: #CBD5E1; }
.mini-row .nm small { display: block; font-size: 10.5px; color: var(--hero-muted); font-family: var(--font-mono); letter-spacing: .04em; }
.mini-row .v { font-family: var(--font-mono); font-weight: 600; font-size: 14.5px; text-align: right; }
.mini-row .c { font-family: var(--font-mono); font-size: 12px; text-align: right; min-width: 64px; }
.c.up { color: var(--up-hero); } .c.down { color: var(--down-hero); }

.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin-top: clamp(44px,6vw,72px); background: var(--hero-border); border: 1px solid var(--hero-border); border-radius: 14px; overflow: hidden; }
.stat { background: var(--hero-bg); padding: 22px clamp(14px,2vw,26px); }
.stat .n { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px,3.4vw,38px); letter-spacing: -.02em; }
.stat .n b { color: var(--red-soft); font-weight: 600; }
.stat .l { font-size: 13px; color: var(--hero-muted); margin-top: 4px; }

/* ============ TRUST STRIP ============ */
.strip { background: var(--bg-alt); border-block: 1px solid var(--border); }
.strip .wrap { padding-block: 26px; display: flex; align-items: center; gap: clamp(20px,4vw,56px); flex-wrap: wrap; justify-content: center; }
.strip .lbl { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.strip .item { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink-muted); display: inline-flex; align-items: center; gap: 9px; }
.strip .item svg { width: 17px; height: 17px; color: var(--accent-ink); flex: none; }

/* ============ CARDS GENERIC ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,64px); align-items: center; }
.about-points { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.about-point { display: flex; gap: 14px; }
.about-point .ic { width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent-ink); }
.about-point .ic svg { width: 20px; height: 20px; }
.about-point h4 { font-size: 16.5px; font-weight: 600; margin-bottom: 3px; }
.about-point p { font-size: 14.5px; color: var(--ink-muted); }
.about-visual { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: linear-gradient(160deg, var(--navy-800), var(--navy-600)); min-height: 360px; box-shadow: var(--shadow-lg); color: #E8EEF9; }
.about-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-visual .quote { position: absolute; inset: auto 0 0 0; padding: 26px; background: linear-gradient(0deg, rgba(7,11,20,.86), transparent); }
.about-visual .quote p { font-family: var(--font-display); font-weight: 400; font-size: clamp(16px,1.7vw,20px); line-height: 1.4; }
.about-visual .quote span { display: block; margin-top: 12px; font-size: 12.5px; font-family: var(--font-mono); letter-spacing: .06em; color: var(--red-soft); }

/* PRODUCTS */
.prod-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.prod { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; position: relative; overflow: hidden; }
.prod::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); transform: scaleY(0); transform-origin: top; transition: transform .22s ease; }
.prod:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.prod:hover::before { transform: scaleY(1); }
.prod .ic { width: 44px; height: 44px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent-ink); margin-bottom: 16px; }
.prod .ic svg { width: 22px; height: 22px; }
.prod h4 { font-size: 16px; font-weight: 600; }
.prod .grade { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; letter-spacing: .02em; }
.prod p { font-size: 13.5px; color: var(--ink-muted); margin-top: 12px; }
.prod .unit { margin-top: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); border-top: 1px solid var(--border); padding-top: 12px; }

/* MARKETS */
#markets { background: var(--bg-alt); border-block: 1px solid var(--border); }
.mk-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.mk-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.mk { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.mk-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mk-h .nm { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; }
.mk-h .nm small { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); letter-spacing: .05em; margin-top: 2px; }
.mk .chip { font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.chip.up { background: color-mix(in srgb, var(--up) 15%, transparent); color: var(--up-ink); }
.chip.down { background: color-mix(in srgb, var(--down) 15%, transparent); color: var(--down-ink); }
.mk-px { font-family: var(--font-mono); font-weight: 600; font-size: 30px; letter-spacing: -.01em; margin-top: 14px; }
.mk-px .cur { font-size: 15px; color: var(--ink-faint); font-weight: 500; }
.mk-spark { margin-top: 12px; height: 46px; width: 100%; display: block; }
.mk-meta { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); border-top: 1px solid var(--border); padding-top: 12px; }
.mk-disclaim { margin-top: 24px; font-size: 12.5px; color: var(--ink-faint); display: flex; gap: 8px; align-items: flex-start; max-width: 760px; }
.mk-disclaim svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent-ink); }

/* GLOBAL */
.glob-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.office { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; position: relative; transition: border-color .18s ease, transform .18s ease; box-shadow: var(--shadow-sm); }
.office:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.office .flagrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.office .pin { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.office .pin svg { width: 15px; height: 15px; }
.office .tz { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.office h3 { font-size: 21px; font-weight: 600; }
.office .country { font-size: 14px; color: var(--ink-muted); margin-top: 2px; }
.office .role { margin-top: 14px; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; }
.office .role.hq { color: var(--accent-ink); border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
.office .desc { font-size: 13.5px; color: var(--ink-muted); margin-top: 14px; }

/* CAPABILITIES */
#capabilities { background: var(--hero-bg); color: var(--hero-ink); }
#capabilities .eyebrow { color: var(--red-soft); }
#capabilities .sec-head h2 { color: #fff; }
#capabilities .sec-head p { color: var(--hero-muted); }
.cap-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--hero-border); border: 1px solid var(--hero-border); border-radius: 16px; overflow: hidden; }
.cap { background: var(--hero-bg); padding: 30px 26px; transition: background .2s ease; }
.cap:hover { background: rgba(255,255,255,.03); }
.cap .ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--hero-border); display: grid; place-items: center; color: var(--red-soft); margin-bottom: 18px; }
.cap .ic svg { width: 23px; height: 23px; }
.cap h4 { font-size: 17px; font-weight: 600; color: #fff; }
.cap p { font-size: 14px; color: var(--hero-muted); margin-top: 9px; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,64px); }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.form-field .req { color: var(--down-ink); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; padding: 11px 13px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-msg { font-size: 13.5px; margin-top: 4px; min-height: 20px; }
.form-msg.ok { color: var(--up-ink); }
.form-msg.err { color: var(--down-ink); }
.contact-side h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.contact-side > p { color: var(--ink-muted); font-size: 15px; margin-bottom: 24px; }
.contact-line { display: flex; gap: 13px; padding: 15px 0; border-top: 1px solid var(--border); }
.contact-line:first-of-type { border-top: none; }
.contact-line .ic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent-ink); }
.contact-line .ic svg { width: 18px; height: 18px; }
.contact-line .k { font-size: 12px; color: var(--ink-faint); font-family: var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.contact-line .v { font-size: 15px; font-weight: 500; color: var(--ink); }
.hq-badge { margin-top: 24px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.hq-badge .t { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.hq-badge .a { font-size: 14.5px; color: var(--ink-muted); margin-top: 6px; }

/* FOOTER */
.footer { background: var(--bg-alt); color: var(--ink-muted); border-top: 1px solid var(--border); }
.footer .wrap { padding-block: clamp(40px,6vw,64px); }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { font-size: 14px; color: var(--ink-muted); max-width: 32ch; }
.foot-col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; }
.foot-col a, .foot-col div { display: block; font-size: 14px; color: var(--ink-muted); padding: 5px 0; transition: color .16s; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-faint); }
.foot-bottom .legal { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-bottom .ver { font-family: var(--font-mono); }

/* TOAST */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom,0px)); transform: translateX(-50%) translateY(140%); background: var(--navy-800); color: #fff; padding: 14px 20px; border-radius: 11px; box-shadow: var(--shadow-lg); z-index: 200; display: flex; align-items: center; gap: 11px; font-size: 14.5px; transition: transform .35s cubic-bezier(.16,1,.3,1); max-width: calc(100vw - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast svg { width: 20px; height: 20px; color: var(--up-hero); flex: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { max-width: 460px; }
  .prod-grid { grid-template-columns: repeat(2,1fr); }
  .mk-grid { grid-template-columns: repeat(2,1fr); }
  .glob-grid { grid-template-columns: repeat(2,1fr); }
  .cap-grid { grid-template-columns: 1fr 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-right .btn-ghost { display: none; }
  .nav-toggle { display: grid; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .mobile-menu.open { display: flex; }
}
@media (max-width: 520px) {
  .prod-grid, .mk-grid, .glob-grid, .cap-grid { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* MOBILE MENU */
.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 14px clamp(16px,4vw,40px) 20px; border-top: 1px solid var(--border); background: var(--bg); }
.mobile-menu a { padding: 11px 12px; border-radius: 9px; font-weight: 500; color: var(--ink-muted); }
.mobile-menu a:hover { background: var(--surface-2); color: var(--ink); }
.mobile-menu .btn { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .pulse-dot { animation: none; }
  html { scroll-behavior: auto; }
}
[hidden] { display: none !important; }

/* ---- brand: the real logo directly on the site background (no pill), theme-adaptive ---- */
.brand { display: inline-flex; align-items: center; }
.brand .logo { display: block; width: auto; }
.site-header .brand .logo { height: 40px; }
.footer .foot-brand .brand .logo { height: 84px; }
@media (max-width: 760px) {
  .site-header .brand .logo { height: 34px; }
  .footer .foot-brand .brand .logo { height: 66px; }
}

/* clickable email / phone in the contact block */
.contact-line .v a { color: inherit; transition: color .16s ease; }
.contact-line .v a:hover { color: var(--accent-ink); }

/* ============================================================
   CLIENT PORTAL — login + dashboard (v0.5.0)
   ============================================================ */

/* shared helpers */
.link { color: var(--accent-ink); font-weight: 600; }
.link:hover { text-decoration: underline; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }

/* ---------- LOGIN ---------- */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px,4vw,40px); border-bottom: 1px solid var(--border); background: var(--surface); }
.auth-top .back { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: var(--ink-muted); }
.auth-top .back:hover { color: var(--ink); }
.auth-top .back svg { flex: none; }

.auth-wrap { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand { position: relative; overflow: hidden; background: var(--navy-800);
  background-image: radial-gradient(900px 500px at -10% -10%, rgba(30,58,138,.55), transparent 60%),
    radial-gradient(700px 500px at 110% 120%, rgba(200,16,46,.28), transparent 55%);
  color: var(--hero-ink); display: flex; align-items: center; padding: clamp(32px,5vw,72px); }
.auth-brand-inner { max-width: 440px; }
.eyebrow-dark { color: #fff; opacity: .85; }
.eyebrow-dark::before { background: var(--red-soft); }
.auth-brand .headline { font-size: clamp(28px,3.4vw,40px); font-weight: 600; margin: 14px 0 28px; }
.auth-brand .headline em { font-style: normal; color: var(--red-soft); }
.auth-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.auth-feat { display: flex; gap: 14px; align-items: flex-start; }
.auth-feat .ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid var(--hero-border); color: var(--red-soft); }
.auth-feat .ic svg { width: 19px; height: 19px; }
.auth-feat b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.auth-feat span { color: var(--hero-muted); font-size: 14px; }
.auth-brand-foot { margin-top: 34px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--hero-muted); }

.auth-pane { display: flex; align-items: center; justify-content: center; padding: clamp(28px,5vw,56px); background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: clamp(24px,3vw,30px); margin: 10px 0 8px; }
.auth-sub { color: var(--ink-muted); margin-bottom: 26px; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.field input { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); font-family: inherit; font-size: 15px; color: var(--ink); transition: border-color .16s ease, box-shadow .16s ease; }
.field input::placeholder { color: var(--ink-faint); }
.field input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.13); }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; font-size: 14px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-muted); cursor: pointer; }
.checkbox input { accent-color: var(--red); width: 15px; height: 15px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--ink-faint); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.auth-alt { text-align: center; color: var(--ink-muted); font-size: 14.5px; }
.auth-demo { margin-top: 26px; padding: 11px 13px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--ink-faint); font-size: 12.5px; line-height: 1.5; text-align: center; }

/* ---------- PORTAL ---------- */
.portal-body { background: var(--bg-alt); min-height: 100vh; }
.portal-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px clamp(14px,3vw,28px); background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.pt-left { display: flex; align-items: center; gap: 14px; }
.portal-top .brand .logo { height: 32px; }
.pt-tag { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink-muted);
  padding-left: 14px; border-left: 1px solid var(--border-strong); }
.pt-right { display: flex; align-items: center; gap: 14px; }
.pt-demo { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); background: rgba(200,16,46,.09); border: 1px solid rgba(200,16,46,.22); padding: 3px 8px; border-radius: 999px; }
.pt-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--navy-800); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.pt-user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.pt-user-meta b { font-size: 13.5px; font-family: var(--font-display); }
.pt-user-meta small { font-size: 12px; color: var(--ink-faint); }

.portal-shell { display: grid; grid-template-columns: 236px 1fr; align-items: start; }
.side { position: sticky; top: 57px; height: calc(100vh - 57px); background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px 14px; display: flex; flex-direction: column; }
.side nav { display: grid; gap: 3px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14.5px; color: var(--ink-muted); }
.side nav a svg { width: 18px; height: 18px; flex: none; color: var(--ink-faint); }
.side nav a:hover { background: var(--surface-2); color: var(--ink); }
.side nav a.active { background: var(--navy-800); color: #fff; }
.side nav a.active svg { color: var(--red-soft); }
.side-foot { margin-top: auto; padding: 14px 12px 4px; font-size: 13.5px; color: var(--ink-faint); }
.side-foot p { margin-bottom: 2px; }

.pmain { padding: clamp(18px,3vw,32px); max-width: 1080px; }
.pview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.pview-head h1 { font-size: clamp(22px,2.6vw,28px); }
.pview-sub { color: var(--ink-muted); margin-top: 4px; }
.pill-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--up-ink);
  background: rgba(21,128,61,.09); border: 1px solid rgba(21,128,61,.22); padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.pill-live .pulse-dot { background: var(--up); box-shadow: none; }

.kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.kpi-l { display: block; font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }
.kpi-n { display: block; font-family: var(--font-display); font-weight: 700; font-size: 28px; margin: 6px 0 4px; letter-spacing: -.02em; }
.kpi-n small { font-size: 15px; font-weight: 600; color: var(--ink-muted); margin-left: 2px; }
.kpi-d { font-size: 12.5px; color: var(--ink-faint); }
.kpi-d.up { color: var(--up-ink); } .kpi-d.down { color: var(--down-ink); }

.pgrid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 16px; overflow: hidden; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.panel-h h3 { font-size: 15.5px; font-family: var(--font-display); }
.panel-h .src { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-faint); text-transform: lowercase; }

.tbl-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint);
  font-weight: 600; padding: 11px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.ptable td { padding: 12px 18px; border-bottom: 1px solid var(--border); color: var(--ink); white-space: nowrap; }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable tbody tr:hover { background: var(--surface-2); }
.st { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st-sea { color: #1E3A8A; background: rgba(30,58,138,.1); }
.st-load { color: var(--accent-ink); background: rgba(200,16,46,.09); }
.st-disc { color: #92400E; background: rgba(217,119,6,.12); }
.st-done { color: var(--up-ink); background: rgba(21,128,61,.1); }

.pp-prices { padding: 8px 18px 14px; }
.pp-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.pp-row:last-child { border-bottom: 0; }
.pp-nm { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; }
.pp-nm small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink-faint); font-weight: 400; text-transform: none; margin-top: 2px; }
.pp-px { font-family: var(--font-mono); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.pp-ch { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; min-width: 74px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-faint); }
.pp-ch.up { color: var(--up-ink); } .pp-ch.down { color: var(--down-ink); }
.pp-prices-lg .pp-row { padding: 15px 0; }
.pp-prices-lg .pp-px { font-size: 18px; }
.pp-note { padding: 0 18px 16px; font-size: 12px; color: var(--ink-faint); line-height: 1.5; }

.docs { list-style: none; margin: 0; padding: 6px 0; }
.doc { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.doc:last-child { border-bottom: 0; }
.doc-ic { flex: none; width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.dt-pdf { color: var(--down-ink); background: rgba(185,28,28,.09); }
.dt-xls { color: var(--up-ink); background: rgba(21,128,61,.1); }
.doc-m { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.doc-m b { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; }
.doc-m small { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .pgrid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2,1fr); }
  .portal-shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto;
    border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 12px; }
  .side nav { grid-auto-flow: column; gap: 4px; }
  .side nav a { white-space: nowrap; }
  .side-foot { display: none; }
}
@media (max-width: 560px) {
  .pt-user-meta { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   i18n — language switcher, Arabic font, RTL (v0.6.0)
   ============================================================ */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang-btn { border: 0; background: transparent; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-faint); padding: 4px 8px; border-radius: 999px; cursor: pointer; line-height: 1; transition: background .15s ease, color .15s ease; }
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { background: var(--navy-800); color: #fff; }
.auth-top-right { display: flex; align-items: center; gap: 14px; }
.lang-switch-m { margin-top: 4px; align-self: flex-start; }
@media (max-width: 760px) { .nav-right .lang-switch { display: none; } }

/* Arabic typography */
:root[lang="ar"] {
  --font-body: "Noto Sans Arabic", "Source Sans 3", system-ui, sans-serif;
  --font-display: "Noto Sans Arabic", "Lexend", system-ui, sans-serif;
}
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3, :root[lang="ar"] h4, :root[lang="ar"] h5 { letter-spacing: 0; line-height: 1.25; }

/* RTL adjustments */
[dir="rtl"] .hero-cta .btn-hero-primary svg,
[dir="rtl"] .back svg { transform: scaleX(-1); }
[dir="rtl"] .eyebrow::before { margin-left: 8px; }
[dir="rtl"] .about-point, [dir="rtl"] .auth-feat, [dir="rtl"] .contact-line, [dir="rtl"] .strip .item { text-align: right; }
[dir="rtl"] .pp-ch, [dir="rtl"] .mk-px, [dir="rtl"] .tnum { direction: ltr; }

/* ============================================================
   Flag language dropdown (v0.6.2)
   ============================================================ */
.flag-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.lang-dd { position: relative; }
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); cursor: pointer; line-height: 0; }
.lang-toggle:hover { border-color: var(--ink-faint); }
.flag { width: 22px; height: 15px; border-radius: 2px; display: block; box-shadow: inset 0 0 0 1px rgba(15,23,42,.12); flex: none; }
.lang-toggle .flag { display: none; }
:root[lang="en"] .lang-toggle .f-en,
:root[lang="tr"] .lang-toggle .f-tr,
:root[lang="ar"] .lang-toggle .f-ar,
html:not([lang]) .lang-toggle .f-en { display: block; }
.lang-toggle .caret { width: 13px; height: 13px; color: var(--ink-faint); transition: transform .15s ease; }
.lang-dd.open .lang-toggle .caret { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; display: flex; flex-direction: column; gap: 2px; min-width: 156px; padding: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-lg); z-index: 60; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.lang-dd.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; text-align: left; }
.lang-opt:hover { background: var(--surface-2); }
.lang-opt.active { background: var(--surface-2); font-weight: 700; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .lang-opt { text-align: right; }
