/* ======================================================================
   GREYFERN — greyfern.dev
   Offensive security & competitive intelligence. See first. Move last.

   Design system: the firm, dark. Flat graphite surfaces, crisp white
   type, hairline rules, and one disciplined steel-green accent reserved
   for links, key figures, and the firm's one true idea — where sources
   disagree, that gap is the finding. Everything set in Archivo; mono
   only for literal data (addresses, source rows). No gradients, no
   glow, no animation.
   ====================================================================== */

:root {
  --bg:        #121415;
  --bg-panel:  #17191b;
  --bg-deep:   #0e1011;
  --line:      #26292b;
  --line-soft: #1e2123;
  --white:     #f4f5f5;
  --text:      #c9cdcf;
  --muted:     #8b9194;
  --accent:    #57a381;
  --accent-dim:#3e7a60;
  --fiction:   #f59e0b;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  --maxw: 1200px;
  --gut: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { color: var(--white); font-weight: 600; }

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

h1, h2, h3 { color: var(--white); font-weight: 600; letter-spacing: -0.015em; }

.kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 14px;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 22px;
  border: 1px solid var(--line);
  color: var(--white);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn--solid {
  background: var(--white);
  border-color: var(--white);
  color: #0c0d0e;
}
.btn--solid:hover { background: #d9dcdd; border-color: #d9dcdd; }

/* --- nav ------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); }
.brand:hover { text-decoration: none; }
.brand__frond { width: 16px; height: 26px; overflow: visible; flex: none; }
.brand__frond .coil { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.brand__frond .stem { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.brand__name { font-size: 17px; font-weight: 600; letter-spacing: 0; color: var(--white); }
.brand__name b { font-weight: 700; }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 12px;
}
.nav__link:hover { color: var(--white); text-decoration: none; }
.nav__link--active { color: var(--white); }
.nav__cta { margin-left: 10px; padding: 10px 18px; font-size: 13px; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav__toggle span { display: block; height: 2px; background: var(--white); }

/* --- hero (home) ---------------------------------------------------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  min-height: clamp(560px, 80vh, 840px);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  margin: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 12% center;
  filter: saturate(0.75) contrast(1.02);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 16, 17, 0.94) 0%, rgba(14, 16, 17, 0.78) 42%, rgba(14, 16, 17, 0.28) 100%);
}
.hero > .wrap { width: 100%; }
.hero__copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: clamp(72px, 10vw, 130px) 0;
}
.hero__kicker { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 22px; }
.hero__title {
  font-size: clamp(42px, 6.5vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero__title .move { color: var(--accent); }
.hero__lede {
  margin-top: 26px;
  max-width: 46ch;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--text);
}
.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__coords {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.hero__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 8px 14px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* --- page header (interior pages) ----------------------------------- */
.phead {
  border-bottom: 1px solid var(--line);
  padding: clamp(56px, 8vw, 104px) 0;
}
.phead h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 22ch;
}
.phead p { margin-top: 20px; max-width: 62ch; font-size: 17px; color: var(--text); }

/* --- sections -------------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--line { border-top: 1px solid var(--line); }
.h-section {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 26ch;
}
.lede { margin-top: 16px; max-width: 62ch; color: var(--text); font-size: 17px; }

/* statement */
.statement {
  max-width: 46ch;
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--white);
}
.statement .fade { color: var(--muted); }

