/* Lug Software — styles
   Rebrand by editing the tokens in :root (and the dark block below). */

:root {
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --alt: #efe9de;
  --ink: #1a1d21;
  --muted: #565b62;
  --line: #ddd5c7;
  --accent: #b24a14;
  --accent-hover: #963c0e;
  --accent-ink: #ffffff;
  --accent-soft: #f4e1d1;
  --band: #1a1d21;
  --band-ink: #f4efe6;
  --band-muted: #b9b4aa;
  --band-card: #25292f;
  --band-accent: #f0a06a;
  --ok: #1f6b45;
  --err: #a12a22;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 14px;
  --gutter: 20px;
  --max: 1140px;
  --section-y: clamp(64px, 9vw, 112px);
  --shadow: 0 1px 2px rgba(26, 29, 33, .05), 0 12px 32px -12px rgba(26, 29, 33, .18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1d2025;
    --alt: #191b20;
    --ink: #f1ece3;
    --muted: #a9acb1;
    --line: #31353c;
    --accent: #e98f55;
    --accent-hover: #f3a672;
    --accent-ink: #1a1006;
    --accent-soft: #3a291c;
    --band: #0d0f12;
    --band-ink: #f1ece3;
    --band-muted: #a9acb1;
    --band-card: #1a1d22;
    --band-accent: #e98f55;
    --ok: #6fcf9b;
    --err: #ff8f85;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 700; max-width: 22ch; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 800px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  font: 600 1.02rem/1 var(--font-body);
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.3rem/1 var(--font-display); letter-spacing: -0.02em; text-decoration: none;
}
.wordmark-icon { width: 28px; height: 28px; color: var(--accent); flex: none; }
.wordmark-light { font-weight: 500; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .98rem; }
.site-nav a:not(.btn):hover { color: var(--accent); }
.nav-phone { font-weight: 600 !important; white-space: nowrap; }

.nav-toggle {
  display: none; width: 46px; height: 46px; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, background-color .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav .btn { margin-top: 16px; min-height: 50px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) var(--section-y); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 56px; } }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); margin-top: 22px; max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: .95rem; color: var(--muted); }

.hero-visual {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow);
}
.diagram { width: 100%; height: auto; }
.d-wires path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 5 9; animation: flow 1.4s linear infinite; }
.d-tools rect { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.d-dots circle { fill: var(--accent); }
.d-labels text { font: 600 15px var(--font-body); fill: var(--ink); }
.d-lug rect { fill: var(--accent); }
.d-lug circle { stroke: var(--accent); }
.d-caption { font: 700 15px var(--font-display); fill: var(--accent); letter-spacing: .04em; }
.d-ai rect { fill: var(--ink); }
.d-ai text { font: 700 18px var(--font-display); fill: var(--bg); }
@keyframes flow { to { stroke-dashoffset: -14; } }

.chat { margin-top: 14px; padding-top: 18px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.chat p { padding: 12px 16px; border-radius: 14px; font-size: .97rem; line-height: 1.45; max-width: 92%; }
.chat-who { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.chat-q { background: var(--alt); justify-self: end; border-bottom-right-radius: 4px; }
.chat-a { background: var(--accent-soft); border-bottom-left-radius: 4px; }
.chat .chat-foot { padding: 0; font-size: .8rem; color: var(--muted); }
/* Rotating examples: slides share one grid cell so the box keeps the height of the tallest. */
.chat-slides { display: grid; }
.chat-slide { display: grid; gap: 10px; align-content: start; }
.chat-slide + .chat-slide { margin-top: 18px; }
.chat.is-rotating .chat-slide { grid-area: 1 / 1; margin-top: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.chat.is-rotating .chat-slide.is-active { opacity: 1; visibility: visible; transition: opacity .5s ease; }
.chat-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-dots { display: flex; gap: 2px; }
.chat-dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.chat-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background .2s ease; }
.chat-dot[aria-current="true"]::before { background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .chat.is-rotating .chat-slide, .chat.is-rotating .chat-slide.is-active { transition: none; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--alt); }
.section-intro { color: var(--muted); font-size: 1.12rem; max-width: 62ch; margin-top: 18px; }

.grid { display: grid; gap: 20px; margin-top: 44px; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card p, .service p, .why p, .steps p { color: var(--muted); margin-top: 10px; }

.services { gap: 0; border-top: 2px solid var(--ink); }
.service { padding: 30px 0; border-bottom: 1px solid var(--line); }
.service-num { display: block; font: 700 .95rem var(--font-display); color: var(--accent); margin-bottom: 14px; letter-spacing: .06em; }
@media (min-width: 720px) {
  .service { padding: 32px 30px 8px; border-bottom: 0; border-left: 1px solid var(--line); }
  .service:first-child { padding-left: 0; border-left: 0; }
}

/* Examples band */
.section-band { background: var(--band); color: var(--band-ink); }
.section-band .eyebrow { color: var(--band-accent); }
.section-band .section-intro { color: var(--band-muted); }
.grid-examples { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.example { background: var(--band-card); border-radius: var(--radius); padding: 26px; border: 1px solid rgba(255, 255, 255, .07); }
.example-tag { font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--band-accent); }
.example-ask { font: 500 1.22rem/1.3 var(--font-display); margin-top: 12px; letter-spacing: -0.01em; }
.example-result { color: var(--band-muted); margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 1rem; }

/* Steps */
.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 62px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1.15rem var(--font-display);
  background: var(--accent-soft); color: var(--accent);
}
@media (min-width: 620px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; } }
@media (min-width: 1020px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: 58px; right: -20px; height: 2px; background: var(--line); }
}

.why { border-top: 2px solid var(--accent); padding-top: 20px; }

/* FAQ */
.faq { margin-top: 36px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font: 700 1.12rem/1.3 var(--font-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font: 500 1.3rem/1 var(--font-body);
  background: var(--accent-soft); color: var(--accent);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--muted); padding: 0 48px 24px 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 44px; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; } }
.contact-copy > p:not(.eyebrow) { color: var(--muted); margin-top: 18px; font-size: 1.1rem; }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 20px; }
.contact-label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-list a { font: 700 clamp(1.3rem, 2.4vw, 1.6rem) var(--font-display); text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--accent); }

.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(20px, 3.5vw, 36px); box-shadow: var(--shadow);
  display: grid; gap: 18px;
}
.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 13px 14px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder { color: var(--muted); opacity: .75; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { justify-self: start; }
.form-status { font-weight: 500; min-height: 1.6em; }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-err { color: var(--err); }
.form-status a { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 40px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-contact a { text-decoration: none; font-weight: 500; }
.footer-contact a:hover { color: var(--accent); }
.footer-legal { color: var(--muted); font-size: .9rem; width: 100%; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; width: 100%; font-size: .95rem; }
.footer-links a { text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Landing pages ---------- */
.hero-page { padding-bottom: clamp(48px, 6vw, 80px); }
.hero-page h1 { max-width: 20ch; }
.hero-page .lede { max-width: 64ch; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 28px; }
.breadcrumb a { text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { color: var(--accent); }
.card-link { display: block; text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.card-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-link h3::after { content: " \2192"; color: var(--accent); }
.grid + .section-intro { margin-top: 36px; }
.section-intro a, .hero-note a { font-weight: 600; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .d-wires path { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* Text pages (privacy): space before each heading that follows a paragraph */
.section-intro + h2 { margin-top: 48px; }
