/* Ironsite Capital — shared stylesheet
   Palette: drafting paper / iron ink / steel slate / rust accent */

:root {
  --paper: #f2f1ec;
  --paper-deep: #e8e7e0;
  --ink: #1f2528;
  --slate: #46545c;
  --rust: #ac4a22;
  --rust-deep: #8f3c1a;
  --rule: #d3d2ca;
  --paper-on-ink: #edece6;
  --slate-on-ink: #9aa8ae;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --measure: 62ch;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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

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

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ---------- type roles ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust-deep);
  display: block;
  margin-bottom: 0.9rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 1.4rem; }
h3 { font-size: 1.25rem; letter-spacing: 0.02em; }

.lede { font-size: 1.15rem; color: var(--slate); max-width: var(--measure); }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(242, 241, 236, 0.78);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    backdrop-filter: blur(12px) saturate(1.3);
  }
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.6rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wordmark:hover { color: var(--ink); }
.wordmark .monument { flex: none; transition: transform 520ms cubic-bezier(0.22, 0.7, 0.2, 1); }
.wordmark:hover .monument { transform: rotate(90deg); }
.wordmark small {
  font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.12em;
  font-size: 0.72em;
}

.site-nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.5vw, 1.6rem); }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--slate);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:not(.nav-cta) {
  position: relative;
  padding-bottom: 3px;
  transition: color 180ms ease;
}
.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms cubic-bezier(0.22, 0.7, 0.2, 1);
}
.site-nav a:not(.nav-cta):hover::after,
.site-nav a:not(.nav-cta):focus-visible::after { transform: scaleX(1); }
.site-nav a.nav-cta {
  color: var(--paper-on-ink);
  background: var(--ink);
  padding: 0.55rem 0.95rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: color 200ms ease;
}
.site-nav a.nav-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--rust-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms cubic-bezier(0.22, 0.7, 0.2, 1);
}
.site-nav a.nav-cta:hover, .site-nav a.nav-cta:focus-visible { color: #fff; }
.site-nav a.nav-cta:hover::before, .site-nav a.nav-cta:focus-visible::before { transform: scaleX(1); }

/* marching ants — dashed selection frame crawls around the CTA on hover */
.site-nav a.nav-cta { overflow: visible; }
.site-nav a.nav-cta::after {
  content: "";
  position: absolute;
  inset: -6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  background:
    repeating-linear-gradient(90deg, var(--rust) 0 7px, transparent 7px 14px) left top / 100% 1.5px no-repeat,
    repeating-linear-gradient(90deg, var(--rust) 0 7px, transparent 7px 14px) left bottom / 100% 1.5px no-repeat,
    repeating-linear-gradient(0deg, var(--rust) 0 7px, transparent 7px 14px) left top / 1.5px 100% no-repeat,
    repeating-linear-gradient(0deg, var(--rust) 0 7px, transparent 7px 14px) right top / 1.5px 100% no-repeat;
  animation: cta-ants 700ms linear infinite;
}
.site-nav a.nav-cta:hover::after, .site-nav a.nav-cta:focus-visible::after { opacity: 1; }
@keyframes cta-ants {
  to { background-position: 14px top, -14px bottom, left -14px, right 14px; }
}

/* entrance choreography — logo draws itself, wordmark rises, nav staggers in,
   the bottom rule sweeps across. All keyframes end in the natural state, so
   reduced-motion and no-animation environments render the finished header. */
.site-header { border-bottom-color: transparent; }
.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--rule);
  animation: header-rule 900ms cubic-bezier(0.22, 0.7, 0.2, 1) 250ms backwards;
}
@keyframes header-rule { from { transform: scaleX(0); transform-origin: left; } }

.site-header .monument circle,
.site-header .monument path { stroke-dasharray: 70; }
.site-header .monument circle { animation: monument-draw 700ms ease-out 100ms backwards; }
.site-header .monument path { animation: monument-draw 500ms ease-out 500ms backwards; }
@keyframes monument-draw { from { stroke-dashoffset: 70; } to { stroke-dashoffset: 0; } }

.site-header .wordmark { animation: wordmark-rise 500ms cubic-bezier(0.22, 0.7, 0.2, 1) 150ms backwards; }
@keyframes wordmark-rise { from { opacity: 0; transform: translateY(9px); } }

