/* World AI Innovation — site stylesheet
   Layout concept: editorial, Apple-grade whitespace; dark navy "stage" bands for the hero and the
   research center, warm off-white pages elsewhere; the logo's navy + tan carry every accent. */

:root {
  --navy: #1B3A6B;
  --navy-deep: #10213F;
  --navy-ink: #0B1526;
  --gold: #C9A273;
  --gold-deep: #A8804F;
  --gold-soft: #EAD9BF;
  --sand: #F3EDE4;
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --surface-2: #F4F1EB;
  --fg: #0F1B2D;
  --muted: #5B6578;
  --line: rgba(16, 33, 63, 0.10);
  --line-strong: rgba(16, 33, 63, 0.18);
  --accent: #1B3A6B;
  --accent-fg: #FFFFFF;
  --link: #1B3A6B;
  --shadow: 0 10px 30px rgba(16, 33, 63, 0.08), 0 1px 2px rgba(16, 33, 63, 0.06);
  --shadow-lg: 0 30px 60px rgba(16, 33, 63, 0.14);
  --stage: #0B1526;
  --stage-2: #10213F;
  --stage-fg: #EDF1F8;
  --stage-muted: #AAB7CC;
  --stage-line: rgba(255, 255, 255, 0.12);
  --radius: 18px;
  --radius-sm: 10px;
  --font-latin: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-arabic: "Readex Pro", "Segoe UI", "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
  --font-cjk: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font: var(--font-latin);
  --max: 1200px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1526; --surface: #121F36; --surface-2: #172743; --fg: #E9EEF6; --muted: #A7B3C7;
    --line: rgba(255,255,255,0.10); --line-strong: rgba(255,255,255,0.2);
    --accent: #8FB0E8; --accent-fg: #0B1526; --link: #9DBCF0; --sand: #172743; --gold-soft: #3a3326;
    --shadow: 0 10px 30px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.3); --shadow-lg: 0 30px 60px rgba(0,0,0,0.5);
    --stage: #060D1A; --stage-2: #0B1526;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1526; --surface: #121F36; --surface-2: #172743; --fg: #E9EEF6; --muted: #A7B3C7;
  --line: rgba(255,255,255,0.10); --line-strong: rgba(255,255,255,0.2);
  --accent: #8FB0E8; --accent-fg: #0B1526; --link: #9DBCF0; --sand: #172743; --gold-soft: #3a3326;
  --shadow: 0 10px 30px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.3); --shadow-lg: 0 30px 60px rgba(0,0,0,0.5);
  --stage: #060D1A; --stage-2: #0B1526;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html[lang="ar"] { --font: var(--font-arabic); }
