/* ==========================================================================
   Delmarva AI — /start comp styles (M2)
   Mobile-first. Shell (header/footer) is the system every page reuses (M13a).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--body-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
}

img, svg { display: block; }

/* ---- Layout ---- */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--s3);
  padding-right: var(--s3);
}

@media (min-width: 768px) {
  .wrap { padding-left: var(--s6); padding-right: var(--s6); }
}

/* ---- Typography ---- */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading);
  margin: 0;
}

h1 {
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h2 { font-weight: 600; font-size: 28px; line-height: 1.2; }
h3 { font-weight: 600; font-size: 21px; line-height: 1.3; }

@media (min-width: 768px) {
  h1 { font-size: 48px; }
}

@media (min-width: 1200px) {
  h1 { font-size: 56px; }
}

p { margin: 0; }
p + p { margin-top: var(--s2); }

a {
  color: var(--link);
  text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent);
  text-underline-offset: 3px;
  transition: color 140ms ease;
}
a:hover { color: var(--link-hover); }

.small { font-size: 13px; }

/* ==========================================================================
   SHELL — header
   Two modes: .header--lockup (the /start brand moment, full lockup with
   tagline per spec §4) and .header--compact (interior pages, confirmation).
   ========================================================================== */

.site-header { background: var(--band-bg); }

/* --- Lockup construction (spec §4): H = mark height --- */

.lockup {
  /* All measures derive from H = mark height (spec §4) */
  --wordmark-size: calc(var(--lockup-h) * 0.47);
  --lockup-gap: calc(var(--lockup-h) * 0.29);
  --tagline-size: calc(var(--wordmark-size) * 0.55);
  --tagline-mt: calc(var(--wordmark-size) * 0.17);

  display: flex;
  align-items: center;               /* text block vertically centered on mark */
  gap: var(--lockup-gap);
}

.lockup .mark { height: var(--lockup-h); width: auto; flex: none; }
.lockup .mark path { fill: var(--band-mark-fill); }

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: var(--wordmark-size);
  line-height: 1;
  color: var(--band-wordmark);
  white-space: nowrap;
}

.tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--tagline-size);
  letter-spacing: 0.005em;
  line-height: 1.2;
  margin-top: var(--tagline-mt);
  color: var(--band-tagline);
  white-space: nowrap;
}

.header--lockup { padding: var(--s4) 0 0; }

/* --- Compact shell header (interior pages): mark ≥ 36px min size --- */

.header--compact {
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--rule);
}
html.t2 .header--compact { border-bottom: none; }

.header--compact .lockup { --lockup-h: 40px; align-items: center; }
.header--compact .tagline { display: none; }

/* ==========================================================================
   HERO — headline + intro, same surface as header band
   ========================================================================== */

.hero { background: var(--band-bg); padding: var(--s6) 0 var(--s8); }

.hero h1 { color: var(--band-heading); max-width: 21ch; }

.hero .intro {
  margin-top: var(--s3);
  color: var(--band-text);
  font-size: 17px;
  max-width: 56ch;
}

@media (min-width: 768px) {
  .header--lockup { padding-top: var(--s6); }
  .hero { padding: var(--s8) 0; }
}

/* ==========================================================================
   EXAMPLES — four plain-language cards
   ========================================================================== */

.examples { padding: var(--s6) 0 var(--s8); }

.examples .lede {
  color: var(--body-muted);
  max-width: 56ch;
  margin-top: var(--s2);
}

.example-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2);
  margin-top: var(--s4);
}

@media (min-width: 768px) {
  .examples { padding: var(--s8) 0 var(--s12); }
  .example-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); }
}

.example {
  background: var(--card-bg);
  border-radius: 10px;
  padding: var(--s3) var(--s3) var(--s4);
}

.example .num {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--blue-500);
}

.example h3 { margin-top: var(--s1); }

.example p { margin-top: var(--s1); color: var(--body-muted); }

@media (min-width: 768px) {
  .example { padding: var(--s4); }
}

/* ==========================================================================
   THE ASK — swappable offer block (see landing-design-notes.md)
   The whole <section id="offer"> can be replaced without touching anything
   above or below it. Nothing outside this block references the free session.
   ========================================================================== */

.offer-section { padding: 0 0 var(--s8); }

.offer {
  background: var(--blue-100);
  border-radius: 12px;
  padding: var(--s4) var(--s3);
}

