/* Blackwood Digital — site styles
   Tokens follow brand/brand-guidelines.md (Section 3). Inter only on public pages. */

:root {
  /* Brand palette */
  --bw-abyss: #042E40;
  --bw-deep: #066B7C;
  --bw-tide: #17939E;
  --bw-current: #28A4AD;
  --bw-mist: #66CBD4;
  --bw-ink: #000000;
  --bw-graphite: #1F2429;
  --bw-ash: #5C6168;
  --bw-bone: #F6F4EF;
  --bw-paper: #FFFFFF;

  /* Lines */
  --line: rgba(4, 46, 64, 0.12);
  --line-strong: rgba(4, 46, 64, 0.24);

  /* Type scale (desktop), ratio ~1.33 */
  --fs-sm: 15px;
  --fs-body: 17px;
  --fs-lead: 21px;
  --fs-h3: 21px;
  --fs-h2: clamp(32px, 4vw, 44px);
  --fs-h1: clamp(52px, 8.4vw, 112px);

  --max-w: 1120px;
  --gutter: 24px;
  --section-y: 128px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-optical-sizing: auto;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--bw-graphite);
  background: var(--bw-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--bw-deep); }
a:hover { color: var(--bw-abyss); }

:focus-visible {
  outline: 2px solid var(--bw-tide);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--bw-abyss);
  color: var(--bw-paper);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; color: var(--bw-paper); }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bw-abyss);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-logo img { width: 30px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--bw-graphite);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.nav-links a:hover { color: var(--bw-deep); }
.nav-links a[aria-current="page"] { color: var(--bw-abyss); font-weight: 600; }
.nav-cta {
  background: var(--bw-abyss);
  color: var(--bw-paper) !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 500;
}
.nav-cta:hover { background: var(--bw-deep); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--bw-abyss); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 8px var(--gutter) 20px;
  border-top: 1px solid var(--line);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  color: var(--bw-graphite);
  text-decoration: none;
  font-size: 17px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a.nav-cta { text-align: center; border: none; border-radius: 12px; margin-top: 12px; padding: 14px 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--bw-abyss); color: var(--bw-paper); }
.btn-primary:hover { background: var(--bw-deep); color: var(--bw-paper); }
.btn-quiet { color: var(--bw-abyss); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--bw-abyss); color: var(--bw-abyss); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---- Section shell ---- */
section { padding: var(--section-y) 0; }
.section-title {
  font-size: var(--fs-h2);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--bw-abyss);
  margin: 0 0 20px;
  max-width: 18ch;
}
.section-lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--bw-ash);
  max-width: 34em;
  margin: 0 0 64px;
}

/* ---- Hero: the one bold moment — the brand's contour lines ---- */
.hero {
  position: relative;
  padding: 112px 0 0;
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 1; }
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--bw-abyss);
  margin: 0;
}
.hero-lead {
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.5;
  color: var(--bw-graphite);
  max-width: 32em;
  margin: 32px 0 0;
}
.hero-ctas { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-contours {
  display: block;
  width: 100%;
  height: clamp(220px, 30vw, 420px);
  margin-top: 24px;
}
.contour {
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: contour-draw 2.4s cubic-bezier(.3,.7,.2,1) forwards;
  animation-delay: calc(var(--i) * 90ms + 200ms);
}
@keyframes contour-draw { to { stroke-dashoffset: 0; } }

/* ---- How it starts ---- */
.start { background: var(--bw-abyss); color: var(--bw-paper); }
.start .section-title { color: var(--bw-paper); }
.start .section-lead { color: rgba(255, 255, 255, 0.72); }
.start-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  counter-reset: step;
}
.start-steps li {
  counter-increment: step;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  padding-top: 24px;
}
.start-steps li::before {
  content: counter(step);
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--bw-mist);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.start-steps h3 { font-size: var(--fs-h3); font-weight: 600; margin: 0 0 8px; color: var(--bw-paper); }
.start-steps p { margin: 0; color: rgba(255, 255, 255, 0.72); }

/* ---- Services list ---- */
.service-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.service-rows li { border-bottom: 1px solid var(--line); }
.service-rows a {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 11em;
  gap: 32px;
  align-items: baseline;
  padding: 32px 0;
  text-decoration: none;
  color: inherit;
}
.service-name {
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bw-abyss);
  line-height: 1.2;
}
.service-desc { color: var(--bw-ash); max-width: 32em; }
.service-price {
  text-align: right;
  font-weight: 500;
  color: var(--bw-abyss);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.service-price.is-quoted { color: var(--bw-ash); font-weight: 400; }
.service-rows a:hover .service-name { color: var(--bw-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.services-note { margin: 32px 0 0; font-size: var(--fs-sm); color: var(--bw-ash); max-width: 40em; }

/* ---- Demo ---- */
.demo { background: var(--bw-bone); }
.demo-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.demo-grid .section-lead { margin-bottom: 0; font-size: 19px; }
.demo-shell {
  background: var(--bw-paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.demo-log {
  height: 220px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.demo-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: var(--fs-sm); line-height: 1.5; }
.demo-msg.bot { background: var(--bw-bone); color: var(--bw-graphite); align-self: flex-start; border-bottom-left-radius: 4px; }
.demo-msg.user { background: var(--bw-abyss); color: var(--bw-paper); align-self: flex-end; border-bottom-right-radius: 4px; }
.demo-typing { display: flex; gap: 4px; padding: 14px; }
.demo-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--bw-ash); opacity: 0.5; animation: typing 1.2s infinite ease-in-out; }
.demo-typing span:nth-child(2) { animation-delay: 0.15s; }
.demo-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.35; } 30% { opacity: 1; } }
.demo-suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 16px; }
.demo-suggestions button {
  font: inherit;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bw-paper);
  color: var(--bw-abyss);
  cursor: pointer;
}
.demo-suggestions button:hover { border-color: var(--bw-abyss); }
.demo-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.demo-input-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--bw-graphite);
}
.demo-input-row input:focus { outline: none; border-color: var(--bw-tide); box-shadow: 0 0 0 3px rgba(23, 147, 158, 0.18); }
.demo-input-row button {
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: var(--bw-abyss);
  color: var(--bw-paper);
  cursor: pointer;
}
.demo-input-row button:hover { background: var(--bw-deep); }

