/* Layout concept: the Fogwren logo's world. Misty white page, slate ink, soft fog gradients,
   airy tracked capitals like the FOGWREN wordmark, and a monospace "launch report" panel as the signature element. */
:root {
  --bg: #f6f7f8;          /* paper white with a cool fog tint */
  --surface: #ffffff;
  --ink: #17212b;         /* the bird's deep slate */
  --muted: #5b6670;
  --line: #dde2e6;
  --fog: #65717d;         /* the grey of "FOG" in the wordmark, darkened enough to read */
  --mist: #e9edf0;        /* the fog bank behind the bridge */
  --accent: #34495c;      /* slate blue for buttons and marks */
  --accent-ink: #ffffff;
  --bay: #4f5f6d;         /* secondary slate for labels */
  --pass: #2f7a4a;
  --err: #b23b3b;

  --font-display: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 4.5vw, 3rem);
  --step-4: clamp(2.4rem, 6.5vw, 4.4rem);

  --radius: 8px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1318; --surface: #161d24; --ink: #e8ecef; --muted: #9aa6b0; --line: #26313b;
    --fog: #7d8994; --mist: #18212a; --accent: #b3c4d3; --accent-ink: #0e1318; --bay: #a5b5c3; --pass: #6cc58c; --err: #f08a8a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1318; --surface: #161d24; --ink: #e8ecef; --muted: #9aa6b0; --line: #26313b;
  --fog: #7d8994; --mist: #18212a; --accent: #b3c4d3; --accent-ink: #0e1318; --bay: #a5b5c3; --pass: #6cc58c; --err: #f08a8a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); font-weight: 500; }
h2 { font-size: var(--step-3); font-weight: 500; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: 0; }
p { margin: 0; max-width: 62ch; }
.lede { font-size: var(--step-1); color: var(--muted); }
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--bay);
}

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg);
}
.nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px; padding-block: 14px;
}
/* Brand: the logo mark beside the tracked FOG|WREN wordmark, with a light-ink mark for dark mode */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: block; height: 40px; width: auto; }
.brand-mark-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark-light { display: none; }
  :root:not([data-theme="light"]) .brand-mark-dark { display: block; }
}
:root[data-theme="dark"] .brand-mark-light { display: none; }
:root[data-theme="dark"] .brand-mark-dark { display: block; }
.wordmark {
  font-family: var(--font-display); font-weight: 400; font-size: 1.2rem;
  letter-spacing: 0.32em; margin-right: -0.32em; color: var(--ink);
}
.wordmark .fog { color: var(--fog); }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; }
.nav a.link { text-decoration: none; color: var(--muted); font-weight: 500; padding: 4px 0; }
.nav a.link:hover { color: var(--ink); }
.nav a.link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 var(--step-0)/1 var(--font-body);
  padding: 14px 22px; border-radius: var(--radius);
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding-block: clamp(48px, 8vw, 96px); }
section + section { border-top: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px); }
.hero-grid {
  display: grid; gap: 40px; align-items: center;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
.hero h1 .hl { color: var(--accent); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* Launch report: the signature element */
.report {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.9rem; overflow: hidden; min-width: 0;
}
.report-head {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted);
}
.report ol { list-style: none; margin: 0; padding: 8px 0; }
.report li {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  padding: 7px 16px; font-variant-numeric: tabular-nums;
}
.report .ok { color: var(--pass); font-weight: 500; }
.report-foot {
  padding: 12px 16px; border-top: 1px dashed var(--line); color: var(--ink);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .price-grid { grid-template-columns: minmax(0, 1fr); } }
.price {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 18px;
}
.price.featured { border-color: var(--accent); border-width: 2px; }
.amount {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em;
  font-size: var(--step-4); line-height: 1; font-variant-numeric: tabular-nums;
}
.amount small { font-family: var(--font-body); font-size: var(--step-0); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { padding-left: 26px; position: relative; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.price .btn { align-self: flex-start; margin-top: auto; }

/* Process (a real sequence, so numbered) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: s; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { counter-increment: s; padding: 20px 20px 20px 0; border-top: 2px solid var(--ink); display: flex; flex-direction: column; gap: 8px; }
.steps li::before { content: "Step " counter(s); font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent); }
.steps p { color: var(--muted); }

/* Neighborhoods */
.hoods { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.hoods li {
  font-family: var(--font-mono); font-size: var(--step--1);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--surface);
}

/* Two-column text */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding-block: 18px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: var(--step-1); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin-top: 10px; color: var(--muted); }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }

/* Contact */
.form { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
label { font-weight: 600; font-size: var(--step--1); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--bay); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bay) 25%, transparent); }
textarea { min-height: 140px; resize: vertical; }
.form-status { font-weight: 500; min-height: 1.6em; }
.form-status.ok { color: var(--pass); }
.form-status.err { color: var(--err); }
.contact-facts { display: flex; flex-direction: column; gap: 22px; }
.fact .eyebrow { display: block; margin-bottom: 4px; }
.fact strong { font-size: var(--step-1); user-select: all; }

