/* SARTUS · Stitched Insignia */
:root {
  --navy: #151f36;
  --navy-deep: #0c1322;
  --olive: #a8a47a;
  --olive-ink: #5c5933;
  --copper: #a4552b;
  --copper-deep: #84421f;
  --chalk: #f1f3f0;
  --chalk-alt: #e4e7e0;
  --rule: #c9cdc2;
  --thread-light: #e9e6d6;
  --ink: #17212b;
  --muted: #474f58;
  --display: "Black Ops One", "Arial Black", sans-serif;
  --text: "Public Sans", "Segoe UI", Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --space: clamp(4rem, 3rem + 4vw, 7rem);
  --masthead-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--masthead-h); scrollbar-color: var(--olive-ink) var(--chalk-alt); }
body { margin: 0; font-synthesis: none; font-family: var(--text); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--chalk); }
::selection { background: var(--navy); color: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; border-radius: 4px; }
.twill :focus-visible, .masthead :focus-visible, .solution-live :focus-visible { outline-color: var(--olive); }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--chalk); color: var(--navy); padding: 0.6rem 1rem; z-index: 10; font-weight: 700; }
.skip:focus { top: 1rem; }

/* twill: diagonal weave on navy */
.twill {
  background-color: var(--navy);
  background-image:
    repeating-linear-gradient(45deg, rgb(255 255 255 / 0.06) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgb(0 0 0 / 0.28) 0 1px, transparent 1px 6px);
  color: var(--thread-light);
}

/* masthead */
.masthead { position: sticky; top: 0; z-index: 5; background: var(--navy-deep); border-bottom: 1px solid rgb(168 164 122 / 0.4); }
.masthead-row { display: flex; align-items: center; gap: 1.5rem; min-height: var(--masthead-h); }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--chalk); text-decoration: none; margin-right: auto; }
.brand img { width: 52px; height: 52px; }
.brand-name { font-family: var(--display); font-weight: 400; font-size: 1.75rem; letter-spacing: 0.06em; line-height: 1; display: grid; }
.brand-sub { font-family: var(--text); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--olive); }
.nav { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--thread-light); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding-block: 0.4rem; }
.nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--olive); }

/* patches: buttons as embroidered patches that press into the twill */
.patch {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.75rem 1.6rem; border-radius: 10px;
  font-family: var(--display); font-weight: 400; font-size: 1.25rem; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; color: #fff;
  box-shadow: 0 2px 3px rgb(0 0 0 / 0.3), 0 10px 20px -8px rgb(0 0 0 / 0.5);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms;
}
.patch::after { content: ""; position: absolute; inset: 4px; border: 2px dashed rgb(255 255 255 / 0.6); border-radius: 7px; pointer-events: none; }
.patch:hover { box-shadow: 0 3px 5px rgb(0 0 0 / 0.32), 0 14px 26px -8px rgb(0 0 0 / 0.55); }
.patch:active { transform: translateY(2px) scale(0.985); box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.45), 0 1px 1px rgb(0 0 0 / 0.2); }
.patch-copper { background: var(--copper); }
.patch-copper:hover { background: var(--copper-deep); }
.patch-olive { background: transparent; color: var(--thread-light); box-shadow: inset 0 0 0 2px var(--olive); }
.patch-olive::after { border-color: rgb(168 164 122 / 0.55); }
.patch-olive:hover { box-shadow: inset 0 0 0 2px var(--thread-light); }
.patch-olive:active { box-shadow: inset 0 0 0 2px var(--olive), inset 0 3px 8px rgb(0 0 0 / 0.5); }
.patch-small { min-height: 2.6rem; padding: 0.5rem 1.1rem; font-size: 1.05rem; }

