/* ══════════════════════════════════════════════════════════
   TB3 Technologies — doc.css (service "learn more" pages)
   Loads AFTER css/main.css and builds on its tokens/classes:
   .navbar, .sec-label, .sec-title, .btn, .stat, .faq-*, .footer,
   .reveal system, .spot spotlight, .orb + keyframes.
══════════════════════════════════════════════════════════ */

.doc-page section{padding:clamp(64px,8vw,108px) 0}
.doc-page .container{max-width:1000px}

/* NAV extras (logo + back pill + language toggle) */
.nav-right{display:flex;align-items:center;gap:8px}
.nav-back{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:980px;font-size:13.5px;font-weight:550;color:var(--text2);text-decoration:none;border:1px solid transparent;transition:var(--ease)}
.nav-back:hover{color:var(--blue);background:rgba(var(--blue-rgb),.06)}
.nav-back svg{width:14px;height:14px}

/* HERO — full-bleed treatment matching the homepage (grid mask + orbs) */
.doc-hero{position:relative;overflow:hidden;background:var(--bg);padding:calc(var(--nav-h) + 72px) 0 clamp(56px,7vw,84px);text-align:center}
.doc-hero::before{content:'';position:absolute;inset:0;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Ctext x='32' y='32' font-family='ui-monospace,Menlo,Consolas,monospace' font-size='26' fill='rgba(0,102,214,.05)' text-anchor='middle' dominant-baseline='central'%3E0%3C/text%3E%3Ctext x='96' y='32' font-family='ui-monospace,Menlo,Consolas,monospace' font-size='26' fill='rgba(0,102,214,.05)' text-anchor='middle' dominant-baseline='central'%3E1%3C/text%3E%3Ctext x='32' y='96' font-family='ui-monospace,Menlo,Consolas,monospace' font-size='26' fill='rgba(0,102,214,.05)' text-anchor='middle' dominant-baseline='central'%3E1%3C/text%3E%3Ctext x='96' y='96' font-family='ui-monospace,Menlo,Consolas,monospace' font-size='26' fill='rgba(0,102,214,.05)' text-anchor='middle' dominant-baseline='central'%3E0%3C/text%3E%3C/svg%3E");background-size:128px 128px;pointer-events:none;-webkit-mask-image:radial-gradient(ellipse 75% 70% at 50% 20%,#000 25%,transparent 72%);mask-image:radial-gradient(ellipse 75% 70% at 50% 20%,#000 25%,transparent 72%)}
.doc-hero-inner{position:relative;z-index:1}
.doc-crumb{display:flex;justify-content:center;align-items:center;gap:9px;font-size:12.5px;color:var(--text3);margin-bottom:22px;animation:fadeUp .6s .05s ease both}
.doc-crumb a{color:var(--text3);text-decoration:none;transition:color .2s}
.doc-crumb a:hover{color:var(--blue)}
.doc-crumb .sep{opacity:.45}
.doc-crumb [aria-current]{color:var(--text2);font-weight:600}
.doc-hero .sec-label{justify-content:center;animation:fadeUp .6s .1s ease both}
.doc-hero .sec-label::after{content:'';width:26px;height:1.5px;background:linear-gradient(270deg,var(--blue),rgba(var(--blue-rgb),.25));border-radius:1px}
.doc-title{font-family:var(--font-display);font-size:clamp(42px,6.5vw,78px);font-weight:800;letter-spacing:-0.045em;line-height:1.03;color:var(--text);margin-bottom:18px;animation:fadeUp .7s .16s ease both}
.doc-title .blue{color:var(--blue);background:linear-gradient(90deg,var(--blue),#5AB0FF,var(--blue));background-size:200% auto;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:shimmer 5s linear infinite}
.doc-lead{font-size:clamp(16.5px,1.9vw,19px);color:var(--text2);max-width:620px;margin:0 auto 36px;line-height:1.65;animation:fadeUp .7s .26s ease both}
.doc-hero-btns{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;animation:fadeUp .7s .34s ease both}
.doc-stats{display:flex;justify-content:center;margin-top:56px;animation:fadeUp .7s .48s ease both}

/* SECTION SCALE — doc pages use a slightly tighter type scale than index */
.doc-page .sec-title{font-size:clamp(30px,4vw,48px)}
.doc-page .sec-head{margin-bottom:0}
.doc-page .sec-head + *{margin-top:48px}

/* FEATURE CARDS — service-card language from the homepage */
.feature-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px;perspective:1200px}
.feature{background:#fff;border:1px solid var(--border);border-radius:var(--r);padding:28px;position:relative;overflow:hidden;transition:var(--ease)}
.feature::after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--blue);transform:scaleX(0);transform-origin:left;transition:.3s cubic-bezier(.4,0,.2,1)}
.feature:hover{box-shadow:var(--shadow-hover);transform:translateY(-3px);border-color:rgba(var(--blue-rgb),.14)}
.feature:hover::after{transform:scaleX(1)}
.feature-icon{width:44px;height:44px;border-radius:12px;background:rgba(var(--blue-rgb),.08);display:flex;align-items:center;justify-content:center;margin-bottom:16px;color:var(--blue)}
.feature-icon svg{width:21px;height:21px;stroke-width:1.5}
.feature h3{font-family:var(--font-display);font-size:16.5px;font-weight:600;letter-spacing:-0.01em;color:var(--text);margin-bottom:8px}
.feature p{font-size:14.5px;color:var(--text2);line-height:1.65;margin:0}

/* TECH PILLS */
.techs{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:720px;margin:0 auto}
.tech{font-size:13.5px;font-weight:500;padding:8px 18px;background:var(--bg2);color:var(--text2);border-radius:980px;border:1px solid var(--border);transition:var(--ease)}
.alt-bg .tech{background:#fff}
.tech:hover{color:var(--blue);border-color:rgba(var(--blue-rgb),.35);background:rgba(var(--blue-rgb),.05);transform:translateY(-2px)}

/* STEPS — vertical timeline; the connector line draws in on reveal and
   each number lights up as its step scrolls into view. */
.steps{list-style:none;counter-reset:step;max-width:660px;margin:0 auto;padding:0;position:relative}
.steps::before{content:'';position:absolute;top:10px;bottom:28px;left:26px;width:2px;border-radius:2px;background:linear-gradient(180deg,var(--blue),rgba(var(--blue-rgb),.12));transform:scaleY(1);transform-origin:top;transition:transform 1.2s cubic-bezier(.4,0,.2,1) .1s}
.js .steps.reveal{opacity:1;transform:none;filter:none} /* the ol itself never hides — only its line animates */
.js .steps.reveal:not(.visible)::before{transform:scaleY(0)}
.steps li{position:relative;padding:0 0 40px 78px;text-align:left}
.steps li:last-child{padding-bottom:0}
.steps li::before{counter-increment:step;content:counter(step);position:absolute;left:0;top:-4px;width:54px;height:54px;background:#fff;border:1px solid var(--border);color:var(--blue);border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-size:16px;font-weight:700;z-index:1;box-shadow:0 0 0 6px var(--bg);transition:var(--ease)}
.js .steps li.reveal.visible::before{background:var(--blue);color:#fff;border-color:var(--blue);box-shadow:0 0 0 6px var(--bg),0 4px 20px rgba(var(--blue-rgb),.3)}
.alt-bg .steps li::before{box-shadow:0 0 0 6px var(--bg2)}
.js .alt-bg .steps li.reveal.visible::before{box-shadow:0 0 0 6px var(--bg2),0 4px 20px rgba(var(--blue-rgb),.3)}
.steps h3{font-family:var(--font-display);font-size:17px;font-weight:600;letter-spacing:-0.01em;color:var(--text);margin-bottom:4px}
.steps p{font-size:15px;color:var(--text2);line-height:1.7;margin:0}

/* Intro line under a section head, centered */
.doc-intro{font-size:16.5px;color:var(--text2);line-height:1.7;max-width:620px;margin:0 auto;text-align:center}

/* CTA */
.cta-box{position:relative;overflow:hidden;background:var(--navy);border-radius:var(--rL);padding:clamp(44px,6vw,72px) 32px;text-align:center}
.cta-box::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 60% 60% at 50% 0%,rgba(var(--blue-rgb),.2),transparent 65%);pointer-events:none}
.cta-box > *{position:relative;z-index:1}
.cta-box h2{font-family:var(--font-display);color:#fff;font-size:clamp(26px,3.4vw,38px);font-weight:700;letter-spacing:-0.03em;margin-bottom:10px}
.cta-box p{color:rgba(255,255,255,.65);font-size:16px;max-width:460px;margin:0 auto 28px;line-height:1.65}

/* RELATED SERVICES */
.related-wrap{text-align:center;margin-top:56px}
.related-label{font-size:12.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text3);margin-bottom:16px}
.related{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.related a{display:inline-flex;align-items:center;gap:7px;font-size:14px;font-weight:550;padding:10px 20px;background:#fff;border:1px solid var(--border);border-radius:980px;color:var(--text2);text-decoration:none;transition:var(--ease)}
.related a:hover{color:var(--blue);border-color:rgba(var(--blue-rgb),.35);box-shadow:var(--shadow);transform:translateY(-2px)}
.related a .arr{transition:transform .25s cubic-bezier(.4,0,.2,1)}
.related a:hover .arr{transform:translateX(3px)}

/* FOOTER — compact, centered variant of the homepage navy footer */
.doc-page .footer{padding:48px 0 36px;text-align:center}
.doc-page .footer .container{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:16px}
.flinks{display:flex;gap:6px 20px;flex-wrap:wrap;justify-content:center}
.flinks a{font-size:13px;color:rgba(255,255,255,.62);text-decoration:none;transition:var(--ease)}
.flinks a:hover{color:#fff}

/* RESPONSIVE */
@media(max-width:760px){
  .feature-grid{grid-template-columns:1fr}
  .doc-stats{flex-direction:column;align-items:center;gap:0}
  .doc-stats .stat{border-right:none;border-bottom:1px solid var(--border);padding:14px 0;width:200px}
  .doc-stats .stat:last-child{border-bottom:none}
  .steps li{padding-left:64px}
  .steps li::before{width:44px;height:44px;font-size:14px}
  .steps::before{left:21px}
}
@media(prefers-reduced-motion:reduce){
  .js .steps.reveal:not(.visible)::before{transform:scaleY(1)}
}

/* ── CONTENT PAGES (site/content → scripts/render-content.mjs) ── */
.doc-intro{max-width:760px;margin:0 auto;font-size:18.5px;line-height:1.8;color:var(--text2)}
.doc-intro p + p{margin-top:18px}
#overview{padding-top:72px;padding-bottom:40px}
.doc-narrow{max-width:820px}
.doc-prose{font-size:17.5px;line-height:1.8;color:var(--text2);text-align:center}
#story .doc-prose{text-align:start}
.doc-note{margin-top:22px;font-size:15px;line-height:1.7;color:var(--text3);text-align:center}
#story .doc-note{text-align:start;margin:0 0 8px}
.doc-list{list-style:none;display:grid;gap:14px;margin:0 auto;max-width:720px}
.doc-list li{display:flex;gap:12px;align-items:flex-start;font-size:16.5px;line-height:1.65;color:var(--text2)}
.doc-list svg{flex:0 0 20px;width:20px;height:20px;margin-top:3px;color:var(--blue);stroke-width:2.4}
.doc-h2{font-size:clamp(24px,3vw,32px);margin:44px 0 14px}
#story .doc-list{margin:0}
.doc-links{list-style:none;display:flex;flex-wrap:wrap;gap:10px 22px;font-size:16px}
.doc-links a{color:var(--blue);font-weight:500}
.feature .svc-more{display:inline-flex;gap:6px;margin-top:14px;font-size:14px;font-weight:500;color:var(--blue);text-decoration:none}
.feature .svc-more:hover{text-decoration:underline}
[dir="rtl"] .svc-more [aria-hidden]{transform:scaleX(-1)}
.work-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}
.work-link{display:flex;flex-direction:column;gap:8px;padding:24px;border-radius:var(--r);background:#fff;border:1px solid var(--border);text-decoration:none;color:var(--text);transition:box-shadow .25s ease,transform .25s ease}
.work-link:hover{box-shadow:var(--shadow-hover);transform:translateY(-3px)}
.work-link-name{font-family:var(--font-display);font-size:19px;font-weight:700;letter-spacing:-0.02em}
.work-link-sum{font-size:14.5px;line-height:1.6;color:var(--text2)}
.work-link .svc-more{margin-top:auto;display:inline-flex;gap:6px;font-size:14px;font-weight:500;color:var(--blue)}
.work-shot{margin:0;border-radius:var(--rL);overflow:hidden;border:1px solid var(--border);box-shadow:var(--shadow);aspect-ratio:16/9;background:var(--navy)}
.work-shot img{display:block;width:100%;height:100%;object-fit:cover}
#shot{padding-top:48px;padding-bottom:0}