html[lang="zh"] { --font: var(--font-cjk); }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="ar"] body { line-height: 1.85; }
img, svg, video { max-width: 100%; height: auto; display: block; }
svg[aria-hidden="true"] { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; font-weight: 700; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
html[lang="zh"] h1, html[lang="zh"] h2, html[lang="zh"] h3 { letter-spacing: 0; line-height: 1.3; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4.1rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 62ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 14px; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 0.9rem; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); border-radius: 2px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.section { padding-block: clamp(56px, 8vw, 110px); }
.section-head { display: grid; gap: 10px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .lede { margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stage { background: var(--stage); color: var(--stage-fg); }
.stage .muted, .stage .lede { color: var(--stage-muted); }
.stage .eyebrow { color: var(--gold); }
.stage a { color: #CFE0FF; }
.band { background: var(--surface-2); }

/* ---------- buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 0.98rem; border: 1.5px solid transparent; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s; text-decoration: none !important; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 10px 24px rgba(27,58,107,.25); }
.btn-primary:hover { background: var(--navy-deep); }
.btn-gold { background: var(--gold); color: #1a1409; box-shadow: 0 10px 24px rgba(201,162,115,.3); }
.btn-gold:hover { background: #d6b184; }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.stage .paper, .stage .card { color: var(--fg); }
.stage .paper a:not(.btn), .stage .card a:not(.btn) { color: var(--link); }
.stage .paper .meta, .stage .card .meta, .stage .card .excerpt { color: var(--muted); }
.stage .btn-ghost, .hero .btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.stage .btn-ghost:hover, .hero .btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }
.btn svg { width: 18px; height: 18px; }
html[dir="rtl"] .btn svg.arrow { transform: scaleX(-1); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; letter-spacing: .02em; background: var(--sand); color: var(--navy); border: 1px solid transparent; }
.stage .chip { background: rgba(255,255,255,.08); color: var(--stage-fg); border-color: var(--stage-line); }
.chip-gold { background: var(--gold-soft); color: var(--gold-deep); }
.chip-outline { background: transparent; border-color: var(--line-strong); color: var(--muted); }
.chip-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn { padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--fg); transition: all .2s; }
.filter-btn:hover { border-color: var(--navy); }
.filter-btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.stage .filter-btn { border-color: var(--stage-line); color: var(--stage-fg); }
.stage .filter-btn[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a1409; }
.filter-count { font-size: .9rem; color: var(--muted); margin-inline-start: auto; align-self: center; }

/* ---------- header ---------- */
.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); transition: background .3s; }
.header-inner { display: flex; align-items: center; gap: 18px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--fg); letter-spacing: -0.01em; text-decoration: none !important; min-width: 0; }
.brand img { width: 44px; height: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand-name small { font-weight: 600; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
html[lang="ar"] .brand-name small { letter-spacing: 0; font-size: .78rem; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { padding: 9px 13px; border-radius: 10px; font-weight: 600; font-size: .95rem; color: var(--fg); opacity: .85; text-decoration: none !important; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sand); opacity: 1; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--fg); transition: background .2s; }
.icon-btn:hover { background: var(--sand); }
.icon-btn svg { width: 20px; height: 20px; }
.lang-btn { width: auto; padding-inline: 12px; gap: 8px; font-weight: 700; font-size: .9rem; border-color: var(--line-strong); }
.menu-pop { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; min-width: 210px; z-index: 70; }
.menu-pop a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--fg); font-weight: 600; text-decoration: none !important; }
.menu-pop a:hover { background: var(--sand); }
.menu-pop a[aria-current="true"] { background: var(--navy); color: #fff; }
.menu-pop a small { font-weight: 600; font-size: .72rem; opacity: .6; letter-spacing: .06em; text-transform: uppercase; }
.lang-wrap { position: relative; }
.burger { display: none; }
.mobile-nav { display: none; }
@media (max-width: 960px) {
  .nav { display: none; }
  .lang-wrap { display: none; }
  .brand-name { font-size: .95rem; }
  .burger { display: inline-flex; }
  .brand-name small { display: none; }
  .mobile-nav { display: block; position: fixed; inset: 0; top: 70px; background: var(--bg); z-index: 55; padding: 20px var(--gutter-r) 40px var(--gutter-l); overflow: auto; }
  .mobile-nav a { display: block; padding: 16px 6px; border-bottom: 1px solid var(--line); font-size: 1.25rem; font-weight: 700; color: var(--fg); text-decoration: none !important; }
  .mobile-nav .mobile-langs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; }
  .mobile-nav .mobile-langs a { border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; font-size: .95rem; }
  .mobile-nav .mobile-langs a[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--stage); color: var(--stage-fg); isolation: isolate; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; }