/* ---- About ---- */
.about-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 80px; align-items: center; }
.about-facts dd { font-size: var(--fs-sm); }
.about-copy p { max-width: 34em; }
.about-copy .section-title { max-width: 20ch; }
.text-link { font-weight: 500; text-underline-offset: 4px; }
.about-facts { margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.about-map { margin: 0; }
.about-map svg { display: block; width: 100%; height: auto; }
.about-facts div { padding-top: 16px; border-top: 1px solid var(--line); }
.about-facts dt {
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--bw-abyss);
  line-height: 1.1;
}
.about-facts dd { margin: 6px 0 0; color: var(--bw-ash); }

/* ---- Contact ---- */
.contact { background: var(--bw-bone); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact .section-lead { margin-bottom: 40px; font-size: 19px; }
.contact-details { margin: 0; display: grid; gap: 20px; }
.contact-details dt { font-size: 14px; font-weight: 600; color: var(--bw-abyss); }
.contact-details dd { margin: 2px 0 0; color: var(--bw-graphite); max-width: 30em; }

.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: var(--fs-sm); font-weight: 500; margin-bottom: 6px; color: var(--bw-abyss); }
.form-field .optional { font-weight: 400; color: var(--bw-ash); }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bw-paper);
  color: var(--bw-graphite);
  font: inherit;
  font-size: 16px;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--bw-tide);
  box-shadow: 0 0 0 3px rgba(23, 147, 158, 0.18);
}
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
#form-status { margin: 14px 0 0; font-size: var(--fs-sm); min-height: 24px; }
#form-status[data-state="success"] { color: var(--bw-deep); }
#form-status[data-state="error"] { color: #B23A2A; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--bw-ash); }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-row p { margin: 0; }
.footer-row a { color: var(--bw-ash); text-decoration: none; margin-left: 24px; }
.footer-row a:first-child { margin-left: 0; }
.footer-row a:hover { color: var(--bw-abyss); }

/* ================= Services page ================= */
.page-head { padding: 96px 0 64px; }
.page-head h1 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--bw-abyss);
  margin: 0 0 24px;
  max-width: 14ch;
}
.page-head .hero-lead { margin-top: 0; }

.step-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px 32px;
  flex-wrap: wrap;
}
.step-nav a { display: block; padding: 16px 0; text-decoration: none; color: var(--bw-graphite); font-size: var(--fs-sm); }
.step-nav a:hover { color: var(--bw-deep); }

.step { padding: 96px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.step-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; }
.step h2 {
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 650;
  color: var(--bw-abyss);
  margin: 0 0 16px;
}
.step-price { font-size: var(--fs-lead); color: var(--bw-abyss); font-weight: 500; margin: 0; }
.step-price + .step-price { margin-top: 20px; }
.step-price small { display: block; font-size: var(--fs-sm); font-weight: 400; color: var(--bw-ash); margin-top: 4px; }
.step-body > p:first-child { font-size: var(--fs-lead); line-height: 1.5; color: var(--bw-graphite); margin-top: 0; }
.step-body h3 { font-size: var(--fs-body); font-weight: 600; color: var(--bw-abyss); margin: 32px 0 8px; }
.step-body ul { margin: 0; padding-left: 20px; }
.step-body li { margin-bottom: 6px; }
.step-body li::marker { color: var(--bw-tide); }
.step-first { background: var(--bw-abyss); color: var(--bw-paper); border-bottom: none; }
.step-first h2, .step-first .step-price, .step-first .step-body h3 { color: var(--bw-paper); }
.step-first .step-price small, .step-first .step-body > p:first-child { color: rgba(255, 255, 255, 0.78); }
.step-first .step-body { color: rgba(255, 255, 255, 0.85); }
.step-first .step-body li::marker { color: var(--bw-mist); }

.faq { padding: 112px 0; }
.faq-list { border-top: 1px solid var(--line); max-width: 52em; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 24px 40px 24px 0;
  font-size: 19px;
  font-weight: 500;
  color: var(--bw-abyss);
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--bw-abyss);
  border-bottom: 1.5px solid var(--bw-abyss);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list details p { margin: 0 0 24px; max-width: 40em; color: var(--bw-graphite); }

.cta-band { background: var(--bw-bone); padding: 96px 0; }
.cta-band .section-lead { margin-bottom: 32px; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .contour { animation: none; stroke-dashoffset: 0; }
  .demo-typing span { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  :root { --section-y: 88px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding-top: 72px; }
  .start-steps { grid-template-columns: 1fr; gap: 32px; }
  .service-rows a { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .service-price { text-align: left; }
  .about-facts { grid-template-columns: 1fr; gap: 16px; }
  .about-map { max-width: 420px; }
  .demo-grid, .about-grid, .contact-grid, .step-grid { grid-template-columns: 1fr; gap: 40px; }
  .section-lead { margin-bottom: 48px; }
  .step { padding: 72px 0; }
  .page-head { padding: 64px 0 48px; }
  .footer-row a { margin-left: 0; margin-right: 20px; }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .btn { width: 100%; text-align: center; }
}
