/* ============================================================
   HamTech Automation — Trade Services wing (formerly Northpath)
   Shared design system for /trade/ pages.
   Dark industrial-circuit brand, orange current, SVG motion.
   No mouse-follow effects by design.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0b0806;
    --bg-deep: #070403;
    --surface: #141009;
    --surface-2: #1b1510;
    --line: rgba(255, 122, 47, 0.16);
    --line-strong: rgba(255, 122, 47, 0.38);
    --text: #ece7e1;
    --text-strong: #fffaf5;
    --text-muted: #a89f96;
    --text-soft: #6e675f;
    --orange: #ff7a2f;
    --orange-dark: #e05f16;
    --amber: #ffb347;
    --ember: #ff4d00;
    --good: #3ddc84;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
img, svg { max-width: 100%; }

::selection { background: rgba(255, 122, 47, 0.35); color: var(--text-strong); }

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--ember), var(--orange), var(--amber));
    box-shadow: 0 0 12px rgba(255, 122, 47, 0.8);
    z-index: 3000;
    pointer-events: none;
}

/* ---------- Header ---------- */
header.site {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 4, 3, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
nav.site-nav { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; }
.logo {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-strong);
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.logo .logo-mark { width: 30px; height: 30px; flex: none; }
.logo .division {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--amber);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    padding: 3px 7px;
    text-transform: uppercase;
}
.nav-links { display: flex; gap: 22px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 13.5px; font-weight: 500; transition: color 0.15s; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--amber); }
.nav-cta {
    display: inline-block;
    padding: 9px 16px;
    background: var(--orange);
    color: #140a04 !important;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 700;
    transition: background 0.15s, box-shadow 0.2s;
}
.nav-cta:hover { background: var(--amber); box-shadow: 0 0 18px rgba(255, 122, 47, 0.45); }

@media (max-width: 860px) {
    nav.site-nav { flex-wrap: wrap; padding-bottom: 0; }
    .nav-links { width: 100%; order: 3; padding: 10px 0 12px; gap: 18px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 96px 0 72px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(7, 4, 3, 0.86) 0%, rgba(7, 4, 3, 0.72) 55%, var(--bg) 100%),
        url("../assets/img/hero-circuit-lava.jpg") center / cover no-repeat var(--bg-deep);
    border-bottom: 1px solid var(--line);
}
.hero > .container { position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--amber);
    background: rgba(255, 122, 47, 0.09);
    border: 1px solid var(--line-strong);
    padding: 6px 14px;
    border-radius: 6px;
    margin-bottom: 24px;
    text-transform: uppercase;
}
.hero-eyebrow .pulse-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 8px var(--orange);
    animation: ht-dot 2.4s ease-in-out infinite;
    flex: none;
}
@keyframes ht-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero h1 {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--text-strong);
    margin-bottom: 22px;
    max-width: 880px;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(110deg, var(--orange) 25%, var(--amber) 50%, var(--orange) 75%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--orange);
    -webkit-text-fill-color: transparent;
    animation: ht-sweep 6s ease-in-out infinite;
}
@keyframes ht-sweep {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.hero p.lede { font-size: 18.5px; color: var(--text-muted); max-width: 720px; margin-bottom: 34px; line-height: 1.6; }
.hero p.lede strong { color: var(--text); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* acquisition strapline under nav breadcrumb */
.crumb { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--text-soft); margin-bottom: 18px; }
.crumb a { color: var(--text-soft); text-decoration: none; }
.crumb a:hover { color: var(--amber); }
.crumb .sep { margin: 0 8px; color: var(--line-strong); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
}
.btn-primary { background: var(--orange); color: #140a04; }
.btn-primary:hover { background: var(--amber); box-shadow: 0 0 26px rgba(255, 122, 47, 0.5); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--amber); color: var(--amber); background: rgba(255, 122, 47, 0.06); }

/* ---------- Stat chips ---------- */
.stat-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 52px;
    max-width: 920px;
}
.stat {
    background: rgba(11, 8, 6, 0.92);
    padding: 24px 20px;
    text-align: center;
}
.stat .figure {
    font-family: var(--mono);
    font-size: clamp(24px, 3.4vw, 34px);
    font-weight: 700;
    color: var(--amber);
    line-height: 1.1;
    margin-bottom: 6px;
    text-shadow: 0 0 22px rgba(255, 122, 47, 0.35);
}
.stat .figure .unit { font-size: 0.55em; font-weight: 500; color: var(--text-muted); margin-left: 3px; }
.stat .label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ---------- Circuit divider (inline SVG between sections) ---------- */
.circuit-divider { display: block; width: 100%; height: 46px; overflow: visible; }
.circuit-divider path { fill: none; stroke: var(--line); stroke-width: 1.5; }
.circuit-divider .live {
    stroke: var(--orange);
    stroke-dasharray: 40 660;
    stroke-dashoffset: 700;
    filter: drop-shadow(0 0 4px rgba(255, 100, 10, 0.8));
    animation: ht-trace 8s linear infinite;
}
.circuit-divider circle { fill: var(--line-strong); }
.circuit-divider .node-live { fill: var(--amber); animation: ht-dot 3.2s ease-in-out infinite; }
@keyframes ht-trace { to { stroke-dashoffset: 0; } }

