/* Shared design system for konversation.ai (K.AI) and rewayai.ai (Re:WayAI).
   Tokens, base, nav, buttons, hero, window chrome, steps, cards, rate tables,
   contact form, footer. Page-specific styles stay inline in each page. */

:root {
    --accent: #22c55e;
    --accent-light: #4ade80;
    --accent-dim: rgba(34, 197, 94, 0.55);
    --bg: #030712;
    --bg-raise: #0b1120;
    --ink: #f3f6fb;
    --ink-mid: #a3aec2;
    --ink-dim: #5d6b84;
    --line: rgba(148, 163, 184, 0.14);
    --line-strong: rgba(148, 163, 184, 0.24);
    --panel: rgba(148, 163, 184, 0.05);
    --sans: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    --s1: #4ade80;
    --s2: #7dd3fc;
    --s3: #f0abfc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
::selection { background: rgba(34, 197, 94, 0.3); }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }
img { max-width: 100%; }
.mono {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}
svg.ic { width: 22px; height: 22px; stroke: var(--accent); stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 10px;
    font-weight: 600; font-size: 14.5px; text-decoration: none;
    border: 1px solid transparent;
    transition: all .18s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent); color: #03130a;
    box-shadow: 0 0 0 1px rgba(34,197,94,.4), 0 8px 24px -8px rgba(34,197,94,.5);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(34,197,94,.5), 0 12px 28px -8px rgba(34,197,94,.55); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: rgba(148,163,184,0.04); }
.btn-ghost:hover { border-color: var(--accent-dim); color: var(--accent-light); }
.btn-lg { padding: 14px 26px; font-size: 15.5px; border-radius: 12px; }