/* split prose */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.split--stretch { align-items: stretch; }
.split__col { display: flex; flex-direction: column; }
.prose p { color: var(--text); }
.prose p + p { margin-top: 1em; }
.prose .h-section { margin-bottom: 18px; }
.prose .kicker + .h-section { margin-top: 0; }
.firm-photo { margin-top: 28px; border: 1px solid var(--line); }
.firm-photo img { filter: saturate(0.8); }
.firm-photo--lead { margin-top: 0; }
.firm-photo--fill { flex: 1; min-height: 240px; position: relative; }
.firm-photo--fill img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- services: capability index -------------------------------------- */
.svc-index { margin-top: 44px; border-top: 1px solid var(--line); }
.svc-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 0.75fr) 28px;
  gap: clamp(16px, 2.5vw, 36px);
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.svc-row__num { font-size: 14px; font-weight: 600; color: var(--muted); }
.svc-row__title { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.25; }
.svc-row__body { font-size: 15px; color: var(--text); }
.svc-row__need { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.svc-row__need span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.svc-row__need q { color: var(--text); quotes: "\201C" "\201D"; }
.svc-row__arw { text-align: right; color: var(--accent); font-size: 17px; align-self: center; }
.svc-row:hover { background: var(--bg-panel); }

/* --- method: numbered vertical timeline ------------------------------ */
.method { margin-top: 44px; max-width: 860px; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: clamp(18px, 3vw, 40px);
  padding: 26px 0 30px;
}
.step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.step:first-child::before { top: 30px; }
.step:last-child::before { bottom: auto; height: 30px; }
.step__num {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  margin-top: -2px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}
.step--signal .step__num { border-color: var(--accent-dim); color: var(--accent); }
.step__name { font-size: 19px; font-weight: 600; color: var(--white); }
.step--signal .step__name { color: var(--accent); }
.step__desc { margin-top: 6px; max-width: 62ch; font-size: 15.5px; color: var(--text); }

/* --- contradiction (accent concentrates here) ------------------------ */
.signal-section { background: var(--bg-deep); }
.signal-block {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: clamp(24px, 3.5vw, 44px);
}
.src {
  display: grid;
  grid-template-columns: minmax(110px, 170px) 1fr;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 13.5px;
  align-items: baseline;
}
.src__label { color: var(--muted); }
.src__val { color: var(--text); }
.src__val em { font-style: normal; color: var(--muted); }
.src--gap { border-bottom: 0; padding-top: 20px; }
.src--gap .src__label { color: var(--accent); font-weight: 500; }
.src--gap .src__val { font-family: var(--sans); font-size: 15px; color: var(--white); }

/* --- doctrine: dense two-column ruleset ------------------------------ */
.doctrine {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(32px, 5vw, 72px);
  border-top: 1px solid var(--line);
}
.rule-item {
  padding: 24px 0 26px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  align-items: baseline;
}
.rule-item__n { font-size: 14px; font-weight: 600; color: var(--muted); }
.rule-item__k { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.rule-item__t { font-size: 17px; font-weight: 600; color: var(--white); line-height: 1.35; }
.rule-item__d { margin-top: 6px; font-size: 14.5px; color: var(--muted); }

/* --- tooling (about) -------------------------------------------------- */
.tools { border-top: 1px solid var(--line); }
.tool {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: clamp(16px, 2.5vw, 32px);
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.tool__n { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--accent); }
.tool__d { font-size: 14.5px; color: var(--text); }

/* --- callout ---------------------------------------------------------- */
.callout {
  margin-top: 44px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: clamp(22px, 3vw, 34px);
}
.callout p { font-size: 15.5px; color: var(--text); }

/* --- team roster ------------------------------------------------------ */
.roster { margin-top: 32px; border-top: 1px solid var(--line); }
.op {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: clamp(20px, 3vw, 36px);
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line);
}
.mono-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  font-family: var(--mono);
  font-size: 15px;
  color: var(--accent);
}
.op__name { font-size: 20px; font-weight: 600; color: var(--white); }
.op__title { font-size: 14px; font-weight: 500; color: var(--text); margin-top: 3px; }
.op__div { font-size: 13px; color: var(--muted); margin-top: 2px; }
.op__bio { margin-top: 12px; max-width: 72ch; font-size: 15px; color: var(--text); }
.orgline { margin-top: 12px; font-size: 13px; color: var(--muted); }
.orgline b { color: var(--text); font-weight: 500; }
.op__mail {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

/* --- contact routes --------------------------------------------------- */
.contact-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 32px);
}
.route {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: clamp(24px, 3.5vw, 40px);
}
.route__k { font-size: 13px; font-weight: 600; color: var(--muted); }
.route__addr {
  display: block;
  margin: 14px 0 12px;
  font-family: var(--mono);
  font-size: clamp(15px, 2vw, 19px);
  color: var(--accent);
  word-break: break-all;
}
.route__d { font-size: 14.5px; color: var(--text); }

