/* Palette copied from hastekey-app's brand.rs (LIGHT and DARK), so the
   site looks like the app's own default "Hastekey" look. Amber is the only
   accent, and text on amber is always the dark on_accent ink. */
:root {
    --base: #f3f0eb;
    --layer: #faf8f5;
    --card: #ffffff;
    --edge: #e6e0d7;
    --edge-strong: #d5cdc1;
    --ink: #1e1a16;
    --soft: #433c34;
    --muted: #6f675d;
    --accent: #ff9f43;
    --accent-hover: #ffac5e;
    --on-accent: #241405;
    --accent-ink: #a35700;
    --key-bg: #fff0dd;
    --key-fg: #8a4a00;
    --key-edge: #f4d2a6;
    --text-sel: #ffd9ae;
    --ok: #2c8147;
    --shadow: 0 30px 70px rgba(30, 26, 22, 0.14), 0 4px 14px rgba(30, 26, 22, 0.07);
    --content-max: 1160px;
    --font-sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --base: #1d1c1a;
        --layer: #252422;
        --card: #2d2b29;
        --edge: #3a3734;
        --edge-strong: #4a4642;
        --ink: #f3f0eb;
        --soft: #d3cdc5;
        --muted: #a39c93;
        --accent: #ff9f43;
        --accent-hover: #ffb062;
        --on-accent: #1f1206;
        --accent-ink: #ffb264;
        --key-bg: #3d2c19;
        --key-fg: #ffc388;
        --key-edge: #5c4226;
        --text-sel: #5c4226;
        --ok: #6fcf8d;
        --shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.3);
        color-scheme: dark;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--base);
    color: var(--ink);
    line-height: 1.6;
}

::selection {
    background: var(--text-sel);
}

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

img {
    max-width: 100%;
}

.wrap {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 32px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--card);
    color: var(--ink);
    padding: 8px 14px;
    border-radius: 6px;
    z-index: 10;
}

.skip-link:focus {
    left: 8px;
}

/* ---- Header ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: color-mix(in srgb, var(--base) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--edge);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 68px;
}

.logo {
    display: block;
    height: 30px;
    width: auto;
}

.logo-dark {
    display: none;
}

/* Parent-brand link back to routrix.tech, beside the Hastekey logo. */
.brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.by-routrix {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding-left: 0.875rem;
    border-left: 1px solid var(--edge-strong);
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.by-routrix img {
    width: 1.1rem;
    height: auto;
    display: block;
}

.by-routrix:hover {
    color: var(--ink);
}

.by-routrix:hover span {
    text-decoration: underline;
}

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

    .logo-dark {
        display: block;
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.site-nav a:hover {
    color: var(--ink);
}

.pill {
    display: inline-block;
    font-family: var(--font-mono);
    background: var(--key-bg);
    color: var(--key-fg);
    border: 1px solid var(--key-edge);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 11px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ---- Hero ---- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 96px;
    background:
        radial-gradient(800px 460px at 90% 0%, rgba(255, 159, 67, 0.22), transparent 60%),
        radial-gradient(600px 360px at 0% 100%, rgba(255, 159, 67, 0.08), transparent 60%);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 64px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 56px;
    line-height: 1.05;
    letter-spacing: -1.4px;
    font-weight: 800;
    margin: 0 0 22px;
}

.hero h1 .hl {
    background: linear-gradient(transparent 62%, rgba(255, 159, 67, 0.45) 62%);
    padding: 0 2px;
}

.lede {
    font-size: 19px;
    color: var(--soft);
    margin: 0 0 32px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 22px;
    border-radius: 8px;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.btn-accent {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 6px 18px rgba(255, 159, 67, 0.32);
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-quiet {
    color: var(--ink);
    border: 1px solid var(--edge-strong);
    background: var(--card);
}

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

.hero-note {
    margin: 22px 0 0;
    font-size: 14px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-note svg {
    width: 18px;
    height: 18px;
    flex: none;
}

/* ---- Typing demo (same markup and script as routrix.tech's promo) ---- */

.demo-window {
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.demo-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 10px 16px;
    background: var(--layer);
    border-bottom: 1px solid var(--edge);
    font-size: 13px;
    color: var(--muted);
}

.demo-controls {
    display: flex;
    gap: 14px;
}

.demo-controls svg {
    width: 12px;
    height: 12px;
    display: block;
}

.demo-body {
    position: relative;
    padding: 22px 24px 26px;
    min-height: 236px;
    font-size: 15px;
    line-height: 1.65;
}

.demo-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.demo-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    padding: 0 0 14px;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--edge);
    font-size: 13px;
    color: var(--muted);
}

.demo-header span:nth-child(even) {
    color: var(--ink);
}

.demo-expanded {
    border-radius: 3px;
    animation: demo-flash 1.6s ease-out;
}

@keyframes demo-flash {
    0% { background: var(--text-sel); }
    100% { background: transparent; }
}

.demo-caret {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    margin-left: 1px;
    vertical-align: text-bottom;
    background: var(--ink);
    animation: demo-blink 1s steps(1) infinite;
}

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

.demo-snippets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.demo-snippet {
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    min-width: 0;
}

.demo-snippet .kbd {
    display: inline-block;
    font-family: var(--font-mono);
    background: var(--key-bg);
    color: var(--key-fg);
    border: 1px solid var(--key-edge);
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.demo-snippet span:last-child {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-snippet.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.22);
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .demo-caret, .demo-expanded {
        animation: none;
    }
}

/* ---- Sections ---- */

.section {
    padding: 88px 0;
    scroll-margin-top: 68px;
}

.section-alt {
    background: var(--layer);
    border-top: 1px solid var(--edge);
    border-bottom: 1px solid var(--edge);
}

.section-head {
    max-width: 640px;
    margin-bottom: 44px;
}

.section h2 {
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -0.6px;
    font-weight: 800;
    margin: 0 0 14px;
}

.section-head p {
    margin: 0;
    color: var(--soft);
    font-size: 17px;
}

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

.feature {
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 14px;
    padding: 26px;
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--key-bg);
    color: var(--key-fg);
    border: 1px solid var(--key-edge);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--key-bg);
    color: var(--key-fg);
    border: 1px solid var(--key-edge);
    border-radius: 5px;
    padding: 0 5px;
}

/* ---- Looks gallery: hidden until the screenshots exist ---- */

.looks[hidden] {
    display: none;
}

.looks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.look {
    margin: 0;
}

.look[hidden] {
    display: none;
}

.look img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--edge);
    box-shadow: var(--shadow);
    background: var(--card);
}

