/* Ambia tool suite — shared with the main Ambia identity. */
:root {
  --cream: #ffffff;
  --cream-2: #f7f7f4;
  --paper: #ffffff;
  --ink: #050505;
  --muted-ink: #555555;
  --copper: #c0272d;
  --acid-beige: rgba(192,39,45,0.075);
  --rule: #050505;
  --rule-soft: #d8d8d8;
  --red: #c0272d;
  --red-bright: #e3262e;
  --red-dark: #8b1a1e;
  --site-header-height: 72px;
  --notice-height: 0px;
  --container: 1240px;
}

html { background: #fff; }

body,
.tool-site,
.planner-site,
.projection-site,
.directory-site {
  color: var(--ink);
  background: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
}

body::before {
  z-index: 0;
  opacity: 1;
  background:
    radial-gradient(circle at 78% 18%, rgba(192,39,45,0.075), transparent 0 18%, transparent 30%),
    linear-gradient(90deg, rgba(5,5,5,0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5,5,5,0.035) 1px, transparent 1px);
  background-size: clamp(42px,6vw,86px) clamp(42px,6vw,86px);
  mask-image: linear-gradient(90deg,rgba(0,0,0,0.9),rgba(0,0,0,0.1) 68%,transparent);
  mix-blend-mode: normal;
}

.site-shell { position: relative; z-index: 1; padding-top: var(--site-header-height); }

.site-header {
  top: 0;
  height: var(--site-header-height);
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid #d8d8d8;
  box-shadow: inset 3px 0 0 var(--red);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(1rem,2vw,1.2rem);
  letter-spacing: -0.045em;
  text-transform: none;
}

.brand .brand-mark {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  object-fit: contain;
}

.nav-link,
.button,
.eyebrow,
.section-kicker,
.result-tag,
.control-label,
.legal-links,
.disclaimer,
.directory-site label,
.tool-stage,
.tool-tags,
.tool-link {
  font-family: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
}

h1,
h2,
h3,
.hero-result,
.planner-metric strong,
.directory-stats strong,
.tool-monogram {
  font-family: 'Archivo Black', 'Arial Black', 'Inter', sans-serif;
  font-weight: 400;
}

h1,
h2 {
  color: var(--ink);
  letter-spacing: -0.045em;
  line-height: 0.94;
  text-shadow: none;
  text-transform: none;
  overflow-wrap: normal;
  text-wrap: balance;
}

.tool-site h1,
.planner-site h1,
.projection-site h1,
.directory-site h1 {
  font-size: clamp(52px,7.6vw,112px);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.tool-site h2,
.planner-site h2,
.projection-site h2,
.directory-site h2 {
  font-size: clamp(42px,5.4vw,76px);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.eyebrow,
.section-kicker { color: var(--red); background: transparent; padding: 0; }

.button,
.nav-actions .button {
  min-height: 44px;
  padding: 12px 22px;
  color: #fff;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 0;
  box-shadow: none;
  font-size: 0.75rem;
}

.button:hover,
.button:focus-visible,
.nav-actions .button:hover,
.nav-actions .button:focus-visible {
  color: #fff;
  background: var(--red-dark);
  border-color: var(--red-dark);
  box-shadow: none;
  transform: translateY(-1px);
}

.tools-menu summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 2px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color 120ms ease, border-color 120ms ease;
}

@media (max-width: 720px) {
  .tools-menu summary { font-size: 0.6875rem; }
  .nav-actions .button { font-size: 0.6875rem; }
}

.tools-menu summary::after {
  content: "▾";
  color: var(--red);
  font-size: 0.72rem;
  transform: none;
}

.tools-menu[open] summary::after { transform: rotate(180deg); }

.tools-menu summary:hover,
.tools-menu summary:focus-visible {
  color: var(--red);
  background: transparent;
  border-bottom-color: var(--red);
  outline: none;
}

.tools-menu-panel {
  top: calc(var(--site-header-height) - 1px);
  min-width: 290px;
  padding: 8px;
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--ink);
  box-shadow: 10px 10px 0 rgba(192,39,45,0.18);
}

.tools-menu-panel a {
  color: var(--muted-ink);
  border-bottom-color: #d8d8d8;
}
.tools-menu-panel a:hover,
.tools-menu-panel a:focus-visible,
.tools-menu-panel a[aria-current='page'] {
  color: #fff;
  background: var(--red);
}

.tool-hero,
.planner-hero,
.projection-hero,
.directory-hero {
  background:
    radial-gradient(circle at 82% 18%,rgba(192,39,45,0.1),transparent 0 16%,transparent 28%),
    linear-gradient(90deg,rgba(5,5,5,0.04) 1px,transparent 1px),
    linear-gradient(180deg,rgba(5,5,5,0.035) 1px,transparent 1px),
    #fff;
  background-size: auto,72px 72px,72px 72px,auto;
  border-bottom: 1px solid var(--ink);
  box-shadow: inset 3px 0 0 var(--red);
}

.tool-hero::after,
.planner-hero::after,
.projection-hero::after,
.directory-hero::before { opacity: 0.16; }

.privacy-note,
.planner-note,
.projection-note,
.directory-note {
  color: var(--muted-ink);
  background: rgba(192,39,45,0.075);
  border-color: var(--red);
}

.calculator-section,
.planner-model,
.projection-model,
.directory-results { background-color: #fff; }

.input-panel,
.result-card,
.planner-panel,
.planner-control,
.channel-card,
.projection-panel,
.projection-metric,
.directory-card,
.search-field,
.tool-logo-frame,
.empty-state {
  background: rgba(255,255,255,0.96);
  border-color: var(--ink);
  border-radius: 0;
  box-shadow: 8px 8px 0 rgba(192,39,45,0.2);
}

.result-card-inverse,
.planner-metric,
.projection-metric.is-dark,
.channel-rank,
.tool-monogram,
.tool-link,
#result-count {
  color: #fff;
  background: var(--ink);
}

.planner-metric.is-light,
.projection-metric.is-light,
.blended-panel { color: var(--ink); background: var(--paper-soft, #f7f7f4); }

input[type='range'] { accent-color: var(--red); }
.segmented-control button[aria-pressed='true'],
.planner-segmented button[aria-pressed='true'],
.projection-toggle button.is-active,
.category-filter.is-active { color: #fff; background: var(--red); }

.model-readout,
.projection-callout,
.feasibility-callout { border-left-color: var(--red); }

.result-tag,
.tool-stage { border-color: var(--red); }

.tool-cta,
.planner-cta,
.projection-cta,
.directory-cta {
  color: #fff;
  background: var(--ink);
  border-top-color: var(--ink);
  box-shadow: inset 3px 0 0 var(--red);
}

.tool-cta h2,
.planner-cta h2,
.projection-cta h2,
.directory-cta h2 { color: #fff; }

.tool-cta .section-kicker,
.planner-cta .section-kicker,
.projection-cta .section-kicker,
.directory-cta .section-kicker { color: #ff4b50; }

.footer,
.tool-site .footer,
.planner-site .footer,
.projection-site .footer,
.directory-site .footer {
  color: var(--ink);
  background: #fff;
  border-top: 1px solid var(--ink);
  box-shadow: inset 3px 0 0 var(--red);
}
.footer a { color: var(--ink); }

@media (max-width: 720px) {
  .site-header,
  .tool-hero,
  .planner-hero,
  .projection-hero,
  .directory-hero,
  .tool-cta,
  .planner-cta,
  .projection-cta,
  .directory-cta,
  .footer { box-shadow: inset 2px 0 0 var(--red); }

  .brand .brand-mark { width: 23px; height: 23px; }
  .tools-menu-panel {
    top: calc(var(--site-header-height) - 1px + env(safe-area-inset-top, 0px));
    right: 14px;
    left: 14px;
    width: auto;
    max-height: calc(100dvh - var(--site-header-height) - 14px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .tool-site h1,
  .planner-site h1,
  .projection-site h1,
  .directory-site h1 { font-size: clamp(38px,12vw,58px); line-height: 0.95; }
  .tool-site h2,
  .planner-site h2,
  .projection-site h2,
  .directory-site h2 { font-size: clamp(34px,10vw,48px); }
}
