/* 7-brains.com, V2 (docs/DESIGN.md, "The company site's direction"). Built on the logo: ink, paper, one orange, the
   link greys; IBM Plex served from this machine; hairlines; things arrive and settle. Phone first; logical properties
   so Arabic lays out right to left with the same rules. Every animation has a still state: the page is complete
   without script and under prefers-reduced-motion. */
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url("/static/fonts/plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url("/static/fonts/plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "PlexAr"; font-weight: 400; font-display: swap; src: url("/static/fonts/plex-arabic-400.woff2") format("woff2"); }
@font-face { font-family: "PlexAr"; font-weight: 600; font-display: swap; src: url("/static/fonts/plex-arabic-600.woff2") format("woff2"); }
@font-face { font-family: "PlexMono"; font-weight: 400; font-display: swap; src: url("/static/fonts/plex-mono-400.woff2") format("woff2"); }

:root {
  --ink: #101820; --ink-2: #1a2430; --ink-3: #243040; --paper: #F2F0EA; --card: #FBFAF6;
  --orange: #FF6B3D; --orange-ink: #C2410C; --orange-soft: rgba(255, 107, 61, .10);
  --line-dark: #666A6D; --line-light: #8C8F8E; --hair: #DDD9CF; --hair-dark: #2B3542;
  --text: #101820; --text-2: #4A5058; --on-ink: #F2F0EA; --on-ink-2: rgba(242, 240, 234, .74);
  --sans: "Plex", system-ui, sans-serif; --mono: "PlexMono", ui-monospace, monospace;
  --r: 14px; --r-frame: 22px; --gap: 16px;
  --shadow: 0 24px 60px rgba(16, 24, 32, .18);
  color-scheme: light;
}
html[lang="ar"] { --sans: "PlexAr", "Plex", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--text-2); font: 400 16px/1.6 var(--sans); }
html[lang="ar"] body { font-size: 17px; line-height: 1.75; }
h1, h2, h3 { color: var(--text); margin: 0 0 .45em; line-height: 1.18; font-weight: 600; letter-spacing: -.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: 32px; } h2 { font-size: 26px; } h3 { font-size: 18px; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: inherit; }
img, video, svg { max-width: 100%; }
.mono { font-family: var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 16px; top: 8px; z-index: 50; background: var(--paper); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* ---- surfaces ---- */
.ink { background: var(--ink); color: var(--on-ink-2); }
.ink h1, .ink h2, .ink h3 { color: var(--on-ink); }
.ink a { color: var(--on-ink); }
section.block { padding: 56px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 400 13px/1 var(--mono); letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; }
html[lang="ar"] .eyebrow { text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 14px; }
.ink .eyebrow { color: var(--on-ink-2); }
.eyebrow::before { content: ""; width: 22px; height: 10px; flex: none;
  background: radial-gradient(circle at 4px 5px, currentColor 2.5px, transparent 3px),
              radial-gradient(circle at 18px 5px, var(--orange) 3px, transparent 3.5px),
              linear-gradient(currentColor, currentColor) 4px 4.5px / 14px 1px no-repeat; opacity: .9; }
.lede { font-size: 18px; color: var(--text-2); }
.ink .lede { color: var(--on-ink-2); }

/* ---- the bar ---- */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(16, 24, 32, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair-dark); }
.bar .wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.bar .logo { display: block; flex: none; }
.bar .logo img { display: block; height: 28px; width: auto; }
.bar nav.sections { display: none; gap: 20px; margin-inline-start: auto; font-size: 14px; }
.bar nav.sections a { color: var(--on-ink-2); text-decoration: none; }
.bar nav.sections a:hover { color: var(--on-ink); }
.bar .langs { display: flex; gap: 2px; margin-inline-start: auto; }
.bar .langs a { color: var(--on-ink-2); text-decoration: none; font-size: 13px; padding: 8px 9px; border-radius: 8px; min-width: 36px;
  text-align: center; }
