/*
 * BegleWeyer Technology Solutions — site styles
 * Derived from the Figma redesign (redesign-code/bw-redesign).
 */

:root {
    --navy: #090e1a;
    --navy-mid: #0d1526;
    --navy-card: #111d35;
    --blue: #1f87be;
    --blue-light: #38afea;
    --text: #e8edf5;
    --text-soft: #c8d4e0;
    --muted: #8ea0b8;
    --dim: #4a6180;
    --faint: #2e3f58;
    --green: #63c47a;
    --line: rgba(31, 135, 190, 0.15);
    --line-soft: rgba(31, 135, 190, 0.08);
    --line-strong: rgba(31, 135, 190, 0.4);
    --tint: rgba(31, 135, 190, 0.08);
    --font-display: 'Barlow Condensed', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container: 1200px;
    --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }

body {
    margin: 0;
    background: var(--navy);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-light); }
p { margin: 0 0 1rem; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: #1f87be44; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 2rem; position: relative; z-index: 1; }
.container--narrow { max-width: 800px; }

/* ---------- Decorative ---------- */

.grid-lines {
    pointer-events: none; position: absolute; inset: 0; overflow: hidden; opacity: 0.04;
    background-image:
        linear-gradient(var(--blue) 1px, transparent 1px),
        linear-gradient(90deg, var(--blue) 1px, transparent 1px);
    background-size: 60px 60px;
}

.glow { position: absolute; pointer-events: none; }
.glow--hero-a { top: 20%; right: 10%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(31,135,190,0.18) 0%, transparent 70%); }
.glow--hero-b { bottom: 10%; left: 5%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(56,175,234,0.08) 0%, transparent 70%); }
.glow--center { top: 30%; left: 50%; transform: translateX(-50%); width: 800px; max-width: 100%; height: 400px; background: radial-gradient(ellipse, rgba(31,135,190,0.08) 0%, transparent 70%); }

.section { position: relative; padding: 8rem 0; overflow: hidden; }
.section--tight { padding: 5rem 0; }
.section--alt { background: var(--navy-mid); }
.section--rule::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(to right, transparent, rgba(31,135,190,0.35), transparent);
}

/* ---------- Typography ---------- */

.eyebrow {
    color: var(--blue); font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.75rem;
}

.display, .h2, .h3, .h4 {
    font-family: var(--font-display); text-transform: uppercase; color: var(--text); margin: 0;
}
.display { font-weight: 800; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; letter-spacing: 0.01em; margin-bottom: 1.5rem; }
.h2 { font-weight: 800; font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: 0.01em; }
.h2--xl { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.h3 { font-weight: 700; font-size: 1.5rem; letter-spacing: 0.03em; line-height: 1.15; }
.h4 { font-weight: 700; font-size: 1.25rem; letter-spacing: 0.03em; line-height: 1.2; }
.accent { color: var(--blue); }

.lead { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.body { color: var(--muted); font-size: 0.95rem; line-height: 1.8; }
.body p:last-child { margin-bottom: 0; }
.body a { color: var(--blue-light); }
.small { font-size: 0.85rem; }

.section-head { margin-bottom: 4rem; }
.section-head--center { text-align: center; }
.section-head .lead { max-width: 640px; margin-top: 1.25rem; margin-bottom: 0; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons, tags, badges ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
    padding: 14px 32px; border-radius: 2px; border: 1px solid transparent;
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
    cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-light); }
.btn--ghost { background: transparent; color: var(--text); border-color: rgba(232,237,245,0.2); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue-light); }
.btn--sm { padding: 8px 20px; font-size: 0.8rem; }
.btn--lg { padding: 18px 40px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn[disabled]:hover { background: var(--blue); }

.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.tag {
    display: inline-block; background: rgba(31,135,190,0.1); border: 1px solid rgba(31,135,190,0.2);
    color: var(--blue-light); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 3px 10px; border-radius: 2px; white-space: nowrap;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.chip {
    display: inline-block; background: rgba(31,135,190,0.06); border: 1px solid var(--line);
    color: var(--muted); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em;
    padding: 4px 12px; border-radius: 2px; transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--line-strong); color: var(--blue-light); }

.status-pill {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(31,135,190,0.1); border: 1px solid rgba(31,135,190,0.25);
    border-radius: 2px; padding: 4px 12px; margin-bottom: 1.5rem;
    color: var(--blue-light); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue-light); animation: pulse 2s infinite; }