.look figcaption {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
}

.look figcaption strong {
    color: var(--ink);
    display: block;
    font-size: 15px;
}

/* ---- Privacy ---- */

.privacy-card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 48px;
    background: #1e1a16;
    color: #f3f0eb;
    border-radius: 18px;
    padding: 48px;
    box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
    .privacy-card {
        background: var(--card);
        border: 1px solid var(--edge);
    }
}

.privacy-card .eyebrow {
    color: #ffb264;
}

.privacy-card h2 {
    color: #f3f0eb;
}

.privacy-card > div > p {
    color: #d3cdc5;
    margin: 0;
    font-size: 17px;
}

.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
}

.check-list li {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 12px;
    color: #d3cdc5;
    font-size: 15px;
}

.check-list strong {
    color: #f3f0eb;
    display: block;
}

.check-list svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
    margin-top: 2px;
}

/* ---- Pricing / requirements ---- */

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 14px;
    padding: 32px;
}

.panel h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.panel p {
    margin: 0 0 16px;
    color: var(--soft);
}

.panel ul {
    margin: 0;
    padding-left: 20px;
    color: var(--soft);
}

.panel li {
    margin-bottom: 6px;
}

.price-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 4px 0 16px;
}

.price-line .big {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.price-line .small {
    color: var(--muted);
    font-size: 14px;
}

/* ---- Story ---- */

.story {
    max-width: 760px;
}

.story blockquote {
    margin: 0;
    font-size: 22px;
    line-height: 1.55;
    color: var(--ink);
    border-left: 4px solid var(--accent);
    padding-left: 24px;
}

.story p {
    color: var(--soft);
    font-size: 17px;
    margin: 18px 0 0 28px;
}

/* ---- Footer ---- */

.site-footer {
    border-top: 1px solid var(--edge);
    padding: 28px 0 40px;
    color: var(--muted);
    font-size: 13px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

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

.site-footer a:hover {
    color: var(--ink);
}

/* ---- Responsive ---- */

@media (max-width: 1000px) {
    .hero-grid,
    .privacy-card {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .feature-grid,
    .looks-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lede {
        max-width: none;
    }
}

@media (max-width: 720px) {
    .wrap {
        padding: 0 16px;
    }

    .site-nav a {
        display: none;
    }

    .logo {
        height: 26px;
    }

    .hero {
        padding: 52px 0 64px;
    }

    .hero h1 {
        font-size: 38px;
        letter-spacing: -0.8px;
    }

    .lede {
        font-size: 17px;
    }

    .section {
        padding: 64px 0;
    }

    .section h2 {
        font-size: 28px;
    }

    .feature-grid,
    .looks-grid,
    .split,
    .demo-snippets {
        grid-template-columns: 1fr;
    }

    .demo-body {
        padding: 18px 18px 22px;
        font-size: 14px;
        min-height: 250px;
    }

    .privacy-card {
        padding: 28px 22px;
    }

    .panel {
        padding: 24px 20px;
    }

    .story blockquote {
        font-size: 19px;
        padding-left: 18px;
    }

    .story p {
        margin-left: 22px;
    }
}
