/* ============================================================
   bcdataworks.com — design tokens & base styles
   ============================================================ */

:root {
  /* theme-aware tokens (flip under [data-theme="dark"]) */
  --ink: #0b1220;
  --paper: #f8f9fc;
  --paper-dim: #eef1f8;
  --surface: #fff;
  --grey: #5a6478;
  --grey-soft: #8b93a8;
  --line: #dde2ec;
  --accent-soft: #e2f5f0;
  --accent-2-soft: #d9f0ea;

  /* fixed brand tokens (never flip — the "always dark" bands) */
  --brand-ink: #0b1220;
  --ink-soft: #101b30;
  --panel: #131f38;
  --panel-line: #263354;
  --text-on-dark: #eef1f8;
  --text-on-dark-dim: #9aa7c7;

  --accent: #17a889;
  --accent-2: #0d8a71;
  --accent-on-dark-soft: rgba(23, 168, 137, 0.16);
  --accent-2-on-dark-soft: rgba(13, 138, 113, 0.18);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 6px;
}

:root[data-theme="dark"] {
  --ink: #eef1f8;
  --paper: #0f1726;
  --paper-dim: #141f34;
  --surface: #16213a;
  --grey: #aab3c9;
  --grey-soft: #7d8aa8;
  --line: #26314f;
  --accent-soft: rgba(23, 168, 137, 0.18);
  --accent-2-soft: rgba(13, 138, 113, 0.2);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.card, .insight-tile, .cta-box, .form-field input, .form-field textarea, .placeholder {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

svg { flex-shrink: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand-ink);
  color: #fff;
  padding: 0.75em 1.2em;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Focus states ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--panel-line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  color: #fff;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-on-dark-dim);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: #fff;
}

.nav-cta {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  padding: 0.55em 1.2em;
  border-radius: var(--radius);
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-cta:hover { background: var(--accent); color: var(--brand-ink) !important; }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--panel-line);
  background: none;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-line);
  color: #fff;
  border-radius: var(--radius);
  padding: 0.4em 0.6em;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: 0.86rem; }
}

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--panel-line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem 1.2rem;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; margin: 0; }
  .nav-links a {
    display: block;
    padding: 0.7em 0;
    border-bottom: 1px solid var(--panel-line);
  }
  .nav-cta { display: block; text-align: center; margin-top: 0.6em; }
}

/* ---------- Hero (dark) ---------- */
.hero {
  padding: 6rem 0 4rem;
  background: radial-gradient(ellipse 120% 100% at 50% 0%, #1a2845, #101a2d 70%);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

.hero .container { position: relative; z-index: 1; }

.hero-chart {
  position: absolute;
  right: -5%;
  bottom: -10%;
  width: 55%;
  max-width: 640px;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 { max-width: 18ch; color: #fff; }

.hero-lede {
  max-width: 58ch;
  font-size: 1.12rem;
  color: var(--text-on-dark-dim);
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75em 1.6em;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--brand-ink);
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  border-color: var(--text-on-dark-dim);
  color: #fff;
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); }

/* buttons used on light sections need dark-friendly secondary */
.section .btn-secondary,
.section-alt .btn-secondary {
  border-color: var(--ink);
  color: var(--ink);
}
.section .btn-secondary:hover,
.section-alt .btn-secondary:hover { background: var(--ink); color: var(--paper); }

/* ---------- Trust strip (dark, part of hero band) ---------- */
.trust-strip {
  padding: 2rem 0 3rem;
  background: var(--brand-ink);
  position: relative;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.85rem;
  color: var(--text-on-dark-dim);
}

.trust-item svg { color: var(--accent); width: 20px; height: 20px; }
.trust-item:nth-child(2n) svg { color: var(--accent-2); }

@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Section ---------- */
.section { padding: 4.5rem 0; }

.section-alt {
  background: var(--brand-ink);
  color: var(--text-on-dark);
}

.section-alt .section-intro { color: var(--text-on-dark-dim); }
.section-alt .section-eyebrow { color: var(--accent); }
.section-alt h2 { color: #fff; }

.section-head { max-width: 60ch; margin-bottom: 2.5rem; }

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.section-intro { color: var(--grey); font-size: 1.02rem; }

.link-arrow {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  color: inherit;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.link-arrow:hover { opacity: 0.75; }

/* ---------- Cards / grids ---------- */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1000px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .card-grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(11, 18, 32, 0.08);
  border-color: transparent;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 20px; height: 20px; }
.card:nth-child(2n) .card-icon { background: var(--accent-2-soft); color: var(--accent-2); }

.card h3 { margin-bottom: 0.5em; }

.card ul {
  color: var(--grey);
  font-size: 0.93rem;
}

/* ---------- Case study card (dark panel) ---------- */
.case-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 1.7rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.case-card h3 { color: #fff; margin-bottom: 0.4em; font-size: 1.15rem; }

.case-card .card-icon { background: var(--accent-on-dark-soft); color: var(--accent); }
.case-card:nth-child(2n) .card-icon { background: var(--accent-2-on-dark-soft); color: var(--accent-2); }

.case-teaser { color: var(--text-on-dark-dim); font-size: 0.94rem; margin-bottom: 1rem; }

.case-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }

.tag {
  font-size: 0.74rem;
  color: var(--accent);
  background: var(--accent-on-dark-soft);
  padding: 0.25em 0.7em;
  border-radius: 999px;
  font-weight: 600;
}
.tag:nth-child(2n) { color: var(--accent-2); background: var(--accent-2-on-dark-soft); }

/* Read more disclosure */
.case-card details { margin-top: 0.3rem; }

.case-card summary {
  list-style: none;
  cursor: pointer;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.case-card summary::-webkit-details-marker { display: none; }
.case-card summary::after { content: "→"; transition: transform 0.15s ease; }
.case-card details[open] summary::after { transform: rotate(90deg); }
.case-card details[open] summary { margin-bottom: 0.9rem; }

.case-block { margin-bottom: 1rem; }

.case-block dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark-dim);
  font-weight: 600;
  margin-bottom: 0.3em;
}

.case-block dd { margin: 0 0 0.9em; color: var(--text-on-dark); }

.confidentiality-note {
  font-size: 0.83rem;
  color: var(--text-on-dark-dim);
  font-style: italic;
  margin: 0;
}

.confidentiality-banner {
  display: flex;
  align-items: center;
  gap: 0.6em;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-on-dark-dim);
  border-top: 1px solid var(--panel-line);
  padding-top: 1.75rem;
  margin-top: 0.5rem;
}
.confidentiality-banner svg { color: var(--accent); width: 16px; height: 16px; }

/* ---------- CTA band (boxed card on light section) ---------- */
.cta-band { padding: 4.5rem 0; background: var(--paper-dim); }

.cta-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(11, 18, 32, 0.06);
  padding: 2.6rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-box h2 { max-width: 20ch; margin: 0 0 0.4em; font-size: 1.7rem; }
.cta-box p { max-width: 46ch; margin: 0; color: var(--grey); }
.cta-box .btn-primary { flex-shrink: 0; }

@media (max-width: 700px) {
  .cta-box { padding: 2rem; }
}

/* ---------- Placeholder ---------- */
.placeholder {
  display: block;
  background: rgba(224, 165, 72, 0.06);
  border: 1px dashed var(--accent);
  color: var(--text-on-dark-dim);
  font-size: 0.85rem;
  font-style: italic;
  padding: 0.6em 0.9em;
  border-radius: var(--radius);
}
.section:not(.section-alt) .placeholder { color: var(--grey); border-color: var(--grey-soft); background: var(--paper-dim); }

/* ---------- Timeline ---------- */
.timeline { border-left: 2px solid var(--line); padding-left: 1.75rem; }

.timeline-item { position: relative; margin-bottom: 2rem; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.06rem;
  top: 0.3rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Insights ---------- */
.insight-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.insight-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,18,32,0.07); }

