/* Inichid — site styles
   Dark, precise, quiet. No build step. */

:root {
    --bg: #07080a;
    --bg-2: #0b0d10;
    --surface: #0f1115;
    --surface-2: #13161b;
    --line: rgba(255, 255, 255, 0.07);
    --line-2: rgba(255, 255, 255, 0.12);
    --text: #e9ecef;
    --muted: #9aa2ab;
    --dim: #6b737c;
    --steel: #c3cbd4;
    --live: #4fd1a1;
    --danger: #f08a8a;
    --radius: 14px;
    --radius-sm: 9px;
    --font: "Geist", "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }
strong { color: var(--text); font-weight: 600; }
.mono { font-family: var(--mono); }

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

.skip-link {
    position: absolute; left: 16px; top: -48px; z-index: 100;
    padding: 8px 14px; border-radius: 8px; background: var(--text); color: var(--bg);
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 18px; border-radius: 10px;
    font: 500 15px/1 var(--font); white-space: nowrap; cursor: pointer;
    border: 1px solid transparent;
    transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}
.btn .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translateX(2px); }
.btn:active { transform: translateY(1px); }
.btn--primary {
    background: linear-gradient(180deg, #f4f6f8, #c9d0d7);
    color: #0a0b0d;
    box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset, 0 8px 24px -10px rgba(200, 210, 220, .45);
}
.btn--primary:hover { background: linear-gradient(180deg, #ffffff, #d6dce2); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.05); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    border-bottom: 1px solid transparent;
    transition: background .25s var(--ease), border-color .25s var(--ease);
}
.nav.is-scrolled {
    background: rgba(7, 8, 10, .78);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand__mark { color: var(--steel); }
.brand__word { font-weight: 600; font-size: 18px; letter-spacing: -0.03em; }

.nav__links { display: flex; align-items: center; gap: 28px; font-size: 14px; color: var(--muted); }
.nav__links a:not(.btn) { transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle {
    display: none; width: 40px; height: 40px; align-items: center; justify-content: center;
    border-radius: 9px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero__grid {
    position: absolute; inset: -1px 0 0; pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    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;
}
.hero::after {
    content: ""; position: absolute; left: 50%; top: -220px; width: 900px; height: 520px; transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(195, 205, 215, .10), transparent);
    pointer-events: none;
}
.hero__inner {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}

.badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 10px; border-radius: 999px;
    border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
    font: 500 12.5px/1.4 var(--mono); color: var(--muted);
}
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(79, 209, 161, .15); }

.hero__title { margin-top: 22px; font-size: clamp(42px, 6.4vw, 76px); line-height: 1.12; letter-spacing: -0.035em; }
.title-metal {
    background: linear-gradient(180deg, #ffffff 0%, #d9dee3 45%, #8e98a3 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { margin-top: 22px; max-width: 34em; font-size: 17.5px; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__slogan { margin-top: 28px; font-size: 13px; color: var(--dim); letter-spacing: .02em; }

/* ---------- Demo ---------- */
.demo {
    position: relative;
    border-radius: 16px; border: 1px solid var(--line-2);
    background: linear-gradient(180deg, rgba(19, 22, 27, .92), rgba(11, 13, 16, .96));
    box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset;
    overflow: hidden;
}
.demo::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
}
.demo__bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.demo__dots { display: flex; gap: 6px; }
.demo__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.12); }
.demo__tabs { display: flex; gap: 4px; padding: 3px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.demo__tab {
    padding: 4px 12px; border: 0; border-radius: 6px; background: transparent; cursor: pointer;
    font: 500 12.5px/1.5 var(--mono); color: var(--dim); transition: color .2s, background .2s;
}
.demo__tab:hover { color: var(--text); }
.demo__tab.is-active { background: rgba(255,255,255,.09); color: var(--text); }

.demo__panel { padding: 20px; display: grid; gap: 14px; min-height: 340px; align-content: start; }
.demo__panel[hidden] { display: none; }

.msg { font-size: 15px; line-height: 1.65; padding: 12px 14px; border-radius: 12px; max-width: 92%; }
.msg__who { display: block; margin-bottom: 2px; font: 500 11.5px/1.5 var(--mono); color: var(--dim); letter-spacing: .04em; text-transform: uppercase; }
.msg--user { background: rgba(255,255,255,.04); border: 1px solid var(--line); justify-self: start; }
.msg--agent { background: linear-gradient(180deg, rgba(210, 218, 226, .10), rgba(210, 218, 226, .05)); border: 1px solid rgba(210, 218, 226, .18); justify-self: end; }

.trace {
    font-size: 12.5px; line-height: 1.75; color: var(--muted);
    padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line-2); background: rgba(0,0,0,.25);
    overflow-x: auto; white-space: nowrap;
}
.trace__k {
    display: inline-block; min-width: 38px; margin-right: 6px; padding: 0 6px; border-radius: 4px;
    font-size: 11px; text-align: center; color: var(--live); background: rgba(79, 209, 161, .1);
}
.trace__out { color: var(--text); padding-left: 50px; }
.trace__dim { color: var(--dim); }

.demo__foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.ok-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); }