/* ---------- Sections ---------- */
section { padding: 78px 0; }
section.alt { background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--orange);
    letter-spacing: 0.14em;
    margin-bottom: 14px;
    text-transform: uppercase;
}
.section-eyebrow::before { content: "// "; color: var(--text-soft); }
.section-title { font-size: clamp(27px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.015em; color: var(--text-strong); margin-bottom: 18px; max-width: 780px; line-height: 1.18; }
.section-lede { font-size: 17.5px; color: var(--text-muted); max-width: 700px; margin-bottom: 44px; }
.section-lede a { color: var(--amber); }

/* ---------- Generic card grid ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
    position: relative;
    background: linear-gradient(165deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px;
    transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 0 30px -8px rgba(255, 122, 47, 0.35), inset 0 0 20px rgba(255, 77, 0, 0.05);
    transform: translateY(-3px);
}
/* machined corner brackets */
.card::before, .card::after {
    content: "";
    position: absolute;
    width: 14px; height: 14px;
    border: 1.5px solid var(--line-strong);
    transition: border-color 0.2s;
    pointer-events: none;
}
.card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
.card:hover::before, .card:hover::after { border-color: var(--amber); }

.card .tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amber);
    background: rgba(255, 122, 47, 0.09);
    border: 1px solid var(--line);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 18px;
}
.card h3 { font-size: 21px; font-weight: 800; margin-bottom: 6px; color: var(--text-strong); letter-spacing: -0.01em; }
.card h4 { font-size: 17px; font-weight: 700; color: var(--text-strong); line-height: 1.3; margin-bottom: 6px; }
.card .price { font-family: var(--mono); font-size: 12.5px; color: var(--orange); margin-bottom: 18px; }
.card p { font-size: 14.5px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.card p strong { color: var(--text); }
.card ul { list-style: none; margin-bottom: 24px; }
.card li { font-size: 14px; color: var(--text); padding: 6px 0 6px 24px; position: relative; }
.card li::before {
    content: "";
    position: absolute;
    left: 2px; top: 13px;
    width: 10px; height: 10px;
    background: none;
    border: 1.5px solid var(--orange);
    border-radius: 2px;
    transform: rotate(45deg);
}
.card li strong { color: var(--amber); }
/* fit-check "not for you" variant */
.card ul.bad li::before {
    border-color: var(--text-soft);
    border-radius: 50%;
    transform: none;
}
.card ul.bad li { color: var(--text-muted); }

/* waitlist inline form */
.waitlist-form { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.waitlist-form input, .waitlist-form select {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--line);
    color: var(--text-strong);
    border-radius: 8px;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 14.5px;
    outline: none;
}
.waitlist-form input:focus, .waitlist-form select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.22); }
.waitlist-form select option { background: var(--surface); }
.waitlist-status { font-family: var(--mono); font-size: 12.5px; min-height: 18px; }
.waitlist-status.error { color: #ff6b5e; }
.waitlist-status.ok { color: var(--good); }
.card .btn { margin-top: auto; }
.card.flex { display: flex; flex-direction: column; }

/* featured tier */
.card.featured { border-color: var(--orange); box-shadow: 0 0 34px -10px rgba(255, 122, 47, 0.5); }
.popular-badge {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--orange);
    color: #140a04;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    animation: ht-badge 2.6s ease-in-out infinite;
}
@keyframes ht-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 47, 0.55); }
    50% { box-shadow: 0 0 0 9px rgba(255, 122, 47, 0); }
}

/* numbered feature blocks */
.card .num, .step .num {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--orange);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}
.card .num::after { content: " ▸"; color: var(--text-soft); }

/* icon slot (inline SVG line icons) */
.card .icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--orange);
    background: rgba(255, 122, 47, 0.06);
    margin-bottom: 18px;
}
.card:hover .icon { color: var(--amber); box-shadow: 0 0 16px rgba(255, 122, 47, 0.3); }

/* quote strip inside problem cards */
.card .quote {
    font-size: 13.5px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 14px;
    line-height: 1.5;
    border-left: 2px solid var(--orange);
    padding-left: 12px;
}

