/* ============================================================
   Aurinto — design tokens, reset, base elements, shared components
   Light enterprise theme. Loaded first on every page.
   ============================================================ */

:root {
    /* Surfaces */
    --bg: #ffffff;
    --bg-soft: #f6f9fc;
    --bg-tint: #eef2ff;
    --bg-deep: #0a2540;
    --bg-deep-2: #0d2c4d;

    /* Ink */
    --ink: #0a2540;
    --text: #425466;
    --muted: #6b7c93;
    --line: #e6ebf1;
    --line-strong: #d5dce6;

    /* Brand */
    --primary: #4f46e5;
    --primary-deep: #4338ca;
    --primary-soft: #eef0ff;
    --violet: #9333ea;
    --cyan: #0891b2;
    --gold: #d97706;
    --green: #059669;
    --green-soft: #ecfdf5;
    --red: #dc2626;
    --red-soft: #fef2f2;
    --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #9333ea 100%);

    /* Geometry */
    --radius-s: 8px;
    --radius: 12px;
    --radius-l: 20px;
    --container: 1200px;

    /* Elevation */
    --shadow-s: 0 1px 2px rgba(10, 37, 64, .06), 0 2px 8px rgba(10, 37, 64, .05);
    --shadow-m: 0 6px 24px -8px rgba(10, 37, 64, .14), 0 2px 8px rgba(10, 37, 64, .06);
    --shadow-l: 0 24px 60px -16px rgba(10, 37, 64, .22), 0 8px 24px -12px rgba(10, 37, 64, .1);

    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
}

h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); }

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

img, svg, video { max-width: 100%; height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; padding: 0; }

::selection { background: rgba(79, 70, 229, .18); }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* ---------- Layout ---------- */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-tight { padding: 64px 0; }

.section-head {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-head.left { margin-left: 0; text-align: left; }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary);
}

.kicker::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad);
}

.lede {
    font-size: 1.13rem;
    color: var(--muted);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 980px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .section { padding: 64px 0; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
    white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 2px rgba(10, 37, 64, .12), 0 6px 16px -6px rgba(79, 70, 229, .45);
}

.btn-primary:hover {
    background: var(--primary-deep);
    color: #fff;
    box-shadow: 0 2px 4px rgba(10, 37, 64, .12), 0 10px 24px -6px rgba(79, 70, 229, .5);
}

.btn-ghost {
    background: #fff;
    color: var(--ink);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-s);
}

.btn-ghost:hover { border-color: var(--muted); color: var(--ink); }

.btn-line {
    padding: 0;
    border: 0;
    color: var(--primary);
    font-weight: 600;
    border-radius: 0;
}

.btn-line::after { content: "→"; transition: transform .15s ease; }
.btn-line:hover::after { transform: translateX(3px); }

.btn-white {
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-m);
}

.btn-white:hover { color: var(--primary-deep); }

.btn-lg { padding: 15px 28px; font-size: 1.02rem; border-radius: 12px; }

/* ---------- Shared components ---------- */

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: 28px;
    box-shadow: var(--shadow-s);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.card:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    background: var(--primary-soft);
    color: var(--primary-deep);
}

.chip-green { background: var(--green-soft); color: var(--green); }
.chip-gold { background: #fef3c7; color: var(--gold); }
.chip-red { background: var(--red-soft); color: var(--red); }

.ico-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    flex: none;
}

.ico-tile svg { width: 22px; height: 22px; }

/* Feature list checkmarks */
.check-list { list-style: none; padding: 0; margin: 0 0 1.2em; }

.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* FAQ (native details/summary) */
.faq-list { max-width: 780px; margin: 0 auto; }

.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--muted);
    transition: transform .2s ease;
    flex: none;
}

.faq-item[open] summary::after { transform: rotate(45deg); color: var(--primary); }

.faq-item .faq-a { padding: 0 22px 18px; color: var(--text); }

/* CTA band (used on every page above the footer) */
.cta-band { padding: 40px 0 96px; }

.cta-band-inner {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--bg-deep);
    padding: 72px 40px;
    text-align: center;
    color: #cbd6e2;
}

.cta-band-inner::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(600px 300px at 20% 0%, rgba(124, 58, 237, .35), transparent 60%),
        radial-gradient(600px 300px at 80% 100%, rgba(8, 145, 178, .28), transparent 60%);
    pointer-events: none;
}

.cta-band-inner > * { position: relative; }

.cta-band-inner h2 { color: #fff; margin-bottom: .4em; }

.cta-band-inner p { max-width: 560px; margin: 0 auto 28px; }

.cta-band-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.cta-note { margin-top: 18px; font-size: .85rem; color: #8ba2bd; }

.cta-note a { color: #cbd6e2; text-decoration: underline; text-underline-offset: 2px; }
.cta-note a:hover { color: #fff; }

.btn-ghost-dark {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
}

.btn-ghost-dark:hover { border-color: #fff; color: #fff; }

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

.reveal.in { opacity: 1; transform: none; }

.reveal-group > * {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal-group.in > * { opacity: 1; transform: none; }

.reveal-group.in > *:nth-child(2) { transition-delay: .08s; }
.reveal-group.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-group.in > *:nth-child(4) { transition-delay: .24s; }
.reveal-group.in > *:nth-child(5) { transition-delay: .32s; }
.reveal-group.in > *:nth-child(6) { transition-delay: .4s; }

/* Ask AI button + modal (feature-flagged) */
.ask-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--primary-deep);
    font-weight: 600;
    font-size: .9rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ask-ai-btn:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }

.ask-ai-btn svg { width: 17px; height: 17px; color: var(--violet); }

.ask-ai-modal { position: fixed; inset: 0; z-index: 200; }

.ask-ai-backdrop { position: absolute; inset: 0; background: rgba(10, 37, 64, .5); }

.ask-ai-panel {
    position: absolute;
    left: 50%;
    top: 14%;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 32px));
    background: #fff;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-l);
    padding: 22px;
}

.ask-ai-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--ink); }

.ask-ai-close { font-size: 1.5rem; line-height: 1; color: var(--muted); padding: 4px 8px; }

.ask-ai-note { font-size: .95rem; color: var(--text); background: var(--bg-soft); border-radius: 10px; padding: 14px 16px; }

.ask-ai-form { display: flex; gap: 10px; margin-top: 14px; }

.ask-ai-form input {
    flex: 1;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 11px 14px;
}

.ask-ai-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); }

/* Utility */
.tac { text-align: center; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