/* ---------- header ---------- */
.header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(3, 7, 18, 0.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.navbar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { height: 28px; width: auto; }
.logo-text { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.highlight { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { color: var(--ink-mid); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .signin { color: var(--ink-mid); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-cta .signin:hover { color: var(--ink); }
.nav-cta .btn { padding: 8px 16px; font-size: 13.5px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 96px 0 80px; }
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(52% 42% at 50% -6%, rgba(34,197,94,.13), transparent 70%),
        radial-gradient(30% 30% at 85% 30%, rgba(125,211,252,.05), transparent 70%);
}
.hero::after {
    content: ""; position: absolute; inset: 0 0 40% 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(60% 55% at 50% 0%, rgba(0,0,0,.5), transparent 78%);
    -webkit-mask-image: radial-gradient(60% 55% at 50% 0%, rgba(0,0,0,.5), transparent 78%);
}
.hero-inner { position: relative; text-align: center; max-width: 780px; margin: 0 auto; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
    font-family: var(--mono); font-size: 11.5px; font-weight: 500;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mid);
    padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
    background: rgba(148,163,184,0.05);
}
.hero .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
h1 {
    font-size: 62px; line-height: 1.04; font-weight: 800; letter-spacing: -0.035em;
    background: linear-gradient(180deg, #fff 30%, #94a3b8);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 22px;
}
h1 .accent {
    background: linear-gradient(120deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { font-size: 18px; color: var(--ink-mid); max-width: 620px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note {
    margin-top: 18px; font-size: 13px; color: var(--ink-dim);
    display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}
.hero-note span::before { content: "· "; color: var(--accent); font-weight: 700; }

/* ---------- hero demo panel ---------- */
.demo-wrap { position: relative; max-width: 880px; margin: 64px auto 0; }
.demo-wrap::before {
    content: ""; position: absolute; inset: -1px; border-radius: 17px; z-index: 0;
    background: linear-gradient(160deg, rgba(34,197,94,.4), rgba(148,163,184,.12) 35%, rgba(148,163,184,.08));
}
.demo {
    position: relative; z-index: 1;
    background: linear-gradient(180deg, #0a1120, #070d1a);
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 40px 80px -32px rgba(0,0,0,.8);
}
.demo-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 18px; border-bottom: 1px solid var(--line);
}
.demo-head .file { font-family: var(--mono); font-size: 12.5px; color: var(--ink-mid); display: flex; align-items: center; gap: 9px; }
.demo-head .file .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 2.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.demo-head .badge {
    font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--accent-light); background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.28); border-radius: 6px; padding: 3px 9px;
}
.cursor { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- claims strip ---------- */
.claims { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.claims-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.claim { padding: 38px 30px; }
.claim + .claim { border-left: 1px solid var(--line); }
.claim .k { margin-bottom: 12px; display: block; }
.claim .v { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 8px; }
.claim p { font-size: 13.5px; color: var(--ink-dim); line-height: 1.55; }

/* ---------- sections ---------- */
section { padding: 104px 0; }
.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .mono { display: block; margin-bottom: 14px; }
.section-head.sub { margin-top: 72px; margin-bottom: 0; }
h2 { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 16px; }
.section-head p { color: var(--ink-mid); font-size: 16.5px; }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step {
    position: relative; padding: 26px 22px 24px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
    transition: border-color .2s ease, background .2s ease;
}
.step:hover { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.035); }
.step .n {
    font-family: var(--mono); font-size: 12px; color: var(--accent);
    letter-spacing: .12em; display: block; margin-bottom: 34px;
}
.step .n::after {
    content: ""; position: absolute; top: 34px; left: 62px; right: 22px;
    height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent);
}
.step:last-child .n::after { display: none; }
.step h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 7px; }
.step p { font-size: 13.5px; color: var(--ink-dim); line-height: 1.6; }
.step code { font-family: var(--mono); font-size: 12px; color: var(--ink-mid); }

/* ---------- features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
    padding: 28px 26px; border: 1px solid var(--line); border-radius: 14px;
    background: var(--panel);
    transition: border-color .2s ease, background .2s ease;
}
.feature:hover { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.035); }
.feature .fic {
    width: 42px; height: 42px; border-radius: 10px; margin-bottom: 18px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(34,197,94,.09); border: 1px solid rgba(34,197,94,.22);
}
.feature h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature p { font-size: 14px; color: var(--ink-dim); line-height: 1.65; }

/* ---------- security ---------- */
.security { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-raise); position: relative; overflow: hidden; }
.security::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(40% 50% at 15% 20%, rgba(34,197,94,.07), transparent 70%);
}
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; position: relative; }
.sec-card { padding: 30px 28px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.sec-card .fic {
    width: 42px; height: 42px; border-radius: 10px; margin-bottom: 18px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(34,197,94,.09); border: 1px solid rgba(34,197,94,.22);
}
.sec-card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.sec-card p { font-size: 14px; color: var(--ink-dim); line-height: 1.65; }
.sec-badges {
    margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; position: relative;
}
.sec-badges span {
    font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink-mid); border: 1px solid var(--line-strong);
    border-radius: 999px; padding: 8px 16px; background: rgba(148,163,184,.04);
}
.sec-badges span::before { content: "✓ "; color: var(--accent); }
.onprem {
    position: relative; margin-top: 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 26px 28px; border: 1px solid var(--line-strong); border-radius: 14px;
    background: rgba(3, 7, 18, 0.55);
}
.onprem h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; }
.onprem p { font-size: 14px; color: var(--ink-dim); max-width: 560px; }