.text-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--blue-light); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; text-decoration: none; transition: gap 0.2s, color 0.2s;
}
.text-link:hover { gap: 0.65rem; color: var(--text); }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---------- Header / nav ---------- */

.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s;
}
.site-header.is-scrolled, .site-header.is-open {
    background: rgba(9,14,26,0.95); border-bottom-color: var(--line);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }

.wordmark {
    font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
    letter-spacing: 0.04em; color: var(--text); text-decoration: none;
}
.wordmark span { color: var(--blue); }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.logo-mark { display: block; height: 28px; width: auto; flex: none; transition: transform 0.25s ease; }
.brand:hover .logo-mark { transform: translateY(-1px); }
.brand .wordmark { line-height: 1; }

.nav { display: flex; gap: 2rem; align-items: center; }
.nav__link {
    color: var(--muted); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em;
    text-transform: uppercase; text-decoration: none; padding: 4px 0; transition: color 0.2s;
    border-bottom: 1px solid transparent;
}
.nav__link:hover { color: var(--blue-light); }
.nav__link.is-active { color: var(--text); border-bottom-color: var(--blue); }

.nav-toggle { display: none; background: none; border: 0; color: var(--text); padding: 4px; cursor: pointer; }
.nav-toggle .icon-close { display: none; }
.is-open .nav-toggle .icon-open { display: none; }
.is-open .nav-toggle .icon-close { display: block; }

