/* ==========================================================================
   databricks.expert — Immersive Duotone design system
   Dark editorial. Warm-biased near-black, Databricks ember (#FF3621) as the
   single accent, self-hosted Space Grotesk display + system sans/mono.
   Signature device: duotone photography (SVG filters live in index.html).
   Self-contained — no external requests (CSP default-src 'self').
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- Tokens ---------- */
:root {
  --ink: #0A0A0E;
  --ink2: #121218;
  --ink3: #181820;
  --line: #24242E;
  --line2: #34343F;
  --cream: #F3EEE6;
  --muted: #AEAAB8;
  --faint: #7D7987;
  --ember: #FF3621;
  --ember2: #FF6A4D;
  --ember-soft: rgba(255, 54, 33, 0.11);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --disp: "Space Grotesk", var(--sans);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --container: 1180px;
}

/* ---------- Base ---------- */
body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--cream);
  line-height: 1.62;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--disp); font-weight: 700; letter-spacing: -0.02em; line-height: 1.06; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.85rem); }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--ember2); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--cream); font-weight: 600; }
::selection { background: var(--ember); color: #fff; }
:focus-visible { outline: 2px solid var(--ember2); outline-offset: 3px; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 32px; }
.section { padding-block: 104px; }
.section-alt { background: var(--ink2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 660px; margin-bottom: 50px; }
.section-head h2 { margin-top: 18px; }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 1.15rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--ember); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 14, 0.62);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { font-family: var(--disp); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--cream); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--ember); }
.nav-menu { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-menu a { display: inline-block; padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-menu a:hover { color: var(--cream); text-decoration: none; }
.nav-menu a[aria-current="page"] { color: var(--cream); }
.nav-menu a.nav-cta, .nav-menu a.nav-cta:hover { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; border-radius: var(--radius-sm); }
.nav-toggle-bar { display: block; width: 22px; height: 2px; background: var(--cream); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem; line-height: 1.3; text-align: center;
  border: 1.5px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--ember); color: #fff; box-shadow: 0 8px 24px -10px rgba(255, 54, 33, 0.7); }
.btn-primary:hover { background: var(--ember2); color: #fff; box-shadow: 0 12px 30px -10px rgba(255, 54, 33, 0.8); }
.btn-secondary { border-color: rgba(243, 238, 230, 0.26); color: var(--cream); }
.btn-secondary:hover { border-color: var(--cream); color: var(--cream); }
.btn-ghost { color: var(--ember2); padding-inline: 0.5rem; }
.btn-lg { padding: 17px 32px; font-size: 1.06rem; }
.btn-sm { padding: 9px 16px; font-size: 0.86rem; }

/* ---------- Hero (homepage, full-bleed duotone) ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(90vh, 900px);
  display: flex; align-items: flex-end;
  background: var(--ink);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 66% 28%;
  filter: url(#duoCream) contrast(1.04) saturate(0.92);
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,10,14,0.8) 0%, rgba(10,10,14,0.12) 15%, transparent 28%),
    linear-gradient(93deg, rgba(10,10,14,0.97) 0%, rgba(10,10,14,0.9) 30%, rgba(10,10,14,0.42) 60%, rgba(10,10,14,0.62) 100%),
    linear-gradient(0deg, rgba(10,10,14,0.94) 0%, rgba(10,10,14,0.2) 22%, transparent 40%);
}
.hero > .container { position: relative; z-index: 2; width: 100%; padding-block: 52px 60px; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.1rem); letter-spacing: -0.03em; max-width: 15ch; margin-top: 26px; }
.hero h1 .accent { color: var(--ember); display: block; }
.hero-sub { max-width: 47ch; margin-top: 26px; font-size: 1.19rem; color: #d9d5df; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-note { margin-top: 26px; font-size: 0.86rem; color: var(--faint); font-family: var(--mono); letter-spacing: 0.01em; }

/* ---------- Credential strip / chips ---------- */
/* tighten the credential section without touching markup */
section.section[aria-label="Credentials"] { padding-block: 40px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.chip-row.centered { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 15px; border: 1px solid var(--line2); border-radius: var(--radius-pill);
  font-size: 0.85rem; color: var(--muted); white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.chip svg { width: 14px; height: 14px; color: var(--ember); }
.chip-accent { border-color: rgba(255, 54, 33, 0.5); color: var(--cream); background: var(--ember-soft); }
.chip-accent::before { background: var(--ember); }
.badge {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: var(--radius-pill);
  background: var(--ember-soft); color: var(--ember2);
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}

/* ---------- Grids & cards (services + proof) ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 14px; padding: 26px;
  background: var(--ink3); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.16s ease, transform 0.16s ease;
}
a.card { color: inherit; }
a.card:hover { text-decoration: none; border-color: rgba(255, 54, 33, 0.55); transform: translateY(-3px); }
.card h3 { color: var(--cream); letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 0.95rem; line-height: 1.58; flex-grow: 1; }
.card-icon { color: var(--ember); }
.card-icon svg { width: 26px; height: 26px; }
.card-price { font-family: var(--mono); font-size: 0.84rem; font-weight: 600; color: var(--ember); letter-spacing: 0.01em; }
.card-cta { font-family: var(--mono); font-size: 0.8rem; font-weight: 600; color: var(--ember); letter-spacing: 0.02em; }

/* ---------- Pricing cards (sub-pages) ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; gap: 14px; padding: 32px 26px; background: var(--ink3); border: 1px solid var(--line); border-radius: var(--radius); }
.price-card.featured { border-color: rgba(255, 54, 33, 0.5); box-shadow: 0 20px 50px -30px rgba(255, 54, 33, 0.55); }
.price-figure { font-family: var(--disp); font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; color: var(--cream); }
.price-figure small { font-size: 1rem; font-weight: 500; color: var(--muted); font-family: var(--sans); }
.price-list { list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 0.95rem; flex-grow: 1; }
.price-list li { padding-left: 1.5rem; position: relative; }
.price-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.8rem; height: 0.42rem; border-left: 2px solid var(--ember); border-bottom: 2px solid var(--ember); transform: rotate(-45deg); }

/* ---------- Comparison table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--ink3); }
.compare-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.95rem; }
.compare-table th, .compare-table td { padding: 17px 22px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table thead th { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--faint); font-weight: 500; background: rgba(255, 255, 255, 0.02); }
.compare-table thead th.col-me { color: var(--ember); }
.compare-table tbody th { color: var(--cream); font-weight: 600; white-space: nowrap; }
.compare-table td { color: var(--muted); }
.compare-table .col-me { background: var(--ember-soft); color: var(--cream); }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Steps (sequence -> numbered) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { position: relative; padding: 30px 26px; background: var(--ink3); border: 1px solid var(--line); border-radius: var(--radius); }
.step-num { font-family: var(--disp); font-weight: 700; font-size: 2.9rem; line-height: 1; color: var(--ember); display: block; margin-bottom: 16px; letter-spacing: -0.03em; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 0.97rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: var(--ink3); margin-bottom: 14px; }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 24px; font-family: var(--disp); font-weight: 600; font-size: 1.08rem; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex-shrink: 0; width: 10px; height: 10px; border-right: 2px solid var(--ember); border-bottom: 2px solid var(--ember); transform: rotate(45deg); transition: transform 0.2s ease; }
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-body { padding: 20px 24px; color: var(--muted); }
.faq-body p + p { margin-top: 1rem; }

/* ---------- CTA band (human bookend, duotone photo) ---------- */
.cta-band {
  position: relative; overflow: hidden;
  border: 1px solid var(--line2); border-radius: 22px; background: var(--ink3);
  padding: 54px 46px;
}
.cta-band > :not(.cta-media) { position: relative; z-index: 2; }
.cta-band h2 { max-width: 20ch; }
.cta-band p { margin-top: 16px; color: var(--muted); font-size: 1.06rem; max-width: 42ch; }
.cta-band .btn { margin-top: 26px; }
.cta-band .cta-note { margin-top: 16px; font-family: var(--mono); font-size: 0.8rem; color: var(--faint); }
.cta-media { position: absolute; top: 0; right: 0; bottom: 0; width: 44%; z-index: 1; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: url(#duoEmber) contrast(1.05); }
.cta-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink3) 0%, rgba(24,24,32,0.5) 30%, rgba(24,24,32,0) 66%, rgba(255,54,33,0.14) 100%); }
@media (min-width: 861px) { .cta-band { padding-right: calc(42% + 46px); } .cta-media { width: 42%; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink2); border-top: 1px solid var(--line); padding-block: 70px 34px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 44px; }
.footer-brand .brand { font-size: 1.25rem; }
.footer-brand p { margin-top: 16px; color: var(--muted); max-width: 34ch; font-size: 0.9rem; }
.footer-heading { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--cream); text-decoration: none; }
.link-desc { display: block; font-size: 0.78rem; color: var(--faint); margin-top: 2px; }
.footer-legal { margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

/* ---------- Currency toggle ---------- */
.currency-toggle { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.currency-toggle span { font-size: 0.75rem; color: var(--faint); }
.currency-toggle button { background: transparent; border: 1px solid var(--line2); color: var(--muted); font: inherit; font-size: 0.75rem; padding: 5px 12px; border-radius: var(--radius-pill); cursor: pointer; }
.currency-toggle button[aria-pressed="true"] { border-color: var(--ember); color: var(--cream); font-weight: 600; }
.currency-toggle button:hover { color: var(--cream); }

/* ---------- Page hero (sub-pages) ---------- */
.page-hero { position: relative; padding-block: 76px 56px; border-bottom: 1px solid var(--line); background: var(--ink2); }
.page-hero h1 { max-width: 22ch; }
.page-hero .lede { max-width: 60ch; margin-top: 18px; font-size: 1.18rem; color: var(--muted); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-family: var(--mono); font-size: 0.78rem; color: var(--faint); margin-bottom: 18px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--faint); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--cream); }

/* ---------- Article / guides prose ---------- */
.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2.4rem; font-size: 1.7rem; }
.prose h3 { margin-top: 1.7rem; font-size: 1.3rem; }
.prose p, .prose li { color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.5rem; }
.prose strong { color: var(--cream); }
.prose a { color: var(--ember2); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { border-left: 3px solid var(--ember); padding: 0.4rem 1.2rem; background: var(--ink3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: var(--cream); }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--ink3); border: 1px solid var(--line); border-radius: 4px; padding: 0.12em 0.35em; color: var(--cream); }
.prose pre { background: var(--ink3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 0.9rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 0.6rem 0.9rem; border: 1px solid var(--line); text-align: left; }
.prose thead th { background: var(--ink3); color: var(--cream); }
.article-meta { color: var(--faint); font-size: 0.9rem; margin-top: 0.5rem; font-family: var(--mono); }

/* ---------- Utilities ---------- */
.lede { font-size: 1.18rem; color: var(--muted); }
.text-center { text-align: center; }
.centered { justify-content: center; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 2.5rem; }
.mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 2.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4, .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { display: flex; flex-direction: column; padding: 46px 34px; }
  .cta-media { position: relative; width: auto; height: 240px; order: -1; margin: -46px -34px 30px; }
  .cta-media img { object-position: 50% 20%; }
  .cta-media::after { background: linear-gradient(0deg, var(--ink3) 0%, rgba(24,24,32,0.2) 45%, rgba(255,54,33,0.12) 100%); }
}
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    padding: 16px 32px 24px;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { display: block; padding: 12px 10px; font-size: 1.02rem; }
  .nav-menu .nav-cta { margin-top: 12px; text-align: center; }
}
@media (max-width: 640px) {
  .section { padding-block: 72px; }
  .grid-2, .grid-3, .grid-4, .proof-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 88vh; }
}
@media (max-width: 480px) {
  .chip { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
