/* ==========================================================================
   SANDUST CONSULTING LTD — shared stylesheet
   Design system: "hub & node" — a warm paper canvas with a cobalt/coral
   connection motif that runs through the hero diagram, service icons,
   dividers and footer. See make_logo.py for the mark this motif is built on.
   ========================================================================== */

:root {
  /* --- Color: warm paper ground, ink text, cobalt primary, coral signal --- */
  --paper: #f7f4ee;
  --paper-warm: #efe8d8;
  --card: #ffffff;
  --ink: #171b23;
  --ink-soft: #4c5261;
  --ink-faint: #7a8091;
  --line: #ddd5c0;
  --line-soft: #e8e2d2;

  --cobalt: #2451e0;
  --cobalt-700: #17359e;
  --cobalt-900: #101f3d;
  --coral: #ff6b45;
  --coral-600: #e8532e;

  --navy: #10131a;
  --navy-soft: #171c26;
  --navy-line: #2a3040;
  --paper-on-navy: #eef0f5;
  --ink-soft-on-navy: #a9afc0;

  /* --- Type --- */
  --font-display: "Vollkorn", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  /* --- Layout --- */
  --max: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(23, 27, 35, 0.04), 0 12px 28px -18px rgba(23, 27, 35, 0.22);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:visited { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  margin: 0;
  font-weight: 700;
}
p { margin: 0; }
button { font-family: inherit; }

:focus-visible {
  outline: 2.5px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt-700);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
}
.on-dark .eyebrow { color: #ffd8c9; }
.on-dark .eyebrow::before { background: var(--coral); }

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section-tight { padding: 44px 0; }
}

.section-head {
  max-width: 640px;
  margin: 0 0 44px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin-top: 14px;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-top: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(36, 81, 224, 0.55);
}
.btn-primary:hover { background: var(--cobalt-700); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--cobalt); color: var(--cobalt-700); }
.on-dark .btn-ghost { border-color: var(--navy-line); color: var(--paper-on-navy); }
.on-dark .btn-ghost:hover { border-color: var(--coral); color: #fff; }
.btn-coral {
  background: var(--coral);
  color: #1c0e08;
  box-shadow: 0 10px 24px -12px rgba(255, 107, 69, 0.55);
}
.btn-coral:hover { background: var(--coral-600); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 238, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand img { height: 34px; width: auto; }
.brand { display: flex; align-items: center; }

.nav-primary {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-primary a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}
.nav-primary a:hover { color: var(--ink); }
.nav-primary a.active { color: var(--ink); }
.nav-primary a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--coral);
  border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 18px; }
.header-actions .btn { padding: 10px 20px; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-primary {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line-soft);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 28px 20px;
    display: none;
  }
  .nav-primary.open { display: flex; }
  .nav-primary a { width: 100%; padding: 10px 0; }
  .header-actions .btn-ghost { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .hero-diagram {
    max-width: 340px;
    margin: 0 auto;
    width: 100%;
  }
}
.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  letter-spacing: -0.01em;
}
.hero .eyebrow { margin-bottom: 18px; }
.hero-lede {
  margin-top: 20px;
  font-size: 1.14rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.hero-trust {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}
.hero-trust strong { color: var(--ink); font-family: var(--font-body); }

.hero-diagram { position: relative; }
.hero-diagram svg { width: 100%; height: auto; overflow: visible; }

.hub-node {
  transform-origin: center;
}
.hub-node circle.pulse {
  animation: pulse-travel 3.6s linear infinite;
}
.hub-line {
  stroke-dasharray: 3 7;
  animation: dash-flow 8s linear infinite;
}
@keyframes dash-flow {
  to { stroke-dashoffset: -100; }
}
@keyframes pulse-travel {
  0% { opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- Stat strip ---------- */
.stat-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
}
.stat-strip .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 28px;
}
.stat {
  font-family: var(--font-mono);
}
.stat .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--cobalt-700);
  font-weight: 700;
  display: block;
}
.stat .label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
  display: block;
}
@media (max-width: 720px) {
  .stat-strip .wrap { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Service grid (home summary + services page) ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .service-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--cobalt);
}
.node-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
}
.service-card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.node-code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--coral-600);
  display: block;
  margin-bottom: 10px;
}

