/* AMScodes site styles */
:root {
    --navy-950: #060e1d;
    --navy-900: #0b1a33;
    --navy-800: #12284a;
    --navy-700: #1b3a66;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --cyan-400: #22b8f0;
    --sky-200: #bfdbfe;
    --sky-100: #e0efff;
    --ink: #0f172a;
    --body: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f5f8fd;
    --white: #ffffff;
    --brand: linear-gradient(135deg, #2563eb 0%, #22b8f0 100%);
    --radius: 18px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .04);
    --shadow-md: 0 10px 30px rgba(15, 40, 80, .08);
    --shadow-lg: 0 24px 60px rgba(15, 40, 80, .14);
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --header-h: 72px;
    --accent-blue: #2563eb; /* used by chat widget error message */
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { font-family: var(--font); color: var(--body); background: var(--bg); line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue-600); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .8rem 1.5rem; border-radius: 999px; font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer; border: 0; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; -webkit-appearance: none; appearance: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 28px rgba(37, 99, 235, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(37, 99, 235, .45); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--header-h); display: flex; align-items: center; background: rgba(6, 14, 29, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .08); transition: background .3s ease; }
.site-header.scrolled { background: rgba(6, 14, 29, .96); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.brand img { height: 38px; width: auto; }
.brand b { background: var(--brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }
.main-nav { display: flex; align-items: center; gap: 1.75rem; }
.main-nav a { color: #cbd5e1; text-decoration: none; font-weight: 600; font-size: .95rem; transition: color .2s; }
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a.active:not(.btn) { box-shadow: inset 0 -2px 0 var(--cyan-400); padding-bottom: 4px; }
.mobile-nav a.active { color: #7dd3fc; }
.main-nav .ext::after { content: ' \2197'; font-size: .8em; opacity: .7; }
.main-nav .btn { min-height: 42px; padding: .6rem 1.2rem; font-size: .92rem; color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: #fff; transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav { position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 999; background: var(--navy-950); border-bottom: 1px solid rgba(255, 255, 255, .1); padding: .5rem 24px 1.25rem; display: none; box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: .9rem 0; color: #e2e8f0; text-decoration: none; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.mobile-nav .btn { margin-top: 1rem; width: 100%; color: #fff; border-bottom: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 85% -10%, rgba(34, 184, 240, .22), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(37, 99, 235, .28), transparent 60%), var(--navy-950); color: #cbd5e1; padding: calc(var(--header-h) + 72px) 0 88px; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; background: rgba(34, 184, 240, .12); border: 1px solid rgba(34, 184, 240, .3); color: #7dd3fc; font-size: .82rem; font-weight: 700; letter-spacing: .02em; margin-bottom: 1.4rem; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -0.035em; margin-bottom: 1.3rem; }
.hero h1 .grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 560px; margin-bottom: 2rem; color: #aebbd0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 2.2rem; list-style: none; font-size: .92rem; color: #94a3b8; }
.hero-points li { display: flex; align-items: center; gap: .45rem; }
.hero-points svg { width: 16px; height: 16px; color: var(--cyan-400); flex-shrink: 0; }

/* example chat card */
.demo-wrap { position: relative; }
.demo-card { background: rgba(255, 255, 255, .97); border-radius: 22px; box-shadow: 0 40px 80px rgba(0, 0, 0, .45); overflow: hidden; max-width: 440px; margin-left: auto; }
.demo-head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.2rem; background: var(--brand); color: #fff; }
.demo-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.demo-head strong { display: block; font-size: .98rem; }
.demo-head small { opacity: .85; font-size: .78rem; }
.demo-body { padding: 1.2rem; display: flex; flex-direction: column; gap: .7rem; background: #f8fafc; }
.bubble { max-width: 82%; padding: .7rem .95rem; border-radius: 16px; font-size: .9rem; line-height: 1.45; }
.bubble.them { align-self: flex-end; background: var(--blue-600); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble time { display: block; font-size: .7rem; opacity: .65; margin-top: .25rem; }
.demo-foot { padding: .7rem 1.2rem; font-size: .74rem; color: var(--muted); background: #fff; border-top: 1px solid var(--line); text-align: center; }
.float-chip { position: absolute; display: flex; align-items: center; gap: .55rem; padding: .65rem .95rem; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: .82rem; font-weight: 700; color: var(--ink); animation: bob 5s ease-in-out infinite; }
.float-chip .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.float-chip .ic svg { width: 16px; height: 16px; }
.float-chip small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.chip-a { left: -14px; top: 22%; }
.chip-a .ic { background: #22c55e; }
.chip-b { right: -10px; bottom: -18px; animation-delay: -2.5s; }
.chip-b .ic { background: var(--blue-600); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-600); margin-bottom: .8rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin-bottom: 1rem; }
.section-head p { font-size: 1.08rem; color: var(--muted); }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service-card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; display: flex; flex-direction: column; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--sky-200); }
.service-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.service-icon { width: 54px; height: 54px; border-radius: 15px; background: var(--brand); display: grid; place-items: center; color: #fff; flex-shrink: 0; box-shadow: 0 10px 24px rgba(37, 99, 235, .3); }
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 1.4rem; }
.service-card > p { color: var(--muted); margin-bottom: 1.4rem; }
.sub-label { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: .75rem; }
.sub-list { list-style: none; display: grid; gap: .1rem; margin-bottom: 1.4rem; }
.sub-list li { display: grid; grid-template-columns: 22px 1fr; gap: .55rem; padding: .55rem 0; border-top: 1px dashed var(--line); font-size: .95rem; }
.sub-list li:first-child { border-top: 0; }
.sub-list svg { width: 18px; height: 18px; color: var(--blue-600); margin-top: 3px; }
.sub-list strong { color: var(--ink); font-weight: 700; }
.sub-list span { color: var(--muted); }
.service-example { margin-top: auto; padding: .85rem 1rem; border-radius: 12px; background: var(--sky-100); color: var(--navy-700); font-size: .88rem; }
.service-example strong { color: var(--navy-800); }

/* CrewsOps feature */
.product-band { margin-top: 32px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 40px; border-radius: 24px; background: radial-gradient(600px 300px at 100% 0%, rgba(34, 184, 240, .25), transparent 60%), var(--navy-900); color: #cbd5e1; box-shadow: var(--shadow-lg); }
.product-band .kicker { color: #7dd3fc; }
.product-band h3 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .8rem; }
.product-band p { margin-bottom: 1.4rem; color: #aebbd0; }
.feature-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.feature-pills span { padding: .5rem .85rem; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); font-size: .85rem; font-weight: 600; color: #e2e8f0; }

/* ---------- Work ---------- */
.work { background: var(--white); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.work-banner { height: 120px; display: flex; align-items: flex-end; padding: 18px 22px; color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; position: relative; overflow: hidden; }
.work-banner::after { content: ''; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.wb-green { background: linear-gradient(135deg, #166534, #22c55e); }
.wb-amber { background: linear-gradient(135deg, #7c2d12, #d97706); }
.wb-violet { background: linear-gradient(135deg, #312e81, #7c3aed); }
.work-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.work-type { font-size: .78rem; font-weight: 700; color: var(--blue-600); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; }
.work-body p { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.tags span { font-size: .76rem; font-weight: 600; padding: .3rem .6rem; border-radius: 8px; background: var(--bg); color: var(--body); border: 1px solid var(--line); }
.work-link { margin-top: auto; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.work-link:hover { text-decoration: underline; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 1rem; }
.step h3 { font-size: 1.1rem; margin-bottom: .45rem; }
.step p { font-size: .94rem; color: var(--muted); }

/* ---------- Tech ---------- */
.tech { background: var(--white); }
.tech-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tech-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--bg); }
.tech-group h3 { font-size: 1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.tech-group h3 svg { width: 18px; height: 18px; color: var(--blue-600); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips span { padding: .45rem .75rem; border-radius: 10px; background: var(--white); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--ink); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 1.2rem; }
.about-copy p { margin-bottom: 1rem; font-size: 1.04rem; }
.values { display: grid; gap: 16px; }
.value { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.value .vi { width: 48px; height: 48px; border-radius: 13px; background: var(--sky-100); color: var(--blue-600); display: grid; place-items: center; }
.value .vi svg { width: 22px; height: 22px; }
.value h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.value p { font-size: .94rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { background: var(--white); }
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); transition: background .2s, border-color .2s; }
.faq-list details[open] { background: var(--white); border-color: var(--sky-200); box-shadow: var(--shadow-md); }
.faq-list summary { list-style: none; cursor: pointer; padding: 1.15rem 1.35rem; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-size: 1.4rem; font-weight: 500; color: var(--blue-600); transition: transform .2s; flex-shrink: 0; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .answer { padding: 0 1.35rem 1.2rem; color: var(--body); }

/* ---------- Contact ---------- */
.contact { background: radial-gradient(900px 500px at 100% 0%, rgba(34, 184, 240, .18), transparent 60%), var(--navy-950); color: #cbd5e1; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 2.8rem); margin-bottom: 1rem; }
.contact-intro p { color: #aebbd0; margin-bottom: 2rem; font-size: 1.06rem; }
.contact-methods { display: grid; gap: 12px; }
.method { display: flex; align-items: center; gap: 1rem; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: #e2e8f0; text-decoration: none; transition: background .2s; }
a.method:hover { background: rgba(255, 255, 255, .1); }
.method .mi { width: 42px; height: 42px; border-radius: 12px; background: var(--brand); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.method .mi svg { width: 20px; height: 20px; }
.method small { display: block; color: #94a3b8; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.method strong { color: #fff; font-weight: 700; }
.contact-form { background: var(--white); border-radius: 22px; padding: 34px; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.contact-form h3 { font-size: 1.3rem; margin-bottom: .3rem; }
.contact-form .form-sub { color: var(--muted); font-size: .94rem; margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .86rem; color: var(--ink); margin-bottom: .4rem; }
.field label .opt { font-weight: 500; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: .85rem 1rem; border: 1.5px solid #cbd5e1; border-radius: 12px; font: 500 1rem var(--font); color: var(--ink); background: #fff; -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(59, 130, 246, .15); }
.contact-form select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem; cursor: pointer; }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form button[type="submit"] { width: 100%; margin-top: .4rem; min-height: 52px; }
.contact-form button[type="submit"]:disabled { opacity: .75; cursor: not-allowed; transform: none; }

/* ---------- Footer ---------- */
footer { background: var(--navy-950); color: #94a3b8; padding: 56px 0 calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255, 255, 255, .06); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
footer .brand { margin-bottom: .9rem; }
footer p { font-size: .93rem; max-width: 320px; }
footer h4 { color: #fff; font-size: .9rem; margin-bottom: 1rem; letter-spacing: 0; }
footer ul { list-style: none; display: grid; gap: .55rem; }
footer a { color: #94a3b8; text-decoration: none; font-size: .93rem; }
footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 24px; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ---------- Chat widget (same IDs/classes as before) ---------- */
.chat-bubble { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); right: calc(24px + env(safe-area-inset-right, 0px)); width: 62px; height: 62px; border-radius: 50%; background: var(--brand); color: #fff; border: 0; font-size: 1.6rem; cursor: pointer; z-index: 2000; box-shadow: 0 12px 32px rgba(37, 99, 235, .5); display: grid; place-items: center; transition: transform .2s; -webkit-appearance: none; appearance: none; }
.chat-bubble:hover { transform: scale(1.08); }
.chat-bubble::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(59, 130, 246, .5); animation: ring 2.6s ease-out infinite; }
.chat-bubble.active { background: #ef4444; }
.chat-bubble.active::after { display: none; }
@keyframes ring { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.chat-panel { position: fixed; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); right: calc(24px + env(safe-area-inset-right, 0px)); width: 380px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 140px); background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(15, 23, 42, .35); display: none; flex-direction: column; z-index: 2001; overflow: hidden; }
.chat-panel.active { display: flex; animation: pop .25s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.chat-header { background: var(--brand); color: #fff; padding: 1.1rem 1.3rem; display: flex; justify-content: space-between; align-items: center; }
.chat-header h3 { font-size: 1.02rem; color: #fff; letter-spacing: 0; }
.chat-close { background: rgba(255, 255, 255, .2); border: 0; color: #fff; font-size: 1.4rem; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.chat-messages { flex: 1; padding: 1.2rem; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #f8fafc; }
.chat-message { display: flex; gap: .6rem; margin-bottom: .9rem; }
.message-avatar { width: 34px; height: 34px; min-width: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: .7rem; display: grid; place-items: center; }
.message-content { background: #fff; border: 1px solid var(--line); padding: .7rem .95rem; border-radius: 14px; max-width: 78%; }
.message-content p { font-size: .93rem; line-height: 1.5; color: var(--ink); }
.user-message { flex-direction: row-reverse; }
.user-message .message-content { background: var(--blue-600); border-color: var(--blue-600); }
.user-message .message-content p { color: #fff; }
.thinking-indicator { opacity: .7; }
.chat-input-area { display: flex; gap: .6rem; padding: .9rem 1rem; border-top: 1px solid var(--line); background: #fff; }
.chat-input { flex: 1; min-height: 44px; padding: .65rem 1rem; border: 1.5px solid #cbd5e1; border-radius: 999px; font: 500 1rem var(--font); color: var(--ink); -webkit-appearance: none; appearance: none; }
.chat-input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.chat-send { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-send:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .demo-card { margin: 0 auto; }
    .tech-groups { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .work-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
    .main-nav { display: none; }
    .nav-toggle { display: flex; }
    .services-grid, .about-grid, .contact-grid, .product-band { grid-template-columns: 1fr; }
    .about-grid, .contact-grid { gap: 40px; }
}
@media (max-width: 640px) {
    :root { --header-h: 64px; }
    .container { padding: 0 16px; }
    section { padding: 72px 0; }
    .hero { padding: calc(var(--header-h) + 48px) 0 72px; }
    .section-head { margin-bottom: 40px; }
    .service-card, .contact-form { padding: 24px; }
    .product-band { padding: 28px 22px; }
    .work-grid, .steps, .tech-groups, .form-row { grid-template-columns: 1fr; }
    .form-row { gap: 0; }
    .float-chip { display: none; }
    .hero-ctas .btn { flex: 1 1 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .chat-bubble { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
    .chat-panel { right: 16px; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
@media print { .site-header, .chat-bubble, .chat-panel { display: none !important; } }
    
/* ================= Multi-page additions ================= */
.page-hero { position: relative; overflow: hidden; text-align: center; color: #aebbd0; padding: calc(var(--header-h) + 64px) 0 64px; background: radial-gradient(900px 420px at 80% -20%, rgba(34, 184, 240, .22), transparent 60%), radial-gradient(700px 400px at 0% 120%, rgba(37, 99, 235, .25), transparent 60%), var(--navy-950); }
.page-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.3rem); letter-spacing: -0.03em; margin: 0 auto 1rem; max-width: 820px; }
.page-hero p { max-width: 680px; margin: 0 auto; font-size: 1.12rem; }
.page-hero .kicker { color: #7dd3fc; }
.alt { background: var(--white); }
.section-foot { text-align: center; margin-top: 40px; }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.link-arrow svg { width: 16px; height: 16px; }
.link-arrow:hover { text-decoration: underline; }

/* home: compact service cards */
.svc-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.svc-mini { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s; text-decoration: none; color: inherit; }
.svc-mini:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--sky-200); }
.svc-mini .service-icon { margin-bottom: 1.1rem; }
.svc-mini h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.svc-mini p { color: var(--muted); font-size: .94rem; margin-bottom: 1rem; }
.svc-mini ul { list-style: none; display: grid; gap: .4rem; margin-bottom: 1.3rem; font-size: .9rem; }
.svc-mini li { display: flex; gap: .45rem; align-items: flex-start; color: var(--body); }
.svc-mini li svg { width: 16px; height: 16px; color: var(--blue-600); flex-shrink: 0; margin-top: 4px; }
.svc-mini .more { margin-top: auto; font-weight: 700; color: var(--blue-600); display: inline-flex; align-items: center; gap: .35rem; font-size: .93rem; }
.svc-mini .more svg { width: 16px; height: 16px; }

/* services page */
.svc-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 2rem; }
.svc-jump a { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #e2e8f0; text-decoration: none; font-weight: 600; font-size: .92rem; }
.svc-jump a:hover { background: rgba(255, 255, 255, .14); }
.svc-jump svg { width: 16px; height: 16px; color: var(--cyan-400); }
.svc-detail { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.svc-detail + .svc-detail { margin-top: 88px; padding-top: 88px; border-top: 1px solid var(--line); }
.svc-intro { position: sticky; top: calc(var(--header-h) + 24px); }
.svc-intro .service-icon { margin-bottom: 1.2rem; }
.svc-intro h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1rem; }
.svc-intro > p { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.4rem; }
.svc-intro .service-example { margin-bottom: 1.4rem; }
.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sub-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-sm); }
.sub-card .si { width: 36px; height: 36px; border-radius: 10px; background: var(--sky-100); color: var(--blue-600); display: grid; place-items: center; margin-bottom: .8rem; }
.sub-card .si svg { width: 18px; height: 18px; }
.sub-card h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.sub-card p { font-size: .92rem; color: var(--muted); }
.sub-grid .sub-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* CTA band */
.cta-band { text-align: center; padding: 56px 32px; border-radius: 24px; background: var(--brand); color: #e0f2fe; box-shadow: 0 24px 60px rgba(37, 99, 235, .35); }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: .8rem; }
.cta-band p { max-width: 620px; margin: 0 auto 1.8rem; font-size: 1.06rem; }
.cta-band .btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.btn-white { background: #fff; color: var(--blue-600); box-shadow: 0 10px 24px rgba(0, 0, 0, .15); }
.btn-white:hover { transform: translateY(-2px); }
.btn-outline-w { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .6); }
.btn-outline-w:hover { background: rgba(255, 255, 255, .12); }

/* work page */
.case { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--white); box-shadow: var(--shadow-md); }
.case + .case { margin-top: 28px; }
.case .work-banner { height: auto; min-height: 240px; font-size: 1.6rem; padding: 32px; align-items: flex-end; }
.case .work-body { padding: 34px; }
.case h2 { font-size: 1.5rem; margin-bottom: .6rem; }
.case .built { list-style: none; display: grid; gap: .45rem; margin: 0 0 1.4rem; }
.case .built li { display: flex; gap: .5rem; font-size: .95rem; }
.case .built svg { width: 17px; height: 17px; color: var(--blue-600); flex-shrink: 0; margin-top: 4px; }
.wb-blue { background: linear-gradient(135deg, #0b1a33, #2563eb); }
.wb-cyan { background: linear-gradient(135deg, #0e7490, #22b8f0); }

/* contact page */
.next-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

@media (max-width: 1024px) {
    .svc-mini-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
    .svc-detail, .case { grid-template-columns: 1fr; }
    .svc-detail { gap: 28px; }
    .svc-intro { position: static; }
    .case .work-banner { min-height: 140px; }
    .next-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .svc-mini-grid, .sub-grid { grid-template-columns: 1fr; }
    .svc-detail + .svc-detail { margin-top: 56px; padding-top: 56px; }
    .page-hero { padding: calc(var(--header-h) + 44px) 0 48px; }
    .cta-band { padding: 40px 20px; }
    .case .work-body { padding: 24px; }
}