.offer h2 { max-width: 24ch; }

.offer .offer-body {
  margin-top: var(--s2);
  color: var(--body-muted);
  max-width: 56ch;
}

@media (min-width: 768px) {
  .offer-section { padding-bottom: var(--s12); }
  .offer { padding: var(--s8) var(--s8) var(--s8); }
}

/* Desktop: copy and form side by side so the block carries its width */
@media (min-width: 1024px) {
  .offer-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s8);
    align-items: start;
  }
  .lead-form { margin-top: 0; max-width: none; }
}

/* ---- Form ---- */

.lead-form { margin-top: var(--s4); max-width: 560px; }

.field { margin-top: var(--s3); }
.field:first-child { margin-top: 0; }

.field label {
  display: block;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--body-text);
  margin-bottom: 6px;
}

.field .hint { color: var(--caption); font-weight: 400; }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--body-text);
  background: var(--n0);
  border: 1px solid var(--n300);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--caption); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-500) 22%, transparent);
}

.field textarea { min-height: 96px; resize: vertical; }

.btn {
  display: block;
  width: 100%;
  margin-top: var(--s3);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: #FFFFFF;
  background: var(--blue-500);
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  cursor: pointer;
  transition: background-color 140ms ease;
}

/* Colour is restated on hover because the buttons are anchors, and the global
   `a:hover` rule is more specific than `.btn` — without this the label inherits
   --link-hover (Blue 700) and vanishes into the Blue 700 plate. */
.btn:hover,
.btn:focus-visible { background: var(--blue-700); color: #FFFFFF; }

@media (min-width: 768px) {
  .btn { width: auto; }
}

.form-note { margin-top: var(--s2); color: var(--caption); }

/* ---- Form error state (html.show-errors) ---- */

.form-banner {
  display: none;
  background: var(--error-tint);
  color: var(--error);
  font-weight: 500;
  font-size: 14px;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: var(--s3);
}

.field .error-msg {
  display: none;
  color: var(--error);
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
}

html.show-errors .form-banner { display: block; }
html.show-errors .field.has-error .error-msg { display: block; }
html.show-errors .field.has-error input,
html.show-errors .field.has-error textarea {
  border-color: var(--error);
  background: #FFFDFC;
}

/* ==========================================================================
   CONFIRMATION PAGE
   ========================================================================== */

.confirm { padding: var(--s8) 0 var(--s12); }

.confirm-inner { max-width: 560px; }

.confirm .check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s3);
}

.confirm .check svg { width: 22px; height: 22px; }
.confirm .check path { stroke: var(--success); }

.confirm h1 { font-size: 34px; }

.confirm .confirm-body { margin-top: var(--s2); color: var(--body-muted); }

.confirm .next {
  margin-top: var(--s4);
  border-top: 1px solid var(--rule);
  padding-top: var(--s3);
}

.confirm .next p { color: var(--body-muted); }

@media (min-width: 768px) {
  .confirm { padding: var(--s12) 0; }
  .confirm h1 { font-size: 40px; }
}

/* ==========================================================================
   SHELL — footer
   ========================================================================== */

.site-footer {
  background: var(--footer-bg);
  padding: var(--s6) 0;
  margin-top: var(--s4);
}

.site-footer .lockup { --lockup-h: 36px; }
.site-footer .lockup .mark path { fill: var(--footer-mark-fill); }
.site-footer .wordmark { color: var(--footer-wordmark); }
.site-footer .tagline { display: none; }

.footer-meta {
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--footer-rule);
  color: var(--footer-text);
  font-size: 13px;
}

/* ==========================================================================
   SHELL — header nav (home + every M13a interior page)
   Stacks under the lockup on mobile; sits opposite it from 768px.
   ========================================================================== */

.header-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s3);
}

.lockup-link { text-decoration: none; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}

.site-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--band-text);
  text-decoration: none;
}

.site-nav a:hover { color: var(--band-heading); }

.site-nav .nav-cta {
  border: 1px solid var(--band-text);
  border-radius: 8px;
  padding: 7px 16px;
  color: var(--band-heading);
}

.site-nav .nav-cta:hover {
  border-color: var(--band-heading);
}

@media (min-width: 768px) {
  .header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
  }
  .site-nav { flex-wrap: nowrap; gap: var(--s2); }
}

