/* Root Cause Analysis Ltd — site styles */

:root {
  --ink: #0b1220;
  --ink-2: #111a2e;
  --ink-3: #1a2540;
  --text: #1c2333;
  --muted: #5b6475;
  --line: #e4e7ee;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --accent: #14b8a6;
  --accent-2: #0ea5e9;
  --accent-ink: #0f766e;
  --on-dark: #e8ecf5;
  --on-dark-muted: #9aa5bd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 8px 24px rgba(11, 18, 32, .06);
  --shadow-lg: 0 2px 4px rgba(11, 18, 32, .04), 0 20px 48px rgba(11, 18, 32, .10);
  --max: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 14px;
}
.lead { font-size: 1.18rem; color: var(--muted); max-width: 640px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, .86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
  letter-spacing: -.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.brand-sub { font-size: .72rem; color: var(--on-dark-muted); letter-spacing: .08em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--on-dark);
  font-size: .95rem;
  font-weight: 500;
}
.nav-links a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.nav-links a.active { color: #fff; background: rgba(20, 184, 166, .16); }
.nav-links .btn { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px;
  color: #fff; cursor: pointer;
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: var(--font);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: 0 6px 20px rgba(20, 184, 166, .28); }
.btn-primary:hover { background: #2dd4bf; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.nav-links a.btn-primary { color: var(--ink); padding: 9px 18px; }
.nav-links a.btn-primary:hover { background: #2dd4bf; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark);
  padding: 120px 0 110px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 400px at 85% 10%, rgba(14, 165, 233, .22), transparent 60%),
    radial-gradient(600px 400px at 10% 100%, rgba(20, 184, 166, .20), transparent 60%);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero h1 { color: #fff; max-width: 820px; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .lead { color: var(--on-dark-muted); font-size: 1.22rem; }
.hero .eyebrow { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 72px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-stats div { background: rgba(11, 18, 32, .7); padding: 22px 24px; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.05rem; color: #fff; font-weight: 600; }
.hero-stats span { font-size: .88rem; color: var(--on-dark-muted); }

.page-hero { padding: 96px 0 80px; }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin: 0 auto; }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cfe9e6; }
.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(20, 184, 166, .14), rgba(14, 165, 233, .14));
  color: var(--accent-ink);
  margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; }
.card p { color: var(--muted); font-size: .98rem; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
  font-size: .95rem;
  color: var(--text);
}
.ticks li::before {
  content: "";
  position: absolute; left: 0; top: .5em;
  width: 14px; height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-3px);
}

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 56px; }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}
.step p { color: var(--muted); font-size: .96rem; }

/* ---------- Split / feature ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.tech-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-cloud span {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
}

/* ---------- Education callout ---------- */
.callout {
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
  padding: 44px 48px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--ink-2), var(--ink-3));
  color: var(--on-dark);
  position: relative; overflow: hidden;
}
.callout::after {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, .35), transparent 70%);
}
.callout h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.callout p { color: var(--on-dark-muted); margin: 0; max-width: 620px; }
.callout .btn { position: relative; z-index: 1; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--on-dark); text-align: center; padding: 88px 0; position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% 120%, rgba(20, 184, 166, .28), transparent 70%);
}
.cta-band .container { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--on-dark-muted); max-width: 560px; margin: 0 auto 28px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 380px 1fr; gap: 64px; align-items: start; }
.portrait {
  position: sticky; top: 104px;
}
.portrait-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--ink-2), var(--ink-3));
  box-shadow: var(--shadow-lg);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-frame::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  pointer-events: none;
}
.portrait-card {
  margin-top: 20px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.portrait-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .92rem; }
.portrait-card dt { color: var(--muted); }
.portrait-card dd { margin: 0; font-weight: 500; }

