/* ============================================================
   The Meador Group — design system
   Accent: muted technical teal (#5BA3A8)
   ============================================================ */

:root {
  /* Color */
  --bg:        #0A0A0B;
  --bg-2:      #0E0F10;       /* raised surface */
  --bg-3:      #131415;       /* cards */
  --fg:        #F5F2EC;       /* warm off-white */
  --fg-2:      #8A8780;       /* warm gray secondary */
  --fg-3:      #5C5A55;       /* faint */
  --accent:    #5BA3A8;       /* muted technical teal */
  --accent-2:  #74C0C5;       /* hover */
  --accent-dim: rgba(91,163,168,0.12);
  --line:      rgba(245,242,236,0.08);
  --line-2:    rgba(245,242,236,0.14);

  /* Type */
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* Fluid type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem);
  --text-2xl:  clamp(1.9rem, 1.4rem + 2.4vw, 2.9rem);
  --text-hero: clamp(2.5rem, 1.6rem + 4.4vw, 5rem);

  /* Spacing */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-6: 1.5rem;   --sp-8: 2rem;    --sp-12: 3rem;   --sp-16: 4rem;
  --sp-20: 5rem;    --sp-24: 6rem;   --sp-32: 8rem;

  --maxw: 1140px;
  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg);
  padding: var(--sp-3) var(--sp-4); z-index: 200; font-weight: 600;
}
.skip-link:focus { left: var(--sp-4); top: var(--sp-4); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-6); }
.section { padding-block: clamp(var(--sp-16), 9vw, var(--sp-32)); }
.section--tight { padding-block: clamp(var(--sp-12), 6vw, var(--sp-20)); }

main { display: block; }

/* ---------- Typography helpers ---------- */
.mono { font-family: var(--mono); }

.label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
}
.label--muted { color: var(--fg-2); }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
h1 { font-size: var(--text-hero); font-weight: 700; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); letter-spacing: -0.015em; }
h4 { font-size: var(--text-lg); letter-spacing: -0.01em; line-height: 1.3; }

.lead { font-size: var(--text-lg); color: var(--fg-2); line-height: 1.6; max-width: 60ch; }
.muted { color: var(--fg-2); }
.prose p { color: var(--fg-2); max-width: 68ch; margin-bottom: var(--sp-6); }
.prose p strong, .prose strong { color: var(--fg); font-weight: 600; }

.price { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 500; }
.price .accent { color: var(--accent); }

.hairline { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--sans); font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.7rem 1.2rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  min-height: 44px;
}
.btn--primary { background: var(--accent); color: #06201f; }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { border-color: var(--line-2); color: var(--fg); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn--sm { padding: 0.5rem 0.95rem; font-size: var(--text-xs); min-height: 38px; }

.txtlink { color: var(--accent); font-weight: 500; display: inline-flex; gap: 0.4rem; align-items: center; }
.txtlink:hover { color: var(--accent-2); }
.txtlink .arrow { transition: transform .18s ease; }
.txtlink:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,11,0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: var(--sp-6);
}
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--fg); }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo__txt {
  font-family: var(--mono); font-size: var(--text-sm); letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 500; white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: var(--sp-8); }
.nav a {
  font-size: var(--text-sm); color: var(--fg-2); font-weight: 500;
  transition: color .15s ease; position: relative;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--accent);
}
.header__right { display: flex; align-items: center; gap: var(--sp-6); }

.navtoggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--radius);
  width: 42px; height: 42px; color: var(--fg); cursor: pointer; align-items: center; justify-content: center; }

.mobilenav { display: none; }

