/* ==========================================================================
   Southern AI Consulting — southernaiconsulting.com
   Hand-written CSS. No framework, no build step, no external requests.
   Contrast ratios in comments were computed, not eyeballed.
   ========================================================================== */

:root {
  --bg:          #FBF9F6;
  --band:        #F4F0EA;
  --surface:     #FFFFFF;
  --ink:         #10233A;  /* 15.10:1 on --bg */
  --text:        #1A2430;  /* 14.93:1 on --bg */
  --muted:       #5A6673;  /*  5.58:1 on --bg */
  --copper:      #B26B3F;  /*  3.94:1 — graphics + large text only */
  --copper-text: #8F5430;  /*  5.74:1 — safe for body-size links */
  --border:      #E2DAD0;
  --radius:      10px;
  --wrap:        68rem;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", ui-serif, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0C1826;
    --band:        #101F31;
    --surface:     #14283C;
    --ink:         #E9EDF2;  /* 15.21:1 on --bg */
    --text:        #E9EDF2;
    --muted:       #9FB0C0;  /*  8.05:1 on --bg */
    --copper:      #D99A6C;  /*  6.64:1 on --bg */
    --copper-text: #E2A97D;
    --border:      #24384D;
  }
}

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

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Structure ─────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.wrap.narrow { max-width: 46rem; }

section { padding-block: clamp(3.25rem, 7vw, 5.5rem); }

section[id] { scroll-margin-top: 5.5rem; }

.band {
  background: var(--band);
  border-block: 1px solid var(--border);
}

/* ── Type ──────────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.05rem, 5.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
}

/* A short copper rule under each section heading. One repeated signal ties the
   sections together without introducing another colour, box, or icon set. */
section h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.95rem;
  border-radius: 2px;
  background: var(--copper);
}

h3 {
  font-size: 1.16rem;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--copper-text); }
a:hover { color: var(--ink); }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.lede {
  font-size: clamp(1.06rem, 1.9vw, 1.28rem);
  line-height: 1.55;
  color: var(--text);
  max-width: 38ch;
  margin-bottom: 1.9rem;
}

.section-lede {
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 2.25rem;
}

.section-note {
  color: var(--muted);
  max-width: 65ch;
  margin-top: 2rem;
}

.fine {
  font-size: 0.94rem;
  color: var(--muted);
  max-width: 52ch;
  margin-top: 1.5rem;
}

/* ── Skip link ─────────────────────────────────────────────────────────── */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}

/* Header must survive a 320px viewport: brand + CTA + gaps once summed to
   more than the viewport, which widened the whole document and clipped every
   section. Everything here shrinks first, then grows back at 30em. */
.header-inner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  text-decoration: none;
  color: var(--copper);
  margin-right: auto;
}

/* Sized so the mark's ink height matches the two-line wordmark beside it.
   The generated geometry is tight to its box (46.76 x 64, aspect 0.7306), so
   the height here IS the ink height: 29px against the small wordmark's 29.2px
   block. Width is stated rather than left to `auto` because Safari resolves
   auto against the viewBox only after layout, and the header shifts.
   Verified at a true 320px viewport: the brand stays on two lines and the CTA
   still clears the right edge. */
.brand-mark { flex: none; display: block; width: 21.2px; height: 29px; }
/* The mark is one ink at every size and in both themes. The circuit running
   through it is a hole, not a second colour, so the page shows through it —
   including the header's own translucent backdrop — and it inverts on dark
   without being told to. */
.brand-letter { fill: var(--copper); }

/* The two paths are the same drawing with and without that hole. A hole
   cannot be switched off by hiding an element, so both ship and one is
   chosen here. The circuit needs about 32 DEVICE pixels of ink to stay open —
   which is why the second query is on resolution, not width: at 29px the mark
   is fine on any 2x phone and only closes up on a genuinely low-density
   screen, and gating on width alone would rob every phone of it. */
.brand-full { display: none; }

@media (min-width: 30em) {
  .brand-solid { display: none; }
  .brand-full { display: inline; }
}

@media (min-resolution: 2dppx) {
  .brand-solid { display: none; }
  .brand-full { display: inline; }
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.14;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  font-weight: 700;
}

