/* Ads_Analytic — site styles. Brand tokens come from the Carbrain site (black, gold gradients, gold hairline). */
:root {
  --bg: #050505;
  --bg-raised: #0d0c09;
  --ink: #ede8d8;
  --muted: #a59f8c;
  --gold: #d4af37;
  --gold-hi: #ffd700;
  --gold-deep: #8c6d12;
  --gold-text: #e3c25a;      /* gold used for text on dark: AA on --bg */
  --line: rgba(212, 175, 55, 0.28);
  --line-strong: rgba(212, 175, 55, 0.6);
  --focus: #ffd700;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, "Noto Sans", sans-serif;
  --ease: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fbf8ef;
  --bg-raised: #f3edda;
  --ink: #17140a;
  --muted: #5d5640;
  --gold: #b8921c;
  --gold-hi: #d4af37;
  --gold-deep: #6e540a;
  --gold-text: #7a5c05;
  --line: rgba(122, 92, 5, 0.3);
  --line-strong: rgba(122, 92, 5, 0.65);
  --focus: #7a5c05;
  color-scheme: light;
}

*, *::before, *::after { 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); font-size: 1.0625rem; line-height: 1.6;
  font-variant-numeric: lining-nums;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--gold-text); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:root[data-theme="light"] a:hover { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* the Carbrain signature: a gold hairline around the viewport */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 14px rgba(212, 175, 55, 0.12);
}

.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--gold); color: #050505; padding: .6rem 1rem; z-index: 60; }
.skip:focus { top: 1rem; }

.wrap { width: min(1160px, 100% - 3rem); margin-inline: auto; }

/* header */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.15rem; letter-spacing: .01em; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand span { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hi) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav.main { margin-inline-start: auto; display: flex; gap: 1.6rem; align-items: center; }
nav.main a { color: var(--muted); text-decoration: none; font-size: .98rem; }
nav.main a:hover { color: var(--ink); }
.tools { display: flex; align-items: center; gap: .6rem; }
select.lang, button.theme {
  background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .8rem; font: inherit; font-size: .9rem; cursor: pointer; min-height: 2.4rem;
}
select.lang option { background: var(--bg); color: var(--ink); }
button.theme { width: 2.4rem; padding: 0; }