@media (max-width: 760px) {
  .nav, .header__right .btn { display: none; }
  .navtoggle { display: inline-flex; }
  .mobilenav {
    display: block; border-bottom: 1px solid var(--line); background: var(--bg-2);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .mobilenav.open { max-height: 340px; }
  .mobilenav__inner { padding: var(--sp-4) var(--sp-6) var(--sp-8); display: flex; flex-direction: column; gap: var(--sp-4); }
  .mobilenav a { font-size: var(--text-lg); color: var(--fg); padding: var(--sp-2) 0; }
  .mobilenav .btn { width: fit-content; margin-top: var(--sp-2); }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: var(--sp-16) var(--sp-12); margin-top: var(--sp-12); }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: var(--sp-12); align-items: start;
}
.footer__brand .logo { margin-bottom: var(--sp-4); }
.footer small, .footer p { color: var(--fg-2); font-size: var(--text-sm); }
.footer__links { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer__links a { font-size: var(--text-sm); color: var(--fg-2); transition: color .15s ease; }
.footer__links a:hover { color: var(--accent); }
.footer__meta { font-family: var(--mono); font-size: var(--text-xs); color: var(--fg-3); line-height: 1.8; text-align: right; }
.footer__meta a:hover { color: var(--accent); }
@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .footer__meta { text-align: left; }
}

/* ---------- CTA band ---------- */
.ctaband { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.ctaband__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8);
  padding-block: clamp(var(--sp-12), 6vw, var(--sp-20));
}
.ctaband h2 { font-size: var(--text-xl); max-width: 22ch; }
.ctaband p { color: var(--fg-2); margin-top: var(--sp-2); }
@media (max-width: 640px) { .ctaband__inner { flex-direction: column; align-items: flex-start; gap: var(--sp-6); } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(var(--sp-20), 12vw, calc(var(--sp-32) + 2rem)) var(--sp-16); }
.hero .label { margin-bottom: var(--sp-6); }
.hero h1 { max-width: 16ch; margin-bottom: var(--sp-8); }
.hero .lead { font-size: var(--text-xl); color: var(--fg-2); font-weight: 400; max-width: 56ch; line-height: 1.45; letter-spacing: -0.01em; }
.hero__cta { display: flex; gap: var(--sp-4); margin-top: var(--sp-12); flex-wrap: wrap; }
.hero__note { margin-top: var(--sp-8); font-family: var(--mono); font-size: var(--text-xs); color: var(--fg-2); letter-spacing: 0.06em; }
.hero__note .dot { color: var(--accent); }

/* page hero (interior) */
.phero { padding-block: clamp(var(--sp-16), 10vw, var(--sp-24)) var(--sp-12); border-bottom: 1px solid var(--line); }
.phero .label { margin-bottom: var(--sp-4); }
.phero h1 { font-size: var(--text-2xl); max-width: 20ch; margin-bottom: var(--sp-6); }
.phero .lead { max-width: 64ch; }

/* ---------- Service cards grid (home) ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc-card { background: var(--bg); padding: var(--sp-8); display: flex; flex-direction: column; transition: background .2s ease; }
.svc-card:hover { background: var(--bg-3); }
.svc-card__num { font-family: var(--mono); font-size: var(--text-xs); color: var(--accent); letter-spacing: 0.1em; margin-bottom: var(--sp-6); }
.svc-card h3 { font-size: var(--text-lg); margin-bottom: var(--sp-2); }
.svc-card__tag { font-size: var(--text-sm); color: var(--fg); font-style: italic; margin-bottom: var(--sp-4); }
.svc-card p { color: var(--fg-2); font-size: var(--text-sm); line-height: 1.6; margin-bottom: var(--sp-6); flex: 1; }
.svc-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.svc-card__price { font-family: var(--mono); font-size: var(--text-xs); color: var(--fg); }
.svc-card--wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .svc-grid { grid-template-columns: 1fr; } }

/* ---------- Why section (3-col) ---------- */
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-12); }
.cols3 .col h4 { margin-bottom: var(--sp-4); }
.cols3 .col p { color: var(--fg-2); font-size: var(--text-sm); line-height: 1.65; }
.cols3 .label { margin-bottom: var(--sp-4); }
@media (max-width: 820px) { .cols3 { grid-template-columns: 1fr; gap: var(--sp-8); } }