/* hero: fills the first screen, deadline band pinned to its bottom */
.hero { display: flex; flex-direction: column; min-height: calc(100svh - var(--masthead-h)); overflow: hidden; }
.hero-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; padding-block: clamp(1.5rem, 1rem + 2vw, 3rem); }
h1, h2, h3 { text-wrap: balance; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, min(1.2rem + 3.6vw, 6.8vh), 4.3rem); line-height: 1.02; letter-spacing: 0; text-transform: uppercase; margin: 0 0 1.3rem; color: #fff; }
.sheet h1 { color: var(--navy); }
.stitched-line { display: block; color: var(--olive); }
.lede { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); max-width: 34rem; margin: 0 0 1.5rem; color: var(--thread-light); }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.creed { margin: 1.5rem 0 0; font-weight: 600; letter-spacing: 0.03em; font-size: 0.95rem; color: var(--olive); }

.mend { margin: 0; }
.mend-art { width: 100%; height: auto; max-height: 56vh; filter: drop-shadow(0 22px 34px rgb(0 0 0 / 0.45)); }
.mend figcaption { margin-top: 0.75rem; font-size: 0.85rem; color: rgb(233 230 214 / 0.85); }

/* mended state is the default (no JS, reduced motion); the animation plays torn -> stitched -> fixed */
.rip, .problem { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .js .rip { animation: rip 1900ms var(--ease-out) both; }
  .js .problem { animation: fade-out 500ms var(--ease-out) both; }
  .js .stitch { stroke-dasharray: 16; animation: sew 900ms var(--ease-out) both; }
  .js .fix { animation: fade-in 600ms var(--ease-out) both; }
  .js .seam-1 .rip { animation-delay: 200ms; }
  .js .seam-1 .stitch { animation-delay: 900ms; }
  .js .seam-1 .fix, .js .tag-1 .fix { animation-delay: 1600ms; }
  .js .seam-1 .problem, .js .tag-1 .problem { animation-delay: 1500ms; }
  .js .seam-2 .rip { animation-delay: 700ms; }
  .js .seam-2 .stitch { animation-delay: 1400ms; }
  .js .seam-2 .fix, .js .tag-2 .fix { animation-delay: 2100ms; }
  .js .seam-2 .problem, .js .tag-2 .problem { animation-delay: 2000ms; }
  .js .seam-3 .rip { animation-delay: 1200ms; }
  .js .seam-3 .stitch { animation-delay: 1900ms; }
  .js .seam-3 .fix, .js .tag-3 .fix { animation-delay: 2600ms; }
  .js .seam-3 .problem, .js .tag-3 .problem { animation-delay: 2500ms; }
}
/* the needle travels down the gutter, stitching each seam in turn */
.needle { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .js .needle { animation: needle 3300ms cubic-bezier(0.45, 0, 0.25, 1) both; }
}
@keyframes needle {
  0% { opacity: 0; transform: translateY(140px); }
  25% { opacity: 1; transform: translateY(168px); }
  52% { transform: translateY(262px); }
  60% { transform: translateY(290px); }
  70% { transform: translateY(314px); }
  78% { transform: translateY(370px); }
  88% { opacity: 1; transform: translateY(406px); }
  100% { opacity: 0; transform: translateY(420px); }
}

/* home hero: the badge is sewn onto the twill as the page opens */
.hero-home { min-height: 0; }
.hero-home .hero-grid { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem); }
.hero-badge { position: relative; width: min(100%, 400px); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; }
.hero-badge img { width: 78%; height: auto; filter: drop-shadow(0 24px 34px rgb(0 0 0 / 0.5)); }
.badge-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .js .ring-reveal { stroke-dasharray: 1182; animation: sew-ring 2400ms var(--ease-out) 200ms both; }
  .js .hero-badge img { animation: badge-in 1100ms var(--ease-out) both; }
}
@keyframes sew-ring { from { stroke-dashoffset: 1182; } to { stroke-dashoffset: 0; } }
@keyframes badge-in { from { opacity: 0; transform: rotate(-14deg) scale(0.9); } to { opacity: 1; transform: none; } }
.section-lead { font-size: 1.2rem; margin-top: 0; }