/* glossy primary button (BrainTech signature) */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: .7rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
}
.btn-primary {
  color: #1a1304;
  background: linear-gradient(180deg, #ffe58a 0%, #ffd700 38%, #d4af37 62%, #a9831c 100%);
  border-color: rgba(255, 236, 160, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -3px 6px rgba(120, 85, 0, 0.35),
              0 8px 22px rgba(212, 175, 55, 0.28), 0 2px 4px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.btn-primary::after { /* specular highlight */
  content: ""; position: absolute; inset: 1px 8% auto 8%; height: 46%; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,0)); pointer-events: none;
}
.btn-primary:hover { color: #1a1304; filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 -3px 6px rgba(120,85,0,.35), 0 10px 30px rgba(255,215,0,.42), 0 2px 4px rgba(0,0,0,.5); }
.btn:active { transform: scale(.96); }
.btn-ghost { color: var(--ink); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { color: var(--ink); border-color: var(--gold-hi); }

/* hero */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.06; font-weight: 300; letter-spacing: -0.02em; margin: 0 0 1.4rem; text-wrap: balance; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34rem; margin: 0 0 2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .9rem; }
.status { margin-top: 1.6rem; color: var(--muted); font-size: .95rem; display: flex; gap: .6rem; align-items: center; }
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 10px var(--gold-hi); flex: none; }

/* the cost ladder */
.ladder { margin: 0; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--bg-raised), var(--bg)); box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.ladder ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; }
.ladder li { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .2rem 1rem; }
.ladder .label { color: var(--muted); font-size: .92rem; }
.ladder .count { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ladder .cost { grid-column: 2; grid-row: 1 / span 2; text-align: end; font-size: 1.55rem; font-weight: 300; color: var(--gold-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ladder .bar { grid-column: 1; height: 14px; border-radius: 999px; background: linear-gradient(90deg, var(--gold-deep), var(--gold) 55%, var(--gold-hi)); transform-origin: left center; width: var(--w); }
[dir="rtl"] .ladder .bar { transform-origin: right center; background: linear-gradient(270deg, var(--gold-deep), var(--gold) 55%, var(--gold-hi)); }
.ladder li:last-child .cost { font-size: 2.1rem; color: var(--gold-hi); }
:root[data-theme="light"] .ladder li:last-child .cost { color: var(--gold-deep); }
.ladder figcaption { margin-top: 1.2rem; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .8rem; }
@media (prefers-reduced-motion: no-preference) {
  .ladder .bar { animation: grow 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .ladder li:nth-child(2) .bar { animation-delay: 150ms; }
  .ladder li:nth-child(3) .bar { animation-delay: 300ms; }
  .ladder li:nth-child(4) .bar { animation-delay: 450ms; }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* sections */
section { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 300; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 1rem; text-wrap: balance; max-width: 30ch; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 .35rem; }
.intro { color: var(--muted); max-width: 40rem; margin: 0 0 2.4rem; }

.rows { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.rows > li { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 1rem 3rem; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 1px solid var(--line); }
.rows p { margin: 0; color: var(--muted); max-width: 46rem; }

.steps { counter-reset: step; }
.steps > li::before { counter-increment: step; content: counter(step); font-size: 2.4rem; font-weight: 200; line-height: 1; color: var(--gold-text); }
.steps > li { grid-template-columns: 3.2rem minmax(0, 16rem) minmax(0, 1fr); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.plan { padding: 1.8rem 1.6rem 2rem; border-inline-end: 1px solid var(--line); }
.plan:last-child { border-inline-end: 0; }
.plan.featured { background: linear-gradient(180deg, rgba(212,175,55,.12), transparent 70%); }
.price { font-size: 2.6rem; font-weight: 300; margin: .2rem 0 1rem; font-variant-numeric: tabular-nums; }
.price small { font-size: .95rem; color: var(--muted); font-weight: 400; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; color: var(--muted); font-size: .98rem; }
.plan li { padding-inline-start: 1.3rem; position: relative; }
.plan li::before { content: ""; position: absolute; inset-inline-start: 0; top: .6em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); }
.note { color: var(--muted); font-size: .9rem; margin-top: 1rem; }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 3rem; margin: 0; padding: 0; list-style: none; }
.cols li { padding-inline-start: 1.1rem; border-inline-start: 2px solid var(--line-strong); }
.cols p { margin: 0; color: var(--muted); }

.final { text-align: start; }

footer { border-top: 1px solid var(--line); padding-block: 2.6rem 3.4rem; color: var(--muted); font-size: .95rem; }
footer .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 2.5rem; align-items: center; }
footer img { width: 84px; height: auto; }
footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* legal pages */
.legal { padding-block: 3rem 5rem; max-width: 46rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.35rem; font-weight: 600; margin-top: 2.2rem; max-width: none; }
.legal p, .legal li { color: var(--ink); }
.draft { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1rem 1.2rem; color: var(--muted); background: var(--bg-raised); }

@media (max-width: 880px) {
  nav.main a:not(.keep) { display: none; }
  .hero .wrap { grid-template-columns: 1fr; }
  .rows > li, .steps > li { grid-template-columns: 1fr; gap: .4rem; }
  .steps > li::before { margin-bottom: .2rem; }
  .plans { grid-template-columns: 1fr; }
  .plan { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .plan:last-child { border-bottom: 0; }
  .cols { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 2rem); }
  .top .wrap { gap: .7rem; }
  .brand span { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* visually hidden, safe in RTL (no off-screen offsets) */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