.site-nav > * { animation: nav-drop 420ms cubic-bezier(0.22, 0.7, 0.2, 1) backwards; }
.site-nav > *:nth-child(1) { animation-delay: 380ms; }
.site-nav > *:nth-child(2) { animation-delay: 460ms; }
.site-nav > *:nth-child(3) { animation-delay: 540ms; }
.site-nav > *:nth-child(4) { animation-delay: 620ms; }
.site-nav > *:nth-child(5) { animation-delay: 720ms; }
@keyframes nav-drop { from { opacity: 0; transform: translateY(-7px); } }

/* calibration tick — the instrument re-levels itself every 9s while idle */
.site-header .wordmark:not(:hover) .monument { animation: monument-tick 9s ease-in-out 4s infinite; }
@keyframes monument-tick {
  0%, 90% { transform: rotate(0); }
  93% { transform: rotate(16deg); }
  96% { transform: rotate(-7deg); }
  98%, 100% { transform: rotate(0); }
}

/* dimension measure — hover the wordmark and it gets surveyed */
.site-header .wordmark { position: relative; }
.site-header .wordmark::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 7px;
  opacity: 0;
  background:
    linear-gradient(var(--rust), var(--rust)) left center / 100% 1px no-repeat,
    linear-gradient(var(--rust), var(--rust)) left center / 1px 7px no-repeat,
    linear-gradient(var(--rust), var(--rust)) right center / 1px 7px no-repeat;
  transform: scaleX(0.6);
  transition: opacity 220ms ease, transform 320ms cubic-bezier(0.22, 0.7, 0.2, 1);
  pointer-events: none;
}
.site-header .wordmark::after {
  content: "9.14'";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translate(-50%, 3px);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--rust-deep);
  background: var(--paper);
  padding: 0 5px;
  line-height: 1;
  opacity: 0;
  transition: opacity 220ms ease 80ms, transform 320ms cubic-bezier(0.22, 0.7, 0.2, 1) 80ms;
  pointer-events: none;
}
.site-header .wordmark:hover::before { opacity: 1; transform: scaleX(1); }
.site-header .wordmark:hover::after { opacity: 1; transform: translate(-50%, 0); }

/* header casts a faint shadow only after the page scrolls (pure CSS, no JS) */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-elevate linear both;
    animation-timeline: scroll();
    animation-range: 0 140px;
  }
  @keyframes header-elevate {
    to { box-shadow: 0 10px 28px -20px rgba(31, 37, 40, 0.55); }
  }
}
@media (max-width: 44rem) {
  .site-nav a:not(.nav-cta):not(.nav-keep) { display: none; }
}
@media (max-width: 30rem) {
  .site-nav a.nav-keep { display: none; }
  .wordmark small { display: none; }
}

/* ---------- hero ---------- */

.hero { border-bottom: 1px solid var(--rule); overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
@media (max-width: 56rem) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(2.7rem, 6.2vw, 4.6rem);
  margin-bottom: 1.3rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--rust);
}
.hero .lede { margin-bottom: 2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  border: 1px solid var(--ink);
}
.btn-solid { background: var(--ink); color: var(--paper-on-ink); }
.btn-solid:hover { background: var(--rust-deep); border-color: var(--rust-deep); color: #fff; }
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--rust-deep); color: var(--rust-deep); }

.plat { width: 100%; height: auto; display: block; }
.plat text { font-family: var(--font-mono); }

@keyframes plat-draw {
  from { stroke-dashoffset: 1400; }
  to { stroke-dashoffset: 0; }
}
.plat .parcel-line {
  stroke-dasharray: 1400;
  stroke-dashoffset: 0;
  animation: plat-draw 2.4s ease-out 1;
}

/* ---------- fact band ---------- */

.fact-band { background: var(--ink); color: var(--paper-on-ink); }
.fact-band .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem clamp(1.5rem, 5vw, 4rem);
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}
.fact-band span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.fact-band span::before {
  content: "//";
  color: var(--rust);
  margin-right: 0.7rem;
}

/* ---------- sections ---------- */

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section + .section { border-top: 1px solid var(--rule); }
.section-deep { background: var(--paper-deep); }

.section-head { max-width: var(--measure); margin-bottom: 2.5rem; }

/* spec sheet */

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--ink);
  background: var(--ink);
  gap: 1px;
}
@media (max-width: 62rem) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .spec-grid { grid-template-columns: 1fr; } }
.spec-cell { background: var(--paper); padding: 1.3rem 1.4rem 1.5rem; }
.spec-cell dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--rust-deep);
  margin-bottom: 0.55rem;
}
.spec-cell dd {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.15;
}
.spec-cell dd small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  text-transform: none;
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 0.45rem;
  line-height: 1.5;
}