@media (min-width: 30em) {
  .header-inner { gap: 1.5rem; }
  .brand { gap: 0.7rem; }
  /* 35px of ink against the large wordmark's 34.6px block. */
  .brand-mark { width: 25.6px; height: 35px; }
  .brand-text { font-size: 0.95rem; letter-spacing: 0.055em; }
}

/* Shorter CTA label on narrow screens. display:none also removes the
   unused label from the accessibility tree, so it is not announced twice. */
.lbl-long { display: none; }
.lbl-short { display: inline; }

@media (min-width: 30em) {
  .lbl-long { display: inline; }
  .lbl-short { display: none; }
}

.site-nav { display: none; gap: 1.6rem; }

.site-nav a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-size: 0.94rem;
  padding-block: 0.75rem;
  transition: color 0.18s ease;
}

/* An absolutely-positioned rule that scales in from the centre, rather than a
   transparent border that becomes visible. Same look, but nothing occupies
   layout, so hovering can never nudge the nav by a pixel. */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav a:hover { color: var(--copper-text); }
.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }

@media (min-width: 56em) {
  .site-nav { display: flex; }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);              /* 15.87:1 */
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 1px 2px rgba(16, 35, 58, 0.08);
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, box-shadow 0.18s ease,
              transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:hover {
  background: var(--copper-text);
  border-color: var(--copper-text);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -12px rgba(16, 35, 58, 0.55);
}
/* Settle back to the resting position on press, so the click has a physical
   response and does not just change colour. */
.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(16, 35, 58, 0.08);
}

.btn-sm { font-size: 0.92rem; padding: 0.55rem 1rem; flex: none; }

.btn-lg { font-size: 1.02rem; padding: 0.85rem 1.6rem; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: transparent;
  color: var(--copper-text);
  border-color: var(--copper);
}

.btn-invert {
  background: #FBF9F6;
  border-color: #FBF9F6;
  color: #10233A;
}
.btn-invert:hover {
  /* Light copper, not --copper: navy on #B26B3F is only 3.83:1. */
  background: #D99A6C;
  border-color: #D99A6C;
  color: #10233A;              /* 6.64:1 */
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero { padding-block: clamp(3.5rem, 9vw, 7rem); }

/* ── Cards ─────────────────────────────────────────────────────────────── */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}

/* Five cards never divide evenly, so both multi-column layouts place the
   remainder deliberately instead of letting it hang off to the left.
   Two-wide: the fifth card runs the full width.
   Three-wide: the grid is six tracks and every card spans two, which lets the
   final pair be nudged inward so they sit centred under the first row. */
@media (min-width: 40em) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards > li:nth-child(5) { grid-column: 1 / -1; }
}
@media (min-width: 62em) {
  .cards { grid-template-columns: repeat(6, 1fr); gap: 1.25rem; }
  .cards > li { grid-column: span 2; }
  .cards > li:nth-child(4) { grid-column: 2 / span 2; }
  .cards > li:nth-child(5) { grid-column: 4 / span 2; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--copper);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.5rem;
  box-shadow: 0 1px 2px rgba(16, 35, 58, 0.04),
              0 10px 26px -20px rgba(16, 35, 58, 0.3);
  transition: box-shadow 0.24s ease,
              transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Guarded by (hover: hover) so a touch device never leaves a card stuck in the
   lifted state after a tap. */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgba(16, 35, 58, 0.05),
                0 22px 42px -24px rgba(16, 35, 58, 0.42);
  }
}

.card p:last-child { color: var(--muted); font-size: 0.97rem; }

/* Reserve two lines for the card title so the price lines share a baseline
   across a row. "Custom Software & Websites" wraps at every column width. */
@media (min-width: 40em) {
  .card h3 { min-height: calc(2 * 1.16rem * 1.3); }
}

.price {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.02rem;
  margin-bottom: 0.8rem;
}
.price strong { font-weight: 700; }
.was {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 0.35rem;
  white-space: nowrap;   /* keep "normally $300" from splitting across lines */
}

.founding {
  margin-top: 2rem;
  padding: 1.1rem 1.3rem;
  border-left: 3px solid var(--copper);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-size: 0.99rem;
  max-width: 62ch;
}