@media (min-width: 1024px) {
  .header-row { gap: var(--s6); }
  .site-nav { gap: var(--s3); }
}

/* ==========================================================================
   HOME — delmarva-ai.com root (comp only; production is M11)
   Reuses the /start shell, band, and offer-tint surfaces so the two pages
   read as one system at the M4 cohesion review.
   ========================================================================== */

.hero--home { padding-bottom: var(--s8); }

.hero .hero-actions { margin-top: var(--s4); }

.btn--inline {
  display: inline-block;
  width: auto;
  text-decoration: none;
}

/* Primary action on the Harbor band: white plate, Harbor ink. Gold stays
   scarce (spec §2) — the tagline is already carrying it on this surface. */
.btn--onDark {
  display: inline-block;
  width: auto;
  margin-top: 0;
  text-decoration: none;
  background: #FFFFFF;
  color: var(--harbor);
}

.btn--onDark:hover,
.btn--onDark:focus-visible { background: var(--blue-100); color: var(--harbor); }

.section { padding: var(--s6) 0; }
.section--tint { background: var(--card-bg); }

@media (min-width: 768px) {
  .section { padding: var(--s8) 0; }
}

.section .lede {
  color: var(--body-muted);
  max-width: 56ch;
  margin-top: var(--s2);
}

.measure { max-width: 62ch; }
.measure .lede { max-width: none; }

/* ---- Services ---- */

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2);
  margin-top: var(--s4);
}

@media (min-width: 768px) {
  .service-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); }
}

@media (min-width: 1024px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
}

.service {
  background: var(--n0);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: var(--s3);
}

.service p { margin-top: var(--s1); color: var(--body-muted); }

.service--lead {
  background: var(--blue-100);
  border-color: transparent;
}

.service-tag {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--blue-700);
  margin-bottom: var(--s1);
}

@media (min-width: 768px) {
  .service { padding: var(--s4); }
}

/* ---- Credibility split ---- */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
}

.split-main h2 { max-width: 20ch; }
.split-main p { margin-top: var(--s3); color: var(--body-muted); max-width: 56ch; }

.split-aside {
  background: var(--card-bg);
  border-radius: 12px;
  padding: var(--s3);
}

.plain-list {
  list-style: none;
  margin: var(--s2) 0 0;
  padding: 0;
  color: var(--body-muted);
}

.plain-list li { margin-top: var(--s2); }
.plain-list li:first-child { margin-top: 0; }
.plain-list strong { color: var(--body-text); font-weight: 600; }

@media (min-width: 1024px) {
  .split { grid-template-columns: 1.35fr 1fr; gap: var(--s8); align-items: start; }
  .split-aside { padding: var(--s4); }
}

/* ---- Closing CTA — the only place home points at an offer, and it points
       at /start rather than naming one (see landing-design-notes.md). ---- */

.cta-band { padding: var(--s6) 0 var(--s8); }

.cta-inner {
  background: var(--blue-100);
  border-radius: 12px;
  padding: var(--s4) var(--s3);
  max-width: 62ch;
}

.cta-inner p { margin-top: var(--s2); color: var(--body-muted); }
.cta-inner .btn { margin-top: var(--s3); }

@media (min-width: 768px) {
  .cta-band { padding: var(--s8) 0 var(--s12); }
  .cta-inner { padding: var(--s8); }
}

/* ---- Footer nav (home; interior pages reuse it) ---- */

.footer-row {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

.footer-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--footer-text);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--footer-wordmark); }

@media (min-width: 768px) {
  .footer-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--s6);
  }
}

/* ==========================================================================
   HOW IT WORKS — public rates and packages (comp only; production is M11)
   Reuses the home shell, section rhythm, and service-card vocabulary; adds
   price plates and the booked-time rate table.
   ========================================================================== */

.price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--heading);
  margin-top: var(--s2);
}

.price .per {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  color: var(--body-muted);
}

/* Packages: 2-up from 768px; stays 2-up at desktop so the two lead workshop
   cards own the first row (the headline offering reads as the headline). */
.package-grid { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .package-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .package-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Booked-time rate table ---- */

.rate-table {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
  margin-top: var(--s4);
}

.rate-table th,
.rate-table td {
  text-align: left;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--rule);
}

.rate-table thead th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--caption);
}

.rate-table tbody th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--body-text);
}

