/* Aile Insight website. Brand: docs in the app repo (REBRANDING.md, brand guide). */

@font-face {
    font-family: "Mona Sans";
    src: url("/fonts/MonaSans-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Mona Sans";
    src: url("/fonts/MonaSans-Medium.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: "Mona Sans";
    src: url("/fonts/MonaSans-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

:root {
    --bg: #faf9f7;
    --surface: #ffffff;
    --text: #09090b;
    --muted: #63636b;
    --border: #e6e3de;
    --accent: #0f766e;
    --on-accent: #ffffff;
    --accent-soft: #e6f2f0;
    --error: #b42318;
    --radius: 12px;
    --wrap: 72rem;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
    --gradient: radial-gradient(
        120% 120% at 0% 0%,
        #cfe8e3 0%,
        #eef5f2 45%,
        #f6efe6 100%
    );
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141415;
        --surface: #1b1b1d;
        --text: #f5f5f4;
        --muted: #a1a1aa;
        --border: #2c2c30;
        --accent: #14b8a6;
        --on-accent: #042f2e;
        --accent-soft: #10302d;
        --error: #f97066;
        --gradient: radial-gradient(
            120% 120% at 0% 0%,
            #0f3b36 0%,
            #17201f 50%,
            #1d1b18 100%
        );
        color-scheme: dark;
    }
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        "Mona Sans",
        system-ui,
        -apple-system,
        "Segoe UI",
        sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent);
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-thickness: 2px;
}

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

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .wrap {
        padding-inline: 1.5rem;
    }
}

.narrow {
    max-width: 46rem;
}

.skip {
    position: absolute;
    left: -9999px;
}
.skip:focus {
    left: 1rem;
    top: 1rem;
    background: var(--surface);
    padding: 0.5rem 1rem;
    z-index: 10;
}

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Header and footer */

.site-header {
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    flex-shrink: 0;
}

.logo-light {
    display: none;
}
@media (prefers-color-scheme: dark) {
    .logo-dark {
        display: none;
    }
    .logo-light {
        display: block;
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.95rem;
}

.nav a:not(.button) {
    color: var(--text);
    text-decoration: none;
}

.nav a:not(.button):hover,
.nav a[aria-current="page"] {
    text-decoration: underline;
}

.site-footer {
    margin-top: 5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.875rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    padding-block: 1.5rem;
}

.footer-inner a {
    color: var(--muted);
}

/* Type */

h1,
h2,
h3 {
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

h1 {
    font-size: clamp(2.25rem, 6vw, 3.75rem);
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
    font-size: 1.2rem;
}

p {
    margin: 0 0 1rem;
}

.lead {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--muted);
    max-width: 38rem;
}

.label {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 1rem;
}

h2.label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.note {
    color: var(--muted);
    font-size: 0.925rem;
}

/* Buttons */

.button {
    display: inline-block;
    background: var(--accent);
    color: var(--on-accent);
    border: 0;
    border-radius: 999px;
    padding: 0.8rem 1.6rem;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    filter: brightness(1.08);
}

.button-small {
    padding: 0.45rem 1.1rem;
    font-size: 0.925rem;
}

/* Sections */

.hero {
    display: grid;
    gap: 2.5rem;
    padding-block: 4rem 3rem;
    align-items: center;
}

@media (min-width: 900px) {
    .hero {
        grid-template-columns: 1.15fr 1fr;
        padding-block: 6rem 4rem;
    }
}

.grain {
    background-image: var(--grain), var(--gradient);
    background-size:
        160px 160px,
        cover;
    border-radius: var(--radius);
}

.hero-visual {
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.launcher {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 12px 40px -20px rgb(0 0 0 / 0.25);
}

.launcher ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.launcher li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
}

.launcher .dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #16a34a;
    flex-shrink: 0;
}

.launcher .machine {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.launcher .machine span {
    color: var(--muted);
    font-size: 0.85rem;
}

.launcher .open {
    background: var(--accent);
    color: var(--on-accent);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.features,
.about {
    padding-block: 2.5rem;
}

.grid-3,
.grid-2 {
    display: grid;
    gap: 1rem;
}

@media (min-width: 760px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card p:last-child {
    margin-bottom: 0;
}

.strip p {
    border-block: 1px solid var(--border);
    padding-block: 1.25rem;
    color: var(--muted);
    margin: 1rem 0;
}

.about-text {
    font-size: clamp(1.25rem, 2.6vw, 1.75rem);
    line-height: 1.4;
    letter-spacing: -0.01em;
    max-width: 48rem;
}

.cta {
    margin-top: 3rem;
    padding: clamp(2rem, 6vw, 4rem);
    text-align: center;
}

.cta p:last-child {
    margin-bottom: 0;
}

.page-head {
    padding-block: 4rem 2rem;
}

/* Plans */

.plans {
    margin-bottom: 3rem;
}

.plan .price {
    font-size: 1.1rem;
    color: var(--muted);
}

.plan .price strong {
    font-size: 2.25rem;
    color: var(--text);
    letter-spacing: -0.03em;
}

.plan .best-for {
    color: var(--muted);
}

.plan ul {
    margin: 0;
    padding-left: 1.1rem;
}

.details {
    margin-top: 3rem;
}

.details h2.label:not(:first-child) {
    margin-top: 2rem;
}

/* Tables */

.table-scroll {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    text-align: left;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

tbody tr:last-child th,
tbody tr:last-child td {
    border-bottom: 0;
}

thead th {
    font-weight: 600;
}

tbody th {
    font-weight: 400;
}

.compare td {
    text-align: center;
    white-space: nowrap;
}

.compare thead th:not(:first-child) {
    text-align: center;
}

.yes {
    color: var(--accent);
    font-weight: 600;
}

.no {
    color: var(--muted);
}

.meta {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    word-break: break-all;
}

code {
    font-family: var(--mono);
    font-size: 0.85em;
}

/* Legal */

.legal {
    padding-top: 4rem;
}

.legal h2 {
    font-size: 1.2rem;
    margin-top: 2.25rem;
}

.legal .effective {
    color: var(--muted);
    font-style: italic;
}

.legal ul {
    padding-left: 1.2rem;
}

/* Form */

.apply-form {
    display: grid;
    gap: 1.5rem;
}

.field {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.field > label,
legend {
    display: block;
    font-weight: 600;
    margin-bottom: 0.45rem;
    padding: 0;
}

.optional {
    font-weight: 400;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 0.9rem;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: var(--error);
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.choice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    cursor: pointer;
}

.choice:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.choice input {
    accent-color: var(--accent);
    margin: 0;
}

.field-error,
.form-error {
    color: var(--error);
    font-size: 0.925rem;
    margin: 0.4rem 0 0;
}

.form-error {
    border: 1px solid var(--error);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 520px) {
    .nav {
        gap: 0.85rem;
    }
    .nav a:not(.button):first-child {
        display: none;
    }
}