.insight-tile .card-icon { margin-bottom: 0; flex-shrink: 0; }

.insight-tile span { font-size: 0.96rem; font-weight: 500; }

/* ---------- Featured articles ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1000px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .article-grid { grid-template-columns: 1fr; } }

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(11, 18, 32, 0.1);
  border-color: var(--accent);
}
.article-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.article-cover {
  background: var(--accent-soft);
  color: var(--accent-2);
  border-bottom: 1px solid var(--line);
  height: 104px;
  display: block;
}
.article-cover svg { display: block; width: 100%; height: 100%; }

:root[data-theme="dark"] .article-cover { color: var(--accent); }

.article-body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.55rem;
}

.article-meta {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--grey-soft);
}

.article-card h4 {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}

.article-gloss {
  font-size: 0.88rem;
  color: var(--grey);
  margin: 0;
}

.article-read {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  padding-top: 0.6rem;
}
.article-card:hover .article-read { color: var(--accent-2); }

:root[data-theme="dark"] .article-card:hover .article-read { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-ink);
  color: var(--text-on-dark-dim);
  padding: 4rem 0 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--panel-line);
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .nav-logo { display: inline-block; margin-bottom: 0.8rem; }
.footer-tagline { color: var(--text-on-dark-dim); font-size: 0.9rem; max-width: 28ch; }

.footer-social { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--panel-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-on-dark-dim);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }

.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  font-weight: 600;
  margin-bottom: 1.1rem;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.7em; }
.footer-col a:hover { color: #fff; }

.footer-contact-email { color: #fff; font-weight: 500; }

.footer-legal { padding-top: 2rem; }

.footer-disclaimer {
  max-width: 80ch;
  line-height: 1.6;
  margin-bottom: 0.6em;
  font-size: 0.82rem;
  color: var(--text-on-dark-dim);
}

/* ---------- Form ---------- */
.form-field { margin-bottom: 1.3rem; }

.form-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.4em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.98rem;
  background: var(--surface);
  color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--accent); }

.form-field textarea { resize: vertical; min-height: 140px; }

.form-note { font-size: 0.85rem; color: var(--grey-soft); margin-top: -0.5rem; margin-bottom: 1.5rem; }

/* ---------- About portrait ---------- */
.about-portrait {
  border-radius: var(--radius);
  border: 3px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  max-width: 260px;
}

/* ---------- Utility ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

.list-plain { list-style: none; padding: 0; }
.list-plain li { border-bottom: 1px solid var(--line); padding: 0.6em 0; }
.section-alt .list-plain li { border-bottom-color: var(--panel-line); }
