/* ==========================================================================
   Smartline Technology — site styles (2026)
   ========================================================================== */

:root {
    --bg: #ffffff;
    --bg-2: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #f3f5f9;
    --border: #e5e8ef;
    --border-strong: #d3d9e4;
    --text: #0f1a2e;
    --muted: #4f5b72;
    --faint: #7c869a;
    --navy: #0b1730;
    --on-accent: #ffffff;

    --pink: #e8345f;
    --orange: #ec6a35;
    --amber: #f29a1f;
    --grad: linear-gradient(110deg, var(--pink) 0%, var(--orange) 60%, var(--amber) 100%);
    --grad-btn: linear-gradient(110deg, var(--pink) 0%, var(--orange) 100%);
    --grad-soft: linear-gradient(135deg, rgba(232, 52, 95, .09), rgba(242, 154, 31, .09));
    --shadow-sm: 0 1px 2px rgba(15, 26, 46, .04), 0 4px 14px -6px rgba(15, 26, 46, .08);
    --shadow: 0 2px 4px rgba(15, 26, 46, .04), 0 18px 40px -18px rgba(15, 26, 46, .18);

    --radius: 18px;
    --radius-sm: 12px;
    --container: 1200px;
    --gutter: clamp(16px, 4vw, 32px);
    --header-h: 72px;

    --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
    --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.65 var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
::selection { background: rgba(232, 52, 95, .18); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.icon { width: 22px; height: 22px; flex: none; }
.icon-sm { width: 17px; height: 17px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font: 600 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
    color: var(--orange); margin-bottom: 18px;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 640px; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--orange); font-weight: 600; }
.text-link:hover { gap: 10px; }
.text-link, .text-link .icon { transition: gap .25s var(--ease); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px; padding: 0 26px; border-radius: 999px;
    font: 600 .98rem/1 var(--font-body); white-space: nowrap;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--grad-btn); color: var(--on-accent); box-shadow: 0 10px 24px -10px rgba(232, 52, 95, .55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(236, 106, 53, .6); }
.btn-ghost { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--faint); background: var(--surface-2); }
.btn-sm { height: 42px; padding: 0 18px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Header / navigation ---------- */
.site-header {
    position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
    transition: background .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(255, 255, 255, .88); backdrop-filter: blur(18px) saturate(1.4); border-color: var(--border); box-shadow: 0 6px 24px -16px rgba(15, 26, 46, .25); }
.nav-bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font: 700 1.02rem/1 var(--font-display); letter-spacing: .14em; color: var(--text); }
.brand-text small { font: 500 .58rem/1 var(--font-body); letter-spacing: .5em; color: var(--muted); margin-top: 5px; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav > ul > li > a, .nav-trigger {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 10px 14px; border-radius: 999px; font-size: .94rem; font-weight: 500; color: var(--muted);
    transition: color .2s, background .2s;
}
.main-nav > ul > li > a:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"], .nav-trigger.is-current { color: var(--text); }
.nav-trigger .icon { transition: transform .2s; }
.nav-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }

.has-mega { position: relative; }
.mega {
    position: absolute; top: calc(100% + 14px); left: 50%;
    width: min(880px, calc(100vw - 48px));
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    padding: 18px; border-radius: var(--radius);
    background: rgba(255, 255, 255, .98); backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    box-shadow: 0 30px 70px -24px rgba(15, 26, 46, .28);
    opacity: 0; visibility: hidden; transform: translate(-50%, -6px);
    transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}
.has-mega.is-open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mega-col { padding: 10px; }
.mega-title { display: flex; align-items: center; gap: 8px; font: 600 .78rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: block; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; font-size: .92rem; color: var(--muted); transition: background .15s, color .15s; }
.mega li a:hover { background: var(--surface-2); color: var(--text); }

.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); align-items: center; justify-content: center; }