.bio h2 { margin-top: 1.4em; font-size: 1.6rem; }
.bio h2:first-child { margin-top: 0; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 26px 28px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline h3 { font-size: 1.08rem; margin-bottom: 4px; }
.timeline .meta { font-size: .86rem; color: var(--muted); margin-bottom: 6px; display: block; }
.timeline p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Pricing ---------- */
.price-hero-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: var(--bg);
}
.price-main { padding: 48px; background: var(--ink); color: var(--on-dark); position: relative; overflow: hidden; }
.price-main::before {
  content: ""; position: absolute; right: -100px; bottom: -100px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, .3), transparent 70%);
}
.price-main > * { position: relative; }
.price-main .eyebrow { color: var(--accent); }
.price-figure { font-family: var(--font-display); font-size: 4.2rem; font-weight: 700; color: #fff; line-height: 1; letter-spacing: -.03em; }
.price-figure small { font-size: 1.1rem; font-weight: 500; color: var(--on-dark-muted); letter-spacing: 0; margin-left: 6px; }
.price-main p { color: var(--on-dark-muted); margin-top: 18px; }
.price-includes { padding: 48px; }
.price-includes h3 { margin-bottom: 16px; }

.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tier {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  background: var(--bg);
  position: relative;
  box-shadow: var(--shadow);
}
.tier.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg); }
.tier .badge {
  position: absolute; top: -12px; left: 24px;
  background: var(--accent); color: var(--ink);
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.tier-name { font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tier-days { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--ink); margin: 6px 0 14px; }
.tier-rate { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--ink); line-height: 1; }
.tier-rate small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.tier-save { display: inline-block; margin-top: 10px; font-size: .85rem; font-weight: 600; color: var(--accent-ink); background: rgba(20, 184, 166, .1); padding: 3px 10px; border-radius: 999px; }
.tier-save.none { color: var(--muted); background: var(--bg-soft); }

.estimator {
  margin-top: 56px;
  padding: 36px 40px;
  border-radius: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.estimator label { font-weight: 600; display: block; margin-bottom: 10px; }
.estimator input[type="range"] { width: 100%; accent-color: var(--accent); }
.estimator .range-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.estimate-out { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.estimate-out .row { display: flex; justify-content: space-between; font-size: .95rem; padding: 6px 0; }
.estimate-out .row span:first-child { color: var(--muted); }
.estimate-out .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.estimate-out .total span:first-child { color: var(--ink); }

.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink);
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-ink); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.info-card {
  background: var(--ink); color: var(--on-dark);
  border-radius: 20px; padding: 40px;
  position: relative; overflow: hidden;
}
.info-card::after {
  content: ""; position: absolute; left: -80px; bottom: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, .28), transparent 70%);
}
.info-card > * { position: relative; z-index: 1; }
.info-card h2 { color: #fff; font-size: 1.6rem; }
.info-item { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.info-item:first-of-type { border-top: 0; }
.info-item svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--accent); margin-top: 3px; }
.info-item .label { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 2px; }
.info-item .value { color: #fff; font-weight: 500; }
.info-item a.value { color: #fff; }

.form-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: .98rem;
  padding: 12px 14px;
  border: 1px solid #d6dbe5;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .15);
}
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #e11d48; }
.field .err { display: none; font-size: .82rem; color: #e11d48; margin-top: 5px; }
.field.invalid .err { display: block; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 14px; }
.form-success {
  display: none;
  padding: 16px 18px; border-radius: 10px;
  background: rgba(20, 184, 166, .1); color: var(--accent-ink);
  font-weight: 500; margin-top: 16px;
}
.form-success.show { display: block; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: #070c17; color: var(--on-dark-muted); padding: 64px 0 32px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.site-footer h4 { color: #fff; font-family: var(--font); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--on-dark); }
.site-footer .brand { margin-bottom: 16px; }
.footer-legal {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: .82rem;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .split, .about-grid, .contact-grid, .price-hero-card, .estimator { grid-template-columns: 1fr; }
  .split { gap: 40px; }
  .portrait { position: static; max-width: 420px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  section { padding: 72px 0; }
  .hero { padding: 88px 0 80px; }
  .page-hero { padding: 72px 0 60px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--ink);
    padding: 12px 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { margin: 8px 0 0; justify-content: center; }
  .cards, .steps, .tiers, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .callout { grid-template-columns: 1fr; padding: 32px 24px; }
  .price-main, .price-includes, .form-card, .info-card { padding: 28px 22px; }
  .estimator { padding: 26px 20px; }
  .price-figure { font-size: 3.2rem; }
  .brand-sub { display: none; }
}
