/* ==========================================================================
   CARMEAN INVESTIGATIONS LLC (carmeanpi.com)
   Brand Theme: Logo Crimson Red, Noir Black, Crisp White & Metallic Grey
   ========================================================================== */

:root {
  --bg-primary: #09090b;         /* Deep noir black */
  --bg-secondary: #121215;       /* Dark charcoal (matches logo vignette #141414) */
  --bg-card: #18181c;            /* Gunmetal card surface (matches logo #1a1a1a) */
  --bg-card-hover: #222228;      /* Lifted slate charcoal (matches logo #242424) */
  --border-color: #2e2e36;       /* Subtle metallic grey border */
  --border-accent-grey: #464652; /* Crisp medium grey accent */
  --border-focus: #c8143a;       /* Crimson focus border */
  --glow-red: rgba(180, 16, 51, 0.42);
  --accent-primary: #b41033;     /* Exact Carmean logo crimson red */
  --accent-secondary: #e11d48;   /* High-contrast bright crimson highlight */
  --accent-deep: #880b26;        /* Deep blood crimson */
  --accent-silver: #ccccc9;      /* Exact logo silver-grey ("INVESTIGATION" / "LLC") */
  --text-main: #ffffff;          /* Pure crisp white primary text */
  --text-muted: #a1a1aa;         /* Clean neutral grey secondary text */
  --terminal-bg: #050506;
  --terminal-text: #f4f4f5;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --max-width: 1220px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(circle at 16% 10%, rgba(180, 16, 51, 0.13) 0%, transparent 42%),
    radial-gradient(circle at 84% 22%, rgba(161, 161, 170, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #09090b 0%, #121215 50%, #09090b 100%);
  color: var(--text-main);
  overflow-x: hidden;
}

a {
  color: var(--accent-silver);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a:hover {
  color: #ffffff;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   TOP STATUS BAR & STICKY NAVIGATION
   ========================================================================== */

.top-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.45rem 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(180, 16, 51, 0.16);
  border: 1px solid rgba(225, 29, 72, 0.45);
  color: #ffffff;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 0 8px var(--accent-secondary);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-main);
  text-transform: uppercase;
  line-height: 1.15;
}

.brand-domain {
  font-size: 0.74rem;
  color: var(--accent-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--accent-silver);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-card);
  border-color: var(--border-accent-grey);
}

.nav-link.active {
  color: var(--text-main);
  background: linear-gradient(135deg, rgba(180, 16, 51, 0.32), rgba(34, 34, 40, 0.8));
  border: 1px solid rgba(225, 29, 72, 0.55);
  box-shadow: 0 0 14px rgba(180, 16, 51, 0.28);
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-accent-grey);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 1.15rem;
  cursor: pointer;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.45rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #c8143a, #880b26);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 16px rgba(180, 16, 51, 0.42);
}

.btn-primary:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #e11d48, #9f1239);
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(225, 29, 72, 0.6);
}

.btn-secondary {
  background: var(--bg-card);
  color: #ffffff;
  border: 1px solid var(--border-accent-grey);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: #ffffff;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 14px rgba(180, 16, 51, 0.28);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(180, 16, 51, 0.18);
  border: 1px solid rgba(225, 29, 72, 0.48);
  color: #ffffff;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ==========================================================================
   HERO & MEDIA SHOWCASE
   ========================================================================== */

.hero-section {
  padding: 4rem 0 3.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 2.25rem;
  align-items: center;
}

.eyebrow {
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.15rem, 4.2vw, 3.45rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.15rem;
  color: var(--text-main);
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 10%, #e11d48 58%, #b41033 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--accent-silver);
  margin-bottom: 1.85rem;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  margin-bottom: 2rem;
}

.logo-showcase-card {
  position: relative;
  width: 100%;
  background: #0d0d10;
  border: 1px solid var(--border-accent-grey);
  border-top: 2px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.65), 0 0 24px rgba(180, 16, 51, 0.2);
}

.logo-showcase-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 896 / 372;
  object-fit: contain;
  display: block;
  background: #0d0d10;
}

/* ==========================================================================
   STAT STRIP & CARDS
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin: 1rem 0 3.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.25rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent-grey);
  border-top-color: var(--accent-secondary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 500;
}

.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  max-width: 720px;
  margin-bottom: 2.25rem;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--text-main);
  margin: 0.55rem 0 0.65rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.35rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 16px rgba(180, 16, 51, 0.18);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(180, 16, 51, 0.18);
  border: 1px solid rgba(225, 29, 72, 0.45);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: var(--text-main);
}

.card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 1.15rem;
}

/* ==========================================================================
   PAGE HERO BANNER (SUBPAGES)
   ========================================================================== */

