/* ===========================================================================
   ARIZONA COMPUTER GURU — "Sonoran Ledger"
   Hand-built. Warm paper, precise rules, mono numerals. No framework.
   Baseline grid: 24px. Radius: 0–2px. Orange = ink, used sparingly.
   =========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --paper:      #F7F3EB;
  --surface:    #EDE6D9;
  --surface-2:  #E4DACA;
  --ink:        #2A2521;
  --ink-2:      #5A5148;
  --ink-3:      #6D6456;   /* AA-safe for small text on cream (~4.6:1)        */
  --rule:       rgba(90, 81, 72, 0.16);
  --rule-soft:  rgba(90, 81, 72, 0.09);
  --accent:     #F2922E;   /* the amber "ink" — fills, marks, underlines      */
  --accent-ink: #BD5A00;   /* orange TEXT on light paper (AA-safe ~4.9:1)     */
  --on-accent:  #2A2521;   /* text sitting on an amber fill                   */
  --good:       #4F7A3F;

  --maxw: 1140px;
  --base: 24px;            /* baseline unit */

  --f-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body:    "Lexend", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(40, 33, 25, 0.45);
}

[data-theme="dark"] {
  --paper:      #1C1814;
  --surface:    #2A2520;
  --surface-2:  #322B24;
  --ink:        #E8DFCE;
  --ink-2:      #C4B8A3;
  --ink-3:      #9A8C77;
  --rule:       rgba(196, 184, 163, 0.16);
  --rule-soft:  rgba(196, 184, 163, 0.08);
  --accent:     #F2A24E;
  --accent-ink: #F4A85C;   /* orange text on dark paper (AA-safe)            */
  --on-accent:  #1C1814;
  --good:       #8FB97E;
  --shadow: 0 1px 0 var(--rule), 0 22px 48px -30px rgba(0, 0, 0, 0.7);
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.5;                 /* 24px at 16px → on-grid */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s ease, color 0.4s ease;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
::selection { background: var(--accent); color: var(--on-accent); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- Layout primitives -------------------------------------------------- */
.wrap { width: min(100% - 3rem, var(--maxw)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 3rem, 760px); margin-inline: auto; }

section { padding-block: calc(var(--base) * 3.5); }
.section-tag {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: var(--base);
}
.section-tag::before {            /* precision mark, not an icon font */
  content: ""; width: 28px; height: 0;
  border-top: 2px solid var(--accent);
}
.section-tag span { color: var(--ink-3); }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.04;
  letter-spacing: -0.01em; color: var(--ink); }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); margin-bottom: var(--base); }
h3 { font-size: 1.5rem; font-weight: 600; }
.lead { font-size: 1.18rem; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* underline "ink" used on key phrases */
.ul { background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px; background-position: 0 92%; background-repeat: no-repeat;
  padding-bottom: 1px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  font-family: var(--f-display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.4rem; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; text-decoration: none; transition: transform 0.15s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { color: var(--on-accent); filter: brightness(1.05); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--accent); color: var(--ink); }
.btn .arrow { font-family: var(--f-mono); }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem;
  min-height: calc(var(--base) * 3); }
.brand { display: flex; align-items: baseline; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand__mark { /* CSS-drawn monogram, not an image icon */
  font-family: var(--f-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.05em; color: var(--on-accent); background: var(--accent);
  padding: 0.15rem 0.5rem; border-radius: 2px; align-self: center;
}
.brand__name { font-family: var(--f-display); font-weight: 600; font-size: 1.35rem;
  letter-spacing: 0.005em; }
.brand__since { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-3); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.2rem; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav a { font-family: var(--f-body); font-size: 0.92rem; color: var(--ink-2);
  text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav__phone { font-family: var(--f-mono); color: var(--ink) !important; font-weight: 500; }
.theme-toggle, .nav__toggle {
  background: transparent; border: 1px solid var(--rule); border-radius: 2px;
  width: 44px; height: 44px; cursor: pointer; color: var(--ink);
  display: grid; place-items: center; font-size: 1.1rem; transition: border-color 0.2s;
}
.theme-toggle:hover, .nav__toggle:hover { border-color: var(--accent); }
.nav__toggle { display: none; font-family: var(--f-mono); line-height: 1; }

@media (max-width: 880px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow); padding: 0.5rem 0;
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height 0.25s ease, visibility 0.25s ease;
  }
  .site-header.nav-open .nav__links { max-height: 60vh; visibility: visible; }
  .nav__links a { padding: 0.85rem 1.5rem; font-size: 1.05rem;
    border-top: 1px solid var(--rule-soft); }
}

/* ---- Hero --------------------------------------------------------------- */
.hero { padding-block: calc(var(--base) * 3) calc(var(--base) * 4); position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: calc(var(--base) * 2);
  align-items: center; }
.hero__eyebrow { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: var(--base); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; }
.hero h1 .amp { color: var(--accent-ink); white-space: nowrap; }
.hero__sub { font-size: 1.3rem; color: var(--ink-2); margin-top: var(--base);
  max-width: 38ch; }
.hero__cta { display: flex; gap: 1rem; margin-top: calc(var(--base) * 1.5); flex-wrap: wrap; }
.hero__note { font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-3);
  margin-top: var(--base); }
.hero__frame {
  border: 1px solid var(--rule); border-radius: 2px; overflow: hidden;
  box-shadow: var(--shadow); background: var(--surface); position: relative;
}
.hero__frame img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero__caption {
  font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink-3);
  padding: 0.6rem 0.9rem; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; background: var(--surface);
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero__frame { order: -1; }
}

