/* SiteSmith — blueprint sheet design system
   cobalt #1A3FD1 · ink #101B3E · paper #F4F6FB · safety orange #FF6A2B */

:root {
  --cobalt: #1a3fd1;
  --cobalt-deep: #14309f;
  --ink: #101b3e;
  --paper: #f4f6fb;
  --line: #c9d2e8;
  --orange: #ff6a2b;
  --grid: rgba(255, 255, 255, 0.10);
  --display: "Archivo", "Arial Black", sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* mono annotation — the blueprint "dimension label" device */
.annot {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

h1, h2 { font-family: var(--display); font-weight: 900; line-height: 0.98; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.01em; }
h3 { font-family: var(--display); font-weight: 500; font-size: 1.15rem; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--mono); font-weight: 500; letter-spacing: 0.18em;
  text-decoration: none; font-size: 0.95rem;
}
.wordmark span { color: var(--cobalt); }
.topbar nav { display: flex; gap: clamp(0.8rem, 3vw, 1.6rem); align-items: center; }
.topbar nav a { font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.topbar nav a:hover { color: var(--cobalt); }
.nav-cta {
  padding: 0.45rem 0.9rem; border: 2px solid var(--ink); border-radius: 3px;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }

/* ---------------- hero: the blueprint sheet ---------------- */
.hero {
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, var(--grid) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, var(--grid) 23px 24px),
    linear-gradient(160deg, var(--cobalt) 0%, var(--cobalt-deep) 100%);
  color: #fff;
  padding: clamp(1.2rem, 4vw, 3rem);
}
.sheet {
  position: relative;
  max-width: 1060px; margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.75);
  padding: clamp(2.2rem, 6vw, 5rem) clamp(1.4rem, 5vw, 4rem) clamp(5.5rem, 8vw, 6rem);
  min-height: 62vh;
}
.hero-eyebrow { opacity: 0.85; margin-bottom: 2rem; }
.hero h1 {
  font-size: clamp(3rem, 9.5vw, 7.5rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  animation: rise 0.7s ease-out both;
}
.hero-sub {
  max-width: 34rem; margin-top: 1.6rem; font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.92);
  animation: rise 0.7s 0.12s ease-out both;
}
.hero-actions { display: flex; gap: 0.9rem; margin-top: 2.2rem; flex-wrap: wrap;
  animation: rise 0.7s 0.22s ease-out both; }

.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--display); font-weight: 500; font-size: 1rem;
  padding: 0.8rem 1.5rem; border-radius: 3px; border: 2px solid transparent;
}
.btn-primary { background: var(--orange); color: #16120e; border-color: var(--orange); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.titleblock {
  position: absolute; right: -2px; bottom: -2px;
  display: grid; grid-template-columns: repeat(4, auto);
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: rgba(16, 27, 62, 0.35);
  backdrop-filter: blur(2px);
}
.titleblock div {
  padding: 0.5rem 0.9rem;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  display: flex; flex-direction: column; gap: 0.1rem;
}
.titleblock div:first-child { border-left: none; }
.titleblock .annot { opacity: 0.7; font-size: 0.58rem; }
.titleblock strong { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------------- shared section shell ---------------- */
.example, .process, .spec, .contact { padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 2.5rem); }
.example, .process, .spec { max-width: 1060px; margin: 0 auto; }
.section-annot { color: var(--cobalt); margin-bottom: 0.8rem; }
.section-sub { max-width: 36rem; margin-top: 0.9rem; color: #3c466b; }

/* ---------------- before/after compare (signature) ---------------- */
.compare {
  position: relative; margin-top: 2.2rem;
  border: 2px solid var(--ink); border-radius: 4px;
  overflow: hidden; user-select: none;
  aspect-ratio: 900 / 620;
  background: #fff;
}
.compare img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare-after { position: absolute; inset: 0; }
.compare-before-wrap {
  position: absolute; inset: 0; width: 50%; overflow: hidden;
  border-right: 3px solid var(--orange);
}
.compare-before-wrap img { width: 100%; height: 100%; max-width: none;
  /* keep the before image aligned with the after image while clipping */
  position: absolute; inset: 0;
}
.compare-before { min-width: 0; }
.compare-handle input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; margin: 0;
}
.compare-grip {
  position: absolute; top: 50%; left: var(--pos, 50%);
  transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--orange); color: #16120e;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  font-size: 0.6rem; pointer-events: none;
  box-shadow: 0 2px 10px rgba(16, 27, 62, 0.35);
}
.compare-tag {
  position: absolute; bottom: 0.8rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  padding: 0.25rem 0.55rem; border-radius: 2px; pointer-events: none;
}
.tag-a { left: 0.8rem; background: var(--ink); color: #fff; }
.tag-b { right: 0.8rem; background: var(--orange); color: #16120e; }

/* ---------------- process ---------------- */
.steps {
  list-style: none; padding: 0; margin-top: 2.2rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.steps li {
  border-top: 3px solid var(--cobalt);
  background: #fff; border-radius: 0 0 4px 4px;
  padding: 1.3rem 1.3rem 1.6rem;
  box-shadow: 0 1px 0 var(--line);
}
.step-no { color: var(--cobalt); display: block; margin-bottom: 0.9rem; }
.steps h3 { margin-bottom: 0.5rem; }
.steps p { font-size: 0.95rem; color: #3c466b; }

/* ---------------- spec grid ---------------- */
.spec-grid {
  list-style: none; padding: 0; margin-top: 2.2rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.spec-grid li { background: var(--paper); padding: 1.2rem 1.3rem; }
.spec-grid strong { font-family: var(--display); font-weight: 500; display: block; margin-bottom: 0.3rem; }
.spec-grid p { font-size: 0.92rem; color: #3c466b; }

/* ---------------- contact ---------------- */
.contact { background: var(--ink); color: #fff; }
.contact .section-sub { color: rgba(255, 255, 255, 0.8); }
.contact .section-annot { color: var(--orange); }
.contact-inner { max-width: 700px; margin: 0 auto; }
#contactForm { margin-top: 2rem; display: grid; gap: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
#contactForm label { display: grid; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; }
#contactForm input, #contactForm textarea {
  font: inherit; padding: 0.7rem 0.8rem; border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.07); color: #fff;
}
#contactForm ::placeholder { color: rgba(255, 255, 255, 0.45); }
#contactForm button { justify-self: start; }
.form-note { font-size: 0.9rem; min-height: 1.4em; }
.form-note.ok { color: #7ee2a0; }
.form-note.err { color: #ffb09b; }
.hp-field { position: absolute !important; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }

/* ---------------- footer ---------------- */
.footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.2rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line); font-size: 0.85rem;
}
.footer .annot { color: #3c466b; }

/* ---------------- responsive + motion ---------------- */
@media (max-width: 820px) {
  .steps, .spec-grid, .field-row { grid-template-columns: 1fr; }
  .titleblock { position: static; margin-top: 2.5rem; grid-template-columns: repeat(2, 1fr); }
  .sheet { min-height: 0; padding-bottom: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1, .hero-sub, .hero-actions { animation: none; }
}
