/* ============================================================
   Build with Baker | styles.css
   Brand: #2B4A8B primary | #A07020 accent | #526070 neutral
   Background: #d8dde5 | Cards: #f1eee5 (warm cream)
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary:    #2B4A8B;
  --color-primary-dk: #1e3a61;
  --color-accent:     #A07020;
  --color-accent-lt:  #c48f30;
  --color-neutral:    #526070;
  --color-bg:         #d8dde5;
  --color-card:       #f1eee5;
  --color-text:       #1a2430;
  --color-text-muted: #526070;
  --color-border:     #cfc9bd;
  --color-on-primary: #f5f3ec;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  --radius:    8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.07);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);

  --max-w: 1100px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover { color: var(--color-primary-dk); }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p { color: var(--color-text-muted); }

/* Scoped: only headings use <em> as a brand-accent. Body prose <em> stays
   default-italic so any future emphasized text reads normally. */
h1 em, h2 em {
  font-style: normal;
  color: var(--color-accent);
}

/* --- Buttons --- */
.btn-primary,
.btn-secondary,
.btn-nav {
  display: inline-block;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-size: .925rem;
  font-weight: 600;
  transition: background .18s, color .18s, box-shadow .18s, transform .12s;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #f5f3ec;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-dk);
  color: #f5f3ec;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #f5f3ec;
}

.btn-accent {
  background: var(--color-accent);
  color: #f5f3ec;
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
  background: #8a6018;
  color: #f5f3ec;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Secondary text link for hero / inline CTAs */
.text-link {
  display: inline-block;
  font-size: .95rem;
  font-weight: 600;
  color: var(--color-primary);
  padding: .65rem 0;
  transition: color .15s, transform .12s;
}

.text-link:hover {
  color: var(--color-accent);
  transform: translateX(2px);
}

/* --- Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(241,238,229,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

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

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -.01em;
}

.nav-logo:hover { color: var(--color-primary-dk); }

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

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-neutral);
  transition: color .15s;
}

.nav-links a:hover { color: var(--color-primary); }

.btn-nav {
  background: var(--color-primary);
  color: #f5f3ec !important;
  padding: .45rem 1.1rem;
  border-radius: var(--radius);
  font-size: .875rem !important;
}

.btn-nav:hover {
  background: var(--color-primary-dk);
  color: #f5f3ec !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--color-neutral);
}

/* --- Hero --- */
.hero {
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
}

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.hero h1 {
  max-width: 680px;
  margin-bottom: 1.25rem;
}

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

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

/* --- About Strip --- */
.about-strip {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-text h2 { margin-bottom: 1rem; }
.about-text p { margin-bottom: .85rem; }
.about-text p:last-child { margin-bottom: 0; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-accent);
}

.stat-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
}

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

/* --- Work / Cards Section --- */
.work {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

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

.section-header h2 { margin-bottom: .5rem; }

.section-header p {
  font-size: 1.05rem;
  max-width: 520px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: #f5ead8;
  border-radius: 4px;
  padding: .2rem .55rem;
  width: fit-content;
}

.card-tag-live {
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.card-tag-dev {
  color: var(--color-text-muted);
  background: #e2e0d8;
}

.card h3 { margin: 0; }

.card p { font-size: .925rem; flex: 1; }

.card-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: .25rem;
  display: inline-block;
  transition: gap .15s;
}

.card-link:hover { color: var(--color-accent); }

/* --- CTA Band --- */
.cta-band {
  background: var(--color-primary);
  padding: clamp(3rem, 6vw, 5rem) 0;
  text-align: center;
}

.cta-band h2 {
  color: #f5f3ec;
  margin-bottom: .75rem;
}

.cta-band p {
  color: rgba(245,243,236,.75);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.cta-band .btn-primary {
  background: var(--color-accent);
  font-size: 1rem;
  padding: .8rem 2rem;
}

.cta-band .btn-primary:hover { background: var(--color-accent-lt); }

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--color-border);
}

.page-hero .eyebrow { margin-bottom: .6rem; }
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: .75rem; }
.page-hero p { font-size: 1.1rem; max-width: 560px; }

/* --- Content sections (inner pages) --- */
.content-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.content-section + .content-section {
  border-top: 1px solid var(--color-border);
}

/* --- Contact Page Grid --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 900px;
}

/* --- Contact Form --- */
.contact-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
  padding: .65rem .9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-card);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(46,80,130,.12);
}

.form-group textarea { resize: vertical; min-height: 140px; }

/* Honeypot field — hidden from real users, fillable by spam bots */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  pointer-events: none;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-text);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  color: #f5f3ec;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: .875rem;
  color: rgba(245,243,236,.6);
  font-weight: 500;
  transition: color .15s;
}