/* ---- Ledger ruling background (signature) ------------------------------- */
.ledger {
  background-image: repeating-linear-gradient(
    to bottom, transparent, transparent 23px, var(--rule-soft) 23px, var(--rule-soft) 24px);
  background-position: 0 0;
}

/* ---- Trust strip -------------------------------------------------------- */
.trust { border-block: 1px solid var(--rule); background: var(--surface); }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--rule); }
.trust__cell { background: var(--surface); padding: calc(var(--base) * 1.25) 1.25rem; }
.trust__num { font-family: var(--f-mono); font-size: 1.9rem; font-weight: 600;
  color: var(--ink); line-height: 1; }
.trust__num .u { color: var(--accent-ink); }
.trust__label { font-size: 0.86rem; color: var(--ink-2); margin-top: 0.5rem; }
@media (max-width: 720px) { .trust .wrap { grid-template-columns: repeat(2, 1fr); } }

/* ---- Concierge story ---------------------------------------------------- */
.story .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--base) * 2.2);
  align-items: center; }
.story__img { border: 1px solid var(--rule); border-radius: 2px; overflow: hidden;
  box-shadow: var(--shadow); }
.story__img img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.story p + p { margin-top: var(--base); }
.story blockquote {
  font-family: var(--f-display); font-weight: 500; font-size: 1.6rem; line-height: 1.15;
  color: var(--ink); border-left: 2px solid var(--accent); padding-left: 1.1rem;
  margin-top: calc(var(--base) * 1.2);
}
@media (max-width: 820px) {
  .story .wrap { grid-template-columns: 1fr; }
  .story__img { order: -1; }
}

/* ---- Services (continuous ledger list, not cards) ----------------------- */
.svc-list { border-top: 1px solid var(--rule); margin-top: var(--base); }
.svc {
  display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 1.25rem;
  align-items: baseline; padding-block: calc(var(--base) * 0.9);
  border-bottom: 1px solid var(--rule); transition: background 0.2s ease;
}
.svc:hover { background: var(--surface); }
.svc__no { font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-3); }
.svc__name { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; }
.svc__desc { color: var(--ink-2); font-size: 0.98rem; margin-top: 0.25rem; max-width: 60ch; }
.svc__meta { font-family: var(--f-mono); font-size: 0.82rem; color: var(--accent-ink);
  text-align: right; white-space: nowrap; }
@media (max-width: 680px) {
  .svc { grid-template-columns: 1.8rem 1fr; }
  .svc__meta { grid-column: 2; text-align: left; }
}

/* ---- Pricing rate card -------------------------------------------------- */
.pricing { background: var(--surface); border-block: 1px solid var(--rule); }
.rate-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.tier { background: var(--paper); padding: calc(var(--base) * 1.5) 1.5rem; position: relative;
  align-self: stretch; }