/* ── Steps ─────────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 48em) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2rem 2.5rem; }
}

.steps > li {
  counter-increment: step;
  padding-left: 3.25rem;
  position: relative;
}

/* Filled, not outlined. An outline at this size reads as a faint ring and
   loses the numeral; a solid disc gives the step sequence real weight.
   --copper-text (not --copper) because the numeral sits on top of it:
   #FBF9F6 on #8F5430 is 5.44:1, and in dark mode #0C1826 on #E2A97D is
   7.35:1. Plain --copper would only manage 3.74:1. */
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.15rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--copper-text);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.steps p { color: var(--muted); margin-bottom: 0; }

/* ── Two column ────────────────────────────────────────────────────────── */

.two-col { display: grid; gap: 1.75rem; }

@media (min-width: 48em) {
  .two-col { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
}

.two-col p { color: var(--muted); margin-bottom: 0; }

/* ── Lists (don't-do + policy) ─────────────────────────────────────────── */

.nope, .policy {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  max-width: 68ch;
}

.nope > li, .policy > li {
  position: relative;
  padding-left: 1.85rem;
  color: var(--muted);
}

.nope > li strong, .policy > li strong { color: var(--ink); font-weight: 600; }

.nope > li::before,
.policy > li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--copper-text);
}

.nope > li::before { content: "\00d7"; font-size: 1.25rem; line-height: 1.35; }
.policy > li::before { content: "\2713"; font-size: 1rem; line-height: 1.6; }

/* ── About ─────────────────────────────────────────────────────────────── */

#about p { color: var(--muted); }
#about h2 { margin-bottom: 1.1rem; }

/* ── Closing CTA ───────────────────────────────────────────────────────── */