.footer-links a:hover { color: #f5f3ec; }

.footer-copy {
  font-size: .8rem;
  color: rgba(245,243,236,.7); /* bumped from .4 to pass WCAG AA on dark bg */
  width: 100%;
  font-style: normal; /* <address> defaults to italic — reset */
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-card);
    padding: 1.25rem var(--gutter) 1.75rem;
    border-bottom: 1px solid var(--color-border);
    gap: 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav-toggle { display: block; }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-copy { order: 3; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* --- Services Page: Pricing Card --- */
.pricing-card {
  background: var(--color-card);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 560px;
  margin: 0 auto 3rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.pricing-card .card-tag {
  margin: 0 auto;
}

.pricing-card .price {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--color-primary);
  margin: .75rem 0 1.5rem;
  letter-spacing: -.02em;
  line-height: 1;
}

.price-list {
  text-align: left;
  list-style: none;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.price-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--color-text);
  font-size: .95rem;
  line-height: 1.5;
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* --- Services Page: Process Steps --- */
.process-heading {
  margin: 1rem 0 1.5rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
}

.process-step {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #f5f3ec;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .25rem;
}

.process-step h4 {
  font-size: 1.05rem;
  margin-bottom: .25rem;
  font-weight: 700;
  color: var(--color-text);
}

.process-step p {
  font-size: .925rem;
  line-height: 1.6;
}

/* --- Services Page: Fit Grid --- */
.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.fit-col {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.fit-col h3 {
  margin-bottom: 1rem;
}

.fit-yes {
  border-left: 4px solid var(--color-primary);
}

.fit-no {
  border-left: 4px solid var(--color-neutral);
}

.fit-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.fit-col li {
  position: relative;
  padding-left: 1.5rem;
  font-size: .95rem;
  color: var(--color-text);
  line-height: 1.55;
}

.fit-yes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.fit-no li::before {
  content: "✗";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-neutral);
  font-weight: 700;
}

@media (max-width: 768px) {
  .fit-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Utility classes (extracted from inline styles)
   ============================================================ */

/* Narrow text column for prose / about / problem statements */
.prose        { max-width: 720px; }
.prose-md     { max-width: 760px; }

/* Lead paragraph (top of prose blocks) */
.lead {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

/* Standard paragraph spacing inside prose blocks */
.prose p,
.prose-md p {
  margin-bottom: 1rem;
}

.prose p:last-child,
.prose-md p:last-child {
  margin-bottom: 0;
}

/* Stacked paragraphs in narrow content sections (services problem block) */
.stack-p > p + p { margin-top: 1rem; }

/* Small muted note (under product cards, under forms) */
.muted-note {
  font-size: .85rem;
  color: var(--color-text-muted);
  margin-top: .25rem;
}

.muted-note-sm {
  font-size: .8rem;
  color: var(--color-text-muted);
  margin-top: .5rem;
  text-align: center;
}

/* CTA row (buttons grouped at bottom of about / blocks) */
.cta-row {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Full-width centered button (form submit) */
.btn-block {
  width: 100%;
  text-align: center;
  padding: .75rem;
}

/* Card-internal button that should anchor to card start */
.btn-self-start {
  margin-top: .75rem;
  align-self: flex-start;
}

/* Inline card-link with margin-top spacing */
.card-link-spaced {
  margin-top: .5rem;
  display: inline-block;
}

/* Trust / info box on products page */
.trust-box {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  max-width: 640px;
}

.trust-box h3 { margin-bottom: .75rem; }
.trust-box p  { margin-bottom: .5rem; }
.trust-box p:last-child { margin-bottom: 0; }

/* Contact "What to expect" heading */
.expect-heading {
  margin-bottom: 1.25rem;
}

/* Contact alternate-channels block */
.contact-channels {
  margin-top: 1.75rem;
  font-size: .9rem;
}

/* ============================================================
   Anchor scroll offset (account for sticky nav)
   Scoped to section/heading anchors so it doesn't apply to
   form inputs and other utility ids.
   ============================================================ */
section[id],
h2[id],
h3[id] { scroll-margin-top: 80px; }

/* ============================================================
   Active page indicator (nav)
   ============================================================ */
.nav-links a[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 600;
  position: relative;
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* The "Let's talk" pill stays solid — no underline on active */
.nav-links a.btn-nav[aria-current="page"]::after {
  display: none;
}

/* ============================================================
   Page table-of-contents pills (services page)
   ============================================================ */
.page-toc {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.page-toc a {
  display: inline-block;
  padding: .4rem 1rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: background .15s, color .15s, border-color .15s;
}

.page-toc a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #f5f3ec;
}

/* ============================================================
   Featured cards (services "Why me" hierarchy)
   ============================================================ */
.cards-grid-features {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 1.5rem;
}

.cards-grid-features .card {
  padding: 2.25rem;
}

.cards-grid-features .card h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
}

.cards-grid-features .card p {
  font-size: 1rem;
}

.cards-grid-secondary {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cards-grid-secondary .card {
  padding: 1.4rem;
}

.cards-grid-secondary .card h3 {
  font-size: 1.05rem;
}

.cards-grid-secondary .card p {
  font-size: .9rem;
}

@media (max-width: 768px) {
  .cards-grid-features { grid-template-columns: 1fr; }
}

/* ============================================================
   Audit-booking banner (contact.html when ?topic=audit)
   ============================================================ */
.audit-banner {
  background: var(--color-card);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  max-width: 560px;
  font-size: .95rem;
  color: var(--color-text);
}

.audit-banner strong {
  color: var(--color-primary);
}

/* ============================================================
   Skip-to-content link (keyboard / screen reader accessibility)
   Visually hidden until focused.
   ============================================================ */
.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  z-index: 200;
  padding: .65rem 1.1rem;
  background: var(--color-primary);
  color: #f5f3ec;
  font-weight: 600;
  font-size: .9rem;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  transition: top .15s ease-out;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  color: #f5f3ec;
}

/* ============================================================
   Select styling (contact form inquiry-type dropdown)
   Inherits from form-group input styles, adds caret + cursor.
   ============================================================ */
.form-group select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23526070' stroke-width='2' stroke-linecap='round'><polyline points='1,1 6,7 11,1'/></svg>");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.5rem;
}

/* ============================================================
   Reduced motion — neutralize hover lifts and transitions
   for users who prefer reduced motion.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover,
  .btn-primary:hover,
  .btn-accent:hover,
  .text-link:hover {
    transform: none !important;
  }
}