@media (max-width: 1080px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 0; z-index: 49;
        flex-direction: column; align-items: stretch; gap: 20px;
        padding: 20px var(--gutter) 40px; overflow-y: auto;
        background: rgba(255, 255, 255, .98); backdrop-filter: blur(20px);
        opacity: 0; visibility: hidden; transform: translateY(-8px);
        transition: opacity .25s, transform .25s var(--ease), visibility .25s;
    }
    body.nav-open .main-nav { opacity: 1; visibility: visible; transform: none; }
    body.nav-open { overflow: hidden; }
    body.nav-open .site-header { background: var(--bg); }
    .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
    .main-nav > ul > li { border-bottom: 1px solid var(--border); }
    .main-nav > ul > li > a, .nav-trigger { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 1.1rem; color: var(--text); border-radius: 0; }
    .main-nav > ul > li > a:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { background: none; }
    .mega {
        position: static; width: auto; transform: none; grid-template-columns: 1fr 1fr;
        padding: 0 0 12px; background: none; border: 0; box-shadow: none; backdrop-filter: none;
        display: none; opacity: 1; visibility: visible;
    }
    .has-mega.is-open .mega { display: grid; transform: none; }
    .mega-col { padding: 8px 4px; }
    .nav-cta { height: 52px; }
}
@media (max-width: 560px) { .mega { grid-template-columns: 1fr; } }