.closing {
  background: #10233A;
  border-top: 1px solid var(--border);
}
.closing h2 { color: #FBF9F6; }
/* The section rule has to lift to light copper here — #B26B3F on #10233A is
   1.9:1 and effectively disappears. */
.closing h2::after { background: #D99A6C; }
.closing p { color: #C6D2DE; }   /* 10.3:1 on #10233A */
.closing .fine { color: #A9B8C7; }
.closing .fine a { color: #E2A97D; }  /* 7.2:1 on #10233A */
.closing .fine a:hover { color: #FBF9F6; }
.closing .cta-row { margin-top: 1.75rem; }

/* ── Intake form ───────────────────────────────────────────────────────── */
/* Lives inside .closing, so it is always on navy in both themes. Every
   colour below is one of the pairs already contrast-verified for #10233A. */

.intake { margin-top: 2rem; }

.field { margin: 0 0 1.15rem; display: flex; flex-direction: column; }

.field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #C6D2DE;                /* 10.33:1 on #10233A */
  margin-bottom: 0.4rem;
}

.field .opt { font-weight: 400; color: #A9B8C7; }   /* 7.83:1 */

.field .hint {
  font-size: 0.87rem;
  line-height: 1.45;
  color: #A9B8C7;
  margin-bottom: 0.5rem;
  max-width: 54ch;
}

.intake input[type="text"],
.intake input[type="email"],
.intake input[type="tel"],
.intake textarea {
  font: inherit;
  font-size: 1rem;
  min-height: 44px;              /* tap target */
  padding: 0.6rem 0.75rem;
  background: #FBF9F6;
  color: #10233A;                /* 15.10:1 inside the field */
  border: 1px solid #FBF9F6;
  border-radius: var(--radius);
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.intake textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }

.intake input:focus-visible,
.intake textarea:focus-visible {
  outline: 3px solid #E2A97D;
  outline-offset: 2px;
}

/* Native validation feedback, no JS. Must be :user-invalid, not :invalid —
   :invalid matches an untouched empty required field, so the whole form would
   render pre-errored on load. There are no placeholders here, so the usual
   :not(:placeholder-shown) guard would not work either. Browsers without
   :user-invalid simply get no error styling, which is the right fallback. */
.intake input:user-invalid,
.intake textarea:user-invalid {
  border-color: #E2A97D;
  box-shadow: 0 0 0 2px rgba(226, 169, 125, 0.35);
}

.field-row { display: grid; gap: 0 1rem; }

@media (min-width: 40em) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

/* Honeypot. Deliberately NOT display:none — some bots skip hidden inputs but
   fill anything they can parse, so this stays in the layout and off-screen. */
.honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.intake .btn-invert { border: 2px solid #FBF9F6; cursor: pointer; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--band);
  border-top: 1px solid var(--border);
  padding-block: 2.75rem;
  font-size: 0.94rem;
  color: var(--muted);
}

.footer-inner { display: grid; gap: 1.1rem; }

@media (min-width: 48em) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .copyright { grid-column: 1 / -1; }
}

.site-footer strong { color: var(--ink); font-family: var(--serif); font-weight: 700; }
.site-footer p { margin: 0; }
.copyright { color: var(--muted); font-size: 0.86rem; }

/* ── Focus ─────────────────────────────────────────────────────────────── */

:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 3px;
  border-radius: 3px;
}
.closing :focus-visible, .btn-invert:focus-visible { outline-color: #E2A97D; }

/* ══ Motion ═══════════════════════════════════════════════════════════════
   One rule governs everything below: an animation may only describe where an
   element comes FROM. Every keyframe block here is `from`-only (or `to`-only
   for the two that add a shadow), so the finished state is the element's own
   ordinary computed style. That means the page is fully visible and correctly
   positioned when the animation never runs — unsupported browser, reduced
   motion, scripting-free crawler, whatever. Nothing on this page is made to
   appear by an animation, which is the usual way scroll-reveal effects fail.

   The reveals move `translate`, not `transform`. `.card:hover` uses
   `transform`, and the two are separate properties that compose, so a card
   can be mid-reveal and hovered at the same time without either one
   clobbering the other.

   The `prefers-reduced-motion: reduce` block near the top of this file also
   kills all of this with `animation: none !important` — belt and braces, and
   it is the reason `no-preference` gating here is safe rather than redundant:
   a browser too old to know the media feature matches neither query, so it
   simply gets the static page.
   ══════════════════════════════════════════════════════════════════════════ */

@keyframes rise {
  from { opacity: 0; translate: 0 14px; }
}
@keyframes draw {
  from { stroke-dasharray: 100; stroke-dashoffset: 100; }
  to   { stroke-dasharray: 100; stroke-dashoffset: 0; }
}
@keyframes header-lift {
  to { box-shadow: 0 8px 24px -14px rgba(6, 14, 24, 0.45); }
}

@media (prefers-reduced-motion: no-preference) {
  /* Above the fold. Time-based rather than scroll-based, because it plays once
     on load. The whole cascade is done inside 0.74s, so nothing is still
     moving by the time a visitor reaches for the button. */
  .hero .eyebrow { animation: rise 0.5s 0s    cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero h1       { animation: rise 0.5s 0.06s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero .lede    { animation: rise 0.5s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero .cta-row { animation: rise 0.5s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .hero .fine    { animation: rise 0.5s 0.24s cubic-bezier(0.22, 1, 0.36, 1) both; }

  /* The mark draws itself on. The letter is a filled outline, so there is no
     stroke to dash — instead a fat stroke sweeps along the letter's skeleton
     inside a <mask>, uncovering the real letterform as it goes. Same single
     animated property as before. pathLength="100" on that path is what makes
     these 0-100 dash units correct regardless of its real arc length.

     `both` matters twice over: during the 0.15s delay the mask holds the
     `from` state (nothing revealed), and after it holds the `to` state (fully
     revealed). Without it the mask would sit at its unanimated value — a
     complete stroke — and the mark would simply appear. */
  .brand-sweep { animation: draw 0.9s 0.15s cubic-bezier(0.65, 0, 0.35, 1) both; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 6% entry 78%;
    }

    /* A view() timeline gives each element its own progress, so siblings in one
       row would otherwise all arrive at once. The stagger has to come from the
       range — a scroll-driven animation ignores animation-delay. */
    .stagger > :nth-child(2)   { animation-range: entry 13% entry 85%; }
    .stagger > :nth-child(3)   { animation-range: entry 20% entry 92%; }
    .stagger > :nth-child(4)   { animation-range: entry 27% entry 99%; }
    .stagger > :nth-child(n+5) { animation-range: entry 34% entry 100%; }
  }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Lifts the sticky header off the page as soon as it starts overlapping
       content, and sets it back down at the top. No JS scroll listener. */
    .site-header {
      animation: header-lift linear both;
      animation-timeline: scroll();
      animation-range: 0 140px;
    }
  }
}
