/* ==========================================================================
   Tracnik Technologies, LLC — stylesheet
   Design direction (brief §6): workshop precision. Charcoal/slate base,
   off-white background, single safety-orange accent. Grotesque + humanist
   sans + mono. Signature element: blueprint-grid / dimension-line motif.
   NOTE: This is a prototyping company, NOT a law firm. No legal styling
   cues, no shared assets with the Tracnik Law site.
   ========================================================================== */

:root {
  --slate: #1E2630;       /* charcoal / deep slate base */
  --slate-deep: #151B23;  /* darkest (footer, hero depth) */
  --paper: #F5F3EE;       /* off-white background */
  --surface: #EAE7DF;     /* subtle warm-neutral surface */
  --ink: #283039;         /* body text */
  --muted: #5C6672;       /* secondary text */
  --line: #D7D3C8;        /* hairline rules on paper */
  --orange: #E2571C;      /* safety-orange accent — CTAs + key labels only */
  --orange-deep: #BC4513; /* orange hover / small text on paper */
  --grid-dark: rgba(255, 255, 255, 0.05);
  --grid-light: rgba(31, 41, 51, 0.05);

  --head: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--slate);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.2rem; }

a { color: var(--orange-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--slate); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose { max-width: 46rem; }
.prose p { margin-bottom: 1.35rem; }

/* ---- Mono labels / eyebrows (engineering-drawing flavor) ---- */

.label {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin: 0 0 0.6rem;
}

/* ---- Dimension-line rule (signature element) ---- */

.dim-rule {
  position: relative;
  height: 1px;
  background: var(--slate);
  margin: 0.75rem 0 1.9rem;
  max-width: 240px;
}
.dim-rule::before,
.dim-rule::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 1px;
  height: 9px;
  background: var(--slate);
}
.dim-rule::before { left: 0; }
.dim-rule::after { right: 0; }

.dim-rule--orange { background: var(--orange); }
.dim-rule--orange::before, .dim-rule--orange::after { background: var(--orange); }

.dim-rule--paper { background: rgba(245, 243, 238, 0.4); }
.dim-rule--paper::before, .dim-rule--paper::after { background: rgba(245, 243, 238, 0.4); }

.dim-rule--wide { max-width: 100%; }

/* ---- Header / nav ---- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem 0;
}

.brand {
  font-family: var(--head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--slate);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand span {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--orange-deep);
  vertical-align: 0.2em;
  margin-left: 0.3rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--orange); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--orange); font-weight: 600; }

.nav-cta {
  background: var(--orange);
  color: #fff !important;
  padding: 0.55rem 1.1rem !important;
  border-bottom: none !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--orange-deep); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--slate);
  color: var(--slate);
  font: 600 0.8rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 0 1rem; }
  .site-nav li { border-top: 1px solid var(--line); }
  .site-nav a { display: block; padding: 0.8rem 0.2rem; border-bottom: none; }
  .site-nav a[aria-current="page"] { color: var(--orange-deep); }
  .nav-cta { margin-top: 0.75rem; text-align: center; }
}

/* ---- Hero (slate band w/ blueprint grid) ---- */

.hero {
  background-color: var(--slate);
  background-image:
    linear-gradient(var(--grid-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-dark) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--paper);
  padding: 4.75rem 0 5rem;
}
.hero h1 { color: var(--paper); max-width: 15em; }
.hero .label { color: var(--orange); }
.hero .lede {
  font-size: 1.15rem;
  line-height: 1.75;
  max-width: 40em;
  color: rgba(245, 243, 238, 0.88);
  margin-bottom: 2rem;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font: 600 1rem var(--body);
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--orange-deep); color: #fff; }

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--paper);
  font: 600 1rem var(--body);
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border: 1px solid rgba(245, 243, 238, 0.4);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--paper); }

/* ---- Sections ---- */

.section { padding: 4rem 0; }
.section--surface { background: var(--surface); }
.section--slate {
  background: var(--slate);
  color: var(--paper);
}
.section--slate h2 { color: var(--paper); }

.section-head { margin-bottom: 2.25rem; }

/* ---- Capability / service grid ---- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
}
@media (max-width: 820px) { .cap-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

.cap-item h3 {
  padding-top: 0.9rem;
  border-top: 2px solid var(--orange);
}
.cap-item .num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.cap-item p { font-size: 0.98rem; }

/* ---- Services (stacked, detailed) ---- */

.service-block {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  max-width: 52rem;
}
.service-block:last-of-type { border-bottom: 1px solid var(--line); }
@media (max-width: 620px) { .service-block { grid-template-columns: 1fr; gap: 0.5rem; } }