/* ---------- Decorative backgrounds ---------- */
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; mask-image: linear-gradient(#000 65%, transparent); -webkit-mask-image: linear-gradient(#000 65%, transparent); }
.orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .16; }
.orb-a { width: 560px; height: 560px; background: radial-gradient(circle, var(--pink), transparent 65%); top: -180px; right: -120px; animation: drift 18s ease-in-out infinite alternate; }
.orb-b { width: 480px; height: 480px; background: radial-gradient(circle, var(--amber), transparent 65%); bottom: -260px; left: -160px; opacity: .14; animation: drift 22s ease-in-out infinite alternate-reverse; }
.grid-lines {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
    opacity: .7;
}
@keyframes drift { to { transform: translate(-60px, 50px) scale(1.08); } }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; background: linear-gradient(180deg, #fbf7f6 0%, var(--bg) 85%); padding: calc(var(--header-h) + clamp(48px, 9vw, 110px)) 0 clamp(64px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.pill {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
    padding: 6px 14px 6px 6px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: .86rem; color: var(--muted);
}
.pill b { padding: 4px 10px; border-radius: 999px; background: var(--grad-btn); color: var(--on-accent); font-size: .74rem; letter-spacing: .04em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; color: var(--muted); font-size: .92rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .icon { color: var(--orange); }

/* Hero visual: a "build console" card */
.console {
    position: relative; border-radius: 22px; padding: 1px;
    background: linear-gradient(140deg, rgba(232, 52, 95, .45), var(--border) 40%, rgba(242, 154, 31, .4));
    box-shadow: 0 40px 80px -30px rgba(15, 26, 46, .28);
    animation: float 7s ease-in-out infinite;
}
.console-inner { border-radius: 21px; background: #fff; backdrop-filter: blur(20px); overflow: hidden; }
.console-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: .8rem; color: var(--faint); }
.console-bar { background: var(--bg-2); }
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d7dce5; }
.console-bar span { margin-left: auto; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.console-body { padding: 22px; display: grid; gap: 14px; }
.console-prompt { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--surface-2); font-size: .9rem; }
.console-prompt .icon { color: var(--orange); margin-top: 2px; }
.console-row { display: flex; align-items: center; gap: 12px; font-size: .88rem; }
.console-row .label { flex: 1; color: var(--muted); }
.console-row .bar { flex: 1.3; height: 6px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.console-row .bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transform-origin: left; animation: grow 2.4s var(--ease) both; }
.console-row .state { width: 70px; text-align: right; font-size: .78rem; color: var(--faint); }
.console-row .state.ok { color: #16915a; font-weight: 600; }
.console-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.console-stats div { padding: 12px; border-radius: 12px; border: 1px solid var(--border); }
.console-stats b { display: block; font: 600 1.15rem/1.2 var(--font-display); }
.console-stats small { color: var(--faint); font-size: .74rem; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; isolation: isolate; padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(56px, 7vw, 88px); border-bottom: 1px solid var(--border); }
.page-hero h1 { max-width: 900px; font-size: clamp(2.2rem, 5vw, 3.8rem); }
.page-hero .lead { max-width: 720px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: var(--faint); margin-bottom: 28px; }
.breadcrumb a:hover { color: var(--text); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-tint { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.section-head .lead { margin-bottom: 0; }
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.prose { color: var(--muted); font-size: 1.08rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }

/* ---------- Client logos marquee ---------- */
.logos { padding: 36px 0 12px; }
.logos-label { text-align: center; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 26px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 20px; width: max-content; animation: scroll 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.logo-tile { width: 132px; height: 84px; border-radius: 14px; background: #fff; display: grid; place-items: center; padding: 10px; border: 1px solid var(--border); filter: grayscale(1); opacity: .8; transition: filter .3s, opacity .3s; }
.logo-tile:hover { filter: none; opacity: 1; }
.logo-tile img { max-height: 64px; width: auto; object-fit: contain; }
@keyframes scroll { to { transform: translateX(calc(-50% - 10px)); } }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
    position: relative; padding: 28px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-top: 18px; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card-icon {
    display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
    background: var(--grad-soft); border: 1px solid rgba(236, 106, 53, .22); color: var(--orange);
}

/* Service cards (home) */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.service-card { padding: clamp(28px, 3vw, 40px); overflow: hidden; }
.service-card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
    background: var(--grad); opacity: 0; transition: opacity .35s;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.service-card:hover::before { opacity: .8; }
.service-card .card-head { display: flex; align-items: center; justify-content: space-between; }
.service-card h3 { font-size: 1.5rem; margin: 22px 0 10px; }
.service-links { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.service-links a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: .86rem; color: var(--muted); transition: all .2s; }
.service-links a:hover { color: var(--orange); border-color: var(--orange); background: rgba(236, 106, 53, .06); }
.card-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); transition: all .3s var(--ease); }
.service-card:hover .card-arrow { background: var(--grad-btn); color: var(--on-accent); border-color: transparent; transform: rotate(45deg); }

/* AI / capability band */
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.feature-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.feature-list li b { color: var(--text); font-weight: 600; display: block; }
.feature-list .tick { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--grad-btn); color: var(--on-accent); margin-top: 2px; }
.feature-list .tick .icon { width: 15px; height: 15px; stroke-width: 2.5; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); font-size: .9rem; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.chip .icon { color: var(--orange); }
.orbit { position: relative; width: 100%; aspect-ratio: 1; max-width: 480px; margin-inline: auto; display: grid; place-items: center; }
.orbit::before, .orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px dashed var(--border-strong); }
.orbit::before { inset: 6%; animation: spin 60s linear infinite; }
.orbit::after { inset: 24%; border-style: solid; border-color: var(--border); }
.orbit-core { position: relative; z-index: 1; width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(242, 154, 31, .22), rgba(232, 52, 95, .14) 60%, transparent 70%); display: grid; place-items: center; box-shadow: 0 0 80px rgba(232, 52, 95, .16); }
.orbit-core img { width: 58%; }
.orbit-node { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: .84rem; white-space: nowrap; box-shadow: var(--shadow); }
.orbit-node .icon { color: var(--orange); width: 16px; height: 16px; }
.orbit-node:nth-of-type(1) { top: 4%; left: 50%; transform: translateX(-50%); }
.orbit-node:nth-of-type(2) { top: 30%; right: -2%; }
.orbit-node:nth-of-type(3) { bottom: 18%; right: 2%; }
.orbit-node:nth-of-type(4) { bottom: 3%; left: 30%; }
.orbit-node:nth-of-type(5) { top: 40%; left: -4%; }
.orbit-node:nth-of-type(6) { top: 12%; left: 4%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Work / portfolio ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.work-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), border-color .3s, box-shadow .3s; }
a.work-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.work-thumb { aspect-ratio: 9 / 7; overflow: hidden; background: #fff; border-bottom: 1px solid var(--border); }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
a.work-card:hover .work-thumb img { transform: scale(1.05); }
.work-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.work-info h3 { margin: 0 0 4px; font-size: 1.02rem; }
.work-info p { margin: 0; font-size: .86rem; color: var(--faint); }
.work-info .card-arrow { flex: none; }
.work-card:hover .card-arrow { background: var(--grad-btn); color: var(--on-accent); border-color: transparent; transform: rotate(45deg); }
.work-card[hidden] { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter-btn { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .9rem; transition: all .2s; }
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.section-foot { margin-top: 40px; display: flex; justify-content: center; }

/* ---------- Process ---------- */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.process-step { position: relative; padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.process-step h3 { margin: 18px 0 8px; }
.process-step p { margin: 0; color: var(--muted); font-size: .96rem; }
.step-num { position: absolute; top: 24px; right: 26px; font: 600 .82rem/1 var(--font-display); color: var(--faint); letter-spacing: .08em; }

/* ---------- Values / why us ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.value { padding: 32px; background: var(--surface); transition: background .3s; }
.value:hover { background: var(--bg-2); }
.value h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.value h3 .icon { color: var(--orange); }
.value p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- CTA band ---------- */
.cta-band { padding-top: 0; }
/* Deep-navy surfaces (CTA band, footer) re-map the colour tokens locally */
.cta-card, .site-footer {
    --text: #f4f6fb; --muted: #b4bdd0; --faint: #8590a8;
    --surface: rgba(255, 255, 255, .05); --surface-2: rgba(255, 255, 255, .09);
    --border: rgba(255, 255, 255, .1); --border-strong: rgba(255, 255, 255, .2);
    color: var(--text);
}
.cta-card { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: clamp(48px, 7vw, 96px) clamp(24px, 5vw, 64px); border-radius: 28px; background: var(--navy); box-shadow: 0 40px 80px -40px rgba(11, 23, 48, .55); }
.cta-card .btn-ghost { background: rgba(255, 255, 255, .06); box-shadow: none; }
.cta-card .btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); }
.cta-card .lead { margin-inline: auto; }
.cta-card .btn-group { justify-content: center; }
.cta-glow { position: absolute; inset: auto -20% -60% -20%; height: 120%; z-index: -1; background: radial-gradient(ellipse at 50% 100%, rgba(232, 52, 95, .4), rgba(236, 106, 53, .16) 40%, transparent 70%); }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-list { display: grid; gap: 14px; }
.contact-item { display: flex; gap: 16px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.contact-item h3 { font-size: 1rem; margin: 0 0 4px; }
.contact-item p, .contact-item a { margin: 0; color: var(--muted); display: block; }
.contact-item a:hover { color: var(--text); }
.panel { padding: clamp(24px, 4vw, 40px); border-radius: 24px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.map { margin-top: 14px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Pricing ---------- */
.tabs { display: inline-flex; padding: 5px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); margin-bottom: 40px; }
.tab { padding: 10px 22px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted); transition: all .2s; }
.tab[aria-selected="true"] { background: var(--grad-btn); color: var(--on-accent); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.plans.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 920px; margin-inline: auto; }
.plan { position: relative; padding: 32px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.plan.is-featured { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 1.5px solid transparent; box-shadow: 0 30px 70px -30px rgba(232, 52, 95, .35); }
.plan-badge { position: absolute; top: -13px; left: 32px; padding: 5px 12px; border-radius: 999px; background: var(--grad-btn); color: var(--on-accent); font-size: .74rem; font-weight: 700; letter-spacing: .04em; }
.plan h3 { font-size: 1.4rem; margin-bottom: 6px; }
.plan-sub { color: var(--muted); font-size: .94rem; min-height: 3em; }
.plan-price { font: 600 1.6rem/1 var(--font-display); margin: 18px 0 22px; }
.plan-price small { font: 400 .86rem var(--font-body); color: var(--faint); }
.plan-list { list-style: none; padding: 22px 0 0; margin: 22px 0 0; border-top: 1px solid var(--border); display: grid; gap: 10px; font-size: .93rem; }
.plan-list li { display: flex; gap: 10px; color: var(--muted); }
.plan-list li .icon { width: 17px; height: 17px; color: #16915a; margin-top: 3px; }
.plan-list li.no { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(15, 26, 46, .25); }
.plan-list li.no .icon { color: var(--faint); }
.plan-group { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--orange) !important; font-weight: 600; margin-top: 10px; }
[role="tabpanel"][hidden] { display: none; }

/* ---------- About ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { padding: 26px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat b { display: block; font: 600 1.6rem/1.15 var(--font-display); margin-bottom: 6px; }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Related links ---------- */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-link { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 600; transition: all .25s var(--ease); }
.related-link > span:nth-child(2) { flex: 1; }
.related-link > .icon { color: var(--faint); transition: transform .25s var(--ease), color .25s; }
.related-link:hover { border-color: var(--border-strong); background: var(--surface-2); }
.related-link:hover > .icon { color: var(--orange); transform: translate(2px, -2px); }

/* ---------- Legal / long text ---------- */
.legal { max-width: 820px; color: var(--muted); }
.legal h2, .legal h3, .legal h4 { color: var(--text); margin-top: 2em; }
.legal h2 { font-size: 1.6rem; }
.legal h3 { font-size: 1.25rem; }
.legal a { color: var(--orange); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .5em; }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 32px; background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; }
.footer-brand p { color: var(--muted); font-size: .94rem; margin: 20px 0; max-width: 320px; }
.footer-title { font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.social { display: flex; gap: 10px; }
.social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); color: var(--muted); transition: all .2s; }
.social a:hover { color: var(--on-accent); background: var(--grad-btn); border-color: transparent; }
.social .icon { width: 18px; height: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: .86rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .hero-grid, .ai-grid, .split, .contact-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 560px; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-brand { grid-column: 1 / -1; }
    .card-grid, .card-grid.cols-3, .work-grid, .process, .values, .plans, .related { grid-template-columns: repeat(2, 1fr); }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .service-grid, .card-grid, .card-grid.cols-2, .card-grid.cols-3, .work-grid, .process, .values, .plans, .plans.cols-2, .related { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .btn-group .btn { flex: 1 1 auto; }
    .orbit-node { font-size: .74rem; padding: 7px 10px; }
    .tabs { display: flex; }
    .tab { flex: 1; padding: 10px 12px; }
}
@media (max-width: 420px) {
    .stat-row, .footer-grid { grid-template-columns: 1fr; }
    .console-stats div { padding: 10px; }
    .console-stats b { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; }
}

/* Contact page: four cards in a row above a full-width map */
.contact-cards { grid-template-columns: repeat(4, 1fr); }
.map-wide { aspect-ratio: auto; height: clamp(320px, 40vw, 460px); margin-top: 18px; }
@media (max-width: 1080px) { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .contact-cards { grid-template-columns: 1fr; } }

/* ==========================================================================
   Visual refresh — editorial accents, mesh hero, floating nav, richer cards
   ========================================================================== */

:root { --font-accent: "Instrument Serif", Georgia, "Times New Roman", serif; }

/* Headline highlight: italic serif in the brand gradient */
h1 .gradient-text, h2 .gradient-text {
    font-family: var(--font-accent); font-style: italic; font-weight: 400;
    font-size: 1.1em; letter-spacing: -0.01em; line-height: 1;
    padding-right: .08em; margin-right: -.04em;
}
h2 .gradient-text { font-size: 1.18em; }

/* Eyebrow as a soft chip with a gradient dot */
.eyebrow {
    padding: 7px 14px; border-radius: 999px;
    background: rgba(236, 106, 53, .07); border: 1px solid rgba(236, 106, 53, .18);
    font-size: .72rem;
}
.eyebrow:not(:has(svg))::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--grad-btn); box-shadow: 0 0 0 3px rgba(232, 52, 95, .14); }
.section-head.center .eyebrow { margin-inline: auto; }