.page-banner {
  padding: 3rem 0 2.4rem;
  background: linear-gradient(180deg, #16161a 0%, #09090b 100%);
  border-bottom: 1px solid var(--border-color);
}

.page-banner h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 800;
  margin: 0.6rem 0 0.65rem;
  color: #ffffff;
}

.page-banner p {
  color: var(--accent-silver);
  max-width: 68ch;
  font-size: 1.02rem;
}

/* ==========================================================================
   SERVICES & FEE SCHEDULE TABLES + FILTER TABS
   ========================================================================== */

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-btn {
  background: var(--bg-card);
  color: var(--accent-silver);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
  border-color: var(--border-accent-grey);
}

.tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #b41033, #7a0b22);
  border: 1px solid var(--accent-secondary);
  box-shadow: 0 0 14px rgba(180, 16, 51, 0.35);
}

.search-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent-grey);
  color: var(--text-main);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  min-width: 260px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 12px var(--glow-red);
}

.fee-category-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.65rem;
  overflow: hidden;
}

.fee-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.15rem 1.5rem;
  background: linear-gradient(90deg, rgba(180, 16, 51, 0.22), rgba(24, 24, 28, 0.95));
  border-bottom: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
}

.fee-category-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

.fee-list {
  list-style: none;
}

.fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid rgba(46, 46, 54, 0.8);
  transition: background 0.15s ease;
}

.fee-row:last-child {
  border-bottom: none;
}

.fee-row:hover {
  background: var(--bg-card-hover);
}

.fee-service-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.fee-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.fee-price {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  background: #0d0d10;
  border: 1px solid var(--border-accent-grey);
  border-left: 3px solid var(--accent-primary);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

/* ==========================================================================
   INVESTIGATOR BIO LAYOUT
   ========================================================================== */

.bio-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}

.bio-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent-grey);
  border-top: 3px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.bio-profile-body {
  padding: 1.5rem;
}

.credential-list {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.credential-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-main);
}

.bio-narrative p {
  color: #f4f4f5;
  font-size: 1.03rem;
  margin-bottom: 1.35rem;
  line-height: 1.8;
}

.bio-quote {
  background: var(--bg-card);
  border-left: 4px solid var(--accent-primary);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.35rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.75rem 0;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.02rem;
}

/* ==========================================================================
   INTAKE / SERVICE REQUEST FORM & TERMINAL CONFIRMATION
   ========================================================================== */

.intake-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 2rem;
  align-items: start;
}

.hero-grid > *,
.bio-layout > *,
.intake-layout > *,
.cards-grid-3 > *,
.cards-grid-2 > *,
.stats-grid > *,
.footer-grid > * {
  min-width: 0;
  max-width: 100%;
}

.intake-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.35rem;
  min-width: 0;
}

.form-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
}

.form-section-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-primary);
  padding-left: 0.65rem;
  padding-bottom: 0.45rem;
  margin: 1.65rem 0 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-section-title:first-child {
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  min-width: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-label .req {
  color: var(--accent-secondary);
}

.form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-accent-grey);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.72rem 0.95rem;
  font-size: 0.95rem;
  font-family: inherit;
  text-overflow: ellipsis;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-submit-row {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-control::placeholder {
  color: #71717a;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 12px var(--glow-red);
}

textarea.form-control {
  min-height: 135px;
  resize: vertical;
}

.rate-preview-box {
  background: #0d0d10;
  border: 1px solid var(--border-accent-grey);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--terminal-text);
  font-size: 0.86rem;
  margin-top: 0.35rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--accent-silver);
}

