/* ==========================================================================
   Bradcerb.com — brand stylesheet
   Layered on top of Bootstrap. Design: brutalist orange/black/blue with
   8-bit pixel motifs, hard offset shadows, zero border-radius.
   Fonts: Inter (body + hero display) + Space Grotesk (UI + headings).
   ========================================================================== */

:root {
  --ink: #030712;          /* near-black text */
  --night: #212121;        /* night band / "I AM BRAD" */
  --orange: #f97316;       /* primary buttons */
  --orange-band: #e86716;  /* day band + pixel blocks */
  --blue: #0e74c8;         /* polaroid card */
  --blue-duotone: #1798e9; /* duotone overlay */
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;

  --wrap: 1296px;          /* 1248 content + 24 padding each side = Figma grid */
  --pad-x: 24px;
  --section-y: 96px;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);

  --shadow-sm: 2px 2px 0 0 #000;
  --shadow-md: 4px 4px 0 0 #000;
  --shadow-pill: 1.4px 1.4px 0 0 #000;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; }

/* Content width matching the Figma 1280px container. */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section { padding-block: var(--section-y); }

/* --- Typography ----------------------------------------------------------- */
.tagline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  width: fit-content;     /* hug the words, even inside a stretch flex column */
  max-width: 100%;
  padding-inline: 10px;
  background: #fff;
  color: var(--ink);      /* keep dark text on light-text sections (e.g. cityscape) */
  border: 1px solid #000;
  box-shadow: var(--shadow-pill);
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.display-hero {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 3.75rem); /* up to 60px */
  line-height: 1;
  letter-spacing: -1px;
  text-transform: uppercase;
  margin: 0;
}

.heading-xl {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem); /* up to 48px */
  line-height: 1;
  letter-spacing: -1px;
  text-transform: uppercase;
  margin: 0;
}

.heading-lg {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem); /* up to 36px */
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0;
}

.lead-body { font-size: 18px; line-height: 28px; color: var(--muted); }
.lead-body strong { color: var(--ink); font-family: var(--display); }