/* ---------- pricing: rate table + tiers ---------- */
.rate-table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 18px; background: var(--bg-raise); }
.rate-row { display: grid; grid-template-columns: 1.6fr 0.7fr 0.7fr; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); align-items: baseline; }
.rate-row:first-child { border-top: none; }
.rate-row:not(.head) { transition: background .15s ease, box-shadow .15s ease; }
.rate-row:not(.head):hover { background: rgba(34,197,94,.05); box-shadow: inset 3px 0 0 var(--accent); }
.rate-row.head { background: rgba(3,7,18,.5); color: var(--ink-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.rate-row .n { font-size: 14.5px; }
.rate-row .n small { display: block; color: var(--ink-dim); font-size: 12.5px; margin-top: 2px; }
.rate-row .p { font-weight: 700; color: var(--ink); font-size: 15px; }
.rate-row .pm { color: var(--ink-dim); font-size: 13px; }
.rate-note { color: var(--ink-dim); font-size: 13px; margin-top: 10px; }
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
@media (max-width: 900px) { .tier-grid { grid-template-columns: 1fr; } .rate-row { grid-template-columns: 1fr; gap: 2px; } }
.tier-card {
    border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px;
    background: var(--bg-raise); display: flex; flex-direction: column;
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}
/* The green highlight follows the mouse: Starter (.featured) holds it by default, but as
   soon as ANY card in the grid is hovered, the hovered card takes it and the default lets go. */
.tier-card.featured, .tier-card:hover {
    border-color: rgba(34,197,94,.45);
    background: radial-gradient(80% 60% at 50% 0%, rgba(34,197,94,.08), transparent 70%), var(--bg-raise);
}
.tier-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -18px rgba(34,197,94,.35); }
.tier-grid:hover .tier-card.featured:not(:hover) {
    border-color: var(--line);
    background: var(--bg-raise);
}
.tier-card .k { display: block; margin-bottom: 10px; }
.tier-card .amount { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.tier-card .amount em { font-style: normal; color: var(--accent-light); }
.tier-card .per { color: var(--ink-dim); font-size: 13px; margin-bottom: 18px; }
.tier-card ul { list-style: none; margin-bottom: 24px; }
.tier-card li { color: var(--ink-mid); font-size: 13.5px; margin-bottom: 9px; padding-left: 24px; position: relative; }
.tier-card li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.tier-card .btn { margin-top: auto; text-align: center; }

/* ---------- contact form ---------- */
.contact-wrap { max-width: 680px; margin: 0 auto; }
.contact-card {
    position: relative; border-radius: 18px; overflow: hidden; margin-top: 32px;
    border: 1px solid rgba(34,197,94,.22);
    background:
        radial-gradient(70% 90% at 50% 0%, rgba(34,197,94,.07), transparent 65%),
        var(--bg-raise);
    padding: 38px 40px;
}
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form label { display: block; }
.contact-form .lbl {
    display: block; font-family: var(--mono); font-size: 11px; font-weight: 500;
    letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 7px;
}
.contact-form .lbl b { color: var(--accent); font-weight: 500; }
.contact-form input, .contact-form textarea {
    width: 100%; background: rgba(3,7,18,.6); border: 1px solid var(--line); border-radius: 10px;
    color: var(--ink); font-family: var(--sans); font-size: 14.5px; padding: 13px 15px; outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--ink-dim); }
.contact-form input:focus, .contact-form textarea:focus {
    border-color: rgba(34,197,94,.6); box-shadow: 0 0 0 3px rgba(34,197,94,.12);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .btn { justify-content: center; width: 100%; }
.contact-status { grid-column: 1 / -1; font-size: 13.5px; min-height: 0; }
.contact-status.err { color: #f87171; }
.contact-fine { grid-column: 1 / -1; color: var(--ink-dim); font-size: 12.5px; text-align: center; margin-top: 2px; }
.contact-success { display: none; text-align: center; padding: 28px 10px; }
.contact-success .tick {
    width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
    border: 1.5px solid rgba(34,197,94,.5); background: rgba(34,197,94,.1);
    display: flex; align-items: center; justify-content: center;
}
.contact-success .tick svg { width: 26px; height: 26px; stroke: var(--accent-light); }
.contact-success h3 { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
.contact-success p { color: var(--ink-mid); font-size: 14.5px; }
@media (max-width: 640px) { .contact-form { grid-template-columns: 1fr; } .contact-card { padding: 28px 22px; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 42px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { color: var(--ink-dim); font-size: 13px; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { color: var(--ink-mid); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
/* Company identification (EU e-commerce directive art. 5 / Czech Civil Code §435) */
.footer .footer-legal { margin-top: 6px; font-size: 11.5px; color: var(--ink-dim); opacity: .8; }


/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .demo-head .file .dot, .cursor { animation: none; }
    html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    h1 { font-size: 46px; }
    .claims-grid { grid-template-columns: 1fr 1fr; }
    .claim:nth-child(3) { border-left: none; }
    .claim { border-top: 1px solid var(--line); }
    .claim:nth-child(-n+2) { border-top: none; }
    .steps { grid-template-columns: 1fr 1fr; }
    .step .n::after { display: none; }
    .features-grid, .sec-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
}
@media (max-width: 620px) {
    h1 { font-size: 36px; }
    h2 { font-size: 30px; }
    section { padding: 72px 0; }
    .claims-grid, .steps, .features-grid, .sec-grid { grid-template-columns: 1fr; }
    .claim + .claim { border-left: none; }
    .claim { border-top: 1px solid var(--line); }
    .claim:first-child { border-top: none; }
    .nav-cta .signin { display: none; }
}
