:root {
  --bg: #f0efe9;
  --surface: #e8e7e1;
  --border: #d8d7d0;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
  --max-w: 1080px;
  --radius: 6px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

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

.nav-links a { color: var(--text-muted); font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); }
.nav-link.nav-active {
  color: var(--text);
  background: var(--surface);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; }

/* Hero */
.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  padding: 6rem 2rem;
  border-bottom: 1px solid var(--border);
}

#hero-stripes {
  display: block;
  width: 100vw;
  height: 72px;
  pointer-events: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.hero-heading-top { margin-bottom: 0.5rem; }
.hero-heading-bottom { margin-top: 0.5rem; margin-bottom: 2rem; }

.hero-inner { max-width: 760px; margin: 0 auto; }

.accent { color: var(--accent); }

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 540px;
  line-height: 1.7;
}

/* Buttons */
@keyframes btn-fire {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  40%  { transform: scale(0.96); box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary.btn-firing { animation: btn-fire 0.25s ease-out; pointer-events: none; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

/* Sections */
.section { padding: 5rem 2rem; }
.section-alt { background: var(--surface); }

.container { max-width: var(--max-w); margin: 0 auto; }
.container-narrow { max-width: 680px; margin: 0 auto; }

.section h2 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.section p { color: var(--text-muted); margin-bottom: 1rem; }

/* Services list */
.services-list {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
}

.service-item {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.service-num {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.service-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.service-body p {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 560px;
  line-height: 1.65;
}

.about-detail {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* CTA section */
.cta-section { text-align: center; }
.cta-section p { margin-bottom: 2rem; }

/* Contact form */
.contact-section h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.contact-sub { color: var(--text-muted); margin-bottom: 2.5rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field label { font-size: 0.875rem; font-weight: 500; color: var(--text); }

.required { color: var(--accent); }

.field input,
.field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.15s;
  width: 100%;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea { resize: vertical; min-height: 120px; }

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(0, 200, 150, 0.1);
  border: 1px solid rgba(0, 200, 150, 0.3);
  color: #00c896;
}

.alert-error {
  background: rgba(224, 84, 84, 0.1);
  border: 1px solid rgba(224, 84, 84, 0.3);
  color: var(--danger);
}

/* HTMX loading indicator */
.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator { opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }

.btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.btn-primary.htmx-request {
  opacity: 0.8;
  pointer-events: none;
  cursor: not-allowed;
}

/* Under the Hood — dashboard */

/* Hero */
.uthood-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #0f172a 100%);
  padding: 4rem 2rem 3.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.uthood-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 90% at 75% 50%, rgba(37,99,235,0.2) 0%, transparent 65%);
  pointer-events: none;
}
.uthood-hero-inner { max-width: 640px; position: relative; }

.uthood-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 100px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.25rem;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #22c55e; }
  50%       { opacity: 0.55; box-shadow: 0 0 14px #22c55e; }
}
.uthood-hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1rem;
}
.uthood-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.75;
  max-width: 500px;
}

/* Section structure */
.uthood-body { padding-top: 3rem; }

.uthood-section-header { margin-bottom: 1.75rem; }

.uthood-eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.uthood-section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 580px;
}

.uthood-no-data {
  padding: 4rem 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
}
.no-data-icon { font-size: 2rem; margin-bottom: 1rem; }

/* Metric cards */
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
}
.metric-card--good {
  border-top-color: #16a34a;
  background: linear-gradient(175deg, rgba(22,163,74,0.06) 0%, var(--surface) 45%);
}
.metric-card--warn {
  border-top-color: #d97706;
  background: linear-gradient(175deg, rgba(217,119,6,0.06) 0%, var(--surface) 45%);
}
.metric-card--bad {
  border-top-color: #dc2626;
  background: linear-gradient(175deg, rgba(220,38,38,0.06) 0%, var(--surface) 45%);
}
.metric-value {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.metric-card--good .metric-value { color: #16a34a; }
.metric-card--warn .metric-value { color: #d97706; }
.metric-card--bad  .metric-value { color: #dc2626; }
.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.metric-sub { font-size: 0.72rem; color: var(--text-muted); }

/* Charts */
.uthood-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.chart-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.chart-title { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.chart-unit  { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.chart-canvas-wrap { position: relative; height: 130px; }

/* Hook panel */
.hook-panel {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 3rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(37,99,235,0.07) 0%, rgba(37,99,235,0.02) 100%);
  border: 1px solid rgba(37,99,235,0.18);
  border-radius: 10px;
  padding: 2.5rem 3rem;
  margin-bottom: 3rem;
}
.hook-donut-side { position: relative; }
.donut-svg { width: 100%; max-width: 170px; display: block; margin: 0 auto; }
.donut-track { stroke: var(--border); }
.donut-fill  { stroke: var(--accent); stroke-linecap: round; }
.donut-pct-text {
  font-size: 17px; font-weight: 700; fill: var(--accent);
  font-family: Inter, system-ui, sans-serif;
}
.donut-sub-text {
  font-size: 8.5px; fill: var(--text-muted); font-family: Inter, system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
}
.hook-headline {
  display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.3rem;
}
.hook-n {
  font-size: 3.5rem; font-weight: 700; letter-spacing: -0.04em; color: var(--accent); line-height: 1;
}
.hook-of-total { font-size: 1.1rem; color: var(--text-muted); }
.hook-context  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.hook-detail-row {
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(37,99,235,0.15);
  border-bottom: 1px solid rgba(37,99,235,0.15);
  margin-bottom: 1.25rem;
}
.hook-detail-val {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text);
}
.hook-detail-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted); font-weight: 600; margin-top: 0.15rem;
}
.hook-detail-divider { width: 1px; height: 2rem; background: rgba(37,99,235,0.2); flex-shrink: 0; }
.hook-why { font-size: 0.82rem; color: var(--text-muted); font-style: italic; line-height: 1.6; }

/* Reach / funnel */
.reach-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.5rem 3rem;
  margin-bottom: 1rem;
}
.funnel-step {
  text-align: center;
  padding: 1rem 1.75rem;
  border-radius: var(--radius);
}
.funnel-step--visitors {
  background: rgba(37,99,235,0.07);
  border: 1px solid rgba(37,99,235,0.18);
}
.funnel-step--engaged {
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.18);
}
.funnel-step--contact {
  background: rgba(22,163,74,0.07);
  border: 1px solid rgba(22,163,74,0.2);
}
.funnel-num {
  font-size: 2.5rem; font-weight: 700; letter-spacing: -0.04em; color: var(--text); line-height: 1;
}
.funnel-step--visitors .funnel-num { color: var(--accent); }
.funnel-step--engaged  .funnel-num { color: #7c3aed; }
.funnel-step--contact  .funnel-num { color: #16a34a; }
.funnel-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 600; color: var(--text-muted); margin-top: 0.35rem;
}
.funnel-arrow { font-size: 1.25rem; color: var(--border); flex-shrink: 0; }
.funnel-rate  { margin-left: auto; }
.rate-badge {
  background: rgba(22,163,74,0.1); border: 1px solid rgba(22,163,74,0.25);
  color: #16a34a; font-size: 0.85rem; font-weight: 700;
  padding: 0.5rem 1.25rem; border-radius: 100px; white-space: nowrap;
}

@media (max-width: 960px) {
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .uthood-charts { grid-template-columns: 1fr; }
  .hook-panel { grid-template-columns: 1fr; gap: 2rem; padding: 2rem; }
}
@media (max-width: 600px) {
  .metric-row { grid-template-columns: 1fr 1fr; }
  .metric-value { font-size: 1.6rem; }
  .hook-n { font-size: 2.5rem; }
  .reach-panel { flex-direction: column; align-items: flex-start; padding: 1.5rem; }
  .funnel-rate { margin-left: 0; }
}

/* Footer */
.site-footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 600px) {
  .site-nav { padding: 1rem; }
  .nav-links { gap: 1rem; }
  .hero { padding: 3rem 1rem; }
  .section { padding: 3rem 1rem; }
  .service-item { grid-template-columns: 2.5rem 1fr; gap: 1.5rem; }
}

/* Preserve dashboard colors in forced-colors / high-contrast mode (Opera, Windows HC) */
@media (forced-colors: active) {
  .uthood-hero,
  .uthood-live-badge,
  .metric-card,
  .chart-card,
  .hook-panel,
  .reach-panel,
  .funnel-step,
  .rate-badge,
  .nav-cta,
  .btn-primary,
  .btn-secondary {
    forced-color-adjust: none;
  }
}
