/* Three Miles Up Digital: brand tokens from docs/brand.md */
:root {
  --navy: #1B2A41;
  --navy-deep: #142033;
  --blue: #1E6FD9;
  --blue-dark: #1759B0;
  --glacier: #EEF3F9;
  --ridge: #CBD7E6;
  --slate: #55616F;
  --mist: #C8D5E6;
  --white: #FFFFFF;

  --font: "Outfit", "Segoe UI", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 24px;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* layout rules like .field { display: grid } must not un-hide elements */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0; }

a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--navy); color: var(--white); padding: 8px 14px; border-radius: var(--radius); z-index: 10;
}
.skip:focus { left: 8px; }

.lead { font-size: 1.2rem; color: var(--slate); max-width: 38em; }

/* Buttons and links */
.button {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  padding: 16px 24px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.button:hover { background: var(--blue-dark); }
.button-small { padding: 11px 18px; font-size: 0.95rem; }
.button-light { background: var(--white); color: var(--navy); }
.button-light:hover { background: var(--glacier); }
.text-link { font-weight: 600; color: var(--navy); text-underline-offset: 4px; }
.text-link:hover { color: var(--blue); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--glacier);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 42px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 800; font-size: 1.15rem; color: var(--navy); letter-spacing: 0.01em; white-space: nowrap; }
.brand-up { color: var(--blue); }
.brand-sub { font-weight: 600; font-size: 0.62rem; letter-spacing: 0.55em; color: var(--slate); margin-top: 5px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.button) { color: var(--navy); text-decoration: none; font-weight: 500; }
.nav a:not(.button):hover { color: var(--blue); }

/* Hero */
.hero { padding: 88px 0 0; background: var(--white); overflow: hidden; border-bottom: 1px solid var(--ridge); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.hero-copy { padding-bottom: 96px; }
.hero-copy h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); }
.hero-copy .lead { margin-top: 24px; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }

.profile { margin: 0; align-self: end; }
.profile svg { display: block; width: 100%; height: auto; overflow: visible; }
.profile-fill { fill: var(--glacier); }
.profile-line { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.wp circle { fill: var(--white); stroke: var(--navy); stroke-width: 3; }
.wp text { font: 600 17px var(--font); fill: var(--navy); }
.wp-summit circle { fill: var(--blue); stroke: var(--blue); }
.wp-summit text { fill: var(--blue); }

/* The single orchestrated motion: the route draws once, then the waypoints appear in order. */
@media (prefers-reduced-motion: no-preference) {
  .profile-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s cubic-bezier(.45, 0, .2, 1) .2s forwards; }
  .wp { opacity: 0; animation: appear .4s ease-out forwards; animation-delay: calc(0.55s + var(--i) * 0.42s); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Services: the route */
.services { padding: 112px 0 96px; }
.section-head { max-width: 40em; }
.section-head p { margin-top: 20px; color: var(--slate); font-size: 1.15rem; }

.route { list-style: none; margin: 72px 0 0; padding: 0; }
.stop {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 20px 48px;
  padding-bottom: 72px;
}
/* The rail connecting each stop to the next */
.stop:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 27px; top: 56px; bottom: 0;
  width: 2px;
  background: var(--ridge);
}
.stop-marker {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem;
  color: var(--navy);
  background: var(--white);
  border: 2px solid var(--navy);
}
.stop-summit .stop-marker { background: var(--blue); border-color: var(--blue); color: var(--white); }

.package { font-weight: 800; font-size: clamp(2rem, 3.4vw, 2.6rem); line-height: 1; letter-spacing: -0.02em; }
.stop-summit .package { color: var(--blue); }
.stop-head h3 { margin-top: 10px; color: var(--slate); font-weight: 500; font-size: 1.1rem; }
.pitch { margin-top: 18px; font-size: 1.2rem; font-weight: 500; max-width: 24em; }

.stop-detail { padding-top: 6px; color: var(--navy); }
.stop-detail ul { margin: 16px 0 0; padding-left: 1.2em; }
.stop-detail li { margin: 6px 0; }
.stop-detail li::marker { color: var(--blue); }
.outcome { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--glacier); font-weight: 600; }

