/* ============================================================
   Salt Services — site stylesheet
   Palette lives in :root. Rebranding = edit this one block.
   ============================================================ */
:root {
  /* palette — atmospheric deep violet + warm ivory + amber */
  --brand: #180f2f;       /* primary brand — deep atmospheric violet */
  --brand-soft: #2b1d52;  /* elevated violet for panels/cards */
  --brand-deep: #0e081f;  /* footer / darkest surfaces */
  --ink: #201439;         /* headings on light bg */
  --body: #3d3357;        /* body text on light bg */
  --muted: #635a7d;       /* secondary text */
  --bg: #f5f3ed;          /* warm ivory */
  --bg-alt: #ece9e0;      /* deeper ivory for alternating sections */
  --card-bone: #fbfaf6;   /* card surface on light sections */
  --line: #ddd8cc;
  --accent: #e9a13b;      /* amber — CTAs and accent words only */
  --accent-hover: #f0b055;
  --on-brand: #eae7f4;    /* body text on brand purple */
  --border-ondark: rgba(255, 255, 255, 0.08);   /* hairline on navy surfaces */
  --highlight-ondark: rgba(255, 255, 255, 0.06); /* top-edge sheen on navy cards */

  /* spacing scale (8px rhythm) */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem; --space-16: 4rem;

  /* radius scale */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  /* elevation scale (brand-tinted) */
  --shadow-1: 0 1px 3px rgba(24, 15, 47, 0.07), 0 1px 2px rgba(24, 15, 47, 0.05);
  --shadow-2: 0 10px 24px rgba(24, 15, 47, 0.10);
  --shadow-3: 0 20px 48px rgba(24, 15, 47, 0.16);

  /* motion tokens */
  --dur-fast: 150ms;
  --dur: 250ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-index scale */
  --z-header: 50; --z-callbar: 60; --z-cursor-fx: 9998; --z-cursor: 9999;

  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Instrument Sans', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  color: var(--ink); line-height: 1.15; margin: 0 0 0.6em;
  overflow-wrap: break-word;
}
@media (max-width: 640px) {
  h1, h2, h3 { hyphens: auto; }
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 500; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 500; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; font-weight: 600; }
/* editorial accent word — italic serif in amber */
h1 em, h2 em, .accent-em {
  font-style: italic; font-weight: 500; color: var(--accent);
}
p { margin: 0 0 1em; }
a { color: var(--brand-soft); }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

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

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 0.6rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) ease, box-shadow var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--accent); color: #1c1030; box-shadow: 0 0 0 rgba(233,161,59,0); }
.btn-accent:hover { background: var(--accent-hover); color: #1c1030; box-shadow: 0 4px 24px rgba(233,161,59,0.35); }
.btn-ghost { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost:hover { border-color: rgba(255,255,255,0.75); color: #fff; background: rgba(255,255,255,0.06); }
.btn-navy { background: var(--brand); color: #fff; }
.btn-navy:hover { background: var(--brand-soft); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  background: var(--brand);
  color: #fff;
  position: sticky; top: 0; z-index: var(--z-header);
  box-shadow: 0 1px 0 var(--border-ondark);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand img { width: 42px; height: 42px; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.site-nav a {
  color: var(--on-brand); text-decoration: none; font-weight: 600; font-size: 0.98rem;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"], .site-nav a.current { color: #fff; border-bottom-color: var(--accent); }
.header-phone { white-space: nowrap; padding: 0.6rem 1.1rem; font-size: 0.95rem; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: 2px solid rgba(255,255,255,0.4); border-radius: 8px;
  color: #fff; padding: 0.45rem 0.6rem; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(170deg, #241645 0%, var(--brand) 45%, var(--brand-deep) 100%);
  color: var(--on-brand);
  padding: 4.5rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero h1 { color: #fff; max-width: 21ch; }
.hero p.lead { font-size: 1.2rem; max-width: 54ch; color: var(--on-brand); }
.hero .btn { margin-right: 0.75rem; margin-top: 0.5rem; }
.hero-kicker {
  display: inline-block; font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 1rem;
}
.hero-note { font-size: 0.95rem; color: #b3a9cf; margin-top: 1.25rem; }

/* ---------- 3D hero (home page — Weblove Template 05, Route B adapted) ---------- */
.hero-3d {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  position: relative;
}
/* ambient glow behind the particle swarm (static, zero-cost) */
.hero-3d::before {
  content: "";
  position: absolute; right: -8%; top: 12%;
  width: 55%; height: 76%;
  background: radial-gradient(circle at 60% 50%, rgba(233,161,59,0.10), transparent 62%);
  pointer-events: none;
}
.hero-3d .wrap { position: relative; z-index: 2; width: 100%; }
.hero-3d h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
  font-size: clamp(2.6rem, 5.4vw, 4.75rem);
  max-width: 15ch;
}
.hero-3d h1 .accent { color: var(--accent); font-style: italic; }
.hero-3d .hero-kicker {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
}
.hero-3d .hero-kicker::before { content: "\2014\00a0\00a0"; color: var(--accent); }
.hero-3d .hero-kicker::after { content: "\00a0\00a0\2014"; color: var(--accent); }
#hero-scene {
  position: absolute; inset: 0; z-index: 1;
  opacity: 0; transition: opacity 0.8s ease;
  pointer-events: none; overflow: hidden;
}
#hero-scene.on { opacity: 1; }
#hero-scene canvas { width: 100%; height: 100%; display: block; }

/* Swarm HUD (Template 20) — corner labels, only shown once the scene runs */
.hero-hud {
  display: none;
  position: absolute; z-index: 2;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: #a195c2;
}
.hero-3d.scene-on .hero-hud { display: block; }
.hero-hud.b1 { bottom: 26px; left: 32px; }
.hero-hud.b2 { bottom: 26px; right: 32px; text-align: right; }
.hero-hud #shape { color: var(--accent); }

/* Staggered reveal (Template 05) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0; transform: translateY(24px);
    animation: wl-up 1.1s cubic-bezier(.19, 1, .22, 1) forwards;
  }
  @keyframes wl-up { to { opacity: 1; transform: none; } }
}

/* Signature cursor (Template 05) — .wl-cursor is added by js/cursor.js,
   which skips coarse pointers and reduced-motion users */
body.wl-cursor, body.wl-cursor * { cursor: none !important; }
#wlDot, #wlRing {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: var(--z-cursor);
}
#wlDot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translate(-50%,-50%); }
#wlRing {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(233,161,59,.9); transform: translate(-50%,-50%);
  transition: width .25s ease, height .25s ease;
}
.wlRipple {
  position: fixed; pointer-events: none; z-index: var(--z-cursor-fx);
  width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--accent);
  transform: translate(-50%,-50%);
  animation: wlrip .55s ease-out forwards;
}
@keyframes wlrip { to { width: 70px; height: 70px; opacity: 0; } }

/* Salt sprinkle — the signature motif (inline SVG uses currentColor) */
.sprinkle { color: var(--accent); display: block; margin: 0.25rem 0 1.5rem; }
.hero .sprinkle { margin: 1rem 0 0; }

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

/* numbered process steps — big serif numerals (editorial) */
.step-num {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
  padding-bottom: 0.4rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.section-navy .step-num { border-bottom-color: var(--border-ondark); }
.section-alt { background: var(--bg-alt); }
.section-navy { background: var(--brand); color: var(--on-brand); }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }
.section-navy .section-head p { color: var(--on-brand); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin: 0; padding: 0; list-style: none; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card-bone); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-1);
}
.card h3 { margin-top: 0.75rem; }
.card p { font-size: 0.98rem; margin-bottom: 0.5rem; }
.card .card-link { font-weight: 700; text-decoration: none; }
.card .card-link:hover { text-decoration: underline; }
.card-icon {
  width: 44px; height: 44px; border-radius: 9px;
  background: var(--brand); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.section-navy .card {
  background: var(--brand-soft);
  border-color: var(--border-ondark);
  box-shadow: inset 0 1px 0 var(--highlight-ondark), var(--shadow-1);
}
.section-navy .card h3 { color: #fff; }
.section-navy .card p { color: var(--on-brand); }

/* ---------- Checklist / feature list ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.checklist li { padding-left: 1.9rem; position: relative; margin-bottom: 0.6rem; }
.checklist li svg { position: absolute; left: 0; top: 0.3rem; color: var(--accent); }

/* ---------- Breadcrumbs ---------- */
.crumbs {
  font-size: 0.88rem; color: var(--muted);
  padding-top: 1rem; padding-bottom: 0;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq { max-width: 62ch; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin-bottom: 0.8rem; background: var(--card-bone);
}
.faq summary { font-weight: 700; color: var(--ink); cursor: pointer; }
.faq details[open] summary { margin-bottom: 0.5rem; }

/* ---------- Coraline form ---------- */
.coraline-form { max-width: 760px; }
.coraline-form__placeholder {
  border: 1.5px dashed var(--muted);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: var(--card-bone);
}
.coraline-form__placeholder p { margin-bottom: 0.6rem; }
.coraline-form__placeholder strong { color: var(--ink); font-size: 1.15rem; }
.coraline-form__load-btn {
  margin-top: 0.75rem;
  background: var(--accent); color: #1c1030;
  border: none; border-radius: 999px;
  padding: 0.8rem 1.8rem; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.coraline-form__load-btn:hover { background: var(--accent-hover); }

/* ---------- CTA band ---------- */
.cta-band { text-align: left; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; justify-content: space-between; }
.cta-band h2 { margin-bottom: 0.25rem; }
.cta-band p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-deep); color: var(--on-brand);
  padding: 3rem 0 5.5rem; /* bottom padding clears the mobile call bar */
  font-size: 0.95rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer h3 {
  font-family: 'Space Mono', ui-monospace, monospace;
  color: var(--accent); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.18em; font-weight: 400;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--on-brand); }
.site-footer a:hover { color: #fff; }
.site-footer address { font-style: normal; line-height: 1.8; }
.footer-legal {
  margin-top: 2.25rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.14);
  color: #a99fc6; font-size: 0.85rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
}

/* ---------- Sticky mobile call bar ---------- */
.callbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-callbar);
  background: var(--brand);
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 0.6rem 0.75rem;
  gap: 0.6rem;
}
.callbar a {
  flex: 1; text-align: center; text-decoration: none; font-weight: 700;
  padding: 0.7rem 0.5rem; border-radius: 8px; font-size: 0.95rem;
}
.callbar .callbar-phone { background: var(--accent); color: #1c1030; }
.callbar .callbar-form { border: 2px solid rgba(255,255,255,0.5); color: #fff; }

/* ---------- Prose pages ---------- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.25rem; }
.prose ul { padding-left: 1.3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; order: 10; }
  .site-nav {
    display: none;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--brand); padding: 0.5rem 1.25rem 1.25rem;
    box-shadow: 0 12px 20px rgba(0,0,0,0.25);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.9rem; }
  .header-phone { margin-left: auto; }
}
@media (max-width: 640px) {
  .header-phone { display: none; }
  .card-grid, .card-grid.two, .footer-grid { grid-template-columns: 1fr; }
  .callbar { display: flex; }
  .section { padding: 2.75rem 0; }
  .hero { padding: 3.25rem 0 3.75rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
}

@media print {
  .site-header, .callbar, .coraline-form { display: none; }
}