/* process */

.steps { list-style: none; counter-reset: step; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.9rem 0;
  border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--rust);
  line-height: 1.1;
  padding-top: 0.2rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { max-width: var(--measure); color: var(--slate); }
.step p strong { color: var(--ink); }
@media (max-width: 40rem) {
  .step { grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; }
}

/* FAQ */

.faq { max-width: 46rem; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--rust);
  font-size: 1.1rem;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 1.4rem; color: var(--slate); max-width: var(--measure); }
.faq details p + p { margin-top: -0.6rem; }
.faq details p strong { color: var(--ink); }

/* field notes */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem;
}
.note-card {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 1.5rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: border-color 120ms ease;
}
.note-card:hover { border-color: var(--rust); }
.note-card .meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}
.note-card h3 { line-height: 1.1; }
.note-card h3 a { color: var(--ink); text-decoration: none; }
.note-card h3 a:hover { color: var(--rust-deep); }
.note-card p { font-size: 0.95rem; color: var(--slate); flex: 1; }
.note-card .more {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* contact */

.contact { background: var(--ink); color: var(--paper-on-ink); }
.contact .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
@media (max-width: 56rem) {
  .contact .wrap { grid-template-columns: 1fr; }
}
.contact .eyebrow { color: var(--rust); }
.contact h2 { color: #fff; }
.contact p { color: var(--slate-on-ink); max-width: var(--measure); }
.contact p strong, .contact p a { color: var(--paper-on-ink); }
.contact .direct { margin-top: 1.6rem; font-family: var(--font-mono); font-size: 0.85rem; }

.contact form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--slate-on-ink);
}
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--paper-on-ink);
  background: transparent;
  border: 1px solid #3a464c;
  padding: 0.75rem 0.9rem;
  border-radius: 0;
  width: 100%;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--rust);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 40rem) { .field-row { grid-template-columns: 1fr; } }

.contact button {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--rust);
  color: #fff;
  border: none;
  padding: 0.95rem 1.4rem;
  cursor: pointer;
  justify-self: start;
}
.contact button:hover { background: var(--rust-deep); }
.form-note { font-size: 0.82rem; color: var(--slate-on-ink); }

/* footer */

.site-footer { background: var(--ink); color: var(--slate-on-ink); border-top: 1px solid #333e44; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem 3rem;
  padding-top: 3.2rem;
  padding-bottom: 2.6rem;
}
.footer-brand p { margin-top: 1rem; font-size: 0.9rem; max-width: 24rem; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  color: var(--paper-on-ink);
  text-decoration: none;
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
}
.footer-col a:hover { color: var(--rust); }
.site-footer .wordmark { color: var(--paper-on-ink); font-size: 1.05rem; }
.footer-legal {
  border-top: 1px solid #333e44;
  padding-top: 1.5rem;
  padding-bottom: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 3rem;
  font-size: 0.78rem;
  line-height: 1.6;
}
.footer-legal p:first-child { max-width: 48rem; }
.footer-legal p:last-child { white-space: nowrap; }
@media (max-width: 52rem) { .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; } }

/* ---------- article / blog pages ---------- */

.page-head { border-bottom: 1px solid var(--rule); }
.page-head .wrap { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 26ch; margin-bottom: 1rem; }
.page-head .meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

.article .wrap { padding-top: 3rem; padding-bottom: var(--section-y); }
.article-body { max-width: var(--measure); }
.article-body p { margin-bottom: 1.4rem; }
.article-body h2 {
  font-size: 1.5rem;
  margin: 2.6rem 0 1rem;
}
.article-body ul, .article-body ol { margin: 0 0 1.4rem 1.3rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body .pull {
  border-left: 3px solid var(--rust);
  padding: 0.4rem 0 0.4rem 1.3rem;
  margin: 2rem 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.15;
}

.sources {
  max-width: var(--measure);
  margin-top: 3rem;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 1.4rem 1.6rem;
}
.sources h2 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust-deep);
  margin-bottom: 0.8rem;
}
.sources ul { list-style: none; }
.sources li { margin-bottom: 0.5rem; font-size: 0.9rem; }

.article-cta {
  max-width: var(--measure);
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.8rem;
}
.article-cta p { color: var(--slate); margin-bottom: 1.2rem; }

.disclaimer {
  max-width: var(--measure);
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--slate);
}
