/* ==========================================================================
   ZH Tech — built on the same design system as zackhaynie.com
   Inter Tight, light-first with dark mode, refined cards / chips / pillars.
   Kept large and legible so it stays easy for older visitors.
   ========================================================================== */

:root {
  --bg: #fbfbfd;
  --bg-card: #f5f5f7;
  --bg-elevated: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --accent: #0066cc;
  --accent-ink: #ffffff;
  --accent-2: #0f7a3d;          /* green, the tech-help accent */
  --accent-2-ink: #ffffff;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-card: #101012;
    --bg-elevated: #1a1a1c;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #86868b;
    --line: #2a2a2e;
    --line-soft: #1c1c1f;
    --accent: #2997ff;
    --accent-ink: #000000;
    --accent-2: #3ddc74;
    --accent-2-ink: #000000;
    --shadow: 0 4px 30px rgba(0,0,0,0.5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 60px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Layout ------------------------------------------------------------------ */
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 24px; }
.section { padding: 112px 0; }
.section-tight { padding: 84px 0; }
.center { text-align: center; }
.measure { max-width: 40ch; margin-inline: auto; }
.measure-wide { max-width: 62ch; }
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 24px; }
@media (max-width: 768px) { .section { padding: 76px 0; } .section-tight { padding: 56px 0; } }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 14px 20px; border-radius: 0 0 12px 0; z-index: 200; }
.skip:focus { left: 0; }

/* Type -------------------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }
.t-hero { font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: -0.035em; line-height: 1.05; }
.t-section { font-size: clamp(1.9rem, 4.6vw, 3rem); letter-spacing: -0.03em; }
.t-sub { font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.42; font-weight: 400; letter-spacing: -0.014em; color: var(--ink-2); }
.t-body { font-size: 1.0625rem; line-height: 1.65; color: var(--ink-2); }
.t-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }

/* Nav --------------------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line-soft); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 16px; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.nav-brand .mono { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; }
.nav-brand b { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: 0.875rem; color: var(--ink-2); text-decoration: none; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .nav-hide-sm { display: none; }
  .nav-links a { font-size: 0.8125rem; }
}

/* Buttons ----------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 28px; border-radius: 980px; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease; white-space: nowrap; }
.btn:active { transform: scale(0.975); }
.btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--bg-card); }
.btn-sm { padding: 8px 18px; font-size: 0.875rem; }

.link-arrow { color: var(--accent); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.link-arrow:hover { text-decoration: underline; }
.inline-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Hero -------------------------------------------------------------------- */
.hero { padding: clamp(64px, 11vw, 120px) 0 clamp(52px, 8vw, 84px); }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 980px; background: var(--bg-card); border: 1px solid var(--line-soft); font-size: 0.8125rem; color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 999px; background: #30d158; flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, #30d158 22%, transparent); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.callnote { font-size: 0.95rem; color: var(--ink-3); }
.callnote a { color: var(--accent); }

/* Cards + pillars --------------------------------------------------------- */
.card { background: var(--bg-card); border-radius: 24px; padding: clamp(28px, 5vw, 52px); }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.pillar { background: var(--bg-elevated); border: 1px solid var(--line-soft); border-radius: 18px; padding: 26px 24px; }
.pillar .pico { width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.pillar .pico svg { width: 22px; height: 22px; }
.pillar h3 { font-size: 1.1rem; margin-bottom: 7px; letter-spacing: -0.02em; }
.pillar p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink-2); }

/* Services ---------------------------------------------------------------- */
.services { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 44px; }
@media (min-width: 840px) { .services { grid-template-columns: 1fr 1fr; } }
.service { background: var(--bg-elevated); border: 1px solid var(--line-soft); border-radius: 22px; padding: clamp(28px, 3.6vw, 42px); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.svc-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px; }
.svc-icon svg { width: 27px; height: 27px; }
.service.tech .svc-icon { background: color-mix(in srgb, var(--accent-2) 13%, transparent); color: var(--accent-2); }
.service.web .svc-icon { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.service h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); letter-spacing: -0.025em; margin-bottom: 10px; }
.service .lead { font-size: 1.02rem; line-height: 1.55; color: var(--ink-2); margin: 0 0 18px; }
.feat { list-style: none; padding: 0; margin: 0; }
.feat li { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 1.02rem; border-top: 1px solid var(--line-soft); }
.feat li:first-child { border-top: 0; padding-top: 2px; }
.chk { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center; }
.chk svg { width: 11px; height: 11px; }
.service.tech .chk { background: color-mix(in srgb, var(--accent-2) 15%, transparent); color: var(--accent-2); }
.service.web .chk { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 22px 0 0; padding: 0; }
.chip { font-size: 0.8125rem; padding: 5px 13px; border-radius: 980px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.svc-cta { margin-top: 22px; }

/* Website cards (faux browser chrome, mirrors the portfolio) --------------- */
.site-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
@media (min-width: 640px) { .site-grid { grid-template-columns: 1fr 1fr; } }
.site-card { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; background: var(--bg-card); }
.site-frame { border-bottom: 1px solid var(--line-soft); }
.site-frame-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--bg-elevated); }
.site-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.site-shot { display: block; width: 100%; height: auto; }
.site-body { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 20px; flex: 1; }
.site-name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.site-desc { font-size: 0.9rem; line-height: 1.5; color: var(--ink-2); }
.site-cta { margin-top: auto; padding-top: 14px; }
.site-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 500; color: var(--accent); text-decoration: none; }
.site-link:hover { text-decoration: underline; }

/* FAQ (native details, mirrors the portfolio build-note) ------------------ */
.faq { max-width: 760px; margin: 40px auto 0; }
.faq details { border: 1px solid var(--line-soft); border-radius: 14px; margin-top: 12px; background: var(--bg-elevated); overflow: hidden; }
.faq summary { display: flex; align-items: center; gap: 14px; padding: 20px 22px; cursor: pointer; font-size: 1.08rem; font-weight: 500; letter-spacing: -0.01em; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--bg-card); }
.faq summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s ease; flex: 0 0 auto; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq .ans { padding: 2px 22px 22px; font-size: 1.0rem; line-height: 1.62; color: var(--ink-2); max-width: 64ch; }

/* Contact ----------------------------------------------------------------- */
.contact { padding: clamp(72px, 11vw, 120px) 0; text-align: center; background: var(--bg-card); }
.contact-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* Footer ------------------------------------------------------------------ */
.foot { padding: 34px 0; font-size: 0.8125rem; color: var(--ink-3); display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.foot a { color: var(--ink-3); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Sticky mobile contact bar ----------------------------------------------- */
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line-soft); }
.callbar .btn { flex: 1; padding: 13px 20px; }
body { padding-bottom: 78px; }
@media (min-width: 720px) { .callbar { display: none; } body { padding-bottom: 0; } }

/* Motion ------------------------------------------------------------------ */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.75s cubic-bezier(0.16,1,0.3,1) both; }
.d1 { animation-delay: 0.06s; } .d2 { animation-delay: 0.12s; } .d3 { animation-delay: 0.18s; } .d4 { animation-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