.service-block .svc-num {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--orange-deep);
  padding-top: 0.35rem;
}
.service-block h3 { font-size: 1.3rem; }
.service-block p { margin-bottom: 0; }

/* ---- IP note (verbatim block, brief §5.2) ---- */

.ip-note {
  background: var(--surface);
  border-left: 3px solid var(--orange);
  padding: 1.4rem 1.6rem;
  margin: 3rem 0 0;
  max-width: 52rem;
  font-size: 0.97rem;
}
.ip-note p { margin: 0; }
.ip-note .label { margin-bottom: 0.5rem; }

/* ---- Process stages (scroll reveal) ---- */

.stage {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.75rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
  max-width: 52rem;
  opacity: 1;
}
.stage:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 620px) { .stage { grid-template-columns: 1fr; gap: 0.5rem; } }

.stage .stage-num {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--orange-deep);
  text-transform: uppercase;
  padding-top: 0.35rem;
}
.stage h3 { font-size: 1.25rem; }
.stage p { margin-bottom: 0; }

/* Scroll reveal — gentle, single, respects reduced motion (brief §6) */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Credibility / closing CTA ---- */

.cta-band { padding: 3.75rem 0; }
.cta-band h2 { max-width: 20em; }
.cta-band p { max-width: 40em; margin-bottom: 1.75rem; color: rgba(245, 243, 238, 0.85); }

/* ---- Page header (interior) ---- */

.page-head { padding: 3.5rem 0 0.5rem; }
.page-head h1 { max-width: 20em; }

/* ---- Forms (contact) ---- */

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 3.5rem;
  align-items: start;
}
@media (max-width: 860px) { .form-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.4rem; }
.field label {
  display: block;
  font: 600 0.9rem var(--body);
  color: var(--slate);
  margin-bottom: 0.4rem;
}
.field .optional { font-weight: 400; color: var(--muted); font-size: 0.83rem; }
.field input,
.field textarea,
.field select {
  width: 100%;
  font: 400 1rem var(--body);
  color: var(--ink);
  background: #fff;
  border: 1px solid #B6B1A4;
  padding: 0.7rem 0.85rem;
}
.field textarea { min-height: 9rem; resize: vertical; }

fieldset.field { border: none; padding: 0; margin: 0 0 1.4rem; }
fieldset.field legend { font: 600 0.9rem var(--body); color: var(--slate); margin-bottom: 0.5rem; padding: 0; }
.radio-row { display: flex; gap: 1.5rem; }
.radio-row label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 400; margin: 0; }
.radio-row input { width: auto; }

.form-disclaimer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  padding: 1.1rem 1.3rem;
  font-size: 0.93rem;
  line-height: 1.6;
  margin: 1.8rem 0 1.4rem;
}
.form-disclaimer p { margin: 0; }

.hp-field { position: absolute; left: -9999px; }

.aside-note {
  background: var(--surface);
  border-top: 2px solid var(--orange);
  padding: 1.5rem;
  font-size: 0.95rem;
}
.aside-note .label { margin-bottom: 0.6rem; }
.aside-note p:last-child { margin-bottom: 0; }

/* ---- Legal pages ---- */

.legal-section { max-width: 46rem; margin-bottom: 2.5rem; }
.legal-section h2 { font-size: 1.25rem; }

/* ---- Placeholder flags (remove styling at launch; brief §10) ---- */

.ph {
  background: #FFE08A;
  outline: 1px dashed #B98E2F;
  padding: 0 0.25em;
}

/* ---- Footer (brief §9 — includes the not-a-law-firm statement §8) ---- */

.site-footer {
  background: var(--slate-deep);
  color: rgba(245, 243, 238, 0.82);
  padding: 3rem 0 2.5rem;
  font-size: 0.92rem;
  line-height: 1.7;
}
.site-footer .dim-rule--paper { margin: 0 0 2rem; }
.site-footer p { margin-bottom: 0.8rem; }
.footer-identity { font-family: var(--head); font-size: 1.1rem; font-weight: 600; color: var(--paper); }
.footer-sep { color: var(--orange); font-weight: 600; }
.footer-notice strong { color: var(--paper); }
.footer-links { margin-top: 1.3rem; }
.footer-links a { color: var(--paper); font-weight: 500; }
.footer-links a:hover { color: var(--orange); }
.footer-legal { color: rgba(245, 243, 238, 0.55); }

/* ---- Utility ---- */

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