.checkbox-row input[type="checkbox"] {
  margin-top: 0.22rem;
  accent-color: var(--accent-primary);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.terminal-receipt {
  background: #0a0a0c;
  border: 1px solid var(--accent-primary);
  box-shadow: 0 0 24px rgba(180, 16, 51, 0.3);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--terminal-text);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-top: 1.5rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.receipt-actions {
  margin-top: 1.15rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.terminal-cursor {
  display: inline-block;
  width: 9px;
  height: 15px;
  background: var(--accent-secondary);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.footer-heading {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
  border-left: 3px solid var(--accent-primary);
  padding-left: 0.55rem;
  margin-bottom: 0.85rem;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-bottom {
  padding-top: 1.35rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLETS & PHONES)
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid,
  .bio-layout,
  .intake-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.65rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .container {
    padding: 0 1rem;
  }

  /* Compact single-line mobile top status bar */
  .top-bar {
    padding: 0.35rem 0;
  }

  .top-bar-inner {
    justify-content: center;
  }

  .top-bar-inner > div:nth-child(2) {
    display: none;
  }

  .status-pill {
    font-size: 0.67rem;
    padding: 0.18rem 0.6rem;
    letter-spacing: 0.03em;
    max-width: 100%;
    text-align: center;
  }

  /* Compact sticky mobile navigation & touch drawer */
  .nav-inner {
    min-height: 62px;
    gap: 0.5rem;
  }

  .brand-title {
    font-size: 0.9rem;
    letter-spacing: 0.04em;
  }

  .brand-domain {
    font-size: 0.68rem;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 1.25rem;
    flex-shrink: 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    background: rgba(14, 14, 18, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--accent-primary);
    padding: 0.9rem 1rem 1.15rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li,
  .nav-links .nav-link,
  .nav-links .btn {
    width: 100%;
    justify-content: center;
    min-height: 46px;
    font-size: 0.95rem;
  }

  /* Hero & Page Banners */
  .hero-section {
    padding: 1.5rem 0 2rem;
  }

  .hero-grid {
    gap: 1.35rem;
  }

  .logo-showcase-card {
    order: -1;
    border-radius: var(--radius-md);
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.16;
    margin-bottom: 0.85rem;
  }

  .hero-lead {
    font-size: 0.96rem;
    line-height: 1.6;
    margin-bottom: 1.35rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 1.25rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0 1.5rem;
  }

  .stat-card {
    padding: 0.95rem 0.85rem;
  }

  .stat-value {
    font-size: 1.35rem;
  }

  .stat-label {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .section {
    padding: 2rem 0;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .page-banner {
    padding: 1.6rem 0 1.35rem;
  }

  .page-banner h1 {
    font-size: 1.52rem;
    line-height: 1.2;
    margin: 0.5rem 0 0.5rem;
  }

  .page-banner p {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .badge {
    font-size: 0.68rem;
    padding: 0.24rem 0.62rem;
  }

  /* Single-column grids */
  .cards-grid-3,
  .cards-grid-2,
  .form-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.95rem;
  }

  .card {
    padding: 1.25rem 1.1rem;
  }

  /* Services filter toolbar & fee rows */
  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .category-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
  }

  .category-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
    padding: 0.45rem 0.85rem;
  }

  .search-input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    font-size: 16px; /* Prevents iOS Safari zoom on tap */
  }

  .fee-category-header {
    padding: 0.95rem 1rem;
  }

  .fee-category-header h2 {
    font-size: 1.02rem;
  }

  .fee-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
  }

  .fee-right {
    width: 100%;
    justify-content: space-between;
    gap: 0.65rem;
  }

  /* Intake Form (iOS/Android touch-optimized, zero horizontal overflow, zero focus zoom) */
  .form-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }

  .form-section-title {
    font-size: 0.9rem;
    margin: 1.35rem 0 0.9rem;
    line-height: 1.35;
  }

  .form-control {
    font-size: 16px; /* Prevents iOS Safari zoom on tap */
    min-height: 48px;
    padding: 0.72rem 0.85rem;
  }

  textarea.form-control {
    min-height: 125px;
  }

  .rate-preview-box {
    font-size: 0.8rem;
    padding: 0.8rem 0.9rem;
    word-break: break-word;
  }

  .checkbox-row {
    padding: 0.85rem;
    font-size: 0.83rem;
    line-height: 1.5;
  }

  .checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  .form-submit-row {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.85rem;
  }

  .form-submit-row .btn {
    width: 100%;
    min-height: 50px;
    font-size: 0.98rem;
  }

  .form-submit-row > span {
    text-align: center;
  }

  /* Confirmation Receipt */
  .terminal-receipt {
    padding: 1.1rem 1rem;
    font-size: 0.81rem;
    line-height: 1.6;
    margin-top: 0.5rem;
  }

  .receipt-actions {
    flex-direction: column;
  }

  .receipt-actions .btn {
    width: 100%;
    min-height: 46px;
  }

  /* Bio & Footer Safe Area (clears iOS Safari bottom floating bar) */
  .bio-profile-body {
    padding: 1.15rem 1rem;
  }

  .bio-quote {
    padding: 1.05rem 1.1rem;
    font-size: 0.95rem;
  }

  .site-footer {
    padding: 2.25rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 370px) {
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand-title {
    font-size: 0.82rem;
  }
}