.mobile-nav { display: none; background: var(--navy-mid); border-top: 1px solid var(--line); padding: 1rem 2rem 1.5rem; }
.mobile-nav a:not(.btn) {
    display: block; color: var(--muted); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em;
    text-transform: uppercase; text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.mobile-nav a:not(.btn).is-active { color: var(--text); }
.mobile-nav .btn { display: flex; width: 100%; margin-top: 1.5rem; padding: 14px 24px; color: #fff; }

@media (max-width: 900px) {
    .nav { display: none; }
    .nav-toggle { display: block; }
    .site-header.is-open .mobile-nav { display: block; }
}

/* ---------- Hero (home) ---------- */

.hero { position: relative; min-height: min(100vh, 980px); display: flex; align-items: center; overflow: hidden; }
.hero .container { padding-top: 8rem; padding-bottom: 6rem; width: 100%; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero .lead { max-width: 460px; margin-bottom: 2.5rem; }


.terminal {
    background: var(--navy-mid); border: 1px solid rgba(31,135,190,0.2); border-radius: 6px;
    overflow: hidden; box-shadow: 0 20px 80px rgba(31,135,190,0.15);
}
.terminal__bar {
    background: var(--navy-card); padding: 10px 16px; display: flex; align-items: center; gap: 6px;
    border-bottom: 1px solid rgba(31,135,190,0.1);
}
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.terminal__bar i:nth-child(1) { background: #ff5f57; }
.terminal__bar i:nth-child(2) { background: #febc2e; }
.terminal__bar i:nth-child(3) { background: #28c840; }
.terminal__bar span { color: var(--dim); font-size: 0.72rem; margin-left: 0.5rem; letter-spacing: 0.04em; }
.terminal__body {
    padding: 1.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem; line-height: 1.8; overflow-x: auto; white-space: nowrap;
}
.terminal__body .in { padding-left: 1.2rem; }
.terminal__body .gap { margin-top: 0.5rem; }
.c-cm { color: var(--dim); }
.c-kw { color: var(--blue-light); }
.c-id { color: var(--text); }
.c-br { color: var(--blue); }
.c-key { color: var(--muted); }
.c-str { color: var(--green); }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--blue); vertical-align: middle; animation: blink 1.1s step-end infinite; }

.cert-row { display: flex; gap: 0.75rem; margin-top: 1rem; }
.cert {
    flex: 1; display: flex; align-items: center; gap: 0.75rem; text-decoration: none;
    background: var(--tint); border: 1px solid rgba(31,135,190,0.2); border-radius: 2px; padding: 8px 12px;
    transition: border-color 0.2s;
}
.cert:hover { border-color: var(--line-strong); }
.cert img { width: 36px; height: 36px; flex-shrink: 0; }
.cert span { color: var(--blue-light); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.4; }

@media (max-width: 900px) {
    .hero__grid { grid-template-columns: 1fr; }
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero { position: relative; overflow: hidden; padding: calc(var(--nav-h) + 5rem) 0 4.5rem; border-bottom: 1px solid var(--line); }
.page-hero .h2 { font-size: clamp(2.6rem, 5vw, 4.25rem); }
.page-hero .lead { max-width: 640px; margin: 1.25rem 0 0; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.breadcrumb li { color: var(--dim); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--faint); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue-light); }
.breadcrumb [aria-current] { color: var(--blue-light); }

/* ---------- Grids & cards ---------- */

.grid-3, .grid-2 { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.grid-2--center { align-items: center; }

/* hairline grid: cells separated by 1.5px lines */
.hairline { display: grid; gap: 1.5px; background: var(--line); }
.hairline--3 { grid-template-columns: repeat(3, 1fr); }
.hairline--2 { grid-template-columns: 1fr 1fr; }

.service-cell { background: var(--navy); padding: 3rem 2.5rem; display: flex; flex-direction: column; transition: background 0.3s; }
.service-cell:hover { background: var(--navy-mid); }
.service-cell .icon { margin-bottom: 1.5rem; }
.service-cell .h3 { margin-bottom: 1rem; }
.service-cell p { color: var(--muted); font-size: 0.9rem; line-height: 1.75; margin-bottom: 1.5rem; }
.service-cell .tags { margin-bottom: 1.75rem; }
.service-cell .text-link { margin-top: auto; }

.stat { background: var(--navy-mid); padding: 2.5rem 2rem; }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: 3rem; color: var(--blue); letter-spacing: -0.01em; line-height: 1; margin-bottom: 0.5rem; }
.stat__label { color: var(--muted); font-size: 0.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }

.panel { border: 1px solid var(--line); border-radius: 4px; padding: 1.5rem; }
.panel--tint { background: rgba(31,135,190,0.06); }
.panel__label { color: var(--blue-light); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem; }
.panel__label--dim { color: var(--dim); }
.panel__divider { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(31,135,190,0.1); }
.panel__value { color: var(--text); font-size: 0.9rem; }
.panel__sub { color: var(--muted); font-size: 0.85rem; }

.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.person { background: rgba(9,14,26,0.8); border: 1px solid var(--line); border-radius: 4px; padding: 1.25rem; }
.avatar {
    width: 40px; height: 40px; border-radius: 50%; margin-bottom: 0.75rem;
    background: rgba(31,135,190,0.15); border: 1px solid rgba(31,135,190,0.3);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--blue);
}
.person__name { font-weight: 600; font-size: 0.85rem; color: var(--text); margin-bottom: 0.25rem; }
.person__role { color: var(--blue); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.75rem; }
.person__meta { color: var(--dim); font-size: 0.72rem; line-height: 1.6; }
.person__meta a { color: var(--muted); text-decoration: none; }
.person__meta a:hover { color: var(--blue-light); }

/* Project cards */
.project-card {
    background: var(--navy-mid); border: 1px solid rgba(31,135,190,0.12); border-radius: 4px; overflow: hidden;
    display: flex; flex-direction: column; transition: border-color 0.3s, transform 0.2s;
}
.project-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.project-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-card); }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0.85; transition: opacity 0.3s, transform 0.4s; }
.project-card:hover .project-card__media img { opacity: 1; transform: scale(1.03); }
.project-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13,21,38,0.6), transparent 50%); }
.project-card__bar { height: 3px; background: linear-gradient(to right, var(--blue), transparent); }
.project-card__bar--light { background: linear-gradient(to right, var(--blue-light), transparent); }
.project-card__body { padding: 2rem; display: flex; flex-direction: column; flex: 1; }
.project-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.project-card__type { color: var(--dim); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.4rem; }
.project-card__body p { color: var(--muted); font-size: 0.875rem; line-height: 1.7; margin-bottom: 1.5rem; }
.project-card__links { display: flex; gap: 1.5rem; margin-top: auto; }
.project-card__title a { color: inherit; text-decoration: none; }
.project-card__title a::before { content: ""; position: absolute; inset: 0; }
.project-card { position: relative; }
.project-card__links a { position: relative; z-index: 1; }