.tier--pop { background: var(--surface-2); box-shadow: inset 0 3px 0 var(--accent); }
.tier__flag { position: absolute; top: 0; right: 0; font-family: var(--f-mono);
  font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--accent); color: var(--on-accent); padding: 0.25rem 0.6rem; }
.tier__name { font-family: var(--f-display); font-size: 1.7rem; font-weight: 600; }
.tier__price { font-family: var(--f-mono); font-size: 2.6rem; font-weight: 700;
  color: var(--ink); margin-top: 0.5rem; line-height: 1; }
.tier__price .per { font-size: 0.9rem; color: var(--ink-3); font-weight: 400; }
.tier__blurb { color: var(--ink-2); font-size: 0.92rem; margin-top: 0.75rem;
  padding-bottom: var(--base); border-bottom: 1px solid var(--rule); }
.tier ul { list-style: none; padding: 0; margin-top: var(--base); display: grid; gap: 0.5rem; }
.tier li { font-size: 0.92rem; color: var(--ink-2); padding-left: 1.4rem; position: relative; }
.tier li::before { content: "+"; position: absolute; left: 0; color: var(--accent-ink);
  font-family: var(--f-mono); font-weight: 700; }
.tier li.is-base::before { content: "\2713"; }
@media (max-width: 820px) { .rate-card { grid-template-columns: 1fr; } }

.plans { margin-top: calc(var(--base) * 2); }
.plan-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.plan-table caption { text-align: left; font-family: var(--f-mono); font-size: 0.74rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 0.75rem; }
.plan-table th, .plan-table td { text-align: left; padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule); }
.plan-table thead th { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.plan-table td.num, .plan-table th.num { font-family: var(--f-mono); text-align: right;
  font-variant-numeric: tabular-nums; }
.plan-table tr:hover td { background: var(--surface); }
.plan-table .pop td { color: var(--ink); }
.plan-table .pop td:first-child::after { content: " \25C6"; color: var(--accent-ink); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plan-table { min-width: 460px; }

/* visible keyboard focus everywhere interactive */
.btn:focus-visible, a:focus-visible, button:focus-visible, .faq__q:focus-visible,
.theme-toggle:focus-visible, .nav__toggle:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px;
}

/* ---- Calculator (centerpiece) ------------------------------------------ */
.calc { position: relative; }
.calc__shell {
  border: 1px solid var(--rule); border-radius: 2px; box-shadow: var(--shadow);
  background: var(--paper); overflow: hidden;
}
.calc__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; }
.calc__inputs { padding: calc(var(--base) * 1.5); border-right: 1px solid var(--rule); }
.calc__row { display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 1rem; padding-block: calc(var(--base) * 0.6); border-bottom: 1px dashed var(--rule); }
.calc__row label { font-size: 0.98rem; color: var(--ink); }
.calc__row .hint { display: block; font-size: 0.78rem; color: var(--ink-3); margin-top: 0.15rem; }
.calc__control { display: flex; align-items: center; gap: 0.5rem; }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--rule);
  border-radius: 2px; overflow: hidden; }
.stepper button { width: 44px; min-height: 44px; border: 0; background: var(--surface);
  color: var(--ink); font-family: var(--f-mono); font-size: 1.2rem; cursor: pointer; }
.stepper button:hover { background: var(--accent); color: var(--on-accent); }
.stepper input { width: 64px; height: 44px; border: 0; text-align: center; background: var(--paper);
  color: var(--ink); font-family: var(--f-mono); font-size: 1.05rem; font-weight: 600;
  appearance: textfield; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0; }

select, .calc__control select {
  font-family: var(--f-body); font-size: 0.95rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 2px;
  padding: 0.5rem 2rem 0.5rem 0.7rem; cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select:focus, .stepper input:focus, input:focus { outline: 2px solid var(--accent);
  outline-offset: 1px; }

.toggle-row { display: flex; align-items: center; gap: 0.6rem; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--surface-2);
  border: 1px solid var(--rule); border-radius: 2px; transition: background 0.2s; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  background: var(--ink-3); border-radius: 1px; transition: transform 0.2s, background 0.2s; }
