/*
 * style.css — the whole site's styling, in one file on purpose.
 *
 * A marketing page is a handful of screens; splitting it across five files buys nothing and
 * costs a request each. When it stops fitting in a head, split it then.
 *
 * EVERY COLOUR AND SIZE IS A TOKEN below. That is the part worth keeping when the design
 * arrives: restyling means editing :root, not hunting hex codes through rules. The values
 * here are a neutral dark starting point borrowed from the app's login screen, so the two
 * do not look like different companies — they are meant to be replaced.
 */

:root {
    /* Ink and paper */
    --bg: #09090b;
    --bg-raised: #131316;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --border: #27272a;

    /* The one accent. A second accent needs a reason. */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --on-primary: #ffffff;

    /* Type. The stack is the system font on every platform, which loads instantly and
       looks native; swap in a webfont via site/fonts/ once one is chosen. */
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-heading: var(--font);

    /* Rhythm. One scale, used everywhere, so spacing never drifts into arbitrary numbers. */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.5rem;
    --space-5: 4rem;
    --space-6: 6rem;

    --radius: 10px;
    --container: 1120px;
}

/* Somebody who has asked their operating system to reduce motion has asked for a reason —
   vestibular disorders are the usual one. Honour it globally rather than per-animation. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

html {
    /* The anchors in the nav jump to sections; without this they land instantly and the
       reader loses their place. */
    scroll-behavior: smooth;
    /* And without THIS the heading they jumped to sits under the sticky header. */
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.15;
    margin: 0 0 var(--space-2);
    letter-spacing: -0.02em;
}

/* Fluid, so one rule covers a phone and a desktop without a breakpoint. clamp() reads
   min / preferred / max — the middle term is what scales. */
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }

p { margin: 0 0 var(--space-2); }

a { color: inherit; }

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

/* Never remove an outline without putting a better one back: it is how anybody navigating
   by keyboard knows where they are. */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--space-2);
}

/* The first thing a keyboard or screen-reader user reaches, and invisible to everyone
   else until it is focused. Without it they tab the whole nav on every page. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: var(--space-1);
    background: var(--primary);
    color: var(--on-primary);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius);
    z-index: 100;
}
.skip-link:focus { left: var(--space-1); }

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 4rem;
}

.brand {
    font-weight: 700;
    text-decoration: none;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: var(--space-3);
    list-style: none;
    margin: 0;
    padding: 0;
    margin-inline-start: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9375rem;
}
.nav-links a:hover { color: var(--text); }

/* ---- Language switcher ------------------------------------------------------ */

/* Three real links to three real pages, not a JavaScript toggle: each language has its own
   address, so it can be bookmarked, shared, and indexed separately. */
.lang-switch {
    display: flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.lang {
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) - 4px);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
}
.lang:hover { color: var(--text); }

.lang.is-current {
    background: var(--bg-raised);
    color: var(--text);
}

/* Under 720px the links would wrap into the logo. They are hidden rather than crammed;
   a real mobile menu is a decision for when the content exists. The LANGUAGE SWITCH stays:
   somebody who cannot read the page needs it more on a phone than anywhere else. */
@media (max-width: 720px) {
    .nav-links { display: none; }
    .lang-switch { margin-inline-start: auto; }
}

/* The nav CTA is the first thing to go when the bar gets tight — it repeats a button that
   is already in the hero, two screens up at most. */
@media (max-width: 560px) {
    .nav-cta { display: none; }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: 0.6875rem var(--space-3);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }

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

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

main > section { padding-block: var(--space-6); }

.hero { padding-block: var(--space-6) var(--space-5); text-align: center; }

.lede {
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 44ch;          /* a measure, not a width: past ~75 characters the eye
                                 loses the start of the next line */
    margin-inline: auto;
}

.hero-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-3);
}

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

.site-footer {
    border-top: 1px solid var(--border);
    padding-block: var(--space-4);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ---- Content -------------------------------------------------------------- */

.prose { max-width: 68ch; color: var(--text-muted); }

.feature-grid {
    list-style: none;
    margin: var(--space-3) 0 0;
    padding: 0;
    display: grid;
    /* auto-fit + minmax, so the number of columns follows the width with no breakpoints:
       three on a desktop, two on a tablet, one on a phone, and nothing to maintain. */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-3);
}

.feature h3 { font-size: 1.0625rem; margin-bottom: var(--space-1); }
.feature p { color: var(--text-muted); margin: 0; }

/* ---- Media ----------------------------------------------------------------- */

/* Screenshots and video, served from this server out of site/media/. Both get a frame so a
   shot of a dark UI does not bleed into a dark page and lose its edges. */
.shot, .clip {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-raised);
}

/* Reserves the right amount of space BEFORE the file arrives. Without it the page reflows
   as each image loads and pushes whatever somebody was reading down the screen. Set
   width/height attributes on the element and the browser works the ratio out itself. */
.shot, .clip { aspect-ratio: 16 / 10; object-fit: cover; }

/* ---- Placeholders ---------------------------------------------------------- */

/* Anything on the page that is honestly not finished. Visibly provisional on purpose: a
   placeholder that looks like a feature is one that ships. */
.placeholder-note {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Shared with the app, and for the same reason: one way to take something off the page. */
.hidden { display: none !important; }
