/* Hallmark · design-system: design.md · tone: restrained, credible · anchor hue: crimson (accent only)
   SetuvAI Solutions · setuvai.com
   Colours and type follow SetuvAI-Brand-Guide.pdf (v1.0). Crimson is used sparingly. */

@font-face {
  font-family: "Sora";
  src: url("/assets/fonts/sora-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}

/* ---------- Tokens: light (default) ---------- */
:root {
  --ink: #141414;
  --paper: #F7F7F7;
  --night: #0B0B0B;
  --cable-grey: #8A8A8A;     /* decorative only, never text */
  --crimson-deep: #C20226;

  --bg: var(--paper);
  --bg-alt: #FFFFFF;
  --text: var(--ink);
  --muted: #555555;          /* Cable Grey is too light for body text on Paper; this passes AA */
  --line: #E3E3E3;
  --accent-text: var(--crimson-deep);
  --link: var(--crimson-deep);
  --btn-bg: var(--ink);
  --btn-text: #FFFFFF;
  --btn-hover: #2E2E2E;
  --focus: var(--crimson-deep);
  --crimson: #D90429;

  --font-head: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 68rem;
  --narrow: 42rem;
  --gutter: 1.25rem;
  --radius: 12px;

  color-scheme: light;
}

/* ---------- Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--night);
    --bg-alt: #141414;
    --text: var(--paper);
    --muted: #A3A3A3;
    --line: #2A2A2A;
    --accent-text: #FF3B57;
    --link: var(--paper);
    --btn-bg: var(--paper);
    --btn-text: var(--ink);
    --btn-hover: #FFFFFF;
    --focus: #FF3B57;
    --crimson: #FF3B57;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--night);
  --bg-alt: #141414;
  --text: var(--paper);
  --muted: #A3A3A3;
  --line: #2A2A2A;
  --accent-text: #FF3B57;
  --link: var(--paper);
  --btn-bg: var(--paper);
  --btn-text: var(--ink);
  --btn-hover: #FFFFFF;
  --focus: #FF3B57;
    --crimson: #FF3B57;
  color-scheme: dark;
}

/* Logo variant per theme */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* Theme toggle icon */
.icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--crimson); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: var(--narrow); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--btn-bg); color: var(--btn-text);
  padding: 0.5rem 1rem; border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* Pre-launch placeholders: deliberately loud so none ship by accident */
.placeholder {
  border: 1px dashed var(--crimson);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: var(--accent-text);
  font-size: 0.95rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--btn-hover); }
.btn-small { padding: 0.55rem 1rem; font-size: 0.9rem; }
.text-link { font-weight: 500; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}
.brand { display: block; padding-block: 0.5rem; }
.brand .logo { width: 145px; height: auto; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative; content: "";
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }

.site-nav {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem var(--gutter) 1.25rem;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a {
  display: block; padding: 0.7rem 0;
  color: var(--text); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.site-nav li a:hover { color: var(--accent-text); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--muted); }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex; align-items: center; gap: 2rem;
    position: static; padding: 0; border: 0; background: none;
  }
  .site-nav ul { display: flex; gap: 1.75rem; }
  .site-nav li a { padding: 0; border: 0; font-size: 0.95rem; }
  .nav-actions { margin-top: 0; }
}

/* ---------- Sections ---------- */
.hero { padding-block: clamp(3.5rem, 12vw, 7.5rem) clamp(3rem, 9vw, 6rem); }
.eyebrow {
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 1rem;
}
.hero h1 { max-width: 16ch; }
.lede { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--muted); max-width: 38rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

/* Hero illustration: hand-built flat SVG, no libraries. Motion is off under reduced-motion. */
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-visual { margin: 0; max-width: 36rem; }
.hero-visual figcaption { margin-top: 0.75rem; font-size: 0.95rem; color: var(--muted); max-width: 32rem; }
.hv-svg { display: block; width: 100%; height: auto; }
.hv-ground { stroke: var(--line); stroke-width: 1.5; }
.hv-link { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 6; }
.hv-shape { fill: var(--bg-alt); stroke: var(--text); stroke-width: 1.4; stroke-linejoin: round; }
.hv-mark { fill: none; stroke: var(--text); stroke-opacity: 0.5; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hv-dot-fill { fill: var(--text); }
.hv-core { fill: var(--bg); stroke: var(--text); stroke-width: 2; }
.hv-orbit { fill: none; stroke: var(--crimson); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 52 199; transform-box: fill-box; transform-origin: center; }
.hv-spark { fill: var(--crimson); transform-box: fill-box; transform-origin: center; }
.hv-card { fill: var(--bg-alt); stroke: var(--line); stroke-width: 1.5; }
.hv-ring { fill: none; stroke: var(--line); stroke-width: 1.5; }
.hv-tick { fill: none; stroke: var(--crimson); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; }
.hv-rowline { fill: var(--line); }
.hv-shadow { fill: var(--text); fill-opacity: 0.12; }
.hv-person { fill: var(--text); }
.hv-guest { fill: var(--bg-alt); stroke: var(--text); stroke-width: 1.6; }
.hv-arm { stroke: var(--text); stroke-width: 5; stroke-linecap: round; }
.hv-bubble { fill: var(--bg-alt); stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; }
.hv-dot { fill: var(--text); }
.hv-heart { fill: var(--crimson); transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  .hv-item { animation: hv-in 6s linear infinite; }
  .hv-d2 { animation-delay: -2s; }
  .hv-d3 { animation-delay: -4s; }
  .hv-orbit { animation: hv-spin 3s linear infinite; }
  .hv-spark { animation: hv-pulse 2s ease-in-out infinite; }
  .hv-tick { animation: hv-tick 6s ease-out infinite backwards; }
  .hv-t2 { animation-delay: 0.9s; }
  .hv-t3 { animation-delay: 1.8s; }
  .hv-say-a { animation: hv-a 4s ease-in-out infinite; }
  .hv-say-b { animation: hv-b 4s ease-in-out infinite; }
  .hv-dot { animation: hv-type 1.2s ease-in-out infinite; }
  .hv-n2 { animation-delay: 0.15s; }
  .hv-n3 { animation-delay: 0.3s; }
  .hv-heart { animation: hv-beat 2s ease-in-out infinite; }
}
@keyframes hv-in {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  78% { transform: translate(150px, var(--dy)); opacity: 1; }
  100% { transform: translate(176px, var(--dy)); opacity: 0; }
}
@keyframes hv-spin { to { transform: rotate(360deg); } }
@keyframes hv-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes hv-tick { 0%, 14% { stroke-dashoffset: 14; } 26%, 88% { stroke-dashoffset: 0; } 98%, 100% { stroke-dashoffset: 14; } }
@keyframes hv-a { 0%, 42% { opacity: 1; } 50%, 92% { opacity: 0.25; } 100% { opacity: 1; } }
@keyframes hv-b { 0%, 42% { opacity: 0.25; } 50%, 92% { opacity: 1; } 100% { opacity: 0.25; } }
@keyframes hv-type { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
@keyframes hv-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; }
}