/* FORGE page: the scorecard sheet sits on the twill like the mend illustration */
.hero-forge { min-height: 0; }
.hero-forge .hero-grid { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.eyebrow { margin: 0 0 1rem; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--olive); }
.scorecard { margin: 0; }
.scorecard-art { width: 100%; height: auto; max-height: 64vh; filter: drop-shadow(0 22px 34px rgb(0 0 0 / 0.45)); }
.scorecard figcaption { margin-top: 0.75rem; font-size: 0.85rem; color: rgb(233 230 214 / 0.85); }
/* full bars are the default; the fill draws in once when motion is allowed */
.bar { transform-box: fill-box; transform-origin: left center; }
@media (prefers-reduced-motion: no-preference) {
  .js .bar { animation: fill-bar 1100ms var(--ease-out) 300ms both; }
  .js .bar-2 { animation-delay: 450ms; }
  .js .bar-3 { animation-delay: 600ms; }
  .js .bar-4 { animation-delay: 750ms; }
}
@keyframes fill-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.facts-points dt { display: grid; gap: 0.15rem; }
.pts { font-family: var(--display); font-weight: 400; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--olive-ink); }
.tiers .step h3::before { content: none; }
.range { margin: 0 0 0.3rem; font-family: var(--display); font-weight: 400; font-size: 2.1rem; letter-spacing: 0.03em; line-height: 1.1; color: var(--olive-ink); }
.why-body .patch { margin-top: 0.5rem; }
.solution-live .patch { margin-top: 0.4rem; }

/* scroll reveals: .reveal is only added by JS when motion is allowed. Motion only, never opacity:
   faded text fails contrast for anyone (and any checker) who sees it mid-reveal or without the script. */
.reveal { transform: translateY(28px); transition: transform 1000ms var(--ease-out); }
.reveal.revealed { transform: none; }
.report.reveal { transform: translateX(-48px) rotate(-8deg); }
.report.reveal.revealed { transform: rotate(-2deg); }
.solution.reveal { transform: translateY(18px) scale(0.94) rotate(-1.5deg); }
.solution.reveal.revealed { transform: none; }
.solution-next.reveal { transition-delay: 160ms; }
.sewn.reveal { transform: rotate(-24deg) scale(0.88); }
.sewn.reveal.revealed { transform: none; }
.step.reveal:nth-child(2) { transition-delay: 120ms; }
.step.reveal:nth-child(3) { transition-delay: 240ms; }
.step.reveal:nth-child(4) { transition-delay: 360ms; }
.rule-body.reveal, .why-body.reveal, .scan-copy.reveal { transition-delay: 120ms; }

@keyframes rip { 0% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sew { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }

.deadline-band { border-top: 1px solid rgb(168 164 122 / 0.45); background: rgb(12 19 34 / 0.6); }
.deadline-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0.5rem 2.5rem; align-items: center; padding-block: 1.2rem; }
.deadline-count { margin: 0; font-size: 1.15rem; color: var(--thread-light); }
@media (min-width: 961px) { .deadline-count { white-space: nowrap; } }
.days { font-family: var(--display); font-weight: 400; font-size: 2.1rem; letter-spacing: 0.03em; color: #fff; margin-right: 0.35rem; white-space: nowrap; }
.deadline-note { margin: 0; font-size: 0.92rem; color: rgb(233 230 214 / 0.9); }

/* reading sheets: solid hairline rules; stitching is reserved for patches and the hero seam */
.sheet { padding-block: var(--space); }
.sheet-alt { background: var(--chalk-alt); border-block: 1px solid var(--rule); }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); line-height: 1.05; text-transform: uppercase; letter-spacing: 0; color: var(--navy); margin: 0 0 1.5rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; color: var(--navy); }
p { max-width: 68ch; }

.rule-grid, .why-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.rule-lead { font-size: 1.25rem; margin-top: 0; }
.facts { margin: 2rem 0; display: grid; }
.facts div { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; padding-block: 1rem; border-top: 1px solid var(--rule); }
.facts div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0; }
.source { font-size: 0.9rem; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; }
.step { padding-right: 1.6rem; counter-increment: step; }
.step + .step { padding-left: 1.6rem; border-left: 1px solid var(--rule); }
.step h3::before { content: counter(step) ". "; color: var(--olive-ink); }
.step p { margin: 0; color: var(--muted); }