/* --- Buttons -------------------------------------------------------------- */
.btn-brand,
.btn-ghost {
  --bs-btn-border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 8px 16px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-brand {
  background: var(--orange);
  color: #f9fafb;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 0 #000;   /* matches the Figma button component */
}
.btn-brand:hover { color: #fff; transform: translate(1px, 1px); box-shadow: 1px 1px 0 0 #000; }
.btn-brand:active { transform: translate(2px, 2px); box-shadow: 0 0 0 0 #000; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--orange); }
.btn-ghost svg { width: 16px; height: 16px; }

.btn-brand.on-dark { box-shadow: 3px 3px 0 0 #fff; }
.btn-ghost.on-dark { color: #fff; }
.btn-ghost.on-dark:hover { color: var(--orange); }

/* --- Pixel "dissolve" strips --------------------------------------------- */
/* Rendered as a viewBox SVG so the 68x59 pixel grid stays exact at 1440 and
   scales proportionally on every viewport (no distortion). */
.band-top { position: relative; }
.dissolve {
  position: absolute; left: 0; width: 100%;
  line-height: 0; pointer-events: none; z-index: 5;
}
.dissolve svg { display: block; width: 100%; height: auto; }
.band-top > .dissolve { top: 100%; }   /* drips down from the band's bottom edge */
.cityscape > .dissolve { top: 0; }     /* white pixels melt into the cityscape top */

/* ==========================================================================
   Navbar
   ========================================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.navbar-brand.brand-mark {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.site-header .nav-link {
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--ink);
}
.site-header .nav-link:hover,
.site-header .nav-link.active { color: var(--orange); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero .hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 992px) {
  .hero .hero-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}

.hero-copy { display: flex; flex-direction: column; gap: 32px; align-items: flex-start; }
.hero-title-block { display: flex; flex-direction: column; gap: 24px; }

/* Polaroid card */
.polaroid-wrap { display: flex; justify-content: center; }
.polaroid {
  background: var(--blue);
  border: 1px solid #000;
  box-shadow: 20px 20px 0 0 #000;
  padding: 14px;
  transform: rotate(2.5deg);
  max-width: 520px;
  width: 100%;
}
.polaroid .frame {
  background: #f9fafb;
  border: 1px solid var(--border);
  padding: 6px;
}
.polaroid img { display: block; width: 100%; height: auto; }
@media (min-width: 992px) {
  .polaroid { box-shadow: 26px 26px 0 0 #000; }
}

/* ==========================================================================
   Day / Night split band
   ========================================================================== */
.band { position: relative; overflow: hidden; }
.band-split { display: grid; grid-template-columns: 1fr 1fr; }
.band-half {
  position: relative;
  min-height: 278px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 48px;
  color: #fff;
}
.band-half.day { background: var(--orange-band); }
.band-half.night { background: var(--night); }
.band-half .band-icon { width: 62px; height: 62px; margin-bottom: 16px; }
.band-half .heading-xl { color: #fff; }

.band-seam {
  position: relative;
  background: #fff;
  z-index: 2;
  text-align: center;
}
.i-am-brad {
  color: var(--night);
  padding: 118px 16px 0;
  margin: 0;
}
.band-seam .seam-sub {
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--ink);
  padding: 8px 16px 0;
  margin: 0;
}

/* Small screens: stack the split (side-by-side text overflows on phones) and
   drop the dissolve, which only reads against the orange|black split. */
@media (max-width: 639.98px) {
  .band-split { grid-template-columns: 1fr; }
  .band-half { min-height: 200px; padding: 40px 24px; }
  .band-top > .dissolve { display: none; }
  .i-am-brad { padding-top: 56px; }
}

/* ==========================================================================
   Rock RMS feature
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 992px) {
  .feature-grid { grid-template-columns: 548px 1fr; gap: 64px; }
}
.feature-copy { display: flex; flex-direction: column; gap: 32px; align-items: flex-start; }
.feature-title { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.feature-copy .body { font-size: 16px; line-height: 28px; color: var(--muted); margin: 0; }

/* Grey bust + a single blue rectangle set to mix-blend-difference.
   Over the white stage it renders orange (#e86716); over the grey
   bust it renders electric blue/purple — exactly as in the Figma. */
.bust-stage {
  position: relative;
  width: 100%; max-width: 548px;
  aspect-ratio: 548 / 468;
  background: #fff;
  isolation: isolate;
  overflow: hidden;
  margin-inline: auto;
}
/* Exact reproduction of the Figma image crop (img scaled 141.2%, offset
   -20.6% / -5.2% inside a 548x468 frame — all relative so it stays exact). */
.bust-stage .bust-img {
  position: absolute;
  width: 141.2%; height: auto; max-width: none;
  left: -20.6%; top: -5.2%;
}
/* Rectangle 19: blue, mix-blend-difference -> orange over white, electric
   blue/purple over the grey bust. left 12/548, top 283.9/468, 508x199. */
.bust-stage .diff-band {
  position: absolute;
  left: 2.19%; top: 18.14%;     /* 84.91/468 — band sits across the face */
  width: 92.70%; height: 42.52%; /* 199/468 */
  background: var(--blue-duotone);
  mix-blend-mode: difference;
}

/* Generic duotone (used elsewhere) */
.duotone { position: relative; background: var(--blue); overflow: hidden; }
.duotone img {
  display: block; width: 100%; height: auto;
  mix-blend-mode: luminosity;
  filter: grayscale(1) contrast(1.05);
}

/* ==========================================================================
   Cityscape full-bleed
   ========================================================================== */
.cityscape {
  position: relative;
  background: var(--blue);
  color: #fff;
  overflow: hidden;
}
.cityscape .city-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  mix-blend-mode: luminosity;
  filter: grayscale(1) contrast(1.1);
  opacity: 0.85;
  pointer-events: none;
}
.cityscape .city-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  text-align: center;
  padding-top: 150px;
  padding-bottom: 120px;
}
.cityscape .heading-lg,
.cityscape .city-sub { color: #fff; max-width: 640px; }
.cityscape .city-sub { font-size: 18px; line-height: 28px; }

/* ==========================================================================
   Statement (black) band
   ========================================================================== */
.statement {
  background: var(--night);
  color: #fff;
}
.statement .statement-inner {
  max-width: 760px; margin-inline: auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}
.statement .statement-text {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.25;
  margin: 0;
}
.statement .statement-actions {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: center;
}
.statement .socials { display: flex; gap: 24px; }
.statement .socials a { color: #fff; }
.statement .socials a:hover { color: var(--orange); }
.statement .socials svg { width: 24px; height: 24px; }

/* ==========================================================================
   Newsletter CTA + email mockup
   ========================================================================== */
.newsletter-grid {
  display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center;
}
@media (min-width: 992px) {
  .newsletter-grid { grid-template-columns: 1fr 1fr; }
}
.newsletter-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }

.subscribe-form { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 460px; }
.subscribe-names { display: flex; gap: 12px; }
.subscribe-names input {
  flex: 1; min-width: 0; height: 40px;
  border: 1px solid #000; padding: 8px 12px;
  font-family: var(--sans); border-radius: 0;
}
.subscribe-row { display: flex; gap: 0; }
.subscribe-form input[type="email"] {
  flex: 1; min-width: 0;
  height: 40px;
  border: 1px solid #000;
  border-right: 0;
  padding: 8px 12px;
  font-family: var(--sans);
  border-radius: 0;
}
.subscribe-form input:focus { outline: 2px solid var(--orange); outline-offset: -2px; }
.subscribe-form .btn-brand { box-shadow: none; border-left: 0; white-space: nowrap; }
.subscribe-form .btn-brand:hover { transform: none; }

/* Email-client mockup framed by a chunky orange pixel border (recreated in CSS) */
.mock-wrap { position: relative; display: flex; justify-content: center; padding: 28px; }
.email-frame {
  position: relative;
  width: 100%; max-width: 470px;
  background: var(--orange);
  padding: 26px;
}
/* scattered pixel squares around the orange frame for the 8-bit look */
.email-frame .px {
  position: absolute; width: 38px; height: 33px; background: var(--orange);
}
.email-frame .px.a { top: -26px; left: 18%; }
.email-frame .px.b { top: -18px; right: 12%; width: 30px; height: 26px; }
.email-frame .px.c { bottom: -30px; left: 8%; }
.email-frame .px.d { bottom: -20px; left: 22%; width: 30px; height: 26px; }
.email-frame .px.e { bottom: -34px; right: 16%; }
.email-frame .px.f { top: 30%; right: -22px; width: 30px; height: 26px; }
.email-frame .px.g { top: 14%; left: -20px; width: 26px; height: 24px; }

.email-card {
  position: relative; z-index: 1;
  background: #fff;
}
.email-card .bar {
  background: var(--orange);
  color: #fff;
  padding: 12px 16px;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.email-card .body { padding: 18px; font-size: 13.5px; line-height: 22px; color: #374151; }
.email-card .body p { margin: 0 0 12px; }
.email-card .mock-btn {
  display: inline-block; background: var(--orange); color: #fff;
  font-family: var(--display); font-weight: 500; font-size: 13px;
  padding: 7px 16px; margin: 2px 0 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #6b7280; color: #f3f4f6; }
.site-footer a { color: #f3f4f6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-mark { color: #fff; font-family: var(--display); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.site-footer .footer-top,
.site-footer .footer-bottom { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer .footer-nav a { font-family: var(--display); font-weight: 500; font-size: 14px; text-transform: uppercase; }
.site-footer .sep { border: 0; border-top: 1px solid rgba(255,255,255,.15); margin: 32px 0; }
.site-footer .socials { display: flex; gap: 24px; }
.site-footer .socials svg { width: 22px; height: 22px; }
.site-footer .legal { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; }

/* ==========================================================================
   Blog / Markdown post body
   ========================================================================== */
.post-body { font-size: 1.0625rem; line-height: 1.75; }
.post-body h2 { font-family: var(--display); text-transform: uppercase; margin-top: 2.5rem; margin-bottom: 1rem; }
.post-body pre { background: #0d1117; color: #e6edf3; padding: 1rem 1.25rem; overflow-x: auto; }
.post-body :not(pre) > code { background: #f1f3f5; padding: 0.15em 0.4em; font-size: 0.9em; }
.post-body blockquote { border-left: 4px solid var(--orange); padding-left: 1.25rem; color: var(--muted); font-style: italic; }

.card-brand { border: 1px solid #000; box-shadow: var(--shadow-sm); background: #fff; }

/* ==========================================================================
   Inner pages (Projects / Blog / About / Contact)
   ========================================================================== */
.page-hero { padding-top: 80px; padding-bottom: 32px; }
.page-hero .heading-xl { margin-top: 16px; }
.page-hero .lead-body { margin-top: 16px; max-width: 640px; }

.brand-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 576px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .brand-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.brand-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #000; box-shadow: var(--shadow-md);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.brand-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 #000; }
.brand-card .card-pad { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.brand-card .card-title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: 1.25rem; line-height: 1.2; margin: 0;
}
.brand-card .card-title a { text-decoration: none; }
.brand-card .card-title a:hover { color: var(--orange); }
.brand-card .card-meta { color: var(--muted); font-size: 13px; font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; }
.brand-card .card-text { color: var(--muted); flex: 1; }

.pill-tag {
  display: inline-block; border: 1px solid #000; background: #fff;
  font-family: var(--display); font-size: 12px; text-transform: uppercase;
  padding: 2px 8px; margin-right: 6px;
}

/* Brand form (contact) */
.brand-form label { font-family: var(--display); font-weight: 500; text-transform: uppercase; font-size: 13px; }
.brand-form .field {
  width: 100%; border: 1px solid #000; padding: 10px 12px; font-family: var(--sans);
  border-radius: 0; background: #fff;
}
.brand-form .field:focus { outline: 2px solid var(--orange); outline-offset: -2px; }

/* Markdown prose container for About + legal pages */
.prose { max-width: 760px; }
.prose h1 { font-family: var(--display); text-transform: uppercase; letter-spacing: -1px; }
.prose h2 { font-family: var(--display); text-transform: uppercase; margin-top: 2.25rem; }
.prose a { color: var(--orange); }

/* --- Form status + animation reveal -------------------------------------- */
.form-status.is-success { color: #198754; }
.form-status.is-error { color: #dc3545; }

.js [data-animate] { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .js [data-animate] { opacity: 1; } }
