/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --paper: #f4f7fc;
    --surface: #ffffff;
    --ink: #0a1633;
    --muted: #4a5878;
    --dim: #7a87a3;
    --line: #dce3ef;
    --blue: #1f5bff;
    --blue-deep: #0b2a8a;
    --sky: #cfe0ff;
    --navy: #071233;
    --navy-2: #0e1d4a;
    --on-navy: #e6edff;
    --on-navy-muted: #9aaad6;
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --maxw: 1160px;
    --shadow: 0 1px 0 rgba(10,22,51,0.04), 0 18px 40px -24px rgba(11,42,138,0.35);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
}

a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease); }
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4, h5 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; color: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border: 1.5px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 18px 0;
    transition: padding 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(244,247,252,0.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--line);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.4px;
}

.logo-mark { width: 34px; height: 34px; }
.logo-text small { font-size: 11px; font-weight: 600; color: var(--dim); margin-left: 4px; letter-spacing: 0.4px; }

.nav-menu { display: flex; list-style: none; gap: 4px; align-items: center; }

.nav-menu a {
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    border-radius: 10px;
}

.nav-menu a:hover, .nav-menu a.active { color: var(--ink); background: rgba(31,91,255,0.08); }

.nav-menu a.nav-cta { color: #fff; background: var(--blue); margin-left: 8px; }
.nav-menu a.nav-cta:hover { background: var(--blue-deep); color: #fff; }

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.hamburger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
    padding: 150px 0 96px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(31,91,255,0.06) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(31,91,255,0.06) 1px, transparent 1px) 0 0 / 32px 32px,
        var(--paper);
}

.hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 160px;
    background: linear-gradient(transparent, var(--paper));
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-grid > * { min-width: 0; }

.hero h1 {
    font-size: clamp(42px, 5.6vw, 72px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -2.4px;
    margin-bottom: 24px;
}

.hero-lead { font-size: 19px; color: var(--muted); max-width: 470px; margin-bottom: 34px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-facts { display: flex; gap: 28px; flex-wrap: wrap; list-style: none; color: var(--muted); font-size: 14px; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 18px; height: 18px; color: var(--blue); flex: none; }

/* AI command demo */
.ai-demo {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow), 0 40px 80px -40px rgba(11,42,138,0.35);
    padding: 22px;
}

.ai-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1.5px solid var(--blue);
    background: #f8faff;
    box-shadow: 0 0 0 5px rgba(31,91,255,0.10);
}

.ai-bar .spark { width: 22px; height: 22px; color: var(--blue); flex: none; }

.ai-input {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    min-height: 26px;
    color: var(--ink);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ai-input .caret {
    display: inline-block;
    width: 2px; height: 18px;
    background: var(--blue);
    vertical-align: -3px;
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.ai-enter {
    font-size: 12px;
    font-weight: 600;
    color: var(--dim);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 3px 8px;
    flex: none;
}

.ai-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 18px; }

.ai-chip {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 40px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.ai-chip:hover { border-color: var(--blue); color: var(--blue); }
.ai-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.ai-result {
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 18px;
    min-height: 236px;
}

.ai-result-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.app-ic {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    flex: none;
}
.app-ic svg { width: 22px; height: 22px; }

.ai-result-head b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 16px; display: block; line-height: 1.2; }
.ai-result-head span { font-size: 13px; color: var(--dim); }

.ai-status {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
    background: rgba(31,91,255,0.1);
    padding: 4px 10px;
    border-radius: 40px;
    white-space: nowrap;
}
.ai-status.done { color: #0f7a4b; background: rgba(15,122,75,0.1); }

.ai-lines { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.ai-lines li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.ai-lines li.in { opacity: 1; transform: none; }
.ai-lines li span { color: var(--muted); }
.ai-lines li b { font-weight: 600; text-align: right; }

.ai-note { font-size: 12px; color: var(--dim); margin-top: 12px; text-align: center; }

/* ===== Section shell ===== */
.section { padding: 112px 0; }

.sec-head { max-width: 620px; margin-bottom: 56px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.sec-head h2 {
    font-size: clamp(32px, 4.2vw, 50px);
    font-weight: 800;
    letter-spacing: -1.6px;
    line-height: 1.06;
    margin-bottom: 16px;
}

.sec-head p { color: var(--muted); font-size: 18px; }

/* ===== Apps ===== */
.apps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.app-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.app-card-top { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.app-card .app-ic { width: 60px; height: 60px; border-radius: 18px; }
.app-card .app-ic svg { width: 30px; height: 30px; }
.app-card h3 { font-size: 24px; letter-spacing: -0.6px; line-height: 1.15; }
.app-kind { font-size: 14px; color: var(--dim); }

.app-card > p { color: var(--muted); margin-bottom: 20px; }

.app-ai {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #eef3ff;
    color: var(--blue-deep);
    font-size: 14px;
    margin-bottom: 24px;
}
.app-ai svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--blue); }

.store-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }

.store {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 11px;
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.store:hover { border-color: var(--blue); color: var(--blue); }
.store svg { width: 17px; height: 17px; }

.soon {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 26px 32px;
    border-radius: var(--radius-lg);
    border: 1.5px dashed #b6c6e6;
}
.soon h3 { font-size: 20px; letter-spacing: -0.3px; }
.soon p { color: var(--muted); font-size: 15px; }

/* ===== AI section (dark) ===== */
.ai-section { background: var(--navy); color: var(--on-navy); }
.ai-section .sec-head p { color: var(--on-navy-muted); }

.ai-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.ai-wrap .sec-head { margin-bottom: 0; position: sticky; top: 110px; }

.ai-points { list-style: none; display: flex; flex-direction: column; }

.ai-points li {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 20px;
    padding: 28px 0;
    border-top: 1px solid rgba(154,170,214,0.22);
}
.ai-points li:last-child { border-bottom: 1px solid rgba(154,170,214,0.22); }

.ai-points .pt-ic {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--navy-2);
    color: #8fb2ff;
    border: 1px solid rgba(143,178,255,0.25);
}
.ai-points .pt-ic svg { width: 22px; height: 22px; }

.ai-points h3 { font-size: 21px; letter-spacing: -0.4px; margin-bottom: 6px; }
.ai-points p { color: var(--on-navy-muted); }

/* ===== Studio ===== */
.studio-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; }

.studio-wrap .big {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.25;
}

.studio-side { display: flex; flex-direction: column; gap: 14px; }

.studio-metric { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.studio-metric .n { font-family: 'Bricolage Grotesque', sans-serif; font-size: 26px; font-weight: 800; color: var(--blue); letter-spacing: -0.6px; }
.studio-metric .t { color: var(--muted); font-size: 15px; }

/* ===== Principles ===== */
.principles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 2px solid var(--ink);
}

.principle { padding: 28px 28px 8px 0; }
.principle + .principle { padding-left: 28px; border-left: 1px solid var(--line); }
.principle h3 { font-size: 20px; letter-spacing: -0.4px; margin-bottom: 10px; }
.principle p { color: var(--muted); font-size: 15px; }

/* ===== Contact ===== */
.cta-panel {
    padding: 72px 56px;
    border-radius: 32px;
    background: var(--blue);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px) 0 0 / 32px 32px;
    mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent);
    -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent);
    pointer-events: none;
}