.demo__panel.is-active > * { animation: rise .5s var(--ease) both; }
.demo__panel.is-active > *:nth-child(2) { animation-delay: .25s; }
.demo__panel.is-active > *:nth-child(3) { animation-delay: .55s; }
.demo__panel.is-active > *:nth-child(4) { animation-delay: .75s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section__head { max-width: 680px; margin-bottom: 44px; }
.eyebrow { font-size: 12.5px; color: var(--steel); letter-spacing: .08em; text-transform: uppercase; }
.section h2 { margin-top: 12px; font-size: clamp(28px, 3.6vw, 40px); }
.section__lead { margin-top: 14px; color: var(--muted); font-size: 16.5px; }

/* ---------- Compare ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare__col { padding: 28px; background: var(--bg-2); }
.compare__col--good { background: linear-gradient(180deg, rgba(210, 218, 226, .06), rgba(210, 218, 226, .015)); border-left: 1px solid var(--line); }
.compare__label { font-size: 12.5px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.compare__col--good .compare__label { color: var(--steel); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.list .icon { width: 18px; height: 18px; margin-top: 4px; }
.list--x .icon { color: var(--dim); }
.list--check .icon { color: var(--live); }
.list--check li { color: var(--text); }
.list--compact { margin-top: 26px; gap: 10px; }
.list--compact li { color: var(--muted); font-size: 15px; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 16px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }

.card {
    position: relative; padding: 26px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
    transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.06), transparent 45%);
    opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card:hover::before { opacity: 1; }
.card__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px; margin-bottom: 18px;
    border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--steel);
}
.card__icon .icon { width: 20px; height: 20px; }
.card__num { font-size: 12px; color: var(--dim); letter-spacing: .05em; margin-bottom: 8px; }
.card h3 { font-size: 19px; }
.card p:not(.card__num) { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.card--sm h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card--lab { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 12px, #101317 12px, #101317 13px); }

.pill { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--dim); font-weight: 500; letter-spacing: .04em; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; }
.tags li { font-size: 11.5px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.02); }

/* ---------- Loop ---------- */
.loop {
    list-style: none; margin: 20px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(5, 1fr);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.loop li { position: relative; padding: 18px 18px 18px 20px; font-size: 14px; color: var(--muted); background: var(--bg-2); }
.loop li + li { border-left: 1px solid var(--line); }
.loop li span { display: block; font-size: 12px; color: var(--steel); margin-bottom: 4px; letter-spacing: .03em; }
.loop li + li::before {
    content: ""; position: absolute; left: -5px; top: 50%; width: 8px; height: 8px; transform: translateY(-50%) rotate(45deg);
    background: var(--bg-2); border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
}

/* ---------- Specs ---------- */
.specs { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec { display: flex; gap: 14px; padding: 26px; background: var(--bg-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .25s; }
.spec:nth-child(3n) { border-right: 0; }
.spec:nth-last-child(-n+3) { border-bottom: 0; }
.spec:hover { background: var(--surface); }
.spec > .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--steel); }
.spec h3 { font-size: 16px; }
.spec p { margin-top: 6px; font-size: 14.5px; color: var(--muted); }

/* ---------- Contact ---------- */
.section--contact { background: radial-gradient(800px 400px at 15% 0%, rgba(195, 205, 215, .06), transparent 60%); }
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact__form-wrap {
    padding: 28px; border-radius: 16px; border: 1px solid var(--line-2);
    background: linear-gradient(180deg, rgba(19, 22, 27, .9), rgba(12, 14, 17, .9));
}

.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 14px; font-weight: 500; color: var(--text); }
.field__opt { font-weight: 400; color: var(--dim); font-size: 12.5px; margin-left: 4px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
    border: 1px solid var(--line-2); background: rgba(0,0,0,.35); color: var(--text);
    font: 400 15.5px/1.5 var(--font);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa2ab' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
.field select option { background: #111317; color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: #565d65; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255,255,255,.2); }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: rgba(210, 218, 226, .55); background: rgba(0,0,0,.5);
    box-shadow: 0 0 0 3px rgba(210, 218, 226, .1);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: rgba(240, 138, 138, .6); }
.field__err { font-size: 13px; color: var(--danger); }

.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form__note { font-size: 13px; color: var(--dim); }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; font-size: 15px; margin-bottom: 18px; }
.notice .icon { margin-top: 3px; }
.notice p { color: var(--muted); margin-top: 2px; }
.notice--ok { margin: 0; padding: 22px; border: 1px solid rgba(79, 209, 161, .3); background: rgba(79, 209, 161, .06); }
.notice--ok .icon { color: var(--live); }
.notice--err { border: 1px solid rgba(240, 138, 138, .3); background: rgba(240, 138, 138, .06); color: var(--text); }
.notice--err .icon { color: var(--danger); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; }
.footer__inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer__slogan { margin-top: 10px; font-size: 14px; color: var(--dim); }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--muted); }
.footer__links a:hover { color: var(--text); }
.footer__copy { font-size: 12.5px; color: var(--dim); }

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

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
    .hero__inner { grid-template-columns: 1fr; gap: 48px; }
    .cards--4 { grid-template-columns: repeat(2, 1fr); }
    .loop { grid-template-columns: 1fr; }
    .loop li + li { border-left: 0; border-top: 1px solid var(--line); }
    .loop li + li::before { left: 24px; top: -5px; transform: rotate(135deg); }
    .specs { grid-template-columns: repeat(2, 1fr); }
    .spec:nth-child(3n) { border-right: 1px solid var(--line); }
    .spec:nth-child(2n) { border-right: 0; }
    .spec:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
    .spec:nth-last-child(-n+2) { border-bottom: 0; }
    .contact { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
    body { font-size: 15.5px; }
    .nav__toggle { display: inline-flex; }
    .nav__links {
        position: absolute; left: 0; right: 0; top: 64px;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px 16px 16px; background: rgba(7, 8, 10, .97); border-bottom: 1px solid var(--line);
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
        display: none;
    }
    .nav__links.is-open { display: flex; }
    .nav__links a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
    .nav__cta { margin-top: 14px; justify-content: center; height: 44px; }
    .nav.is-open { background: rgba(7, 8, 10, .97); }

    .container { padding: 0 16px; }
    .hero { padding: 40px 0 64px; }
    .hero__lead { font-size: 16px; }
    .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
    .demo__panel { padding: 16px; min-height: 0; }
    .msg { max-width: 100%; font-size: 14.5px; }
    .trace__out { padding-left: 0; }

    .section { padding: 64px 0; }
    .section__head { margin-bottom: 32px; }
    .compare { grid-template-columns: 1fr; }
    .compare__col { padding: 22px; }
    .compare__col--good { border-left: 0; border-top: 1px solid var(--line); }
    .cards--2, .cards--3, .cards--4 { grid-template-columns: 1fr; }
    .card { padding: 22px; }
    .specs { grid-template-columns: 1fr; }
    .spec, .spec:nth-child(3n), .spec:nth-child(2n) { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px; }
    .spec:last-child { border-bottom: 0; }
    .contact__form-wrap { padding: 20px; }
    .form__row { grid-template-columns: 1fr; }
    .form__foot .btn { width: 100%; justify-content: center; }
    .footer__inner { flex-direction: column; }
}

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