/* ---------- Detailed service blocks (services.html) ---------- */
.service-detail {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 44px;
  padding: 46px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.service-detail:first-of-type { padding-top: 8px; }
.service-detail:last-of-type { border-bottom: none; }
.service-detail-head { display: flex; flex-direction: column; gap: 14px; }
.service-detail-head .node-icon { width: 52px; height: 52px; margin-bottom: 2px; }
.service-detail-head h3 {
  font-size: 1.4rem;
}
.service-detail-body p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 62ch;
}
.service-detail-body ul {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 26px;
}
.service-detail-body li {
  font-size: 0.93rem;
  color: var(--ink);
  padding-left: 20px;
  position: relative;
}
.service-detail-body li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--coral);
}
@media (max-width: 780px) {
  .service-detail { grid-template-columns: 1fr; gap: 18px; }
  .service-detail-body ul { grid-template-columns: 1fr; }
}

/* ---------- Why-us / values panels ---------- */
.panel-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .panel-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .panel-row { grid-template-columns: 1fr; } }

.panel-row-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 980px) { .panel-row-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .panel-row-4 { grid-template-columns: 1fr; } }

.panel {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.panel .idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.panel h3 { font-size: 1.08rem; margin: 12px 0 10px; }
.panel p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Split section (why-us on home, mission/vision on about) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
}
.split h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
.split .lede { color: var(--ink-soft); margin-top: 16px; font-size: 1.05rem; }

.check-list { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.97rem;
  color: var(--ink);
}
.check-list .mark {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--cobalt);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  margin-top: 1px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy);
  color: var(--paper-on-navy);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--navy-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--navy-line) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 72%);
}
.cta-band .wrap {
  position: relative;
  padding: 74px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-band h2 {
  color: #fff;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  max-width: 20ch;
}
.cta-band p {
  color: var(--ink-soft-on-navy);
  margin-top: 16px;
  font-size: 1.05rem;
  max-width: 52ch;
}
.cta-band .hero-actions { justify-content: center; margin-top: 30px; }
.cta-band .eyebrow { color: #ffcbb8; }
.cta-band .eyebrow::before { background: var(--coral); }
.cta-band .btn-ghost { border-color: var(--navy-line); color: #fff; }
.cta-band .btn-ghost:hover { border-color: var(--coral); background: rgba(255, 255, 255, 0.06); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--ink-soft-on-navy);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px 28px 44px;
}
@media (max-width: 880px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}
.footer-brand img { height: 30px; margin-bottom: 18px; }
.footer-brand p { font-size: 0.92rem; max-width: 34ch; color: var(--ink-soft-on-navy); }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col address {
  font-size: 0.9rem;
  color: var(--ink-soft-on-navy);
  font-style: normal;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--navy-line);
  padding: 22px 28px;
}
.footer-bottom .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-soft-on-navy);
  padding: 0;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-top: 16px;
  max-width: 18ch;
}
.page-hero p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 58ch;
}

/* ---------- About page specifics ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .values-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .values-grid { grid-template-columns: 1fr; } }

/* ---------- Contact page ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-card);
}
.contact-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.contact-row:last-child { border-bottom: none; }
.contact-row .ico {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--paper-warm);
  display: flex; align-items: center; justify-content: center;
  color: var(--cobalt-700);
}
.contact-row .label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 4px;
}
.contact-row .value { font-size: 1rem; color: var(--ink); }
.contact-row a.value:hover { color: var(--cobalt-700); }

.map-frame {
  margin-top: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
}
.map-frame iframe { width: 100%; height: 280px; border: 0; display: block; }

.form-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 34px 32px;
  box-shadow: var(--shadow-card);
}
.form-card h2 { font-size: 1.4rem; }
.form-card > p { color: var(--ink-soft); margin-top: 8px; font-size: 0.96rem; }
.form-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  background: #fff;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--ink-faint);
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Misc ---------- */
.divider-hub {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-faint);
  margin: 8px 0 36px;
}
.divider-hub .line { flex: 1; height: 1px; background: var(--line); }

.section-alt { background: var(--paper-warm); }

/* ---------- SVG utility fills/strokes (used by inline icons & hero diagram) ---------- */
.svg-cobalt-fill { fill: var(--cobalt); }
.svg-cobalt-stroke { stroke: var(--cobalt); }
.svg-coral-fill { fill: var(--coral); }
.svg-ink-fill { fill: var(--ink); }
.svg-card-fill { fill: var(--card); }
.svg-line-stroke { stroke: var(--line); }
.svg-mono-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  fill: var(--cobalt-700);
}
.svg-mono-label-dark {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  fill: #fff;
}
