/* ==========================================================================
   Thomas Tech Repair — shared styles (index, services, about, privacy)
   ========================================================================== */

:root {
    --brand: #22c55e;
    --brand-dark: #15803d;
    --brand-tint: rgba(34, 197, 94, 0.1);
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e5e7eb;
    --surface: #f8fafc;
    --dark: #0b1220;
    --radius: 12px;
    --nav-h: 72px;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
    padding-top: var(--nav-h);
    font-family: var(--font-sans);
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: inherit;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

p { line-height: 1.7; }

a { color: var(--brand-dark); }
a:hover { color: var(--brand); }

.text-muted { color: var(--muted) !important; }
.text-brand { color: var(--brand) !important; }

section[id], header[id] { scroll-margin-top: var(--nav-h); }

/* ---------- Layout ---------- */
.section { padding: 6rem 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--dark); color: #e2e8f0; }
.section-dark .text-muted { color: #94a3b8 !important; }
.section-dark h2, .section-dark h3, .section-dark h5 { color: #fff; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-dark);
    margin-bottom: 1rem;
}
.section-dark .eyebrow { color: var(--brand); }

.section-title { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 1rem; }
.section-lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.text-center .section-lead { margin-left: auto; margin-right: auto; }

.dot-grid {
    background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px);
    background-size: 22px 22px;
}

/* ---------- Navbar ---------- */
.navbar {
    min-height: var(--nav-h);
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.25s ease;
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06); }

.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink) !important;
}
.navbar-brand i { color: var(--brand); }

.navbar .nav-link {
    font-weight: 500;
    color: var(--muted) !important;
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
    transition: color 0.2s ease;
}
.navbar .nav-link:hover { color: var(--ink) !important; }
.navbar .nav-link.active { color: var(--brand-dark) !important; }

.nav-social {
    color: var(--muted);
    font-size: 1.15rem;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
}
.nav-social:hover { color: var(--brand-dark); }

/* ---------- Buttons ---------- */
.btn-brand,
.btn-ghost {
    font-weight: 600;
    border-radius: 999px;
    padding: 0.7rem 1.6rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-brand {
    background: var(--brand);
    border: 1px solid var(--brand);
    color: #fff;
}
.btn-brand:hover,
.btn-brand:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
}
.btn-ghost:hover,
.btn-ghost:focus {
    border-color: var(--brand);
    color: var(--brand-dark);
}
.btn-sm.btn-brand { padding: 0.45rem 1.1rem; }

.link-arrow {
    font-weight: 600;
    color: var(--brand-dark);
    text-decoration: none;
}
.link-arrow:hover { color: var(--brand); }

/* ---------- Home hero ---------- */
.hero { padding: 5rem 0 6rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); margin-bottom: 1.5rem; }
.hero .lead { font-size: 1.3rem; color: var(--muted); }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---------- Page hero (Services / About / Privacy) ---------- */
.page-hero {
    padding: 5rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.page-hero .lead { color: var(--muted); max-width: 620px; margin: 0 auto; }

/* ---------- Photo frame ---------- */
.photo-frame {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    background: var(--surface);
}
.photo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 560px;
    object-fit: cover;
    object-position: center top;
}
.photo-frame::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--brand);
}
.photo-badge {
    position: absolute;
    left: 1rem;
    bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}
.photo-badge strong { display: block; font-size: 0.95rem; }
.photo-badge small { font-family: var(--font-mono); font-size: 0.75rem; color: var(--brand-dark); }

/* ---------- Trust strip ---------- */
.trust-strip {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem 0;
    background: #fff;
}
.trust-item {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.trust-item i { color: var(--brand); }

/* ---------- Cards ---------- */
.feature-card {
    height: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--muted); margin-bottom: 0; font-size: 0.95rem; }

.check-list { list-style: none; padding: 0; margin: 1rem 0 0; font-size: 0.9rem; color: var(--muted); }
.check-list li { margin-bottom: 0.35rem; }
.check-list i { color: var(--brand); margin-right: 0.5rem; }

.icon-chip {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--brand-tint);
    color: var(--brand-dark);
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}
.section-dark .icon-chip { background: rgba(34, 197, 94, 0.15); color: var(--brand); }

/* ---------- Terminal card ---------- */
.terminal-card {
    background: var(--dark);
    border-radius: var(--radius);
    border: 1px solid #1e293b;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1e293b;
}
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.terminal-bar span:nth-child(1) { background: #ef4444; }
.terminal-bar span:nth-child(2) { background: #eab308; }
.terminal-bar span:nth-child(3) { background: #22c55e; }
.terminal-bar em { margin-left: auto; font-style: normal; font-size: 0.75rem; color: #64748b; }
.terminal-body { padding: 1.25rem 1.25rem 1.5rem; color: #cbd5e1; line-height: 1.7; }
.terminal-body p { margin-bottom: 0.75rem; line-height: 1.7; }
.terminal-body .prompt { color: var(--brand); }
.terminal-body .dim { color: #64748b; }
.terminal-body .cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--brand);
    vertical-align: text-bottom;
    animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Stats ---------- */
.stat-value {
    font-size: clamp(2.5rem, 5vw, 3.25rem);
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.03em;
    line-height: 1;
}
.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-top: 0.5rem;
}

.accent-rule {
    width: 64px;
    height: 3px;
    background: var(--brand);
    border: 0;
    opacity: 1;
    margin: 1.75rem 0;
}

/* ---------- Media ---------- */
.media-frame {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: auto;
}

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.contact-list .icon-chip { margin-bottom: 0; flex-shrink: 0; }
.contact-list small {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.contact-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--brand-dark); }

.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}
.form-label { font-weight: 600; font-size: 0.9rem; }
.form-control {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}

/* ---------- Prose (privacy) ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.4rem; margin: 2.5rem 0 1rem; }
.prose p, .prose li { color: #334155; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 4rem 0 2rem;
    font-size: 0.95rem;
}
.site-footer .footer-brand { color: #fff; font-weight: 800; font-size: 1.15rem; }
.site-footer .footer-brand i { color: var(--brand); }
.site-footer h6 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-bottom: 1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-bottom {
    border-top: 1px solid #1e293b;
    margin-top: 3rem;
    padding-top: 1.5rem;
    font-size: 0.85rem;
}

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .status-dot, .terminal-body .cursor { animation: none; }
    .feature-card, .btn-brand { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .section { padding: 4rem 0; }
    .hero { padding: 3rem 0 4rem; }
    .page-hero { padding: 3.5rem 0 3rem; }
    .navbar-collapse { padding: 1rem 0; }
    .navbar .nav-link { padding-left: 0 !important; }
}

@media (max-width: 575.98px) {
    .form-card { padding: 1.5rem; }
    .trust-item { justify-content: flex-start; }
}