/* ---------- Timeline (how it works) ---------- */
.timeline { position: relative; max-width: 780px; display: flex; flex-direction: column; gap: 0; }
.timeline::before {
    content: "";
    position: absolute;
    left: 17px; top: 10px; bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--line-strong) 6%, var(--line-strong) 94%, transparent);
}
.step { position: relative; padding: 0 0 34px 58px; }
.step:last-child { padding-bottom: 0; }
.step::before {
    content: "";
    position: absolute;
    left: 10px; top: 4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--orange);
    box-shadow: 0 0 12px rgba(255, 122, 47, 0.5);
}
.step .when { font-family: var(--mono); font-size: 11.5px; color: var(--text-soft); letter-spacing: 0.06em; text-transform: uppercase; float: right; margin-left: 14px; }
.step h3 { font-size: 18px; font-weight: 700; color: var(--text-strong); margin-bottom: 6px; }
.step p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; max-width: 640px; }
@media (max-width: 640px) { .step .when { float: none; display: block; margin: 0 0 6px; } }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px 26px; }
.faq-item h3 { font-size: 16.5px; font-weight: 700; color: var(--text-strong); margin-bottom: 8px; line-height: 1.35; }
.faq-item h3::before { content: "> "; color: var(--orange); font-family: var(--mono); }
.faq-item p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }

/* ---------- Spec table (pricing/stack rows) ---------- */
.spec-table { max-width: 720px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spec-row { display: flex; justify-content: space-between; gap: 20px; padding: 15px 22px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-row:last-child { border-bottom: 0; }
.spec-row .k { color: var(--text-muted); }
.spec-row .v { font-family: var(--mono); color: var(--amber); text-align: right; font-size: 13.5px; }

/* ---------- Contact ---------- */
.contact-section {
    background:
        radial-gradient(90% 130% at 85% 0%, rgba(255, 77, 0, 0.12), transparent 55%),
        var(--bg-deep);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    padding: 52px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
@media (max-width: 768px) { .contact-section { grid-template-columns: 1fr; padding: 32px 24px; gap: 32px; } }
.contact-section .pitch h2 { font-size: 29px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; line-height: 1.2; color: var(--text-strong); }
.contact-section .pitch p { color: var(--text-muted); font-size: 15.5px; margin-bottom: 20px; }
.contact-section .pitch .meta { font-family: var(--mono); font-size: 12.5px; color: var(--amber); line-height: 2; }
.contact-section .pitch .meta div::before { content: "[ok] "; color: var(--good); }

.contact-form-fields { display: flex; flex-direction: column; gap: 12px; }
.contact-form-fields label {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: -6px;
}
.contact-form-fields input,
.contact-form-fields textarea,
.contact-form-fields select {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--line);
    color: var(--text-strong);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.2s;
}
.contact-form-fields input:focus,
.contact-form-fields textarea:focus,
.contact-form-fields select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.22);
}
.contact-form-fields textarea { min-height: 90px; resize: vertical; }
.contact-form-fields select option { background: var(--surface); }
.contact-form-fields button {
    background: var(--orange);
    color: #140a04;
    border: none;
    border-radius: 8px;
    padding: 14px 22px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s, box-shadow 0.2s, transform 0.1s;
}
.contact-form-fields button:hover { background: var(--amber); box-shadow: 0 0 22px rgba(255, 122, 47, 0.45); }
.contact-form-fields button:active { transform: scale(0.99); }
.contact-form-fields .small { font-size: 12px; color: var(--text-soft); font-family: var(--mono); }

/* ---------- Footer ---------- */
footer.site {
    background: var(--bg-deep);
    color: var(--text-muted);
    padding: 56px 0 36px;
    font-size: 14px;
    border-top: 1px solid var(--line);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; margin-bottom: 36px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
footer.site h4 { color: var(--text-strong); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; font-family: var(--mono); }
footer.site ul { list-style: none; }
footer.site li { margin-bottom: 10px; }
footer.site a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
footer.site a:hover { color: var(--amber); }
.footer-bottom {
    padding-top: 26px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12.5px;
    font-family: var(--mono);
    color: var(--text-soft);
}

/* acquisition note chip (footer + hero) */
.acq-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-muted);
    border: 1px dashed var(--line-strong);
    border-radius: 6px;
    padding: 6px 12px;
}
.acq-note s { color: var(--text-soft); }
.acq-note .arrow { color: var(--orange); }

/* ---------- Motion: scroll-triggered entries ---------- */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.in-view { opacity: 1; transform: translateY(0); }
.fade-up-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-up-stagger.in-view > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.fade-up-stagger.in-view > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.08s; }
.fade-up-stagger.in-view > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.16s; }
.fade-up-stagger.in-view > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.24s; }
.fade-up-stagger.in-view > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.32s; }
.fade-up-stagger.in-view > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.fade-up-stagger.in-view > *:nth-child(n+7) { opacity: 1; transform: translateY(0); transition-delay: 0.48s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
    }
    .hero h1 em { -webkit-text-fill-color: var(--orange); }
    .scroll-progress { display: none; }
    .fade-up, .fade-up-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ---------- Accessibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    section { padding: 56px 0; }
    .hero { padding: 60px 0 48px; }
    .contact-section .pitch h2 { font-size: 24px; }
}
