/* Tech Medics — tokens and components from "Techmedics UI Overhaul" */
:root {
  --bg: #1c1e21;
  --surface: #26282c;
  --line: #33363a;
  --line-2: #4a4d52;
  --field: #3d4045;
  --text: #f2f3f4;
  --muted: #b8bbc0;
  --dim: #8a8d93;
  --green: #6dbe5a;
  --amber: #e8a33d;
  --ink: #101214;
  --pad: 56px;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
h1, h2, h3, p, figure, blockquote { margin: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: var(--ink); padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: 1280px; margin: 0 auto; }
.px { padding-left: var(--pad); padding-right: var(--pad); }
.rule-b { border-bottom: 1px solid var(--line); }
.rule-t { border-top: 1px solid var(--line); }

/* Type */
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--green); font-weight: 500; margin-bottom: 16px; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: var(--green); margin-bottom: 18px; }
.mono-sm { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--green); margin-bottom: 10px; }
.mono-sm.dim, .mono.dim { color: var(--dim); }
.mono-sm.amber, .mono.amber { color: var(--amber); }
.h-xl { font-size: clamp(42px, 6vw, 72px); line-height: .98; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
.h-lg { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.h-md { font-size: clamp(28px, 3vw, 36px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.h-sm { font-size: 22px; font-weight: 500; margin-bottom: 8px; }
.lead { font-size: 19px; line-height: 1.55; color: var(--muted); }
.body { font-size: 17px; line-height: 1.6; color: var(--muted); }
.small { font-size: 15px; line-height: 1.5; color: var(--dim); }

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 var(--pad); height: 84px; }
.logo { background: #fff; border-radius: 8px; padding: 9px 16px; }
.logo img { height: 46px; width: auto; }
.nav { display: flex; gap: 26px; font-size: 15px; color: var(--muted); }
.nav a[aria-current="page"] { color: var(--green); }
.head-actions { display: flex; gap: 12px; align-items: center; }

/* Buttons & chips */
.btn { display: inline-block; font-weight: 700; font-size: 15px; padding: 12px 20px; border-radius: 6px; border: 0; cursor: pointer; font-family: inherit; }
.btn-lg { font-size: 17px; padding: 18px 28px; }
.btn-green { background: var(--green); color: var(--ink); }
.btn-green:hover { color: var(--ink); filter: brightness(1.08); }
.btn-light { background: var(--text); color: var(--ink); }
.btn-light:hover { color: var(--ink); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); font-weight: 500; }
.btn-quiet { font-size: 14px; font-weight: 400; color: var(--dim); padding: 10px 14px; border: 1px solid var(--line); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 500; }
.chip { border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; }
.chip.on { border-color: var(--green); color: var(--green); }
.tag { background: var(--surface); border-radius: 6px; padding: 7px 12px; font-size: 13px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--amber); color: var(--amber); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 28px; }
.badge::before { content: ""; width: 7px; height: 7px; background: var(--amber); border-radius: 50%; }

/* Layout */
.split { display: grid; grid-template-columns: 400px 1fr; gap: 64px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.two.end { align-items: end; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gap20 { gap: 20px; }
.sec { padding-top: 96px; padding-bottom: 96px; }
.page-head { padding-top: 88px; padding-bottom: 72px; }
.card { background: var(--surface); border-radius: 12px; padding: 30px; }
.photo { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.ratio { aspect-ratio: 16 / 11; height: auto; }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 15px; }
.feats > div { border-top: 1px solid var(--line); padding-top: 14px; }
.feats b { display: block; font-weight: 500; margin-bottom: 4px; }
.feats span { color: var(--dim); }

/* Hero */
/* Full-bleed: breaks out of the 1280 column; copy stays aligned to the column */
.hero { position: relative; min-height: 720px; overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 30%, rgba(28,30,33,.2) 75%); }
.hero-copy { position: relative; z-index: 1; padding: 100px var(--pad) 200px; padding-left: max(var(--pad), calc((100vw - 1280px) / 2 + var(--pad))); max-width: calc(790px + max(0px, (100vw - 1280px) / 2)); }
.hero h1 { font-size: clamp(44px, 6vw, 68px); line-height: 1; font-weight: 700; letter-spacing: -.03em; margin-bottom: 28px; text-wrap: balance; }
.hero .lead { font-size: 20px; margin-bottom: 40px; max-width: 560px; }
.pulse { position: absolute; left: 0; right: 0; bottom: 60px; height: 80px; z-index: 1; }
.pulse svg { width: 100%; height: 100%; display: block; }
.pulse path { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pulse .base { stroke-opacity: .18; }
/* pathLength=100 makes one dash+gap period equal the whole path, so the loop wraps with no seam */
.pulse .beam { stroke-dasharray: 22 78; animation: pulse 4.5s linear infinite; filter: drop-shadow(0 0 6px rgba(109,190,90,.8)); }
@keyframes pulse { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse .beam { animation: none; stroke-dasharray: none; } .pulse .base { stroke-opacity: 0; } html { scroll-behavior: auto; } }

/* Numbered service rows */
.rows a { display: grid; grid-template-columns: 64px 1fr auto; gap: 24px; align-items: center; padding: 28px 0; border-top: 1px solid var(--line); }
.rows a:last-child { border-bottom: 1px solid var(--line); }
.rows .n { font-size: 15px; color: var(--green); }
.rows .t { display: block; font-size: 26px; font-weight: 500; margin-bottom: 6px; }
.rows .d { display: block; font-size: 15px; color: var(--dim); }
.rows .arr { font-size: 24px; color: var(--green); }

/* Service reel: hero-style panel that crossfades through the six services (CSS only) */
.split-lead { display: flex; flex-direction: column; }
.reel { position: relative; flex: 1; min-height: 360px; margin-top: 40px; border-radius: 8px; overflow: hidden; background: var(--surface); }
.reel-slide { position: absolute; inset: 0; margin: 0; opacity: 0; animation: reel 30s infinite both; animation-delay: calc(var(--i) * 5s); }
.reel-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, rgba(28,30,33,.6) 45%, rgba(28,30,33,.3) 100%); }
.reel-slide img { width: 100%; height: 100%; object-fit: cover; opacity: .55; animation: inherit; animation-name: reel-zoom; }
.reel-slide figcaption { position: absolute; left: 24px; bottom: 22px; z-index: 1; margin: 0; font-size: 13px; color: var(--green); animation: inherit; animation-name: reel-cap; }
@keyframes reel { 0% { opacity: 0; } 3%, 16.67% { opacity: 1; } 20%, 100% { opacity: 0; } }
/* caption leaves before the next one arrives, so crossfades never stack text */
@keyframes reel-cap { 0%, 4% { opacity: 0; } 6%, 15% { opacity: 1; } 16.5%, 100% { opacity: 0; } }
/* matching row title lights up in step with the reel (same 30s timeline, same delays) */
.rows a .t { animation: row-lit 30s infinite both; }
.rows a:nth-child(2) .t { animation-delay: 5s; }
.rows a:nth-child(3) .t { animation-delay: 10s; }
.rows a:nth-child(4) .t { animation-delay: 15s; }
.rows a:nth-child(5) .t { animation-delay: 20s; }
.rows a:nth-child(6) .t { animation-delay: 25s; }
.rows a:hover .t { animation: none; }
@keyframes row-lit { 0%, 20%, 100% { color: var(--text); } 3%, 16.67% { color: var(--green); } }
@keyframes reel-zoom { 0% { transform: scale(1.08); } 20% { transform: scale(1); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .reel-slide, .reel-slide img, .reel-slide figcaption, .rows a .t { animation: none; }
  .reel-slide:first-child { opacity: 1; }
}

/* Figure + labels */
.fig { position: relative; overflow: hidden; border-radius: 8px; min-height: 480px; }
.fig > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fig-label { position: absolute; left: 20px; top: 20px; font-family: var(--mono); font-size: 11px; background: rgba(28,30,33,.82); padding: 6px 10px; letter-spacing: .06em; }
.fig-tags { position: absolute; left: 20px; bottom: 20px; display: flex; gap: 8px; }
.fig-tags span { color: var(--ink); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 4px; background: var(--green); }
.fig-tags span + span { background: var(--amber); }
.mosaic { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.mosaic-side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.mosaic-side img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* Software: browser/phone frames with screenshot slots */
.app { background: var(--surface); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.app-bar { background: var(--line); padding: 10px 14px; display: flex; gap: 6px; align-items: center; }
.app-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.app-bar em { margin-left: 10px; flex: 1; height: 18px; border-radius: 4px; background: var(--surface); }
.app .shot { height: 240px; }
.app-body { padding: 24px; }
/* ponytail: .shot is a labeled placeholder; swap for <img class="shot" src=...> when screenshots arrive */
.shot { display: grid; place-items: center; text-align: center; padding: 16px; font-size: 13px; color: var(--dim); background: var(--bg); background-image: radial-gradient(#3a3d42 1px, transparent 1px); background-size: 14px 14px; object-fit: cover; width: 100%; }
.phones { display: flex; gap: 24px; justify-content: center; align-items: start; }
.phone { width: 249px; aspect-ratio: 402 / 874; border: 10px solid #0b0c0d; border-radius: 40px; overflow: hidden; background: #0b0c0d; box-shadow: 0 0 0 1px var(--line-2); }
.phone .shot { height: 100%; border-radius: 30px; }

/* Stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--surface); border-radius: 10px; padding: 26px; }
.stat b { display: block; font-size: 42px; font-weight: 700; color: var(--green); letter-spacing: -.02em; }
.stat b.amber { color: var(--amber); }
.stat b.white { color: var(--text); }
.stat span { font-size: 14px; color: var(--dim); }

/* Checklist */
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.checks li { border-top: 1px solid var(--line); padding: 16px 0 16px 30px; position: relative; font-size: 16px; line-height: 1.5; color: var(--muted); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 15px; color: var(--green); font-weight: 700; }
.checks b { color: var(--text); font-weight: 500; }

/* Clients + quotes */
.clients { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 500; font-size: 17px; color: var(--dim); }
.quote { border: 1px solid var(--line); border-radius: 10px; padding: 36px; }
.quote blockquote { font-size: 22px; line-height: 1.45; margin-bottom: 24px; }
.quote figcaption { font-size: 14px; color: var(--dim); }

/* CTA band */
.cta { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.cta-amber { padding: 72px var(--pad); background: var(--amber); color: var(--bg); }
.cta-amber .k { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin-bottom: 14px; }
.cta-amber .big { font-size: clamp(34px, 4vw, 44px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin-bottom: 28px; }
.cta-amber a { text-decoration: underline; text-underline-offset: 6px; }
.cta-amber a:hover { color: var(--bg); }
.cta-amber p { font-size: 16px; font-weight: 500; }
.cta-dark { padding: 72px var(--pad); background: var(--surface); display: flex; flex-direction: column; justify-content: center; }
.map { min-height: 360px; background: var(--surface); position: relative; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: invert(.9) hue-rotate(180deg) saturate(.6) brightness(.9); }

/* Forms */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form label, .form fieldset { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.form .full { grid-column: 1 / -1; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea { background: var(--bg); border: 1px solid var(--field); border-radius: 6px; padding: 14px 16px; font: 16px var(--sans); color: var(--text); outline: none; }
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--green); }
.form ::placeholder { color: #6b6e74; }
.form fieldset { border: 0; padding: 0; margin: 0; gap: 10px; }
.form legend { padding: 0; margin-bottom: 10px; }
.form .pick { display: inline-block; position: relative; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: inline-block; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.pick input:checked + span { border-color: var(--green); color: var(--green); }
.pick input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.notice { display: none; border-radius: 8px; padding: 16px 20px; margin-bottom: 24px; font-size: 15px; line-height: 1.5; scroll-margin-top: 120px; }
.notice:target { display: block; }
.notice.ok { border: 1px solid var(--green); color: var(--green); }
.notice.bad { border: 1px solid var(--amber); color: var(--amber); }
.notice a { text-decoration: underline; }

/* Legal */
.legal { display: grid; grid-template-columns: 300px 1fr; gap: 80px; align-items: start; }
.toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--dim); }
.toc a { padding: 9px 12px; border-left: 2px solid var(--line); }
.toc a.sub { padding-left: 24px; }
.toc a:hover { border-color: var(--green); color: var(--text); }
.prose { max-width: 720px; font-size: 17px; line-height: 1.65; color: var(--muted); display: flex; flex-direction: column; gap: 56px; }
.prose section { scroll-margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.prose h3 { font-size: 22px; font-weight: 500; color: var(--text); margin-top: 8px; }
.prose strong { color: var(--text); }
.prose a { color: var(--green); }
.callout { border: 1px solid var(--green); border-radius: 10px; padding: 20px 24px; color: var(--text); font-size: 16px; }
.kbd { font-family: var(--mono); background: var(--bg); color: var(--green); padding: 2px 8px; border-radius: 4px; }
.card-amber { background: var(--amber); color: var(--bg); }
.card-amber .kbd { color: var(--amber); }
.card-amber .mono-sm { color: var(--bg); }
.card-amber a:hover { color: var(--bg); text-decoration: underline; }

/* Footer */
.site-foot { padding: 40px var(--pad); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--dim); }
.site-foot .logo { border-radius: 6px; padding: 6px 10px; }
.site-foot .logo img { height: 26px; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.social { display: inline-flex; gap: 14px; }
.social a { display: inline-flex; padding: 2px; }
.social svg { width: 20px; height: 20px; fill: currentColor; }

/* Responsive — design is 1280 fixed; collapse below 1024 / 720 */
@media (max-width: 1100px) {
  .nav { gap: 22px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .legal { grid-template-columns: 1fr; gap: 40px; }
  .toc { position: static; }
}
@media (max-width: 900px) {
  :root { --pad: 20px; }
  .site-head { height: auto; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
  .site-head { gap: 12px; }
  .logo { padding: 7px 10px; }
  .logo img { height: 30px; }
  .head-actions .btn-green { padding: 10px 14px; font-size: 14px; }
  .nav { order: 3; width: 100%; overflow-x: auto; gap: 20px; padding: 6px 0 2px; white-space: nowrap; }
  .head-actions .btn-quiet { display: none; }
  #contact-grid { grid-template-columns: 1fr !important; }
  #contact-grid > .card { padding: 26px !important; }
  .two, .cta, .mosaic, .form { grid-template-columns: 1fr; gap: 32px; }
  .three { grid-template-columns: 1fr; }
  .three > * { grid-column: auto !important; grid-row: auto !important; }
  .form { gap: 20px; }
  .checks { grid-template-columns: 1fr; }
  .sec { padding-top: 64px; padding-bottom: 64px; }
  .page-head { padding-top: 56px; padding-bottom: 48px; }
  .hero { min-height: 0; }
  .hero-copy { padding-top: 64px; padding-bottom: 160px; }
  .fig { min-height: 320px; }
  .reel { flex: none; min-height: 260px; margin-top: 32px; }
  .mosaic-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .mosaic-side img { aspect-ratio: 4 / 3; }
  .rows a { grid-template-columns: 40px 1fr; }
  .phones { gap: 14px; }
  .phone { width: 46%; border-width: 7px; border-radius: 28px; }
  .phone[style] { margin-top: 24px !important; }
  .rows .arr { display: none; }
  .rows .t { font-size: 22px; }
  .quote { padding: 26px; }
  .quote blockquote { font-size: 19px; }
  .cta-amber, .cta-dark { padding: 56px var(--pad); }
  .site-foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .feats { grid-template-columns: 1fr; }
  .stat { padding: 20px; }
  .stat b { font-size: 34px; }
  .btns .btn { width: 100%; text-align: center; }
}