/* CTA band */
.cta { background: var(--accent); color: var(--bg); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { color: var(--bg); }
.cta p { color: var(--bg); opacity: .85; }
.cta .btn-primary { background: var(--bg); color: var(--ink); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--muted); font-size: var(--step--1); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Service-area tiers: three across, stacking on narrow screens */
.area-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .area-grid { grid-template-columns: minmax(0, 1fr); } }
.area-grid .price p { color: var(--muted); }

/* Utility classes (replace former inline styles so a strict CSP can be used) */
.btn-row-center { align-items: center; }
.btn-start { align-self: flex-start; }
.values-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Skip link: hidden until focused by keyboard */
.skip-link {
  position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); top: -100px; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: calc(8px + env(safe-area-inset-top, 0px)); }

/* Spam honeypot: invisible to people, filled in by bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Click-to-reveal contact details */
.reveal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 2.6rem; }
.reveal-btn, .copy-btn {
  font: 600 var(--step--1)/1 var(--font-body); color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 14px;
}
.reveal-btn:hover, .copy-btn:hover { border-color: var(--ink); }
.reveal-value { font-size: var(--step-1); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.reveal-value:hover { text-decoration: underline; }
.fact-note { margin-top: 6px; font-size: var(--step--1); color: var(--muted); }

/* Booking call-to-action on the contact page */
.fact.book { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }

/* Projects page: each project is a browser-window preview beside its details */
.projects { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 72px); }
.project { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
@media (max-width: 860px) { .project { grid-template-columns: minmax(0, 1fr); } }
.project-info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.project-info .btn { align-self: flex-start; }
.project-preview {
  display: flex; flex-direction: column; text-decoration: none; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface);
  transition: transform .2s ease, border-color .2s ease;
}
.project-preview:hover { transform: translateY(-2px); border-color: var(--ink); }
.preview-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); overflow-wrap: anywhere;
}
.dots { display: inline-flex; gap: 5px; flex: none; }
.dots::before, .dots::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line); box-shadow: 14px 0 0 var(--line); }
.dots::after { display: none; }
.dots { width: 32px; }
.preview-body {
  aspect-ratio: 16 / 9; max-width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  padding: clamp(18px, 4vw, 32px); color: var(--bg);
}
.preview-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.05; }
.preview-tag { font-family: var(--font-mono); font-size: var(--step--1); opacity: .9; }
.preview-plumbing { background: var(--bay); }
.preview-recovery { background: var(--pass); }
.preview-ela { background: var(--ink); }
.preview-ela .preview-name { font-family: var(--font-body); font-weight: 500; letter-spacing: -0.03em; font-size: clamp(2.4rem, 7vw, 4rem); }
@media (prefers-reduced-motion: reduce) { .project-preview:hover { transform: none; } }

/* Fog: hero sections fade into a soft mist band, echoing the fog bank in the logo */
.hero { background: linear-gradient(180deg, var(--bg) 0%, var(--mist) 65%, var(--bg) 100%); }
.hero + section { border-top: 0; }

/* Phones: keep the header to two compact rows (logo, then one line of menu) */
@media (max-width: 520px) {
  .nav { gap: 6px 16px; padding-block: 10px; }
  .nav ul { gap: 2px 14px; font-size: 0.95rem; }
  .brand-mark { height: 34px; }
  .wordmark { font-size: 1.05rem; letter-spacing: 0.28em; margin-right: -0.28em; }
}