.rate-table td.rate {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  color: var(--heading);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.rate-notes { margin-top: var(--s4); }
.rate-notes .lede + .lede { margin-top: var(--s3); }
.rate-notes strong { color: var(--body-text); font-weight: 600; }

/* ---- Hourly rates ---- */

.hourly-rates {
  display: flex;
  gap: var(--s3);
  margin-top: var(--s4);
  margin-bottom: var(--s4);
}

.hourly-rate {
  background: var(--n0);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: var(--s3);
  flex: 1;
  max-width: 220px;
}

.hourly-role {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.hourly-rate .price { margin-top: var(--s1); }

/* ---- Project work ---- */

.change-tolerance {
  margin-top: var(--s6);
  border-top: 1px solid var(--rule);
  padding-top: var(--s4);
}

.change-tolerance .lede { margin-top: var(--s2); }

/* ==========================================================================
   CONTACT — two-intent form (comp only; production is M11)
   Reuses the shell, section rhythm, and the /start field/error vocabulary.
   The reveal is CSS: the checked intent radio selects which panel displays.
   ========================================================================== */

.contact-form { max-width: 640px; }

/* ---- The choice: what brings you here? ---- */

.intent-choice {
  border: none;
  margin: 0;
  padding: 0;
}

.intent-choice legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.3;
  color: var(--heading);
  padding: 0;
}

.intent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2);
  margin-top: var(--s3);
}

@media (min-width: 768px) {
  .intent-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); }
}

.intent {
  position: relative;
  display: block;
  background: var(--n0);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: var(--s3);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.intent input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.intent:hover { border-color: var(--blue-500); }

.intent:has(input:checked) {
  background: var(--blue-100);
  border-color: var(--blue-500);
}

.intent:has(input:focus-visible) {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-500) 22%, transparent);
}

.intent-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  color: var(--heading);
}

.intent-sub {
  display: block;
  margin-top: var(--s1);
  color: var(--body-muted);
  font-size: 15px;
}

/* ---- The pointer to /start. Deliberately quiet: it routes the free-session
       reader away rather than competing with /start's offer. ---- */

.intent-alt {
  margin-top: var(--s3);
  color: var(--body-muted);
  font-size: 15px;
  border-left: 3px solid var(--n300);
  padding-left: var(--s2);
}

/* ---- Panels ---- */

.intent-panel { display: none; margin-top: var(--s6); }

.contact-form:has(#intent-general:checked) #panel-general,
.contact-form:has(#intent-project:checked) #panel-project { display: block; }

/* ---- Grouped choices (radios and checkboxes) ---- */

.field--group {
  border: none;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
}

.field--group legend {
  padding: 0;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--body-text);
  margin-bottom: var(--s1);
}

.field--group .hint { color: var(--caption); font-weight: 400; }

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-list--row { flex-direction: row; flex-wrap: wrap; gap: var(--s1); }

/* Specificity note: the global `.field label` rule (display:block, 13px) would
   otherwise win over a bare `.choice`, stacking the control above its text. */
.field--group .choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--body-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 0;
}

/* The global `.field input` rule dresses text inputs (100% wide, padded,
   bordered). Checkboxes and radios have to be undressed again here. */
.field--group .choice input {
  width: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  margin: 3px 0 0;
  accent-color: var(--blue-500);
  flex: none;
}

.field--group .choice span { flex: 1; }

.field--group .choice-list--row .choice {
  background: var(--n0);
  border: 1px solid var(--n300);
  border-radius: 8px;
  padding: 8px 14px;
  align-items: center;
}

.field--group .choice-list--row .choice:has(input:checked) {
  border-color: var(--blue-500);
  background: var(--blue-100);
}

/* Price links sit on their own line under the option, indented to the label
   text, so they never wrap raggedly between the checkbox and its wording. */
.choice-row { display: block; }

.choice-note {
  display: inline-block;
  margin: 2px 0 0 28px;
  color: var(--link);
}

.group-note { margin-top: var(--s2); color: var(--caption); }

/* ---- Select, styled to match the text inputs ---- */

.field select {
  width: 100%;
  font: inherit;
  color: var(--body-text);
  background: var(--n0);
  border: 1px solid var(--n300);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-500) 22%, transparent);
}

/* Error state reuses /start's convention (html.show-errors) verbatim. */
.contact-form .form-banner { margin-bottom: var(--s4); }