.project-card--cta { border-style: dashed; justify-content: center; text-align: center; padding: 3rem 2rem; background: transparent; }
.project-card--cta .h4 { margin-bottom: 0.75rem; }
.project-card--cta p { color: var(--muted); font-size: 0.875rem; line-height: 1.7; margin: 0 auto 1.75rem; max-width: 280px; }

/* Capability list */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
    display: flex; align-items: center; gap: 1rem; padding: 1rem 0;
    border-bottom: 1px solid var(--line-soft); color: var(--text-soft); font-size: 0.9rem; line-height: 1.5;
    transition: padding-left 0.2s;
}
.check-list li:last-child { border-bottom: 0; }
.check-list li:hover { padding-left: 0.5rem; }
.check-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.check-list--compact li { padding: 0.6rem 0; font-size: 0.875rem; }
.check-list--compact li:hover { padding-left: 0; }

@media (max-width: 900px) {
    .grid-3, .hairline--3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; gap: 3rem; }
}
@media (min-width: 901px) and (max-width: 1100px) {
    .grid-3--projects { grid-template-columns: 1fr 1fr; }
}

/* ---------- Services page ---------- */

.service-layout { display: grid; grid-template-columns: 240px 1fr; gap: 4rem; align-items: start; }
.side-nav { position: sticky; top: calc(var(--nav-h) + 2rem); }
.side-nav ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.side-nav a {
    display: block; padding: 0.7rem 0 0.7rem 1.25rem; margin-left: -1px; border-left: 2px solid transparent;
    color: var(--muted); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}
.side-nav a:hover { color: var(--blue-light); }
.side-nav a.is-active { color: var(--text); border-left-color: var(--blue); }
.side-nav .num { color: var(--dim); margin-right: 0.6rem; font-family: var(--font-display); font-weight: 700; }