/* ---------- Process steps ---------- */
.steps { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step { background: var(--bg); display: grid; grid-template-columns: 80px 1fr; gap: var(--sp-6); padding: var(--sp-8) 0; align-items: start; }
.step__n { font-family: var(--mono); font-size: var(--text-lg); color: var(--accent); }
.step h4 { margin-bottom: var(--sp-2); }
.step p { color: var(--fg-2); font-size: var(--text-sm); max-width: 70ch; }
@media (max-width: 640px) { .step { grid-template-columns: 48px 1fr; gap: var(--sp-4); } }

/* ---------- Comparison table ---------- */
.cmp { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.cmp th, .cmp td { text-align: left; padding: var(--sp-4) var(--sp-4); border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-family: var(--mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-2); font-weight: 500; }
.cmp thead th:last-child { color: var(--accent); }
.cmp td:first-child { color: var(--fg); font-weight: 500; width: 26%; }
.cmp td:nth-child(2) { color: var(--fg-3); }
.cmp td:last-child { color: var(--fg); }
.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .cmp { min-width: 560px; } }

/* ---------- Section heads ---------- */
.shead { margin-bottom: var(--sp-12); }
.shead .label { margin-bottom: var(--sp-4); }
.shead h2 { max-width: 22ch; }
.shead p { color: var(--fg-2); margin-top: var(--sp-4); max-width: 56ch; }

/* ---------- About teaser ---------- */
.teaser { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--sp-16); align-items: center; }
.teaser p { color: var(--fg-2); margin-bottom: var(--sp-6); }
@media (max-width: 820px) { .teaser { grid-template-columns: 1fr; gap: var(--sp-8); } }

/* ============================================================
   Service detail page
   ============================================================ */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: var(--sp-16); align-items: start; }
.detail-main > section { margin-bottom: var(--sp-16); }
.detail-main h2 { font-size: var(--text-xl); margin-bottom: var(--sp-6); }
.detail-main h2 .label { display: block; font-size: var(--text-xs); margin-bottom: var(--sp-3); }
@media (max-width: 920px) { .detail-grid { grid-template-columns: 1fr; gap: var(--sp-12); } }

.deliv-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-4); }
.deliv-list li { position: relative; padding-left: var(--sp-8); color: var(--fg-2); font-size: var(--text-base); line-height: 1.6; }
.deliv-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.deliv-list li strong { color: var(--fg); font-weight: 600; }

.techbox { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-8); font-family: var(--mono); font-size: var(--text-sm); color: var(--fg-2); line-height: 1.7; position: relative; }
.techbox::before { content: "// THE TECH"; display: block; font-size: var(--text-xs); color: var(--accent); letter-spacing: 0.1em; margin-bottom: var(--sp-4); }

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline__row { display: grid; grid-template-columns: 130px 1fr; gap: var(--sp-6); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.timeline__wk { font-family: var(--mono); font-size: var(--text-xs); color: var(--accent); letter-spacing: 0.06em; padding-top: 2px; }
.timeline__row span:last-child { color: var(--fg-2); font-size: var(--text-sm); }
.timeline__total { font-family: var(--mono); font-size: var(--text-sm); color: var(--fg); margin-top: var(--sp-4); }
@media (max-width: 520px){ .timeline__row { grid-template-columns: 100px 1fr; gap: var(--sp-3);} }

.who-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); }
.who-cols ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.who-cols li { padding-left: var(--sp-6); position: relative; color: var(--fg-2); font-size: var(--text-sm); line-height: 1.55; }
.who-cols .for li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.who-cols .notfor li::before { content: "−"; position: absolute; left: 0; color: var(--fg-3); font-family: var(--mono); }
.who-cols h4 { margin-bottom: var(--sp-6); }
@media (max-width: 640px){ .who-cols { grid-template-columns: 1fr; gap: var(--sp-8);} }

.faq dt { font-weight: 600; color: var(--fg); margin-bottom: var(--sp-3); font-size: var(--text-base); }
.faq dd { color: var(--fg-2); font-size: var(--text-sm); line-height: 1.65; margin-bottom: var(--sp-8); max-width: 72ch; }
.faq dt::before { content: "Q "; font-family: var(--mono); color: var(--accent); font-size: var(--text-xs); }