/* Hero: soft mesh gradient + dot texture */
.hero, .page-hero { background: var(--bg); }
.hero-bg::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(42% 55% at 88% 12%, rgba(242, 154, 31, .20), transparent 70%),
        radial-gradient(38% 50% at 70% 40%, rgba(232, 52, 95, .14), transparent 70%),
        radial-gradient(40% 50% at 5% 95%, rgba(99, 102, 241, .08), transparent 70%),
        linear-gradient(180deg, #fdf8f6, var(--bg));
}
.orb { opacity: .22; }
.orb-b { opacity: .12; }
.grid-lines {
    background-image: radial-gradient(rgba(15, 26, 46, .16) 1px, transparent 1.4px);
    background-size: 22px 22px; opacity: .55;
}
.hero h1 { font-size: clamp(2.5rem, 5.8vw, 4.7rem); }
.pill { background: rgba(255, 255, 255, .75); backdrop-filter: blur(10px); transition: border-color .2s, box-shadow .2s; }
.pill:hover { border-color: rgba(236, 106, 53, .4); box-shadow: var(--shadow); }

/* Floating glass navigation once the page scrolls */
.site-header { transition: padding .3s var(--ease); }
.nav-bar { transition: background .3s, box-shadow .3s, border-color .3s, height .3s var(--ease), border-radius .3s; border: 1px solid transparent; }
.site-header.is-scrolled { background: none; border-color: transparent; box-shadow: none; backdrop-filter: none; padding-top: 10px; }
.site-header.is-scrolled .nav-bar {
    height: 60px; width: calc(100% - 24px); max-width: calc(var(--container) + 40px);
    padding: 0 8px 0 18px; border-radius: 999px;
    background: rgba(255, 255, 255, .82); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
    border-color: rgba(15, 26, 46, .07);
    box-shadow: 0 1px 2px rgba(15, 26, 46, .04), 0 14px 40px -16px rgba(15, 26, 46, .22);
}
.main-nav a[aria-current="page"], .nav-trigger.is-current { color: var(--text); background: var(--surface-2); }
body.nav-open .site-header { padding-top: 0; }
body.nav-open .site-header .nav-bar { width: 100%; border-radius: 0; box-shadow: none; border-color: transparent; background: var(--bg); }