.scan-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.report { margin: 0; transform: rotate(-2deg); transition: transform 400ms var(--ease-out); }
.report:hover { transform: rotate(0deg) translateY(-4px); }
.report img { border-radius: 4px; box-shadow: 0 2px 4px rgb(21 31 54 / 0.12), 0 24px 48px -16px rgb(21 31 54 / 0.45); }
.report figcaption { margin-top: 0.9rem; font-size: 0.85rem; color: var(--muted); }
.stitch-list { list-style: none; padding: 0; margin: 1.2rem 0 1.5rem; }
.stitch-list li { position: relative; padding: 0.5rem 0 0.5rem 2.2rem; }
.stitch-list li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 1.4rem; height: 3px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--olive-ink) 0 5px, transparent 5px 8px); }
.fine { font-size: 0.95rem; color: var(--muted); }

.why-body p:first-child { margin-top: 0; font-size: 1.15rem; }

.patches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; margin-top: 2rem; }
.solution { position: relative; padding: 2rem 2rem 2.2rem; border-radius: 18px; }
.solution::after { content: ""; position: absolute; inset: 9px; border-radius: 11px; pointer-events: none; }
.solution h3 { font-family: var(--display); font-weight: 400; font-size: 1.65rem; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.1; }
.solution-live { background: var(--navy); color: var(--thread-light); box-shadow: 0 0 0 5px var(--olive-ink), 0 18px 36px -14px rgb(21 31 54 / 0.6); }
.solution-live::after { border: 2px dashed rgb(168 164 122 / 0.8); }
.solution-live h3 { color: #fff; }
.solution-next { border: 2px dashed #a9ad9f; color: var(--muted); }
.sol-no { display: inline-block; margin-right: 0.4rem; color: var(--olive); }
.solution-next .sol-no { color: var(--olive-ink); }
.solution p:last-child { margin-bottom: 0; }

.about-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.sewn { width: 240px; height: 240px; border-radius: 50%; padding: 10px; border: 2px dashed var(--olive-ink); }
.badge { width: 100%; height: 100%; }
.sig { font-family: var(--display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--navy); }

.close { padding-block: clamp(3.5rem, 3rem + 3vw, 6rem); }
.close-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 2rem; align-items: center; }
.close h2 { color: #fff; margin: 0; }
.close-actions { display: grid; gap: 1.2rem; justify-items: start; }
.contact-lines { margin: 0; font-size: 1.1rem; }
.contact-lines a { color: var(--thread-light); }

.foot { background: var(--navy-deep); color: rgb(233 230 214 / 0.9); font-size: 0.88rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.4rem; }
.foot p { margin: 0; }
.foot a { color: inherit; }

.contact-form { display: grid; gap: 1rem; max-width: 40rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 700; color: var(--navy); }
.field input, .field select, .field textarea { font: inherit; padding: 0.65rem 0.75rem; border: 1px solid #6f7469; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.field [aria-invalid="true"] { border: 2px solid var(--copper-deep); }
.error { margin: 0; color: var(--copper-deep); font-weight: 600; }
.error:empty { display: none; }
.form-status { font-weight: 700; color: var(--navy); min-height: 1.5em; margin: 0; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#cf-submit { justify-self: start; border: 0; cursor: pointer; }
#cf-submit:disabled { opacity: 0.7; cursor: progress; }

@media (max-width: 960px) {
  .nav { display: none; }
  .hero { min-height: 0; }
  .hero-grid, .rule-grid, .why-grid, .scan-grid, .close-grid, .deadline-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .report { max-width: 26rem; }
}
@media (max-width: 600px) {
  .masthead .patch-small { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 0; border-left: 0; }
  .facts div { grid-template-columns: 1fr; gap: 0.2rem; }
  .patches { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .sewn { width: 180px; height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .patch, .report { transition: none; }
}