.cta-panel > * { position: relative; }

.cta-panel h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing: -1.4px; line-height: 1.08; margin-bottom: 16px; }
.cta-panel p { color: rgba(255,255,255,0.82); font-size: 18px; max-width: 500px; margin: 0 auto 32px; }

.cta-actions { display: flex; justify-content: center; margin-bottom: 40px; }
.cta-panel .btn-primary { background: #fff; color: var(--blue-deep); }
.cta-panel .btn-primary:hover { background: var(--sky); }

.cta-details {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.22);
}
.cta-detail { text-align: left; }
.cta-detail .k { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 2px; }
.cta-detail .v { font-size: 16px; font-weight: 600; }
.cta-detail a:hover { text-decoration: underline; }

/* ===== Footer ===== */
.footer { padding: 64px 0 36px; background: var(--navy); color: var(--on-navy); }
.footer .logo-text small { color: var(--on-navy-muted); }

.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 48px; }
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--on-navy-muted); font-size: 14px; margin-top: 14px; }

.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 15px; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--on-navy-muted); font-size: 14px; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 26px;
    border-top: 1px solid rgba(154,170,214,0.2);
    font-size: 13px;
    color: var(--on-navy-muted);
}

/* ===== Scroll top ===== */
.scroll-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 46px; height: 46px;
    border-radius: 14px;
    border: none;
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    display: grid; place-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease), background 0.2s var(--ease);
    z-index: 999;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--blue); }

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

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .apps-grid { grid-template-columns: 1fr; }
    .ai-wrap { grid-template-columns: 1fr; gap: 36px; }
    .ai-wrap .sec-head { position: static; }
    .studio-wrap { grid-template-columns: 1fr; gap: 36px; }
    .principles { grid-template-columns: repeat(2, 1fr); }
    .principle:nth-child(3) { padding-left: 0; border-left: none; }
}

@media (max-width: 720px) {
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed;
        top: 64px; left: 16px; right: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 14px;
        border-radius: 18px;
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        transform: translateY(-160%);
        transition: transform 0.35s var(--ease);
    }
    .nav-menu.active { transform: translateY(0); }
    .nav-menu a { padding: 12px 14px; }
    .nav-menu a.nav-cta { margin-left: 0; text-align: center; }
    .section { padding: 80px 0; }
    .hero { padding: 120px 0 72px; }
    .app-card { padding: 24px; }
    .principles { grid-template-columns: 1fr; }
    .principle, .principle + .principle { padding: 22px 0 6px; border-left: none; }
    .principle + .principle { border-top: 1px solid var(--line); }
    .cta-panel { padding: 48px 22px; border-radius: 24px; }
    .cta-details { gap: 20px; }
    .footer-top { flex-direction: column; }
}

@media (max-width: 420px) {
    .container { padding: 0 16px; }
    .ai-demo { padding: 14px; }
    .ai-lines li { flex-direction: column; gap: 2px; }
    .ai-lines li b { text-align: left; }
    .ai-enter { display: none; }
}