/* Buttons: inner highlight and a sweeping sheen */
.btn-primary { position: relative; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 24px -10px rgba(232, 52, 95, .55); }
.btn-primary::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-120%);
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transition: transform .7s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }

/* Hero console: halo glow behind the card */
.hero-visual { position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: 8% -6% -8%; z-index: -1; border-radius: 40px; background: var(--grad); filter: blur(60px); opacity: .18; }

/* Cards: gradient accent line + icon fills on hover */
.card { overflow: hidden; }
.card::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--grad); transform: scaleX(0); transform-origin: left;
    transition: transform .45s var(--ease);
}
.card:hover::after { transform: scaleX(1); }
.card-icon { transition: background .3s, color .3s, border-color .3s, box-shadow .3s; }
.card:hover .card-icon, .process-step:hover .card-icon {
    background: var(--grad-btn); color: var(--on-accent); border-color: transparent;
    box-shadow: 0 10px 20px -8px rgba(232, 52, 95, .55);
}
.service-card { background: linear-gradient(180deg, #fff 55%, #fbfbfd); }
.service-card:hover::before { opacity: .55; }

/* Process: oversized gradient step numbers */
.process-step { overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.process-step:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.step-num {
    top: 14px; right: 20px; font: 700 2.6rem/1 var(--font-display); letter-spacing: -.04em;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
    opacity: .22; transition: opacity .3s;
}
.process-step:hover .step-num { opacity: .9; }

/* Values: gradient edge on hover */
.value { position: relative; }
.value::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 3px; background: var(--grad); transform: scaleY(0); transition: transform .35s var(--ease); }
.value:hover { background: #fff; }
.value:hover::before { transform: scaleY(1); }

/* Tinted sections get gentle colour washes */
.section-tint {
    background:
        radial-gradient(50% 60% at 100% 0%, rgba(242, 154, 31, .07), transparent 70%),
        radial-gradient(45% 55% at 0% 100%, rgba(232, 52, 95, .06), transparent 70%),
        var(--bg-2);
}

/* Work cards: soft overlay on hover */
.work-thumb { position: relative; }
.work-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(11, 23, 48, .18)); opacity: 0; transition: opacity .35s; }
a.work-card:hover .work-thumb::after { opacity: 1; }

/* Logos: colour on hover, lift */
.logo-tile { transition: filter .3s, opacity .3s, transform .3s var(--ease), box-shadow .3s; }
.logo-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Stats & pricing accents */
.stat b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.plan.is-featured { background: linear-gradient(180deg, #fff6f4, #fff 38%) padding-box, var(--grad) border-box; transform: translateY(-8px); }
@media (max-width: 1080px) { .plan.is-featured { transform: none; } }

/* CTA band: dotted texture and a brighter glow */
.cta-card::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1.4px); background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000, transparent 75%);
}
.cta-card .eyebrow { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #ffb48a; }

/* Footer: gradient hairline and corner glow */
.site-footer { position: relative; overflow: hidden; isolation: isolate; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); }
.site-footer::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -160px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 52, 95, .22), transparent 65%); }
.footer-col a:hover { color: #ffb48a; }

@media (max-width: 1080px) {
    .site-header.is-scrolled .nav-bar { padding-right: 6px; }
}

/* ---------- Small-screen overflow guards ---------- */
/* iOS ignores overflow-x on <body> alone; clip at the root without creating a scroll container */
html { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }

.hero-grid > *, .ai-grid > *, .split > *, .contact-grid > *, .footer-grid > * { min-width: 0; }
.pill { max-width: 100%; }
.contact-item > div, .footer-col { min-width: 0; overflow-wrap: break-word; }

@media (max-width: 760px) {
    .hero-visual::before { inset: 6% 0 -6%; }
    .console-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
    .console-body { padding: 16px; }
    .console-row { gap: 10px; font-size: .82rem; }
    .console-row .state { width: 56px; }
    .console-stats div { min-width: 0; }
    .console-stats small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .orbit-node:nth-of-type(2) { right: 0; }
    .orbit-node:nth-of-type(5) { left: 0; }
}
@media (max-width: 420px) {
    .pill { font-size: .8rem; gap: 8px; }
    .hero-meta { gap: 10px 20px; }
    .btn-group .btn { padding: 0 18px; }
    .eyebrow { letter-spacing: .1em; }
    .contact-item > div { overflow-wrap: anywhere; }
}

/* ==========================================================================
   Aiwa — chat assistant widget (js/aiwa.js)
   ========================================================================== */
.aiwa { --wa: #168a4a; position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 60; font-family: var(--font-body); }
body.nav-open .aiwa { display: none; }

.aiwa-launcher {
    position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
    background: var(--grad-btn); color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 30px -10px rgba(232, 52, 95, .65);
    transition: transform .25s var(--ease), box-shadow .25s;
}
.aiwa-launcher:hover { transform: translateY(-2px) scale(1.04); }
.aiwa-launcher::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgba(232, 52, 95, .45); animation: aiwa-pulse 2.6s ease-out infinite; }
.aiwa.is-open .aiwa-launcher::before { animation: none; opacity: 0; }
.aiwa-launcher .icon { width: 26px; height: 26px; }
.aiwa-launcher-open, .aiwa-launcher-close { display: grid; place-items: center; transition: transform .25s var(--ease), opacity .2s; }
.aiwa-launcher-close { position: absolute; opacity: 0; transform: rotate(-90deg); }
.aiwa.is-open .aiwa-launcher-open { opacity: 0; transform: rotate(90deg); }
.aiwa.is-open .aiwa-launcher-close { opacity: 1; transform: none; }
@keyframes aiwa-pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }

/* Greeting teaser */
.aiwa-teaser {
    position: absolute; right: 0; bottom: 76px; width: 250px;
    background: #fff; border: 1px solid var(--border); border-radius: 16px 16px 4px 16px;
    box-shadow: var(--shadow); animation: aiwa-in .35s var(--ease);
}
.aiwa-teaser[hidden], .aiwa.is-open .aiwa-teaser { display: none; }
.aiwa-teaser-body { display: grid; gap: 3px; width: 100%; padding: 14px 36px 14px 16px; text-align: left; }
.aiwa-teaser-body b { font: 600 .95rem/1.3 var(--font-display); color: var(--text); }
.aiwa-teaser-body span { font-size: .86rem; line-height: 1.45; color: var(--muted); }
.aiwa-teaser-close { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); }
.aiwa-teaser-close:hover { background: var(--surface-2); color: var(--text); }
.aiwa-teaser-close .icon { width: 15px; height: 15px; }

/* Panel */
.aiwa-panel {
    position: absolute; right: 0; bottom: 76px;
    width: 380px; height: min(600px, calc(100dvh - 120px));
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border: 1px solid var(--border); border-radius: 22px;
    box-shadow: 0 2px 6px rgba(15, 26, 46, .06), 0 40px 80px -24px rgba(15, 26, 46, .38);
    transform-origin: bottom right; opacity: 0; visibility: hidden; transform: translateY(12px) scale(.96);
    transition: opacity .22s, transform .28s var(--ease), visibility .28s;
}
.aiwa.is-open .aiwa-panel { opacity: 1; visibility: visible; transform: none; }