/* Pricing: a price list with dotted leaders, like a menu board */
.pricing { padding: 104px 0; border-top: 1px solid var(--glacier); }
.price-groups { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; margin-top: 56px; align-items: start; }
.price-group > h3 { font-size: 1.1rem; font-weight: 600; color: var(--slate); padding-bottom: 12px; border-bottom: 2px solid var(--navy); }
.price-list { margin: 0; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--glacier); }
.price-row dt { display: grid; gap: 4px; }
.price-row dd { margin: 0; white-space: nowrap; text-align: right; }
.price-name { font-weight: 800; font-size: 1.2rem; }
.price-desc { color: var(--slate); font-size: 0.98rem; max-width: 34em; }
.price { font-weight: 800; font-size: 1.5rem; color: var(--navy); }
.price-from, .price-per { color: var(--slate); font-size: 0.95rem; font-weight: 500; }
.price-range { font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.price-terms { margin-top: 32px; padding: 22px 24px; background: var(--glacier); border-radius: 12px; }
.price-terms h4 { margin: 0; font-size: 1rem; }
.price-terms ul { margin: 10px 0 0; padding-left: 1.2em; font-size: 0.98rem; color: var(--navy); }
.price-terms li { margin: 4px 0; }
.price-terms li::marker { color: var(--blue); }
.pricing-cta { margin-top: 56px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.pricing-cta p { color: var(--slate); max-width: 32em; }

/* About */
.about { background: var(--glacier); padding: 104px 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.about .lead { margin-top: 20px; }
.principles { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 16px; max-width: 36em; }
.principles li { padding-left: 22px; position: relative; }
.principles li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--blue);
}
.team { display: grid; gap: 20px; padding-top: 8px; }
.person { display: flex; align-items: center; gap: 18px; background: var(--white); border-radius: 12px; padding: 22px; }
.avatar {
  width: 64px; height: 64px; flex: none; border-radius: 50%;
  background: var(--navy); color: var(--white);
  display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em;
}
.person p { color: var(--slate); font-size: 1rem; margin-top: 2px; }

/* Contact */
.contact { background: var(--navy); color: var(--white); padding: 104px 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.contact .lead { color: var(--mist); margin-top: 20px; }
.contact-note { margin-top: 20px; color: var(--mist); font-size: 1rem; }
.contact-note a { color: var(--white); text-underline-offset: 3px; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; color: var(--white); }
.optional { color: var(--mist); font-weight: 400; }
.field input, .field select, .field textarea {
  font: 400 1rem/1.4 var(--font);
  color: var(--navy);
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 13px 14px;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.45); }
.form .button { justify-self: start; margin-top: 6px; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--mist); font-size: 0.95rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--white); }

/* Project questionnaire (start.html) */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.q-page { padding: 72px 0 96px; background: var(--white); }
.q-wrap { max-width: 820px; }
.q-intro .lead { margin-top: 20px; }
.q-warning { margin-top: 16px; font-size: 1rem; color: var(--slate); padding-left: 14px; border-left: 3px solid var(--blue); }
.req { color: var(--blue); font-weight: 700; }
.q-form .optional { color: var(--slate); }

.q-progress { list-style: none; margin: 48px 0 40px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: qstep; }
.q-progress li { counter-increment: qstep; border-top: 4px solid var(--ridge); padding-top: 12px; color: var(--slate); font-weight: 500; font-size: 0.98rem; }
.q-progress li span::before { content: counter(qstep) ". "; font-weight: 800; }
.q-progress li.is-done { border-color: var(--navy); color: var(--navy); }
.q-progress li.is-current { border-color: var(--blue); color: var(--navy); font-weight: 600; }

.q-form h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); outline: none; }
.q-step-intro { margin-top: 12px; color: var(--slate); }
.q-block { margin: 36px 0 0; padding: 0; border: 0; min-width: 0; }
.q-block > legend, .q-label, .q-sub > legend { font-weight: 600; font-size: 1.12rem; color: var(--navy); padding: 0; }
.q-sub { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.q-sub > legend { font-size: 1rem; }
.hint { color: var(--slate); font-size: 0.98rem; margin-top: 4px; }
.q-gap { margin-top: 20px; }
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-top: 14px; }