/* --- stats ------------------------------------------------------------ */
.stats-band { background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.stat { padding: clamp(40px, 5vw, 64px) clamp(20px, 3vw, 44px); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__n {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--white);
}
.stat__l { margin-top: 12px; font-size: 14px; color: var(--muted); max-width: 26ch; }

/* --- cta -------------------------------------------------------------- */
.cta { max-width: 720px; }
.cta h2 { font-size: clamp(28px, 3.8vw, 46px); letter-spacing: -0.02em; line-height: 1.1; }
.cta__sub { margin: 18px 0 30px; max-width: 56ch; color: var(--text); font-size: 16.5px; }

/* --- footer ----------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-deep); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(44px, 6vw, 68px) 0 40px;
}
.footer__tag { color: var(--muted); font-size: 14px; max-width: 36ch; margin: 16px 0 12px; }
.footer__motto { font-size: 13px; font-weight: 600; color: var(--text); }
.footer__h { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 14px; }
.footer__link { display: block; color: var(--muted); font-size: 14px; padding: 4px 0; }
.footer__link:hover { color: var(--white); text-decoration: none; }
a.footer__link--mail { font-family: var(--mono); font-size: 13px; color: var(--accent); }
a.footer__link--mail:hover { color: var(--accent); text-decoration: underline; }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding: 22px 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
}
.footer__copy { font-size: 13px; color: var(--muted); }

.footer__fiction {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.4s ease, visibility 0.4s ease;
  padding: 14px 32px;
  background: var(--fiction);
  color: #000;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.footer__fiction.is-visible { transform: translateY(0); visibility: visible; }
.footer__fiction a { color: #000; text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.footer__fiction a:hover { color: #1a1a1a; }
.footer__fiction-close {
  background: none;
  border: 0;
  cursor: pointer;
  color: #000;
  font-size: 20px;
  line-height: 1;
  padding: 2px 8px;
  font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
  .footer__fiction { transition: none; }
}

/* --- 404 -------------------------------------------------------------- */
.notfound {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: left;
  padding-top: clamp(56px, 10vw, 120px);
  padding-bottom: clamp(56px, 10vw, 120px);
}
.notfound__code { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.notfound h1 { font-size: clamp(36px, 6vw, 68px); letter-spacing: -0.025em; font-weight: 700; margin: 18px 0 16px; }
.notfound p { max-width: 52ch; color: var(--text); margin-bottom: 30px; }

/* --- accessibility ---------------------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

/* --- responsive ------------------------------------------------------- */
@media (max-width: 1000px) {
  .svc-row {
    grid-template-columns: 44px 1fr 28px;
    grid-template-areas:
      "num title arw"
      "num body body"
      "num need need";
  }
  .svc-row__num { grid-area: num; }
  .svc-row__title { grid-area: title; }
  .svc-row__body { grid-area: body; margin-top: 10px; }
  .svc-row__need { grid-area: need; margin-top: 12px; }
  .svc-row__arw { grid-area: arw; }
}

@media (max-width: 880px) {
  .hero { min-height: clamp(520px, 72vh, 700px); }
  .hero__bg::after { background: rgba(14, 16, 17, 0.82); }
  .hero__caption { display: none; }
  .split { grid-template-columns: 1fr; }
  .firm-photo--fill { flex: none; min-height: 0; position: static; }
  .firm-photo--fill img { position: static; height: auto; }
  .doctrine { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 20px;
  }
  .nav__links--open { display: flex; }
  .nav__link { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
  .nav__cta { margin: 16px 0 0; text-align: center; }
}

@media (max-width: 480px) {
  .svc-row { grid-template-columns: 34px 1fr 24px; gap: 12px; }
  .step { grid-template-columns: 48px 1fr; gap: 14px; }
  .src { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
  .rule-item { grid-template-columns: 28px 1fr; gap: 12px; }
  .tool { grid-template-columns: 1fr; gap: 6px; }
  .op { grid-template-columns: 1fr; gap: 14px; }
}