.hero-art { position: absolute; top: 0; bottom: 0; inset-inline-end: -4%; width: 52%; z-index: 0; pointer-events: none; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center; -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.95) 35%, transparent 100%); mask-image: linear-gradient(to left, rgba(0,0,0,.95) 35%, transparent 100%); }
html[dir="rtl"] .hero-art img { -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.95) 35%, transparent 100%); mask-image: linear-gradient(to right, rgba(0,0,0,.95) 35%, transparent 100%); }
.hero-inner { position: relative; z-index: 1; padding-block: clamp(72px, 10vw, 150px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 40px; align-items: center; min-height: min(78vh, 760px); }
.hero h1 { color: #fff; margin: 0 0 20px; max-width: 14ch; }
html[lang="ar"] .hero h1 { max-width: 18ch; }
.hero .lede { color: #c9d4e8; font-size: clamp(1.05rem, 1.7vw, 1.3rem); margin-bottom: 30px; max-width: 54ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badges span { font-size: .8rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--stage-line); color: #c9d4e8; display: inline-flex; align-items: center; gap: 6px; }
.hero-badges span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img { width: min(100%, 420px); filter: drop-shadow(0 20px 40px rgba(0,0,0,.4)); }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; min-height: 0; } .hero-art { width: 100%; inset-inline-end: 0; opacity: .3; } }

/* ---------- stats strip ---------- */
.stats { position: relative; z-index: 2; border-top: 1px solid var(--stage-line); background: var(--stage-2); color: var(--stage-fg); }
.stats-inner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding-block: 26px; }
.stat { display: grid; gap: 2px; padding: 8px 14px; border-inline-start: 1px solid var(--stage-line); }
.stat b { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--stage-muted); }
@media (max-width: 800px) { .stats-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stats-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:last-child { grid-column: 1 / -1; } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card-body { padding: 22px; display: grid; gap: 10px; align-content: start; }
.card-body h3 a { color: inherit; }
.card-foot { margin-top: auto; padding: 0 22px 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.card-media { aspect-ratio: 16/10; overflow: hidden; background: var(--sand); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card .excerpt { color: var(--muted); font-size: .97rem; margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .82rem; color: var(--muted); align-items: center; }

/* pillars */
.pillar { padding: 28px; display: grid; gap: 14px; align-content: start; position: relative; }
.pillar .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--sand); color: var(--navy); }
.pillar .icon svg { width: 26px; height: 26px; }
.pillar p { color: var(--muted); margin: 0; }
.pillar .more { margin-top: auto; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }

/* fields strip */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.field { padding: 20px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; text-align: center; color: var(--fg); font-weight: 700; text-decoration: none !important; transition: transform .2s, border-color .2s; }
.field:hover { transform: translateY(-3px); border-color: var(--gold); }
.field .fi { width: 44px; height: 44px; margin-inline: auto; border-radius: 12px; background: var(--sand); display: grid; place-items: center; color: var(--navy); }
.field .fi svg { width: 22px; height: 22px; }
.field small { color: var(--muted); font-weight: 500; font-size: .8rem; }
@media (max-width: 900px) { .fields { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 480px) { .fields { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* paper digest */
.paper { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.paper-visual { position: relative; background: var(--navy-ink); min-height: 240px; }
.paper-visual svg { width: 100%; height: 100%; position: absolute; inset: 0; }
.paper-visual .tag { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 2; }
.paper-visual .inst { position: absolute; bottom: 16px; inset-inline-start: 16px; inset-inline-end: 16px; z-index: 2; color: #fff; font-weight: 700; font-size: .9rem; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.paper-body { padding: 26px 28px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.paper-body h3 { font-size: 1.3rem; }
.paper-body .summary { margin: 0; color: var(--fg); }
.paper-body details { border-top: 1px solid var(--line); padding-top: 10px; }
.paper-body summary { cursor: pointer; font-weight: 700; color: var(--navy); list-style: none; display: flex; align-items: center; gap: 8px; }
.paper-body summary::-webkit-details-marker { display: none; }
.paper-body summary::before { content: "+"; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); font-weight: 800; font-size: .9rem; }
.paper-body details[open] summary::before { content: "–"; }
:root[data-theme="dark"] .paper-body summary, .stage .paper-body summary { color: var(--accent); }
.paper-body ul { margin: 10px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.paper-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 6px; }
.paper-foot .meta { font-size: .82rem; }
@media (max-width: 760px) { .paper { grid-template-columns: 1fr; } .paper-visual { min-height: 180px; aspect-ratio: 16/8; } }
.paper-list { display: grid; gap: 22px; }

/* books */
.book { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 20px; align-items: start; }
.cover { aspect-ratio: 2/3; border-radius: 8px 14px 14px 8px; position: relative; overflow: hidden; color: #fff; padding: 16px 14px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 16px 30px rgba(16,33,63,.25), inset 4px 0 0 rgba(255,255,255,.18); background: var(--navy); }
html[dir="rtl"] .cover { border-radius: 14px 8px 8px 14px; box-shadow: 0 16px 30px rgba(16,33,63,.25), inset -4px 0 0 rgba(255,255,255,.18); }
.cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.18), transparent 60%); pointer-events: none; }
.cover .ct { font-weight: 800; font-size: .95rem; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
.cover .ca { font-size: .68rem; opacity: .85; font-weight: 600; letter-spacing: .04em; }
.cover .cy { font-size: .62rem; opacity: .7; }
.cover-navy { background: linear-gradient(160deg, #24498A, #10213F); }
.cover-slate { background: linear-gradient(160deg, #3A4A63, #1C2634); }
.cover-gold { background: linear-gradient(160deg, #D4AE7E, #8F6A3D); }
.cover-ocean { background: linear-gradient(160deg, #1F6E8C, #0E2F4B); }
.cover-sand { background: linear-gradient(160deg, #B99B74, #5E4A30); }
.cover-ink { background: linear-gradient(160deg, #1A1A2E, #0B0B18); }
.book-body { display: grid; gap: 10px; min-width: 0; }
.book-body h3 { font-size: 1.15rem; }
.book-body .short { color: var(--muted); margin: 0; }
.book-body details { border-top: 1px solid var(--line); padding-top: 10px; }
.book-body summary { cursor: pointer; font-weight: 700; color: var(--navy); list-style: none; display: inline-flex; gap: 8px; align-items: center; }
:root[data-theme="dark"] .book-body summary { color: var(--accent); }
.book-body summary::-webkit-details-marker { display: none; }
.book-body summary::after { content: "↓"; font-size: .8rem; transition: transform .2s; }
.book-body details[open] summary::after { transform: rotate(180deg); }
.book-body dl { margin: 12px 0 0; display: grid; gap: 10px; }
.book-body dt { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
html[lang="ar"] .book-body dt { letter-spacing: 0; font-size: .85rem; }
.book-body dd { margin: 2px 0 0; }
@media (max-width: 520px) { .book { grid-template-columns: 110px minmax(0,1fr); } .cover .ct { font-size: .8rem; } }

/* tools */
.tool { padding: 24px; display: grid; gap: 12px; align-content: start; }
.tool-head { display: flex; gap: 14px; align-items: center; }
.mono { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; color: #fff; background: linear-gradient(150deg, var(--navy), var(--navy-deep)); flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.mono.c-image { background: linear-gradient(150deg, #8F6A3D, #C9A273); }
.mono.c-video { background: linear-gradient(150deg, #1F6E8C, #0E2F4B); }
.mono.c-voice { background: linear-gradient(150deg, #5B3F8C, #2B1D45); }
.mono.c-coding { background: linear-gradient(150deg, #1C2634, #3A4A63); }
.mono.c-design { background: linear-gradient(150deg, #B36A4A, #6B3A22); }
.mono.c-research { background: linear-gradient(150deg, #2E6B4F, #16352A); }
.mono.c-productivity { background: linear-gradient(150deg, #24498A, #1B3A6B); }
.tool-head h3 { font-size: 1.2rem; }
.tool-head .maker { font-size: .82rem; color: var(--muted); }
.tool .tagline { font-weight: 600; margin: 0; }
.tool .desc { color: var(--muted); margin: 0; font-size: .95rem; }
.tool ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: .95rem; }
.tool .label { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--gold-deep); }
html[lang="ar"] .tool .label { letter-spacing: 0; font-size: .85rem; }
.tool details summary { cursor: pointer; font-weight: 700; color: var(--navy); list-style: none; }
:root[data-theme="dark"] .tool details summary { color: var(--accent); }
.tool details summary::-webkit-details-marker { display: none; }
.tool-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.note { font-size: .85rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.note svg { width: 18px; height: 18px; }

/* articles */
.featured { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 0; }
.featured .card-media { aspect-ratio: auto; min-height: 320px; }
.featured .card-body { padding: 36px; justify-content: center; }
.featured h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
@media (max-width: 860px) { .featured { grid-template-columns: 1fr; } .featured .card-media { aspect-ratio: 16/9; min-height: 0; } }
.article-hero { padding-block: clamp(40px, 6vw, 80px) 30px; }
.article-hero h1 { font-size: clamp(1.9rem, 4vw, 3.2rem); max-width: 24ch; margin: 14px 0 16px; }
.article-hero .lede { margin-bottom: 18px; }
.article-cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 21/9; box-shadow: var(--shadow-lg); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; padding-block: 40px 70px; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.prose { font-size: 1.08rem; max-width: 70ch; min-width: 0; }
html[lang="ar"] .prose { font-size: 1.1rem; line-height: 2; }
.prose h2 { font-size: 1.5rem; margin: 2em 0 .7em; padding-top: .2em; }
.prose h2::before { content: ""; display: block; width: 36px; height: 3px; background: var(--gold); border-radius: 3px; margin-bottom: 14px; }
.prose p { margin: 0 0 1.15em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1.2em; display: grid; gap: .4em; }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 1.5em 0; padding: 1em 1.4em; border-inline-start: 4px solid var(--gold); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.aside { position: sticky; top: 90px; display: grid; gap: 22px; }
.takeaways { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.takeaways h3 { font-size: 1rem; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.takeaways h3 svg { width: 20px; height: 20px; color: var(--gold-deep); }
.takeaways ol { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 10px; font-size: .95rem; }
.takeaways li::marker { color: var(--gold-deep); font-weight: 800; }
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.progress { position: fixed; top: env(safe-area-inset-top, 0px); inset-inline-start: 0; height: 3px; width: 0; background: var(--gold); z-index: 80; transition: width .1s linear; }
.related { padding-block: 40px 80px; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 40px; align-items: center; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-logo { background: #fff; border-radius: var(--radius); padding: 40px; display: grid; place-items: center; box-shadow: var(--shadow); border: 1px solid var(--line); }
.about-logo img { width: min(100%, 380px); }
.values { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
@media (max-width: 900px) { .values { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.value { padding: 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; }
.value b { font-size: 1.1rem; }
.value span { color: var(--muted); font-size: .95rem; }
.founder { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 36px; align-items: center; }
@media (max-width: 760px) { .founder { grid-template-columns: 1fr; } }
.founder-mark { aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #2a4f8f, var(--navy-deep)); display: grid; place-items: center; box-shadow: var(--shadow-lg); border: 6px solid var(--surface); }
.founder-mark img { width: 60%; }
.founder blockquote { margin: 0 0 18px; font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.5; position: relative; padding-inline-start: 22px; border-inline-start: 4px solid var(--gold); }
.founder .name { font-weight: 800; font-size: 1.1rem; }
.founder .role { color: var(--muted); font-size: .9rem; }
.service { padding: 24px; display: grid; gap: 8px; }
.service b { font-size: 1.05rem; }
.service span { color: var(--muted); font-size: .95rem; }
.legal-box { padding: 22px 26px; border-radius: 14px; border: 1px dashed var(--line-strong); display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; font-size: .95rem; }
.legal-box b { color: var(--navy); }
:root[data-theme="dark"] .legal-box b { color: var(--accent); }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { display: grid; gap: 14px; }
.contact-item { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 14px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); align-items: center; }
.contact-item .ci { width: 48px; height: 48px; border-radius: 12px; background: var(--sand); color: var(--navy); display: grid; place-items: center; }
.contact-item .ci svg { width: 22px; height: 22px; }
.contact-item small { display: block; color: var(--muted); font-size: .8rem; }
.contact-item b { font-size: 1.02rem; word-break: break-word; direction: ltr; unicode-bidi: isolate; }
.contact-item .actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.form { display: grid; gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form input, .form textarea, .form select { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--fg); width: 100%; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 4px rgba(27,58,107,.12); }
.form textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-sent { padding: 18px; border-radius: 12px; background: var(--gold-soft); color: var(--fg); }

/* founder quote band (home) */
.quote-band { background: linear-gradient(135deg, var(--navy-deep), var(--navy)); color: #fff; position: relative; overflow: hidden; }
.quote-band::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,115,.35), transparent 65%); top: -200px; inset-inline-end: -120px; }
.quote-inner { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 30px; align-items: center; padding-block: clamp(48px, 7vw, 90px); }
@media (max-width: 760px) { .quote-inner { grid-template-columns: 1fr; } }
.quote-inner blockquote { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.9rem); font-weight: 600; line-height: 1.45; max-width: 30ch; text-wrap: balance; }
.quote-inner .who { margin-top: 18px; color: #d4c2a4; font-weight: 600; }
.quote-inner .who small { display: block; color: #aab7cc; font-weight: 500; }

/* CTA */
.cta { padding-block: clamp(50px, 7vw, 90px); }
.cta-box { border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: clamp(32px, 5vw, 60px); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.cta-box::after { content: ""; position: absolute; inset-inline-end: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%); }
.cta-box > * { position: relative; }
@media (max-width: 700px) { .cta-box { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { background: var(--stage); color: var(--stage-fg); padding-block: 60px 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
html[lang="ar"] .footer h4 { letter-spacing: 0; font-size: .95rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: #d6deeb; }
.footer .flogo { width: 220px; margin-bottom: 16px; }
.footer p { color: var(--stage-muted); font-size: .95rem; }
.footer .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.footer-bottom { border-top: 1px solid var(--stage-line); margin-top: 40px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .85rem; color: var(--stage-muted); }

/* ---------- search palette ---------- */
.palette { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: clamp(40px, 10vh, 120px) var(--gutter-r) 20px var(--gutter-l); background: rgba(6, 13, 26, .55); backdrop-filter: blur(6px); }
.palette[data-open="true"] { display: flex; }
.palette-box { width: min(720px, 100%); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.palette-input input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 1.1rem; color: var(--fg); outline: none; min-width: 0; }
.palette-input kbd { font: inherit; font-size: .72rem; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); }
.palette-list { max-height: min(60vh, 520px); overflow: auto; padding: 8px; }
.palette-item { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; color: var(--fg); text-decoration: none !important; }
.palette-item:hover, .palette-item[aria-selected="true"] { background: var(--sand); }
.palette-item .pt { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--navy); color: #fff; }
html[lang="ar"] .palette-item .pt { letter-spacing: 0; font-size: .78rem; }
.palette-item b { display: block; font-weight: 700; }
.palette-item small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-hint { padding: 10px 18px 14px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- reveal ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.reveal.in { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal.in { animation: none; }
  .card, .btn, .field { transition: none; }
  .hero-canvas { display: none; }
}

/* ---------- misc ---------- */
.page-head { padding-block: clamp(50px, 7vw, 100px) clamp(30px, 4vw, 50px); }
.page-head .lede { max-width: 70ch; }
.pill-note { display: inline-flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--sand); color: var(--muted); font-size: .9rem; margin-top: 18px; }
.pill-note svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--gold-deep); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toc-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.kicker { font-size: .95rem; color: var(--muted); }
.lang-note { font-size: .85rem; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin-block: 30px; }
