@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

:root {
  --paper: #f6f7f4;
  --paper-2: #eef1ed;
  --ink: #141816;
  --muted: #66706b;
  --line: #dfe4e0;
  --emerald: #17624f;
  --emerald-2: #0e4a3c;
  --lapis: #3d6074;
  --gold: #9a713d;
  --white: #ffffff;
  --serif: "Manrope", system-ui, sans-serif;
  --sans: "Manrope", system-ui, sans-serif;
  --arabic: "Noto Naskh Arabic", serif;
  --max: 1240px;
  --radius: 1rem;
  --shadow: 0 18px 48px rgba(20, 24, 22, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; }
body::before { display: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid #d3973f; outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 1000; background: var(--ink); color: white; padding: .75rem 1rem; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.container { width: min(var(--max), calc(100% - 3rem)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 3rem)); margin-inline: auto; }
.section { padding: clamp(5rem, 8vw, 7.5rem) 0; }
.section-tight { padding: 3rem 0; }
.surface { background: var(--white); }
.dark { color: #f7faf8; background: #123b31; }
.eyebrow { color: var(--emerald); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 1rem; }
.dark .eyebrow { color: #a9d4c5; }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 500; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(3rem, 6.6vw, 6.15rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2.15rem, 4.1vw, 4rem); letter-spacing: -.045em; }
h3 { font-size: clamp(1.35rem, 2vw, 1.9rem); letter-spacing: -.03em; }
p { margin: 0; }
.lead { font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--muted); max-width: 64ch; }
.dark .lead { color: #bfc8c1; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(250px, .6fr); gap: 4rem; align-items: end; margin-bottom: 3.75rem; }
.section-head p:last-child { color: var(--muted); max-width: 48ch; }
.dark .section-head p:last-child { color: #bfc8c1; }
.button-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: 2rem; }
.button { display: inline-flex; min-height: 2.9rem; align-items: center; justify-content: center; gap: .65rem; border: 1px solid transparent; padding: .72rem 1rem; text-decoration: none; font-size: .84rem; font-weight: 700; border-radius: .65rem; cursor: pointer; transition: transform .2s, background .2s, color .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--emerald); color: white; }
.button-primary:hover { background: var(--emerald-2); }
.button-light { background: #f5f1e7; color: var(--ink); }
.button-outline { border-color: currentColor; background: transparent; }
.text-link { color: var(--emerald); font-size: .9rem; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: .3em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(223,228,224,.85); background: rgba(246,247,244,.92); backdrop-filter: blur(16px); }
.nav-wrap { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; font-weight: 700; }
.brand-mark { display: block; width: 2.25rem; aspect-ratio: 1; border-radius: .55rem; color: transparent; overflow: hidden; background-color: #101a20; background-image: url("/img/sedra_ai_logo.jpg"); background-repeat: no-repeat; background-size: 175%; background-position: center 35%; border: 1px solid rgba(20,24,22,.12); box-shadow: 0 3px 10px rgba(20,24,22,.08); font-size: 0; }
.brand-word { letter-spacing: -.03em; font-size: 1.08rem; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 1.2rem; padding: 0; margin: 0; }
.nav-links a { text-decoration: none; font-size: .78rem; font-weight: 600; color: #46504b; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--emerald); }
.nav-toggle { display: none; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: .5rem .75rem; }

/* Hero */
.hero { display: block; overflow: clip; background: linear-gradient(180deg, #fbfcfa 0%, var(--paper) 100%); }
.hero-intro { padding: clamp(4rem, 7vw, 6rem) 0 clamp(2.5rem, 4vw, 3.5rem); }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: 1.75rem; }
.credibility { display: flex; gap: .65rem; align-items: center; margin-top: 2rem; color: var(--muted); font-size: .76rem; }
.credibility::before { content: "N"; width: 1.5rem; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); border-radius: .3rem; font-weight: 800; color: var(--emerald); background: white; }
.hero-art { position: relative; display: block; margin: 0; }
.hero-cover { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: contain; object-position: center; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--paper-2); }
.orbit { width: min(100%, 470px); aspect-ratio: 1; border: 1px solid #d7dfda; border-radius: 50%; position: relative; background: rgba(255,255,255,.48); }
.orbit::before, .orbit::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; inset: 13%; }
.orbit::after { inset: 29%; }
.stroke-path { position: absolute; inset: 12%; }
.stroke-path path { fill: none; stroke: var(--emerald); stroke-width: 2; stroke-linecap: round; }
.stroke-path .guide { stroke: var(--gold); stroke-width: 1; opacity: .75; }
.network-node { position: absolute; width: .7rem; aspect-ratio: 1; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 7px rgba(23,79,66,.08); }
.network-node:nth-child(2) { top: 13%; left: 49%; }.network-node:nth-child(3) { top: 43%; right: 5%; }.network-node:nth-child(4) { bottom: 11%; left: 31%; }.network-node:nth-child(5) { top: 28%; left: 8%; }
.arabic-mark { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--arabic); font-size: clamp(5rem, 10vw, 7.5rem); color: var(--ink); direction: rtl; }
.art-label { position: absolute; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: .55rem; padding: .55rem .7rem; font-size: .68rem; font-weight: 700; box-shadow: 0 10px 30px rgba(20,24,22,.05); }
.art-label.one { top: 17%; right: 1%; }.art-label.two { left: 1%; bottom: 19%; }

/* Grids and cards */
.two-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.three-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 2.6vw, 2.15rem); background: rgba(255,255,255,.72); }
.card-num { display: block; font-family: var(--sans); color: var(--emerald); font-size: .75rem; font-weight: 700; letter-spacing: .04em; margin-bottom: 3rem; }
.card h3 + p { margin-top: 1rem; color: var(--muted); }
.card .text-link { display: inline-block; margin-top: 2rem; }
.pillar-card { min-height: 430px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.pillar-card:first-child { color: white; background: #175444; border-color: #175444; }
.pillar-card:first-child p, .pillar-card:first-child .text-link { color: #d8e6df; }
.pillar-visual { min-height: 175px; margin: -1rem -1rem 2rem; position: relative; border-bottom: 1px solid currentColor; opacity: .82; overflow: hidden; }
.pillar-visual img { width: 100%; height: 215px; object-fit: cover; }
.pillar-card:first-child .pillar-visual img { object-position: center; }
.pillar-card:nth-child(2) .pillar-visual img { object-position: center 65%; }
.feature-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.14); }
.product-media { margin-top: 3rem; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.product-media img { width: 100%; max-height: 620px; object-fit: cover; }
.trajectory { position: absolute; inset: 0; width: 100%; height: 100%; }
.trajectory path { fill: none; stroke: currentColor; stroke-width: 1.2; }
.evidence-strip { display: grid; grid-template-columns: .7fr 1.3fr; gap: 1.5rem; align-items: center; }
.evidence-orb { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 1px solid #51605a; position: relative; }
.evidence-orb::before, .evidence-orb::after { content: ""; position: absolute; inset: 14%; border: 1px solid #51605a; border-radius: 50%; }.evidence-orb::after { inset: 32%; }
.pullquote { font-family: var(--sans); font-size: clamp(1.9rem, 3.4vw, 3.3rem); font-weight: 500; line-height: 1.15; letter-spacing: -.04em; max-width: 22ch; }
.audience-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.audience-list li { display: grid; grid-template-columns: 3.25rem 1fr; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: clamp(1.05rem, 1.5vw, 1.35rem); font-weight: 500; }
.audience-list span { color: var(--gold); font: 500 .75rem var(--sans); padding-top: .55rem; }

/* Page headers and editorial */
.page-hero { padding: clamp(5rem, 9vw, 8rem) 0 4.5rem; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fbfcfa 0%, var(--paper) 100%); }
.page-hero h1 { max-width: 13ch; }
.page-hero .lead { margin-top: 1.5rem; }
.status-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.status { border: 1px solid var(--line); border-radius: 999px; padding: .4rem .7rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
.status.live { background: #e1ece5; border-color: #b6cfbf; color: var(--emerald); }
.status.research { background: #e5e9eb; color: var(--lapis); }
.steps { counter-reset: steps; }
.step { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; border-top: 1px solid var(--line); padding: 2rem 0; }
.step::before { counter-increment: steps; content: "0" counter(steps); color: var(--gold); font-size: .78rem; font-weight: 700; }
.step p { color: var(--muted); margin-top: .75rem; max-width: 65ch; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.research-card { display: flex; min-height: 330px; flex-direction: column; justify-content: space-between; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.55rem; background: var(--white); transition: transform .2s, box-shadow .2s; }
.research-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.research-card .meta { color: var(--emerald); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.research-card p { color: var(--muted); margin-top: 1rem; }
.research-card .arrow { font-size: 1.5rem; }
.article-header { padding: 6rem 0 3rem; }
.article-header h1 { max-width: 12ch; }
.article-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); margin-top: 2rem; font-size: .85rem; }
.article-body { width: min(720px, calc(100% - 3rem)); margin: 0 auto; padding: 4rem 0 7rem; font-family: var(--sans); font-size: 1.08rem; line-height: 1.82; }
.article-body h2 { font-size: clamp(2rem, 4vw, 3.3rem); margin: 4rem 0 1.25rem; }
.article-body p + p { margin-top: 1.4rem; }
.article-body .label { display: inline-block; font: 700 .68rem var(--sans); letter-spacing: .08em; text-transform: uppercase; background: #e4eae6; color: var(--emerald); padding: .4rem .6rem; border-radius: .3rem; margin-bottom: .75rem; }

/* Explorer */
.explorer-shell { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .7fr); min-height: 680px; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.explorer-canvas { padding: 1.5rem; border-right: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr; }
.explorer-toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.explorer-toolbar input, .explorer-toolbar select { min-height: 2.7rem; border: 1px solid var(--line); background: var(--paper); border-radius: .6rem; padding: .55rem .7rem; }
.chord-wrap { display: grid; place-items: center; min-height: 580px; }
.chord { width: min(100%, 590px); aspect-ratio: 1; }
.chord .ring { fill: none; stroke: var(--line); stroke-width: 34; }
.chord .relation { fill: none; stroke: var(--emerald); stroke-opacity: .2; stroke-linecap: round; cursor: pointer; transition: stroke-opacity .2s, stroke-width .2s; }
.chord .relation:hover, .chord .relation:focus, .chord .relation.selected { stroke-opacity: .85; stroke: var(--gold); }
.chord .name-node { cursor: pointer; }
.chord .name-node circle { fill: var(--paper); stroke: var(--emerald); stroke-width: 2; }
.chord .name-node text { font-family: var(--arabic); font-size: 15px; text-anchor: middle; direction: rtl; }
.chord .name-node:focus circle, .chord .name-node.selected circle { fill: var(--emerald); }
.chord .name-node:focus text, .chord .name-node.selected text { fill: white; }
.evidence-panel { padding: 2rem; background: #f4f6f3; overflow: auto; }
.evidence-panel h2 { font-size: 2rem; }
.evidence-panel .empty { color: var(--muted); margin-top: 1rem; }
.verse-card { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.5rem; }
.arabic { font-family: var(--arabic); font-size: clamp(1.55rem, 2.8vw, 2.1rem); line-height: 1.9; direction: rtl; text-align: right; }
.verse-ref { color: var(--emerald); font-size: .78rem; font-weight: 700; margin-top: .75rem; }
.trust-label { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: .35rem; padding: .3rem .5rem; font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lapis); background: white; }
.methodology { border-left: 3px solid var(--emerald); padding: 1.25rem 1.5rem; background: #edf2ef; color: #4e5752; }
.methodology strong { color: var(--ink); }
.artifact-frame { display: block; width: 100%; min-height: 980px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--emerald); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.field { display: grid; gap: .45rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .78rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #bdb6aa; border-radius: .6rem; padding: .8rem; background: var(--white); color: var(--ink); }
.field textarea { min-height: 150px; resize: vertical; }
.form-note { color: var(--muted); font-size: .76rem; margin-top: 1rem; }
.form-status { margin-top: 1rem; font-size: .85rem; }

/* Footer */
.site-footer { padding: 4rem 0 2rem; background: #101513; color: #f5f8f6; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; }
.footer-brand h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.footer-brand p { color: #bfc8c1; max-width: 42ch; margin-top: 1rem; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer-links h3 { font: 700 .7rem var(--sans); color: #91a49b; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-links a { display: block; text-decoration: none; margin: .55rem 0; font-size: .86rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid #3c4641; margin-top: 4rem; padding-top: 1.5rem; color: #91a49b; font-size: .75rem; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 1.25rem; background: rgba(246,247,244,.98); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; }
  .nav-links.open { display: flex; }
  .nav-links .button { width: 100%; }
  .section-head, .footer-grid, .explorer-shell { grid-template-columns: 1fr; }
  .explorer-canvas { border-right: 0; border-bottom: 1px solid var(--line); }
  .artifact-frame { min-height: 820px; }
  .article-grid, .three-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .container, .narrow, .article-body { width: min(100% - 2rem, var(--max)); }
  .section { padding: 4rem 0; }
  h1 { font-size: clamp(2.7rem, 13vw, 4.2rem); }
  .two-grid, .three-grid, .article-grid, .form-grid, .footer-links { grid-template-columns: 1fr; }
  .pillar-card { min-height: 390px; }
  .pillar-visual img { height: 190px; }
  .field.full { grid-column: auto; }
  .explorer-shell { border-radius: .8rem; }
  .explorer-canvas, .evidence-panel { padding: 1rem; }
  .chord-wrap { min-height: 390px; }
  .artifact-frame { min-height: 720px; border-radius: .75rem; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