.bar .langs a[aria-current] { color: var(--ink); background: var(--on-ink); font-weight: 600; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px;
  border-radius: 999px; font: 600 15px/1.2 var(--sans); text-decoration: none; border: 1px solid var(--hair); background: var(--card);
  color: var(--text); cursor: pointer; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn.primary:hover { background: #ff8a63; }
.btn.ghost { background: transparent; color: var(--on-ink); border-color: var(--line-dark); }
.btn.ghost:hover { border-color: var(--on-ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ---- hero ---- */
.hero { padding: 40px 0 48px; position: relative; overflow: hidden; }
.hero h1 { font-size: 34px; max-width: 18ch; }
html[lang="ar"] .hero h1, html[lang="fr"] .hero h1 { max-width: 22ch; }
.hero .line { margin: 18px 0 0; padding-inline-start: 14px; border-inline-start: 3px solid var(--orange); color: var(--on-ink);
  font-size: 18px; font-weight: 600; }
.hero-grid { display: grid; gap: 32px; align-items: center; }

/* ---- 1. the network (the logo, alive) and 2. the flow ---- */
.net { width: 100%; max-width: 560px; margin: 0 auto; display: block; aspect-ratio: 592 / 352; overflow: visible; }
.net .link { stroke: var(--line-dark); stroke-width: 1.4; fill: none; }
.net .node { fill: var(--on-ink); }
.net .centre { fill: var(--orange); }
.net .glow { fill: url(#glow); }
.net .label { font: 400 17px var(--mono); fill: var(--on-ink-2); letter-spacing: .02em; }   /* drawing units: ~11 px on a phone */
html[lang="ar"] .net .label { font-family: var(--sans); font-size: 19px; letter-spacing: 0; }
.net .msg { fill: var(--ink-3); stroke: var(--line-dark); stroke-width: 1; }
.net .msg-line { stroke: var(--on-ink-2); stroke-width: 1.2; }
.net .decision rect { fill: var(--on-ink); }
.net .decision .bar-o { fill: var(--orange); }
.net .decision .txt { fill: var(--ink); opacity: .55; }
.js .net.live .link { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .9s ease-out forwards; }
.js .net.live .node { transform-box: fill-box; transform-origin: center; animation: arrive .6s ease-out both; }
.js .net.live .centre-g { transform-box: fill-box; transform-origin: center; animation: arrive .8s 1s ease-out both; }
.js .net.live .glow { animation: breathe 6s 1.6s ease-in-out infinite; }
.js .net.live .decision { animation: decide 7.2s ease-out infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes arrive { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes decide { 0%, 50% { opacity: 0; transform: translate(0, 0); } 62% { opacity: 1; } 90% { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 0; } }
.net .decision { opacity: 1; }
.js .net .decision { opacity: 0; }
.js .net:not(.live) .decision, .no-motion .net .decision { opacity: 1; }

/* the seven steps under the network */
.chain { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: s;
  font: 400 12px/1 var(--mono); }
html[lang="ar"] .chain { font-family: var(--sans); font-size: 13px; }
.chain li { padding: 8px 10px; border: 1px solid var(--hair-dark); border-radius: 999px; color: var(--on-ink-2); }
.chain li.c-model { border-color: var(--line-dark); color: var(--on-ink); }
.chain li.c-review { border-color: var(--orange); color: var(--on-ink); }
.chain li.c-action { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.js .chain.live li { animation: step 7.2s ease-in-out infinite; }
@keyframes step { 0%, 12%, 100% { background-color: transparent; } 4% { background-color: rgba(242, 240, 234, .14); } }
.js .chain.live li.c-action { animation: none; }

/* ---- cards ---- */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); padding: 20px; }
.ink .card { background: var(--ink-2); border-color: var(--hair-dark); }
.card p:last-child { margin-bottom: 0; }
.quote { font-size: 17px; color: var(--text); }
.quote::before { content: "“"; color: var(--orange); font-size: 28px; line-height: 0; vertical-align: -10px; margin-inline-end: 4px; }
html[lang="ar"] .quote::before { content: "«"; font-size: 20px; vertical-align: 0; }
html[lang="fr"] .quote::before { content: "«\00a0"; font-size: 18px; vertical-align: 0; }

/* ---- 5. frames (our own screens) ---- */
.frame { position: relative; border-radius: var(--r-frame); background: var(--ink); box-shadow: var(--shadow); overflow: hidden; }
.frame img, .frame video { display: block; width: 100%; height: auto; }
.frame .tag { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; font: 400 11px/1 var(--mono);
  color: var(--on-ink); background: rgba(16, 24, 32, .78); padding: 6px 8px; border-radius: 6px; }
html[lang="ar"] .frame .tag { font-family: var(--sans); font-size: 12px; }
.frame.phone { padding: 10px; max-width: 320px; margin: 0 auto; }
.frame.phone img, .frame.phone video { border-radius: 14px; }
.frame.browser { padding: 0; background: var(--card); border: 1px solid var(--hair); }
.frame.browser .chrome { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--hair); }
.frame.browser .chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--hair); }
.frame.browser .chrome span { margin-inline-start: 10px; font: 400 12px var(--mono); color: var(--text-2); direction: ltr; }
.frame.camera { padding: 0; border: 1px solid var(--hair-dark); }
.frame.camera .stamp { position: absolute; top: 10px; inset-inline-start: 12px; font: 400 11px var(--mono); color: var(--on-ink); }

/* ---- split: media and points ---- */
.split { display: grid; gap: 28px; align-items: center; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.points li::before { content: ""; width: 10px; height: 10px; margin-top: .55em; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 0 5px var(--orange-soft); justify-self: center; }
.points b { color: var(--text); display: block; }
.ink .points b { color: var(--on-ink); }

/* ---- 3. layers ---- */
.layers { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.layers li { border: 1px solid var(--hair); border-radius: var(--r); background: var(--card); overflow: hidden; }
.layers button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 40px 1fr 20px; gap: 12px;
  align-items: center; padding: 16px 18px; cursor: pointer; font-weight: 600; color: var(--text); min-height: 56px; }
.layers button:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.layers .n { font: 400 13px var(--mono); color: var(--text-2); }
.layers .chev { width: 10px; height: 10px; border-inline-end: 2px solid var(--line-light); border-bottom: 2px solid var(--line-light);
  transform: rotate(45deg); transition: transform .24s ease-out; justify-self: center; }
.layers [aria-expanded="true"] .chev { transform: rotate(225deg); }
.layers .say { padding: 0 18px 18px 70px; }
html[dir="rtl"] .layers .say { padding: 0 70px 18px 18px; }
.layers .say p { margin: 0; }
.js .layers .say[hidden] { display: none; }
.layers li.on { border-color: var(--orange); }
.economy { margin-top: 18px; padding: 18px 20px; border-radius: var(--r); background: var(--ink); color: var(--on-ink-2); }
.economy b { color: var(--on-ink); }

/* ---- 4. switcher ---- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { all: unset; cursor: pointer; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--hair); font-weight: 600;
  color: var(--text); background: var(--card); min-height: 24px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tabs button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.no-js .tabs { display: none; }
.scene { display: grid; gap: 14px; }
.js .scene[hidden] { display: none; }
.no-js .scene + .scene { margin-top: 28px; }
.notice { border-radius: var(--r); padding: 16px 18px; border: 1px solid var(--hair); background: var(--card); }
.notice .who { font: 400 12px var(--mono); color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 6px; }
html[lang="ar"] .notice .who { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 13px; }
.notice.fdi { border-inline-start: 3px solid var(--ink); }
.notice.vision { border-inline-start: 3px solid var(--orange); }
.notice p { margin: 0; color: var(--text); font-size: 17px; }

/* ---- principles ---- */
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.principles li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; padding: 18px; border-radius: var(--r);
  border: 1px solid var(--hair-dark); background: var(--ink-2); }
.principles svg { width: 56px; height: 56px; }
.principles b { color: var(--on-ink); display: block; margin-bottom: 4px; }

/* ---- steps (pilot) ---- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: st; }
.steps li { position: relative; padding: 20px 20px 20px 64px; border-radius: var(--r); background: var(--card); border: 1px solid var(--hair); }
html[dir="rtl"] .steps li { padding: 20px 64px 20px 20px; }
.steps li::before { counter-increment: st; content: counter(st); position: absolute; inset-inline-start: 18px; top: 18px; width: 30px; height: 30px;
  border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font: 600 14px var(--mono); }
.steps .when { font: 400 12px var(--mono); color: var(--orange-ink); display: block; margin-bottom: 4px; }
html[lang="ar"] .steps .when { font-family: var(--sans); font-size: 13px; }

/* ---- forms (the contact form, shared with FDI's page) ---- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-weight: 600; color: var(--text); font-size: 15px; }
.field small { color: var(--text-2); font-size: 14px; }
.star { color: var(--orange-ink); }
input, select, textarea { width: 100%; font: 400 16px/1.4 var(--sans); color: var(--text); background: #fff; border: 1px solid var(--hair);
  border-radius: 10px; padding: 12px; min-height: 48px; }
textarea { resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.consent input { width: 22px; height: 22px; min-height: 0; flex: none; margin-top: 2px; }
.error { background: #FBE7DF; color: #8A2A0E; border-radius: 10px; padding: 10px 12px; margin: 0; }
.trap { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-write { margin: 16px 0 6px; color: var(--text-2); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.contact-list span { color: var(--text-2); min-width: 90px; display: inline-block; }
.form .button, .form button[type="submit"] { justify-self: start; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--on-ink); font: 600 15px/1.2 var(--sans); cursor: pointer; text-decoration: none; }

/* ---- footer ---- */
.foot { padding: 40px 0 48px; border-top: 1px solid var(--hair); font-size: 14px; }
.foot img { display: block; height: 30px; width: auto; margin-bottom: 14px; }
.foot p { margin: 0 0 6px; }
.foot .links a { color: var(--text-2); }
.legal-note { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 13px; color: var(--text-2); }
.legal-note h2 { font-size: 14px; margin-bottom: 6px; }
.legal-note p { margin: 0 0 4px; }

/* ---- arrival (sections settle in once) ---- */
.js .rise { opacity: 0; transform: translateY(14px); transition: opacity .7s ease-out, transform .7s ease-out; }
.js .rise.in { opacity: 1; transform: none; }

@media (min-width: 760px) {
  h1 { font-size: 48px; } h2 { font-size: 32px; }
  .hero { padding: 72px 0 80px; }
  .hero h1 { font-size: 44px; max-width: 20ch; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  section.block { padding: 88px 0; }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .cards.two { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .split.flip > :first-child { order: 2; }
  .principles { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .scene { grid-template-columns: 1fr 1fr; align-items: start; }
  .scene .wide { grid-column: 1 / -1; }
  #contact .form { max-width: 720px; }
}
@media (min-width: 1000px) { .bar nav.sections { display: flex; } .bar .langs { margin-inline-start: 18px; } }

/* ---- still versions: no motion means the finished picture, not a missing one ---- */
@media (prefers-reduced-motion: reduce) {
  .js .net.live .link, .js .net.live .node, .js .net.live .centre-g, .js .net.live .glow, .js .net.live .travel,
  .js .net.live .decision, .js .chain.live li { animation: none !important; stroke-dashoffset: 0; opacity: 1; }
  .js .net.live .travel { opacity: 0 !important; }
  .js .net .decision { opacity: 1 !important; }
  .js .rise { opacity: 1; transform: none; transition: none; }
}

/* the decision card's caption, and the travelling messages hidden under reduced motion (SVG animateMotion is not CSS) */
.net .dec-t { font: 600 14px var(--mono); fill: var(--ink); opacity: 1; }
html[lang="ar"] .net .dec-t { font-family: var(--sans); font-size: 15px; }
.no-motion .net .travel, .no-js .net .travel { display: none; }
@media (prefers-reduced-motion: reduce) { .net .travel { display: none; } }

/* ---- present mode (?present=1): one section per slide, the logo in a corner ---- */
.presenting body { overflow: hidden; background: var(--ink); }
.presenting .bar, .presenting .foot { display: none; }
.presenting main > section { display: none; min-height: 100vh; padding: 6vh 0; }
.presenting main > section.current { display: flex; flex-direction: column; justify-content: center; }
.presenting main > section:not(.ink) { background: var(--paper); }
.presenting .rise { opacity: 1 !important; transform: none !important; }
.presenting::after { content: ""; position: fixed; inset-block-start: 20px; inset-inline-end: 24px; width: 120px; height: 40px;
  background: url("/static/brand/logo-on-dark.svg") no-repeat center / contain; z-index: 30; pointer-events: none;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, .4)); }
.present-count { position: fixed; inset-block-end: 18px; inset-inline-end: 24px; color: var(--line-light); font-size: 13px; z-index: 30; }
@media (min-width: 1200px) { .presenting h1 { font-size: 64px; } .presenting h2 { font-size: 44px; } .presenting .lede { font-size: 22px; } }

/* ---- sector pages: the week, with and without; the screens; the PDF ---- */
.note { color: var(--text-2); font-size: 14px; }
.ink .note { color: var(--on-ink-2); }
.plain { margin: 0; padding-inline-start: 20px; }
.plain li { margin-block: 8px; }
.card.on { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
#week .notice { margin-top: 14px; }
.loop { margin-top: 24px; max-width: 760px; }
.pdf { margin-top: 18px; }
.pdf a { font-weight: 600; }
.person { display: flex; gap: 14px; align-items: flex-start; }
.person img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.person .role { color: var(--text-2); margin-bottom: 6px; }
h2.h3 { font-size: 18px; letter-spacing: 0; }
.ink h2.h3 { color: var(--on-ink-2); font: 400 13px var(--mono); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
html[lang="ar"] .ink h2.h3 { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 14px; }
/* the static copy, when our server cannot be reached (site.js): said plainly, with the address to write to */
.form-down { background: #FBE7DF; color: #8A2A0E; border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; font-weight: 600; }
.form-down a { color: inherit; }