.switch input:checked + .track { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.switch input:checked + .track + .knob, .switch input:checked ~ .knob { transform: translateX(20px);
  background: var(--accent); }

/* ledger output side */
.calc__out { padding: calc(var(--base) * 1.5); background: var(--surface);
  display: flex; flex-direction: column; }
.calc__out h3 { font-size: 1.15rem; }
.ledger-lines { margin-top: var(--base); flex: 1; }
.lline { display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  font-family: var(--f-mono); font-size: 0.9rem; padding-block: 0.45rem;
  color: var(--ink-2); }
.lline .lcost { color: var(--ink); font-variant-numeric: tabular-nums; }
.lline.dots .lname { position: relative; }
.lline.is-zero { display: none; }
.calc__divider { border: 0; border-top: 1px solid var(--ink-3); margin-block: 0.75rem; }
.calc__total { display: grid; grid-template-columns: 1fr auto; align-items: end; }
.calc__total .tlabel { font-family: var(--f-display); font-size: 1.1rem; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--ink-2); }
.calc__total .tnum { font-family: var(--f-mono); font-size: 2.9rem; font-weight: 700;
  color: var(--ink); line-height: 1; }
.calc__annual { font-family: var(--f-mono); font-size: 0.82rem; color: var(--ink-3);
  text-align: right; margin-top: 0.4rem; }
.calc__perep { font-family: var(--f-mono); font-size: 0.82rem; color: var(--accent-ink);
  margin-top: 0.2rem; text-align: right; }
.calc__cta { margin-top: var(--base); }
.calc__foot { font-size: 0.78rem; color: var(--ink-3); margin-top: 1rem; }
@media (max-width: 820px) {
  .calc__grid { grid-template-columns: 1fr; }
  .calc__inputs { border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* ---- FAQ ---------------------------------------------------------------- */
.faq { background: var(--surface); border-block: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q { width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer;
  padding: calc(var(--base) * 0.9) 0; display: flex; justify-content: space-between;
  gap: 1.5rem; align-items: center; color: var(--ink); font-family: var(--f-display);
  font-size: 1.25rem; font-weight: 600; }
.faq__q .pm { font-family: var(--f-mono); color: var(--accent-ink); font-size: 1.4rem;
  flex: none; transition: transform 0.2s; }
.faq__q[aria-expanded="true"] .pm { transform: rotate(45deg); }
.faq__a { overflow: hidden; max-height: 0; visibility: hidden;
  transition: max-height 0.3s ease, visibility 0.3s ease; }
.faq__q[aria-expanded="true"] + .faq__a { visibility: visible; }
.faq__a-inner { padding-bottom: calc(var(--base) * 1.1); color: var(--ink-2); max-width: 70ch; }

/* ---- Contact ------------------------------------------------------------ */
.contact { padding-block: calc(var(--base) * 4.5); }
.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--base) * 2.5);
  align-items: start; }
.contact__lines { font-family: var(--f-mono); margin-top: var(--base); display: grid; gap: 0.6rem; }
.contact__lines .k { color: var(--ink-3); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; }
.contact__lines .v { color: var(--ink); font-size: 1.05rem; }
.contact__lines a { color: var(--ink); }
.contact__lines a:hover { color: var(--accent-ink); }
.form-field { margin-bottom: var(--base); }
.form-field label { display: block; font-size: 0.85rem; color: var(--ink-2);
  margin-bottom: 0.4rem; font-family: var(--f-mono); letter-spacing: 0.06em;
  text-transform: uppercase; }
.form-field input, .form-field textarea {
  width: 100%; font-family: var(--f-body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 2px;
  padding: 0.65rem 0.8rem; }
.form-field textarea { min-height: calc(var(--base) * 4); resize: vertical; }
.form-note { font-size: 0.82rem; color: var(--ink-3); margin-top: 0.5rem; }
@media (max-width: 820px) { .contact .wrap { grid-template-columns: 1fr; } }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule); padding-block: calc(var(--base) * 1.5);
  background: var(--paper); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  align-items: center; }
.site-footer p { font-size: 0.84rem; color: var(--ink-3); font-family: var(--f-mono); }
.site-footer .disclaimer { width: 100%; font-size: 0.74rem; color: var(--ink-3);
  border-top: 1px dashed var(--rule); padding-top: 0.9rem; margin-top: 0.5rem; }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