.service-block { padding-bottom: 5rem; margin-bottom: 5rem; border-bottom: 1px solid var(--line); }
.service-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.service-block__head { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.service-block__head .icon {
    width: 64px; height: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: rgba(31,135,190,0.06); border-radius: 4px;
}
.service-block > .body { max-width: 720px; margin-bottom: 2.5rem; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px; background: var(--line); }
.feature-grid--single { grid-template-columns: 1fr; }
.feature { background: var(--navy); padding: 2rem; }
.feature .h4 { margin-bottom: 0.75rem; text-transform: none; font-size: 1.35rem; }
.feature .body { font-size: 0.9rem; }
.feature .tags { margin-top: 1.25rem; }

@media (max-width: 900px) {
    .service-layout { grid-template-columns: 1fr; gap: 2rem; }
    .side-nav { position: static; }
    .side-nav ol { display: flex; flex-wrap: wrap; border-left: 0; gap: 0.5rem; }
    .side-nav a { border: 1px solid var(--line); padding: 0.5rem 0.9rem; margin: 0; border-radius: 2px; }
    .side-nav a.is-active { border-color: var(--blue); }
    .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- Project detail ---------- */

.project-layout { display: grid; grid-template-columns: 1fr 320px; gap: 4rem; align-items: start; }
.project-layout .body { font-size: 1rem; }
.meta-list { margin: 0; }
.meta-list div { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.meta-list div:first-child { padding-top: 0; }
.meta-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-list dt { color: var(--dim); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.35rem; }
.meta-list dd { margin: 0; color: var(--text); font-size: 0.9rem; }
.meta-list dd a { color: var(--blue-light); text-decoration: none; }
.meta-list dd a:hover { text-decoration: underline; }

.arch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; background: var(--line); margin-top: 2.5rem; }
.arch__step { background: var(--navy-mid); padding: 1.5rem; }
.arch__step .stat__label { color: var(--blue-light); font-size: 0.68rem; margin-bottom: 0.5rem; }
.arch__step p { color: var(--muted); font-size: 0.85rem; line-height: 1.65; margin: 0; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.shot {
    display: block; padding: 0; margin: 0; text-align: left; cursor: zoom-in; width: 100%;
    background: var(--navy-mid); border: 1px solid rgba(31,135,190,0.12); border-radius: 4px; overflow: hidden;
    font: inherit; color: inherit; transition: border-color 0.3s, transform 0.2s;
}
.shot:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.shot__img { aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.shot__img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shot__cap { padding: 1.25rem 1.5rem; border-top: 1px solid rgba(31,135,190,0.12); }
.shot__cap .h4 { font-size: 1.05rem; }
.shot__cap p { color: var(--muted); font-size: 0.82rem; line-height: 1.6; margin: 0.4rem 0 0; }

.lightbox {
    border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 94vh; overflow: visible;
}
.lightbox::backdrop { background: rgba(5,8,16,0.92); }
.lightbox img { max-width: 100%; max-height: 82vh; border: 1px solid var(--line); border-radius: 4px; margin: 0 auto; }
.lightbox__cap { color: var(--muted); font-size: 0.85rem; text-align: center; margin-top: 1rem; }
.lightbox__close {
    position: absolute; top: -2.75rem; right: 0; background: none; border: 0; color: var(--text); cursor: pointer;
    font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; display: flex; align-items: center; gap: 0.5rem;
}
.lightbox__close:hover { color: var(--blue-light); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px; background: var(--line); }
.pager a { background: var(--navy); padding: 2rem; text-decoration: none; transition: background 0.3s; }
.pager a:hover { background: var(--navy-mid); }
.pager a:last-child { text-align: right; }
.pager .stat__label { font-size: 0.68rem; margin-bottom: 0.5rem; }

@media (max-width: 900px) {
    .project-layout { grid-template-columns: 1fr; gap: 3rem; }
    .gallery, .arch { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 900px) {
    .gallery { grid-template-columns: 1fr 1fr; }
}

/* ---------- Contact ---------- */

.contact-layout { display: grid; grid-template-columns: 1fr 1.35fr; gap: 5rem; align-items: start; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line-soft); }
.info-list li:first-child { padding-top: 0; }
.info-list .icon {
    width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: rgba(31,135,190,0.06); border-radius: 2px; color: var(--blue-light);
}
.info-list .panel__label { margin-bottom: 0.25rem; }
.info-list a { color: var(--text); text-decoration: none; font-size: 0.9rem; }
.info-list a:hover { color: var(--blue-light); }
.info-list .panel__value + .panel__value { margin-top: 0.15rem; }

.form-card { background: var(--navy-mid); border: 1px solid var(--line); border-radius: 4px; padding: 2.5rem; position: relative; }
.form-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(to right, var(--blue), transparent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; color: var(--muted); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.5rem; }
.field label .req { color: var(--blue-light); }
.field input, .field textarea, .field select {
    width: 100%; background: var(--navy); color: var(--text); border: 1px solid rgba(31,135,190,0.2); border-radius: 2px;
    padding: 0.85rem 1rem; font: inherit; font-size: 0.92rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,135,190,0.15); }
.field.has-error input, .field.has-error textarea { border-color: #e5656b; }
.field__error { color: #f08a8f; font-size: 0.78rem; margin-top: 0.4rem; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.form-note { color: var(--dim); font-size: 0.75rem; margin: 0; }

.alert { border-radius: 2px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.9rem; display: flex; gap: 0.75rem; align-items: flex-start; }
.alert--success { background: rgba(99,196,122,0.08); border: 1px solid rgba(99,196,122,0.3); color: #a7e3b6; }
.alert--error { background: rgba(229,101,107,0.08); border: 1px solid rgba(229,101,107,0.3); color: #f3a9ad; }

@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
}
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-card { padding: 1.75rem 1.25rem; }
}

/* ---------- Pricing (hosting) ---------- */

.price-card { background: var(--navy-mid); border: 1px solid rgba(31,135,190,0.12); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.3s, transform 0.2s; }
.price-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.price-card--featured { border-color: rgba(31,135,190,0.45); box-shadow: 0 20px 60px rgba(31,135,190,0.12); }
.price-card__body { padding: 2.25rem 2rem 2rem; display: flex; flex-direction: column; flex: 1; }
.price-card__price { display: flex; align-items: baseline; gap: 0.25rem; margin: 1rem 0 1.5rem; }
.price-card__price .amount { font-family: var(--font-display); font-weight: 800; font-size: 3.5rem; line-height: 1; color: var(--text); }
.price-card__price .cur { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--blue); align-self: flex-start; margin-top: 0.4rem; }
.price-card__price .per { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.price-card .check-list { margin-bottom: 2rem; }
.price-card .btn { margin-top: auto; }
.fine-print { color: var(--dim); font-size: 0.75rem; margin-top: 1.5rem; }

/* ---------- CTA band ---------- */

.cta { position: relative; overflow: hidden; padding: 7rem 0 6rem; text-align: center; }
.cta .lead { max-width: 520px; margin: 0 auto 2.5rem; }
.cta .h2 { margin-bottom: 1.5rem; }
.cta .btn-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--navy); padding: 4rem 0 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 3rem; margin-bottom: 3rem; }
.brand--footer { margin-bottom: 1.25rem; }
.brand--footer .logo-mark { height: 24px; }
.brand--footer .wordmark { font-size: 1.2rem; }
.footer-blurb { color: var(--dim); font-size: 0.82rem; line-height: 1.7; max-width: 320px; }
.footer-title { color: var(--muted); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a, .footer-links span { color: var(--dim); font-size: 0.82rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--blue-light); }
.footer-certs { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.footer-certs img { width: 56px; height: 56px; opacity: 0.85; transition: opacity 0.2s; }
.footer-certs a:hover img { opacity: 1; }
.footer-bottom { border-top: 1px solid var(--line-soft); padding-top: 2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom span { color: var(--faint); font-size: 0.72rem; letter-spacing: 0.04em; }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .container { padding: 0 1.25rem; }
    .section { padding: 5.5rem 0; }
    .cert-row { flex-direction: column; }
    .hairline--2, .team-grid { grid-template-columns: 1fr; }
}

/* ---------- Error page ---------- */

.error-page { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; }
.error-page .code { font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 18vw, 12rem); line-height: 0.9; color: var(--blue); opacity: 0.9; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ======================================================================
   Additions: layout helpers, draft states, motion
   ====================================================================== */

.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 200;
    background: var(--blue); color: #fff; padding: 0.6rem 1rem; border-radius: 2px;
    font-size: 0.8rem; font-weight: 600; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.glow--page { top: -60%; right: -10%; width: 700px; height: 700px; background: radial-gradient(circle, rgba(31,135,190,0.16) 0%, transparent 70%); }

.section-head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }

.project-card__placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--faint); background:
        linear-gradient(var(--navy-card), var(--navy-card)) padding-box,
        repeating-linear-gradient(45deg, rgba(31,135,190,0.06) 0 10px, transparent 10px 20px);
}

.shot__img, .shot__cap { display: block; }
.shot__text { display: block; color: var(--muted); font-size: 0.82rem; line-height: 1.6; margin-top: 0.4rem; }

.alert code { font-size: 0.85em; }

/* ---------- Motion ---------- */

/* Cross-document page transitions (Chrome, Edge, Safari 18+; ignored elsewhere). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.18s ease both; }
::view-transition-new(root) { animation: vt-in 0.3s ease both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
.site-header { view-transition-name: site-header; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Hero and page-hero entrance: staggered on first paint. */
.hero__copy > *, .hero__visual, .page-hero .container > * {
    animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero__copy > :nth-child(1) { animation-delay: 0.05s; }
.hero__copy > :nth-child(2) { animation-delay: 0.15s; }
.hero__copy > :nth-child(3) { animation-delay: 0.25s; }
.hero__copy > :nth-child(4) { animation-delay: 0.35s; }
.hero__visual { animation-delay: 0.3s; animation-duration: 0.9s; }
.page-hero .container > :nth-child(1) { animation-delay: 0s; }
.page-hero .container > :nth-child(2) { animation-delay: 0.08s; }
.page-hero .container > :nth-child(3) { animation-delay: 0.16s; }
.page-hero .container > :nth-child(4) { animation-delay: 0.24s; }
.glow { animation: fade-in 1.6s ease both; }

/* Scroll reveal. Only hides content when JS is running (html.js). */
.js .reveal {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Keep hover lifts responsive once revealed. */
.js .reveal.is-visible.project-card,
.js .reveal.is-visible.shot,
.js .reveal.is-visible.price-card { transition: border-color 0.3s, transform 0.2s, opacity 0.7s; transition-delay: 0s; }
.js .reveal.is-visible.project-card:hover, .js .reveal.is-visible.shot:hover, .js .reveal.is-visible.price-card:hover { transform: translateY(-3px); }

/* Mobile menu slide. */
@media (max-width: 900px) {
    .site-header.is-open .mobile-nav { animation: menu-in 0.25s ease both; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Lightbox. */
.lightbox[open] { animation: lb-in 0.25s cubic-bezier(0.22, 1, 0.36, 1) both; }
.lightbox[open]::backdrop { animation: fade-in 0.25s ease both; }
@keyframes lb-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

/* Buttons: arrow nudge on hover. */
.btn svg, .text-link svg { transition: transform 0.2s; }
.btn:hover svg, .text-link:hover svg { transform: translateX(2px); }

/* Nav underline grows in. */
.nav__link { position: relative; border-bottom: 0; }
.nav__link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--blue);
    transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

/* Form submit state. */
.btn.is-loading { pointer-events: none; opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; }
    @view-transition { navigation: none; }
}

.pager-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--navy); }
.pager-wrap .pager { background: var(--line); }
.pager-wrap .pager a { padding: 2rem 0; }
.pager-wrap .pager a:first-child { padding-right: 2rem; }
.pager-wrap .pager a:last-child { padding-left: 2rem; }

/* Let grid children shrink below their content width (keeps the terminal from widening the page on mobile). */
.hero > .container, .error-page > .container, .hairline > *, .hero__grid > *, .grid-2 > *, .grid-3 > *, .project-layout > *, .service-layout > *, .contact-layout > *, .feature-grid > *, .footer-grid > * { min-width: 0; }

/* Gallery cards are <button>s, which vertically center their content by default.
   Stack content from the top so shorter captions don't shift the screenshot down. */
.shot { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; height: 100%; }
.shot__img { flex: none; }
.shot__cap { flex: 1; }
.shot:focus:not(:focus-visible) { outline: none; }

/* ---------- Contact form spam protection ---------- */

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ALTCHA widget, themed to match the form. */
altcha-widget {
    display: block;
    --altcha-max-width: 100%;
    --altcha-border-width: 1px;
    --altcha-border-radius: 2px;
    --altcha-border-color: rgba(31, 135, 190, 0.2);
    --altcha-color-base: var(--navy);
    --altcha-color-base-content: var(--text-soft);
    --altcha-color-neutral: var(--navy-card);
    --altcha-color-neutral-content: var(--muted);
    --altcha-color-primary: var(--blue);
    --altcha-color-primary-content: #fff;
    --altcha-color-success: var(--green);
    --altcha-color-error: #e5656b;
    --altcha-checkbox-border-color: rgba(31, 135, 190, 0.45);
    --altcha-checkbox-border-radius: 2px;
    --altcha-spinner-color: var(--blue-light);
    --altcha-shadow: none;
}
.field.has-error altcha-widget { --altcha-border-color: #e5656b; }