.section { padding-block: clamp(3.5rem, 9vw, 6rem); border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--muted); max-width: 40rem; margin-bottom: 2.5rem; }
#problem p { color: var(--muted); }
#problem p:first-of-type { color: var(--text); }

/* Services ladder */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.step {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.25rem;
}
.step { display: flex; flex-direction: column; }
.step p { color: var(--muted); }
.step .deliverable {
  margin: auto 0 0; padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.deliverable span {
  display: block; margin-bottom: 0.4rem;
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 600;
  color: var(--accent-text);
}
.deliverable ul { margin: 0; padding: 0; list-style: none; }
.deliverable li { position: relative; margin-bottom: 0.3rem; padding-left: 1.1rem; }
.deliverable li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.62em;
  width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: var(--crimson);
}
.deliverable li:last-child { margin-bottom: 0; }
/* Line the three Deliverable boxes up across the cards on desktop */
@media (min-width: 960px) {
  @supports (grid-template-rows: subgrid) {
    .step { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0; }
  }
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; margin-bottom: 1rem;
  border-radius: 999px;
  border: 2px solid var(--crimson);
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
}
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* Sectors */
.sectors { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sector { background: var(--bg); padding: 1.5rem; }
.sector h3 { margin-bottom: 0.5rem; }
.sector p { color: var(--muted); margin: 0; }
@media (min-width: 640px) { .sectors { grid-template-columns: repeat(2, 1fr); } }

/* About */
.about { display: grid; gap: 2rem; align-items: start; }
.headshot { width: 180px; border-radius: var(--radius); background: var(--cable-grey); }
.about-name { font-weight: 500; color: var(--muted); }
@media (min-width: 640px) {
  .about { grid-template-columns: 200px 1fr; gap: 3rem; }
  .headshot { width: 200px; }
}

/* Contact */
.contact { text-align: left; }
.contact p { color: var(--muted); }
.contact .btn { margin-block: 0.5rem 1.5rem; }
.contact-address { font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; font-size: 0.9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.footer-inner p { margin: 0; }
.footer-inner .footer-copy { width: 100%; }
.site-footer a { color: inherit; }
@media (min-width: 640px) { .footer-inner .footer-copy { width: auto; margin-left: auto; } }

/* ---------- Example conversation ---------- */
.demo { display: grid; gap: 2rem; align-items: start; }
.demo-note { color: var(--muted); font-size: 0.95rem; }
.btn-outline { background: none; color: var(--text); border: 1px solid var(--line); cursor: pointer; font-family: var(--font-head); }
.btn-outline:hover { background: none; border-color: var(--muted); }

.chat-widget {
  width: 100%; max-width: 21rem;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem;
}
.chat-tag { font-family: var(--font-body); font-weight: 500; font-size: 0.75rem; color: var(--muted); }
.chat {
  list-style: none; margin: 0; padding: 0.9rem 0.8rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.chat-widget.is-live .chat { height: 17rem; overflow-y: auto; }
.chat-foot {
  padding: 0.6rem 0.9rem; border-top: 1px solid var(--line);
  font-size: 0.82rem; color: var(--muted);
}
.msg { max-width: 88%; padding: 0.5rem 0.75rem; border-radius: 14px; font-size: 0.9rem; line-height: 1.4; }
.msg-bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: var(--btn-bg); color: var(--btn-text); border-bottom-right-radius: 4px; }
.msg.is-hidden { display: none; }
.msg-typing { display: inline-flex; gap: 4px; padding: 0.7rem 0.8rem; }
.msg-typing.is-user { align-self: flex-end; background: var(--btn-bg); border-color: transparent; border-bottom-right-radius: 4px; border-bottom-left-radius: 14px; }
.msg-typing.is-user span { background: var(--btn-text); opacity: 0.7; }
.msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .msg:not(.is-hidden):not(.msg-typing) { animation: msg-in 0.25s ease-out; }
  .chat-widget.is-live .chat { scroll-behavior: smooth; }
  .msg-typing span { animation: typing 1s ease-in-out infinite; }
  .msg-typing span:nth-child(2) { animation-delay: 0.15s; }
  .msg-typing span:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
@media (min-width: 960px) {
  .demo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; }
}

[hidden] { display: none !important; }
