/* BlackFox Restoration, LLC — blackfoxusa.com
   Static site stylesheet. No external assets: safe for S3/CloudFront. */

:root {
  --ink:        #0b0d10;
  --ink-2:      #12161b;
  --ink-3:      #1a2026;
  --line:       #262e36;
  --fg:         #e8eaed;
  --fg-muted:   #9aa4ae;
  --accent:     #c8a24a;
  --accent-dim: #8f7133;
  --max:        1120px;
  --pad:        clamp(1.25rem, 4vw, 2.5rem);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Stops iOS inflating type when the phone is turned to landscape. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Long unbroken strings (emails, URLs) must not widen the page. */
  overflow-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.brand:hover { text-decoration: none; }
.brand img {
  height: 38px;
  width: auto;
  flex: none;
  /* Wide 2.6:1 profile — sized by height so the wordmark stays put. */
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--fg-muted);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav a {
  color: var(--fg-muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  /* Vertical padding brings each link up to a comfortable touch target. */
  padding: 0.6rem 0;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: none;
}
.nav a[aria-current="page"] { border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

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

.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  background: var(--accent);
  color: #0b0d10;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: transparent; color: var(--accent); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--fg); color: var(--ink); border-color: var(--fg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(78vh, 620px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(200, 162, 74, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #10151a 0%, #0b0d10 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
/* Fox watermark — sits behind the hero copy, bleeds off the right edge. */
.hero-mark {
  position: absolute;
  z-index: 0;
  right: -6%;
  bottom: -4%;
  width: min(58%, 720px);
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
  filter: grayscale(1) brightness(1.6);
}

.hero .wrap { position: relative; z-index: 1; padding-top: 4rem; padding-bottom: 4rem; }

@media (max-width: 780px) {
  .hero-mark { width: 82%; right: -14%; bottom: -2%; opacity: 0.06; }
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 1.1rem;
}

.hero h1 {
  margin: 0;
  /* Floor lowered to 2.1rem so "Professional protection." holds together
     rather than breaking mid-word on a 360px phone. */
  font-size: clamp(2.1rem, 7vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.hero h1 .sub { display: block; color: var(--fg-muted); font-weight: 400; }

.hero p.lede {
  margin: 1.5rem 0 2.25rem;
  max-width: 46ch;
  font-size: 1.1rem;
  color: var(--fg-muted);
}

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

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

section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
section.alt { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 62ch; margin-bottom: 3rem; }
.section-head h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.section-head p { margin: 0; color: var(--fg-muted); font-size: 1.05rem; }

.rule {
  width: 56px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 1.5rem;
}

/* ---------- Cards ---------- */

/* Both card grids hold exactly four tiles, so the column count steps
   1 -> 2 -> 4. An auto-fit minmax() would pass through a 3-column stage and
   strand the fourth card alone on its own row. */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2rem 1.75rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.card .icon { color: var(--accent); margin-bottom: 1.1rem; }
.card .icon svg { width: 30px; height: 30px; }
.card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  font-weight: 700;
}
.card p { margin: 0; color: var(--fg-muted); font-size: 0.95rem; }

.card ul {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--fg-muted);
  font-size: 0.93rem;
}
.card ul li { margin-bottom: 0.35rem; }
.card ul li::marker { color: var(--accent-dim); }

/* ---------- Split / detail rows ---------- */

/* Every .split holds either two or four children, so the column count steps
   1 -> 2 and stops. An auto-fit minmax() reached three tracks around 1040px,
   which left the fourth Core Competency stranded on its own row. */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 760px) {
  .split { grid-template-columns: repeat(2, 1fr); }
}

/* Core competencies: four long-form blocks in a 2x2. Without a divider the
   text columns bleed together, so each block gets a rule above it. */
.competencies { gap: clamp(2rem, 4vw, 3rem); }
.competencies > article {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.competencies > article h3 { color: var(--fg); }
.competencies > article h3 .num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.stat {
  border-left: 2px solid var(--accent);
  padding-left: 1.1rem;
}
.stat strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.stat span { color: var(--fg-muted); font-size: 0.88rem; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(120deg, #15191f 0%, #0d1014 100%);
  border-top: 1px solid var(--line);
}
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: clamp(2.75rem, 6vw, 4rem);
  padding-bottom: clamp(2.75rem, 6vw, 4rem);
}
.cta-band h2 { margin: 0 0 0.4rem; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.cta-band p { margin: 0; color: var(--fg-muted); }

/* ---------- Contact ---------- */

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list .label {
  flex: 0 0 8.5rem;
  color: var(--fg-muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  padding-top: 0.15rem;
}
.contact-list .value { font-size: 1.02rem; }
.contact-list .value small { display: block; color: var(--fg-muted); font-size: 0.85rem; }

form label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  margin: 1.25rem 0 0.45rem;
}
form input, form select, form textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.98rem;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
form textarea { min-height: 140px; resize: vertical; }
form .btn { margin-top: 1.6rem; cursor: pointer; font-family: inherit; }
.form-note { margin-top: 1rem; font-size: 0.85rem; color: var(--fg-muted); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: 3rem 0 2.25rem;
  font-size: 0.88rem;
  color: var(--fg-muted);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-nav a { color: var(--fg-muted); }
.footer-nav a:hover { color: var(--fg); }
.footer-bottom {
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.license-line { color: var(--fg-muted); font-size: 0.82rem; }

/* ---------- Cookie notice ---------- */

.cookie {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  max-width: 620px;
  margin: 0 auto;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.cookie p { margin: 0; flex: 1 1 260px; font-size: 0.86rem; color: var(--fg-muted); }
.cookie .btn { padding: 0.6rem 1.3rem; font-size: 0.74rem; }
.cookie[hidden] { display: none; }

/* ---------- Small screens ---------- */

/* ---------- Phones ---------- */

@media (max-width: 640px) {
  .site-header .wrap {
    min-height: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
    gap: 0.25rem;
  }
  .brand img { height: 30px; }
  .brand span { font-size: 0.86rem; }

  /* Nav drops to its own full-width row and spreads evenly. */
  .nav {
    width: 100%;
    gap: 0.5rem;
    justify-content: space-between;
  }
  .nav a { font-size: 0.76rem; letter-spacing: 0.09em; }

  .hero { min-height: 0; }
  .hero .wrap { padding-top: 3rem; padding-bottom: 3rem; }
  .hero p.lede { font-size: 1.02rem; margin-bottom: 1.9rem; }

  /* Stacked, full-width buttons are easier to hit than side-by-side ones. */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; padding-left: 1rem; padding-right: 1rem; }

  .cta-band .wrap { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .cta-band .hero-actions { width: 100%; }

  .contact-list li { flex-direction: column; gap: 0.3rem; }
  .contact-list .label { flex: none; }

  .card { padding: 1.6rem 1.35rem; }

  .footer-top, .footer-bottom { flex-direction: column; gap: 1rem; }
  .footer-nav { gap: 1.1rem; }

  .cookie { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; padding: 1rem; }
  .cookie .btn { width: 100%; text-align: center; }
}

/* Very small handsets (iPhone SE and similar). */
@media (max-width: 380px) {
  .brand span small { letter-spacing: 0.16em; }
  .nav { gap: 0.35rem; }
  .nav a { font-size: 0.72rem; letter-spacing: 0.06em; }
}

@media print {
  .site-header, .cookie, .cta-band, .hero::after { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- Profile card (contact page) ---------- */

.profile {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (max-width: 640px) {
  .profile { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

.profile-portrait {
  position: relative;
  width: 100%;
  max-width: 260px;
  /* Matches the source photo's own aspect ratio exactly, so object-fit:
     cover never has to crop it -- the whole frame (including the top of
     the head) is always shown, just scaled. */
  aspect-ratio: 680 / 804;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-3);
}
.profile-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  /* Slight desaturation + lift so a full-color outdoor photo sits calmly
     inside the site's dark, restrained palette instead of popping out. */
  filter: saturate(0.88) contrast(1.03);
  display: block;
}
.profile-portrait::after {
  /* Thin inner gold edge, echoing the accent used on .rule elsewhere. */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(200, 162, 74, 0.25);
  pointer-events: none;
}

.profile-name {
  margin: 0 0 0.15rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.profile-title {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.profile-bio {
  margin: 0;
  color: var(--fg-muted);
  font-size: 1rem;
  max-width: 46ch;
}
@media (max-width: 640px) {
  .profile-bio { max-width: none; }
}