.aiwa-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 10px 14px 16px; background: var(--navy); color: #fff; overflow: hidden; isolation: isolate; }
.aiwa-head::after { content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; right: -70px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 52, 95, .45), transparent 65%); }
.aiwa-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.aiwa-id { flex: 1; min-width: 0; display: grid; gap: 2px; }
.aiwa-id strong { font: 600 1.05rem/1.2 var(--font-display); letter-spacing: -.01em; }
.aiwa-id small { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: #b4bdd0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aiwa-id small i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .2); }
.aiwa-icon-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, .75); transition: background .2s, color .2s; }
.aiwa-icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.aiwa-icon-btn .icon { width: 18px; height: 18px; }

.aiwa-log { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 18px 14px 10px; background: var(--bg-2); }
.aiwa-msg { display: flex; animation: aiwa-in .3s var(--ease); }
.aiwa-user { justify-content: flex-end; }
.aiwa-bubble { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: .9rem; line-height: 1.55; overflow-wrap: break-word; }
.aiwa-bot .aiwa-bubble { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 5px; color: var(--text); box-shadow: 0 1px 2px rgba(15, 26, 46, .04); }
.aiwa-user .aiwa-bubble { background: var(--grad-btn); color: #fff; border-bottom-right-radius: 5px; }
.aiwa-bubble p { margin: 0 0 .55em; }
.aiwa-bubble p:last-child { margin-bottom: 0; }
.aiwa-bubble ul, .aiwa-bubble ol { margin: .2em 0 .55em; padding-left: 1.15em; }
.aiwa-bubble li { margin: .2em 0; }
.aiwa-bubble li::marker { color: var(--orange); }
.aiwa-bubble b { font-weight: 600; }
.aiwa-bot .aiwa-bubble p a, .aiwa-bot .aiwa-bubble li a { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; }
.aiwa-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.aiwa-links a { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(236, 106, 53, .3); background: rgba(236, 106, 53, .06); color: var(--orange); font-size: .8rem; font-weight: 600; transition: background .2s, color .2s; }
.aiwa-links a:hover { background: var(--orange); color: #fff; }
.aiwa-links .icon { width: 13px; height: 13px; }
.aiwa-wa-inline { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 14px; border-radius: 999px; background: var(--wa); color: #fff; font-size: .84rem; font-weight: 600; transition: filter .2s, transform .2s var(--ease); }
.aiwa-wa-inline:hover { filter: brightness(1.08); transform: translateY(-1px); }
.aiwa-wa-inline .icon { width: 17px; height: 17px; }

.aiwa-typing .aiwa-bubble { display: inline-flex; gap: 4px; padding: 14px 16px; }
.aiwa-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: aiwa-dot 1.1s infinite ease-in-out; }
.aiwa-typing span:nth-child(2) { animation-delay: .15s; }
.aiwa-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aiwa-dot { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes aiwa-in { from { opacity: 0; transform: translateY(8px); } }

.aiwa-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; background: var(--bg-2); max-height: 104px; overflow-y: auto; }
.aiwa-chips:empty { display: none; }
.aiwa-chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; font-size: .82rem; font-weight: 500; color: var(--text); transition: border-color .2s, color .2s, background .2s; }
.aiwa-chip:hover { border-color: var(--orange); color: var(--orange); background: rgba(236, 106, 53, .05); }

.aiwa-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: #fff; }
.aiwa-form input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font: inherit; font-size: .92rem; transition: border-color .2s, box-shadow .2s, background .2s; }
.aiwa-form input::placeholder { color: var(--faint); }
.aiwa-form input:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(236, 106, 53, .14); }
.aiwa-form button { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-btn); color: #fff; transition: transform .2s var(--ease); }
.aiwa-form button:hover { transform: scale(1.06); }
.aiwa-form button .icon { width: 19px; height: 19px; }
.aiwa-wa { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-top: 1px solid var(--border); background: #f1faf4; color: var(--wa); font-size: .86rem; font-weight: 600; transition: background .2s; }
.aiwa-wa:hover { background: #e2f4e8; }
.aiwa-wa .icon { width: 18px; height: 18px; }

/* Phones: full-screen chat */
@media (max-width: 520px) {
    .aiwa { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
    .aiwa-launcher { width: 56px; height: 56px; }
    .aiwa-teaser { bottom: 70px; }
    .aiwa-panel { position: fixed; inset: 0; width: auto; height: 100dvh; border: 0; border-radius: 0; transform-origin: bottom center; }
    .aiwa.is-open .aiwa-launcher { display: none; }
    .aiwa-head { padding-top: max(14px, env(safe-area-inset-top)); }
    .aiwa-form input { font-size: 16px; }
    .aiwa-wa { padding-bottom: max(11px, env(safe-area-inset-bottom)); }
    html.aiwa-locked, html.aiwa-locked body { overflow: hidden; }
}
@media print { .aiwa { display: none; } }
