/* Book Lab light theme
   Brand: Teal #3fbac2 · Ink #111111 · White #ffffff
   Wordmark: Archivo 600, uppercase, +0.42em tracking, teal square terminal */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #3fbac2;
  --teal-dark: #2e979e;
  --teal-tint: #e9f7f8;
  --ink: #111111;
  --ink-soft: #3d3d3d;
  --grey: #6b6b6b;
  --line: #e6e6e6;
  --bg: #ffffff;
  --bg-alt: #f7f8f8;
  --radius: 10px;
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Archivo", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Wordmark */
.wordmark {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .terminal {
  display: inline-block;
  width: 0.42em; height: 0.42em;
  background: var(--teal);
  margin-left: 0.12em;
}

/* Header: centred wordmark, utility text either side, nav row below */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 18px;
}
.header-side {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}
.header-right { text-align: right; }
.header-right a { color: var(--grey); text-decoration: none; }
.header-right a:hover { color: var(--ink); }
.header-mark { font-size: 1.15rem; }

.site-nav {
  display: flex; justify-content: center; gap: 8px;
  padding-bottom: 14px;
}
.site-nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.08em;
  padding: 6px 14px;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active {
  background: var(--ink); color: #fff;
}

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer; padding: 8px;
  justify-self: end;
}
.nav-toggle .bar {
  display: block; width: 22px; height: 2px;
  background: var(--ink); margin: 5px 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 6px;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--teal-dark); color: var(--teal-dark); }

/* Type */
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: 18px;
}
h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 20px;
  max-width: 760px;
}
.center h2 { margin-left: auto; margin-right: auto; }
h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 10px; }
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 620px; margin-bottom: 28px; }
.center .lede { margin-left: auto; margin-right: auto; }

/* Photo hero: full-bleed image, wordmark front and centre */
.hero-photo { padding: 0; }
.hero-frame {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}
.hero-frame img {
  display: block;
  width: 100%;
  height: min(72vh, 680px);
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Scrim sits only behind the text and fades to nothing well before the
     edges, so the photo keeps its full brightness in the corners. */
  background: radial-gradient(ellipse 65% 45% at 50% 50%,
    rgba(17, 17, 17, 0.48) 0%,
    rgba(17, 17, 17, 0.38) 40%,
    rgba(17, 17, 17, 0) 78%);
  padding: 24px;
}
.hero-wordmark {
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: clamp(1.8rem, 5.5vw, 4.2rem);
  text-shadow: 0 2px 24px rgba(17, 17, 17, 0.35);
  white-space: nowrap;
}
.hero-wordmark .terminal {
  display: inline-block;
  width: 0.42em; height: 0.42em;
  background: var(--teal);
  margin-left: 0.12em;
}
.hero-tagline {
  margin-top: 22px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(17, 17, 17, 0.4);
}

/* Editorial intro */
.intro { padding: 96px 0; }
.intro-copy {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: 36px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }

.integration-note {
  margin-top: 40px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}
.integration-note strong { color: var(--ink); font-weight: 600; }
.integration-note a { color: var(--teal-dark); text-decoration: none; }
.integration-note a:hover { text-decoration: underline; }

.link-light { color: var(--teal); text-decoration: none; }
.link-light:hover { text-decoration: underline; }

.section-more { margin-top: 36px; }
.section-more a {
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.section-more a:hover { text-decoration: underline; }

.prose a { color: var(--teal-dark); }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-ink {
  background: var(--ink);
  color: #fff;
}
.section-ink h2 { color: #fff; }
.section-ink .lede { color: #c9c9c9; }
.section-ink .kicker { color: var(--teal); }
.section-cta {
  background: var(--teal-tint);
  border-top: 1px solid var(--line);
}

/* Grids & cards */
.grid { display: grid; gap: 20px; margin-top: 40px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card p { font-size: 0.92rem; color: var(--ink-soft); }
.card.numbered { position: relative; padding-top: 56px; }
.num {
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.1em;
  font-size: 0.95rem;
}
.card.numbered .num { position: absolute; top: 22px; left: 26px; }

.card-dark {
  background: #1c1c1c;
  border-color: #2c2c2c;
}
.pentest-note {
  margin-top: 44px;
  margin-bottom: 0;
  border-left: 3px solid var(--teal);
  padding-left: 20px;
}
.card-dark h3 { color: #fff; }
.card-dark p { color: #b5b5b5; }

.steps .step {
  border-top: 2px solid var(--teal);
  padding-top: 18px;
}
.steps .step p { font-size: 0.95rem; color: var(--ink-soft); }
.steps .num { display: block; margin-bottom: 8px; }

/* Interior pages */
.page-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
}
.updated {
  font-size: 0.78rem;
  color: var(--grey);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prose h2 {
  font-size: 1.35rem;
  margin-top: 52px;
  margin-bottom: 14px;
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 16px; color: var(--ink-soft); }
.prose ul { margin: 0 0 16px 22px; color: var(--ink-soft); }
.prose li { margin-bottom: 8px; }
.faq h3 {
  font-size: 1.05rem;
  margin-top: 32px;
  margin-bottom: 8px;
}
.faq p { color: var(--ink-soft); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  align-items: center;
}
.footer-mark { font-size: 0.9rem; }
.tagline {
  margin-top: 10px;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--grey);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.88rem;
}
.site-footer nav a:hover { color: var(--ink); }
.footer-meta { font-size: 0.82rem; color: var(--grey); }

/* Responsive */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .header-side { display: none; }
  .header-mark { grid-column: 2; }
  .nav-toggle { grid-column: 3; justify-self: end; }
  /* Keep the photo's own shape on smaller screens so the sides aren't
     cropped away; the frame just gets shorter instead. */
  .hero-frame img { height: auto; aspect-ratio: 1672 / 941; }
}

@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .intro { padding: 64px 0; }
  .hero-wordmark { letter-spacing: 0.36em; }

  .site-footer { padding: 40px 0; }
  .footer-grid { gap: 28px; }
  .site-footer nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    column-gap: 48px;
    row-gap: 14px;
  }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    border-top: 1px solid var(--line);
    padding: 16px 24px 24px;
    gap: 8px;
  }
  .site-nav.open { display: flex; }
  .site-nav a.active { background: none; color: var(--ink); font-weight: 700; }
}

/* Contact form */
.contact-form { max-width: 720px; margin: 40px auto 0; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.form-span { grid-column: 1 / -1; }
.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.form-field .optional { color: var(--grey); font-weight: 500; text-transform: none; letter-spacing: 0; }
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 0;
  border-color: var(--teal);
}
.form-field textarea { resize: vertical; min-height: 110px; }
/* Honeypot: visually removed, still in the DOM for bots to find */
.form-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}
.form-actions { margin-top: 28px; }
.form-actions .btn { border: 0; cursor: pointer; }
.form-actions .btn:disabled { opacity: 0.6; cursor: default; }
.form-status { margin-top: 18px; text-align: center; font-weight: 500; }
.form-status.ok { color: var(--teal-dark); }
.form-status.err { color: #b3261e; }
.center-note { text-align: center; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}
