/* Sandcat landing page: the promo's look (DM Sans, Instrument Serif italic,
 * near-black field, one lime accent) on a page that reads well from a phone
 * to a wide desktop. Motion is progressive: without JavaScript, or with
 * reduced motion, everything is simply shown. */

@font-face {
    font-family: 'DM Sans';
    src: url(/landing/fonts/dm-sans-latin.woff2?t=sandcat-719fdd9bd2b7) format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Instrument Serif';
    src: url(/landing/fonts/instrument-serif-italic-latin.woff2?t=sandcat-eec7b69e46c7) format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

:root {
    --ink: #08090b;
    --surface: #121418;
    --paper: #f4f1ea;
    --muted: rgba(244, 241, 234, 0.66);
    --faint: rgba(244, 241, 234, 0.4);
    --edge: rgba(255, 255, 255, 0.1);
    --lime: #a3e635;
    --lime-ink: #0d1404;
    --sans: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    --serif: 'Instrument Serif', Georgia, serif;
    --gutter: clamp(20px, 5vw, 40px);
    color-scheme: dark;
}

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

html {
    background: var(--ink);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 100%;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }

.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------------------------------------------------------------- header */
.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(8, 9, 11, 0.78);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--edge);
}
.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding-top: env(safe-area-inset-top);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
}
.brand-logo { width: 30px; height: 30px; }
.top-nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 24px); }

.logo-hole { fill: #050505; stroke: rgba(255, 255, 255, 0.22); stroke-width: 10; }
.logo-cat { fill: #f2f1ee; }

/* ---------------------------------------------------------------- controls */
.link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.link:hover { color: var(--paper); }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--lime);
    color: var(--lime-ink);
    font-weight: 600;
    font-size: 1.0625rem;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s, background-color 0.15s;
}
.button:hover { background: #b5f04d; }
.button:active { transform: translateY(1px); }
.button-small { min-height: 38px; padding: 0 16px; font-size: 0.9375rem; }
.button-ghost {
    background: transparent;
    color: var(--paper);
    box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.28);
}
.button-ghost:hover { background: rgba(244, 241, 234, 0.08); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.button:focus-visible { border-radius: 999px; }

/* ---------------------------------------------------------------- hero */
.hero {
    position: relative;
    padding: clamp(72px, 14vh, 150px) 0 clamp(48px, 8vh, 80px);
    text-align: center;
    background: radial-gradient(60% 70% at 50% 40%, rgba(150, 120, 80, 0.13), transparent 70%);
}
.tagline { display: grid; gap: 0.35em; font-weight: 500; }
.tagline-1 {
    font-size: clamp(2.6rem, 7.4vw, 5.4rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}
.tagline-2 {
    font-size: clamp(1.7rem, 4.4vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 400;
    color: var(--muted);
}
.oneliner {
    margin-top: clamp(20px, 3vw, 32px);
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    color: var(--muted);
}
.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: clamp(28px, 4vw, 40px);
}

/* Typing: each character keeps its place, so centred lines never move. */
/* Until the script has split the lines they stay hidden; if it never runs,
 * they appear anyway. */
.js:not(.typing-ready) [data-type] { opacity: 0; animation: show-anyway 0s 2.5s forwards; }
@keyframes show-anyway { to { opacity: 1; } }
.ch { opacity: 0; }
.ch.on { opacity: 1; }
.ch.caret { position: relative; }
.ch.caret::after {
    content: '';
    position: absolute;
    top: 0.12em;
    bottom: 0.06em;
    right: -0.14em;
    width: max(2px, 0.05em);
    background: var(--lime);
    animation: blink 1.1s steps(1) infinite;
}
.ch.caret.typing::after { animation: none; }
@keyframes blink { 50% { opacity: 0; } }
.js .hero .oneliner,
.js .hero .actions { animation: rise 0.7s 1.4s both cubic-bezier(0.2, 0.7, 0.2, 1); }

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
}

/* ---------------------------------------------------------------- video */
.tour { padding-bottom: clamp(72px, 12vw, 140px); }
.film {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: clamp(10px, 1.6vw, 18px);
    overflow: hidden;
    background: #000 url(/landing/video/sandcat-30s-poster.webp?t=sandcat-71a91d93ebc2) center / cover no-repeat;
    box-shadow: 0 0 0 1px var(--edge), 0 30px 80px rgba(0, 0, 0, 0.55);
}
.film video { width: 100%; height: 100%; object-fit: cover; }
.film-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    border: 0;
    padding: 0;
    background: linear-gradient(to top, rgba(8, 9, 11, 0.55), rgba(8, 9, 11, 0.1) 60%);
    color: var(--paper);
    font: 600 1rem var(--sans);
    cursor: pointer;
}
.film-play[hidden] { display: none; }
.film-play-icon {
    position: relative;
    width: clamp(64px, 9vw, 88px);
    height: clamp(64px, 9vw, 88px);
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s;
}
.film-play-icon::after {
    content: '';
    position: absolute;
    left: 54%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 0.6em 0 0.6em 1em;
    border-color: transparent transparent transparent var(--lime-ink);
    font-size: clamp(16px, 2.2vw, 22px);
}
.film-play-label {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(8, 9, 11, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.film-play:hover .film-play-icon { transform: scale(1.06); }

/* The film plays in a lightbox. On a phone turned sideways it fills the
 * screen (and the script asks for fullscreen where the browser allows it). */
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(5, 6, 8, 0.94);
    color: var(--paper);
    overflow: hidden;
}
.lightbox[open] {
    display: grid;
    place-items: center;
    animation: lightbox-fade 0.22s ease-out;
}
.lightbox::backdrop { background: transparent; }
.lightbox-frame {
    width: min(94vw, calc((100dvh - 136px) * 16 / 9), 1600px);
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 0 1px var(--edge), 0 40px 120px rgba(0, 0, 0, 0.6);
}
.lightbox[open] .lightbox-frame { animation: lightbox-zoom 0.32s cubic-bezier(0.2, 0.7, 0.2, 1); }
.lightbox-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.lightbox-close {
    position: absolute;
    z-index: 1;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(244, 241, 234, 0.12);
    color: var(--paper);
    cursor: pointer;
    transition: background-color 0.15s;
}
.lightbox-close:hover { background: rgba(244, 241, 234, 0.22); }
.lightbox-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@keyframes lightbox-fade { from { background-color: rgba(5, 6, 8, 0); } }
@keyframes lightbox-zoom { from { opacity: 0; transform: scale(0.94); } }
@media (max-width: 760px) and (orientation: portrait) {
    .lightbox { background: #000; }
    .lightbox-frame { width: 100vw; border-radius: 0; box-shadow: none; }
}
@media (orientation: landscape) and (max-height: 560px) {
    .lightbox { background: #000; }
    .lightbox-frame { width: min(100vw, calc(100dvh * 16 / 9)); border-radius: 0; box-shadow: none; }
    .lightbox-close {
        top: max(10px, env(safe-area-inset-top));
        right: max(10px, env(safe-area-inset-right));
        background: rgba(8, 9, 11, 0.55);
    }
}

/* ---------------------------------------------------------------- features */
.feature {
    --glow: rgba(60, 86, 150, 0.22);
    position: relative;
    padding: clamp(56px, 9vw, 120px) 0;
}
.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(45% 55% at 70% 45%, var(--glow), transparent 75%);
    pointer-events: none;
}
.feature-flip::before { background: radial-gradient(45% 55% at 30% 45%, var(--glow), transparent 75%); }
.feature[data-tone='characters'] { --glow: rgba(170, 120, 70, 0.16); }
.feature[data-tone='direct'] { --glow: rgba(110, 140, 90, 0.16); }
.feature[data-tone='play'] { --glow: rgba(190, 120, 60, 0.17); }
.feature[data-tone='share'] { --glow: rgba(120, 110, 90, 0.12); }

.feature-row {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}
.feature-flip .feature-row { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature-flip .feature-copy { order: 2; }
.label {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-weight: 600;
    font-size: 1.0625rem;
    margin-bottom: 14px;
}
.label span { color: var(--lime); }
.feature h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -0.03em;
}
.feature-copy p:not(.label) {
    margin-top: 18px;
    max-width: 34em;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--muted);
}

.shot {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    padding-top: 22px;
    box-shadow: 0 0 0 1px var(--edge), 0 24px 60px rgba(0, 0, 0, 0.5);
}
.shot::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 11px 0 rgba(255, 255, 255, 0.22), 22px 0 rgba(255, 255, 255, 0.22);
}
.shot img { width: 100%; height: auto; }

.pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 5vw, 64px);
    margin-top: clamp(56px, 8vw, 96px);
}
.feature[data-tone='share'] .pair { margin-top: 0; }
.pair h3 {
    margin-top: 24px;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.pair p { margin-top: 10px; color: var(--muted); font-size: 1.0625rem; max-width: 32em; }

/* ---------------------------------------------------------------- closing */
.closing {
    padding: clamp(72px, 12vw, 150px) 0 clamp(64px, 10vw, 120px);
    text-align: center;
    background: radial-gradient(50% 60% at 50% 45%, rgba(120, 110, 90, 0.12), transparent 70%);
}
.closing-logo { width: clamp(96px, 14vw, 140px); height: auto; margin: 0 auto; overflow: visible; }
.closing-name {
    margin-top: 20px;
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
}
.closing-line {
    margin-top: 22px;
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    font-weight: 500;
    line-height: 1.35;
}
.closing-line span { color: var(--muted); font-weight: 400; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--edge); color: var(--faint); font-size: 0.9375rem; }
.foot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    padding-bottom: env(safe-area-inset-bottom);
}
.foot nav { display: flex; gap: 20px; }

/* ---------------------------------------------------------------- reveal */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* The closing logo opens and the cat peeks out, as in the film. */
.js .closing .logo-hole { transform-box: fill-box; transform-origin: center; transform: scale(0.4); transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) 0.15s; }
.js .closing .logo-cat { transform: translateY(720px); transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.45s; }
.js .closing .is-visible .logo-hole { transform: none; }
.js .closing .is-visible .logo-cat { transform: none; }

/* ---------------------------------------------------------------- layout */
@media (max-width: 860px) {
    .feature-row,
    .feature-flip .feature-row,
    .pair { grid-template-columns: minmax(0, 1fr); }
    .feature-flip .feature-copy { order: 0; }
    .feature::before,
    .feature-flip::before { background: radial-gradient(70% 45% at 50% 65%, var(--glow), transparent 75%); }
}
@media (max-width: 480px) {
    .top-nav .link { display: none; }
    .brand { font-size: 1.125rem; }
    .actions .button { flex: 1 1 100%; }
    .shot { border-radius: 10px; padding-top: 18px; }
    .shot::before { top: 6px; left: 10px; }
    .foot-row { flex-direction: column; justify-content: center; padding-top: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal,
    .js .hero .oneliner,
    .js .hero .actions,
    .js .closing .logo-hole,
    .js .closing .logo-cat { opacity: 1; transform: none; transition: none; animation: none; }
    .lightbox[open],
    .lightbox[open] .lightbox-frame { animation: none; }
    .ch.caret::after { animation: none; }
}
