/* ==========================================================================
   A1A Surveying — Base + reusable UI primitives
   Reset, typography, layout container, buttons, tags, form fields,
   section headings. Nothing here is specific to one page section.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: var(--weight-regular);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;      /* belt-and-braces against stray wide children */
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  letter-spacing: -.01em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--aqua-700); }

img, svg, video { max-width: 100%; }
img { height: auto; border: 0; }

ul { margin: 0; padding: 0; list-style: none; }

/* Beats any display: flex/grid we set on a component we later hide in JS. */
[hidden] { display: none !important; }

::selection { background: var(--orange-200); color: var(--navy-900); }

:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Visible only to screen readers, until focused (the skip link). */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: var(--weight-semibold);
  transition: top var(--dur-base) var(--ease);
}
.skip-link:focus { top: var(--space-4); color: var(--paper); }


/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; scroll-margin-top: 96px; background: var(--paper-veil); }
.section--tan { background: var(--paper-2-veil); }

/* Responsive column grid. Cards inside never force horizontal overflow
   because the track minimum is capped by min(). */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }


/* --------------------------------------------------------------------------
   Section heading
   -------------------------------------------------------------------------- */

.heading { display: flex; flex-direction: column; gap: var(--space-3); }

.heading__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--aqua-700);
  margin: 0;
}

/* The little dashed survey-tape mark before an eyebrow. */
.heading__eyebrow::before {
  content: "";
  flex: none;
  width: 34px;
  height: 5px;
  border: 1px solid var(--ink);
  border-radius: 1px;
  background: linear-gradient(90deg,
    var(--ink) 0 25%, transparent 25% 50%,
    var(--ink) 50% 75%, transparent 75% 100%);
}

.heading__title {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0;
}

.heading__sub {
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-muted);
  max-width: 62ch;
  margin: 0;
}


/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-h-md);
  padding: 0 var(--control-pad-x-md);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: 0;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition-control);
}

.btn--lg { height: var(--control-h-lg); padding: 0 var(--control-pad-x-lg); font-size: 17px; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--primary:hover,
.btn--primary:active {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair);
}
.btn--outline:hover,
.btn--outline:active { border-color: var(--ink); color: var(--ink); }

.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .icon { flex: none; }


/* --------------------------------------------------------------------------
   Tags
   -------------------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: .01em;
  color: var(--aqua-700);
  background: var(--aqua-50);
  border: 1px solid var(--aqua-200);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}


/* --------------------------------------------------------------------------
   Form fields
   -------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: var(--space-2); }

.field__label {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-body);
}
.field__label .req { color: var(--orange-600); font-style: normal; }

.field__hint { font-size: 12px; color: var(--ink-faint); }

.field__error {
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--danger-600);
  min-height: 0;
}
.field__error:empty { display: none; }

.input, .textarea {
  width: 100%;
  font-family: var(--font-text);
  font-size: 16px;              /* 16px keeps iOS Safari from zooming on focus */
  color: var(--ink);
  background: rgba(255, 253, 249, .9);
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  transition: var(--transition-control);
}

.input { height: 48px; padding: 0 var(--space-4); }
.textarea { padding: var(--space-3) var(--space-4); line-height: 1.55; resize: vertical; min-height: 120px; }

.input::placeholder, .textarea::placeholder { color: #A79E8D; }
.input:hover, .textarea:hover { border-color: var(--tan-500); }

.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--aqua-600);
  box-shadow: 0 0 0 3px rgba(46, 150, 175, .16);
}

.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger-600); }

/* Honeypot — a real person never sees or fills this. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}


/* --------------------------------------------------------------------------
   Icons — Lucide, drawn from the sprite at the top of <body> via <use>

   stroke-width 2 on a 24-unit viewBox is Lucide's native weight, which the
   design system calls for. It scales with the box, so a 16px icon renders an
   effective 1.3px stroke — that is by design, not a rounding error.

   Sizes follow the design system's scale:
     16  inline with text        24  navigation
     18  default controls        32  feature / service cards
   -------------------------------------------------------------------------- */

/* The sprite itself renders nothing — it only holds the <symbol> defs. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.125em;
}

.icon--16 { width: 16px; height: 16px; }
.icon--18 { width: 18px; height: 18px; }
.icon--24 { width: 24px; height: 24px; }
.icon--32 { width: 32px; height: 32px; }