/* pricing sidebar */
.pricecard { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-8); position: sticky; top: 90px; }
.pricecard .tier { padding-bottom: var(--sp-6); margin-bottom: var(--sp-6); border-bottom: 1px solid var(--line); }
.pricecard .tier:last-of-type { border-bottom: none; }
.pricecard .tier__label { font-family: var(--mono); font-size: var(--text-xs); color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.pricecard .tier__price { font-family: var(--mono); font-size: var(--text-lg); color: var(--fg); margin: var(--sp-2) 0; font-variant-numeric: tabular-nums; }
.pricecard .tier__desc { font-size: var(--text-xs); color: var(--fg-2); line-height: 1.5; }
.pricecard .terms { font-size: var(--text-xs); color: var(--fg-3); font-family: var(--mono); line-height: 1.6; margin-top: var(--sp-4); }
.pricecard .btn { width: 100%; justify-content: center; margin-top: var(--sp-6); }
@media (max-width: 920px){ .pricecard { position: static; } }

.tagline-big { font-size: var(--text-xl); color: var(--fg); line-height: 1.35; max-width: 26ch; font-weight: 500; letter-spacing: -0.01em; }

/* ============================================================
   Contact / form
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: var(--sp-16); align-items: start; }
@media (max-width: 880px){ .contact-grid { grid-template-columns: 1fr; gap: var(--sp-12);} }

.field { margin-bottom: var(--sp-6); }
.field label { display: block; font-family: var(--mono); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); margin-bottom: var(--sp-2); }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  color: var(--fg); font-family: var(--sans); font-size: var(--text-base); padding: 0.7rem 0.85rem;
  transition: border-color .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%238A8780' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.2rem; }
.field .err { color: #d98b8b; font-size: var(--text-xs); margin-top: var(--sp-2); display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #b06464; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 520px){ .row2 { grid-template-columns: 1fr; gap: 0;} }

.form-success { display: none; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius); padding: var(--sp-12); text-align: left; }
.form-success.show { display: block; }
.form-success .check { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-dim); display: flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: var(--sp-6); }
.form-success h3 { margin-bottom: var(--sp-3); }
.form-success p { color: var(--fg-2); font-size: var(--text-sm); }
.form-error { display: none; margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); background: rgba(220, 90, 90, 0.08); border: 1px solid rgba(220, 90, 90, 0.35); color: #e89090; font-size: var(--text-sm); font-family: var(--font-mono); }
.form-error.show { display: block; }

.next-steps { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-8); }
.next-steps .label { margin-bottom: var(--sp-6); }
.next-steps ol { list-style: none; counter-reset: ns; display: flex; flex-direction: column; gap: var(--sp-6); }
.next-steps li { counter-increment: ns; position: relative; padding-left: var(--sp-12); color: var(--fg-2); font-size: var(--text-sm); line-height: 1.55; }
.next-steps li::before { content: counter(ns, decimal-leading-zero); position: absolute; left: 0; font-family: var(--mono); color: var(--accent); font-size: var(--text-xs); top: 2px; }

/* ============================================================
   Legal pages
   ============================================================ */
.legal { max-width: 720px; }
.legal h2 { font-size: var(--text-lg); margin: var(--sp-12) 0 var(--sp-4); }
.legal p, .legal li { color: var(--fg-2); font-size: var(--text-base); line-height: 1.7; margin-bottom: var(--sp-4); }
.legal ul { padding-left: var(--sp-6); }
.legal li { margin-bottom: var(--sp-2); }
.legal a { color: var(--accent); }
.legal .updated { font-family: var(--mono); font-size: var(--text-xs); color: var(--fg-3); letter-spacing: 0.06em; }

/* ============================================================
   About
   ============================================================ */
.about-body { display: grid; grid-template-columns: 1fr 300px; gap: var(--sp-16); align-items: start; }
@media (max-width: 880px){ .about-body { grid-template-columns: 1fr; gap: var(--sp-12);} }
.facts { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-8); position: sticky; top: 90px; }
.facts .label { margin-bottom: var(--sp-6); }
.facts dl { display: flex; flex-direction: column; gap: var(--sp-4); }
.facts dt { font-family: var(--mono); font-size: var(--text-xs); color: var(--fg-2); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }
.facts dd { color: var(--fg); font-size: var(--text-sm); }
@media (max-width: 880px){ .facts { position: static; } }
.about-body .prose p { font-size: var(--text-base); line-height: 1.75; }

/* ============================================================
   Motion
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(0.16,1,0.3,1), transform .6s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