.q-form .field { display: grid; gap: 6px; }
.q-form .field label { font-weight: 500; color: var(--navy); }
.q-form input[type=text], .q-form input[type=email], .q-form input[type=tel], .q-form input[type=url], .q-form textarea {
  font: 400 1rem/1.45 var(--font); color: var(--navy); background: var(--white);
  border: 1.5px solid var(--ridge); border-radius: var(--radius); padding: 12px 14px; width: 100%;
}
.q-form textarea { resize: vertical; }
.q-form input:focus-visible, .q-form textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.3); }
.q-form [aria-invalid="true"]:not(fieldset) { border-color: #B42318; }
.q-form fieldset[aria-invalid="true"] .choice { border-color: #F3B8B2; }

.q-choices { display: grid; gap: 10px; margin-top: 14px; }
.q-columns { grid-template-columns: 1fr 1fr; }
.q-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border: 1.5px solid var(--ridge); border-radius: var(--radius);
  cursor: pointer; font-size: 1rem; line-height: 1.4; background: var(--white);
}
.choice:hover { border-color: var(--blue); }
.choice:has(input:checked) { border-color: var(--blue); background: var(--glacier); }
.choice input { margin: 3px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--blue); }
.choice small { display: block; color: var(--blue); font-weight: 600; font-size: 0.85rem; margin-top: 2px; }

.q-callout { background: var(--glacier); border-radius: 12px; padding: 24px; }
.q-callout .choice { background: var(--white); }
.q-callout > legend { float: left; width: 100%; margin-bottom: 4px; }
.q-callout > legend + * { clear: both; }

.q-error { color: #B42318; font-weight: 500; font-size: 0.98rem; margin-top: 10px; }
.q-error-box { margin-top: 28px; padding: 14px 16px; border-radius: var(--radius); background: #FEF3F2; color: #7A271A; }
.q-error-box a { color: #7A271A; }

.q-next-steps { margin-top: 40px; padding: 22px 24px; border-radius: 12px; background: var(--glacier); }
.q-next-steps h3 { font-size: 1.1rem; }
.q-next-steps p { margin-top: 8px; color: var(--slate); font-size: 1rem; }

.q-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--glacier); }
.q-back { background: none; border: 0; padding: 8px 0; font: 600 1rem var(--font); cursor: pointer; text-decoration: underline; }
.q-draft-note { margin-top: 28px; color: var(--slate); font-size: 0.92rem; }
.q-draft-note .text-link { background: none; border: 0; padding: 0; font: 600 0.92rem var(--font); cursor: pointer; text-decoration: underline; color: var(--slate); }
.button:disabled { opacity: 0.6; cursor: wait; }

.contact-alt { margin-top: 28px; }
.contact-alt a { color: var(--white); font-weight: 600; text-underline-offset: 4px; }

@media (max-width: 600px) {
  .q-page { padding: 48px 0 72px; }
  .q-grid, .q-columns { grid-template-columns: 1fr; }
  .q-progress li { font-size: 0.82rem; }
  .q-callout { padding: 18px; }
  .q-nav .button { padding: 14px 18px; }
}

/* Thanks page */
.thanks { min-height: 70vh; display: grid; place-items: center; text-align: left; padding: 96px 0; }
.thanks .lead { margin: 20px 0 32px; }

/* Tablet */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .contact-grid, .price-groups { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { padding-bottom: 0; }
  .profile { margin: 0 -8px; }
  .stop { grid-template-columns: 56px minmax(0, 1fr); }
  .stop-detail { grid-column: 2; }
}

/* Phone */
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .header-inner { height: 64px; }
  .nav { display: none; } /* the hero's own button sits directly below on phones */
  .brand-icon { width: 34px; height: 34px; }
  .brand-name { font-size: 0.95rem; }
  .brand-sub { font-size: 0.55rem; }
  .hero { padding-top: 48px; }
  .services, .about, .contact, .pricing { padding: 72px 0; }
  .price-row { flex-direction: column; gap: 8px; }
  .price-row dd { text-align: left; }
  .route { margin-top: 48px; }
  .stop { grid-template-columns: 40px minmax(0, 1fr); gap: 14px 18px; padding-bottom: 56px; }
  .stop:not(:last-child)::before { left: 19px; top: 40px; }
  .stop-marker { width: 40px; height: 40px; font-size: 1rem; }
  .wp text { font-size: 22px; }
}
