/* =================================================================
   corporation1 — Global Stylesheet
   Aesthetic derived from the brand mark: a hairline circle bisected by a
   vertical line, rendered in "bone" on warm espresso-black. The whole site
   is monochrome, austere, and typographically driven (Space Grotesk + Inter)
   — the restraint is the point.
   Structure:
     1. Design tokens
     2. Base / reset
     3. Layout helpers
     4. Ambient light
     5. Navbar
     6. Buttons & pills
     7. Hero
     8. Sections & cards
     9. (see 14: apps, legal pages, contact)
    11. Footer
    12. Animations
    13. Responsive
   ================================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
    --bg:          #0c0a08;   /* warm espresso-black (from the logo)   */
    --bg-2:        #100d0a;   /* very slightly lifted panel base       */
    --bone:        rgba(242, 239, 232, 0.92); /* primary text / lines  */
    --bone-soft:   rgba(242, 239, 232, 0.78);
    --bone-dim:    rgba(242, 239, 232, 0.52);
    --bone-faint:  rgba(242, 239, 232, 0.30);
    --line:        rgba(242, 239, 232, 0.13); /* hairline borders      */
    --line-strong: rgba(242, 239, 232, 0.26);
    --surface:     rgba(242, 239, 232, 0.025);
    --surface-2:   rgba(242, 239, 232, 0.05);
    --radius:      4px;        /* sharp, architectural corners          */
    --maxw:        1120px;
    --display:     "Space Grotesk", system-ui, sans-serif;
    --body:        "Inter", system-ui, -apple-system, sans-serif;
}

/* ---------- 2. Base / reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--body);
    background: var(--bg);
    color: var(--bone-soft);
    line-height: 1.7;
    font-weight: 300;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Faint film-grain / fine grid texture for depth */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(242, 239, 232, 0.022) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

a { color: inherit; text-decoration: none; }
svg { display: block; }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 400;
    color: var(--bone);
    line-height: 1.18;
    letter-spacing: -0.01em;
}
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.15rem; letter-spacing: 0; }

/* The brand mark is an <img> loaded from static/ (see COMPANY["logo"]) */
.mark { display: block; object-fit: contain; }

/* ---------- 3. Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 1;
}

.section { padding: 110px 0; position: relative; z-index: 1; }
.section--top { padding-top: 168px; }
.section--cta { padding-top: 0; }

.section__head { max-width: 680px; margin: 0 auto 64px; text-align: center; }
.section__lead { color: var(--bone-dim); font-size: 1.05rem; margin-top: 18px; }

.eyebrow {
    display: inline-block;
    font-family: var(--display);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--bone-faint);
    margin-bottom: 20px;
}

.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
/* The grid gap is a hairline rule; cards fill cells with the page background. */
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- 4. Ambient light ---------- */
.ambient {
    position: fixed;
    top: -30vh; left: 50%;
    transform: translateX(-50%);
    width: 90vw; height: 70vh;
    background: radial-gradient(ellipse at center, rgba(242, 239, 232, 0.05), transparent 65%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

/* ---------- 5. Navbar ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 22px 0;
    transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    padding: 14px 0;
    background: rgba(12, 10, 8, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.navbar__inner { display: flex; align-items: center; justify-content: space-between; }

.brand {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--display);
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.16em;
    color: var(--bone);
}
.brand__mark { display: inline-flex; }
.brand__name { font-family: var(--display); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
    padding: 8px 16px;
    color: var(--bone-dim);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    transition: color 0.25s ease;
}
.nav-link:hover { color: var(--bone); }
.nav-link.is-active { color: var(--bone); }
.nav-link.is-active::after {
    content: "";
    display: block;
    height: 1px; width: 100%;
    margin-top: 4px;
    background: var(--bone);
}
.nav-cta { margin-left: 12px; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav-toggle span {
    width: 24px; height: 1px;
    background: var(--bone);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. Buttons & pills ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: var(--radius);
    font-family: var(--display);
    font-weight: 400;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--bone);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.btn--small { padding: 9px 18px; font-size: 0.72rem; }
.btn--primary { background: var(--bone); color: var(--bg); border-color: var(--bone); }
.btn--primary:hover { background: transparent; color: var(--bone); transform: translateY(-2px); }
.btn--ghost:hover { border-color: var(--bone); background: var(--surface-2); transform: translateY(-2px); }

.pill {
    display: inline-block;
    padding: 7px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--display);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--bone-dim);
    margin-bottom: 34px;
}

/* ---------- 7. Hero ---------- */
.hero { padding: 190px 0 120px; text-align: center; }
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__mark { margin-bottom: 40px; opacity: 0.95; }
.hero__mark .mark { filter: drop-shadow(0 0 30px rgba(242, 239, 232, 0.12)); }

.hero__title {
    font-family: var(--display);
    font-size: clamp(2.6rem, 7vw, 5rem);
    font-weight: 300;
    letter-spacing: 0.06em;
    margin-bottom: 28px;
}
.hero__subtitle {
    color: var(--bone-dim);
    font-size: 1.1rem;
    max-width: 62ch;
    margin-bottom: 42px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 88px;
    width: 100%;
    max-width: 760px;
    border: 1px solid var(--line);
}
.stat {
    padding: 34px 22px;
    text-align: center;
    border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat__num {
    display: block;
    font-family: var(--display);
    font-size: 2.6rem;
    font-weight: 300;
    color: var(--bone);
    letter-spacing: 0.02em;
}
.stat__label {
    display: block;
    color: var(--bone-faint);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    margin-top: 10px;
}

/* ---------- 8. Sections & cards ---------- */
.card {
    background: var(--bg);
    padding: 44px 36px;
    transition: background 0.3s ease;
    position: relative;
}
.card:hover { background: var(--surface); }
.card__num {
    font-family: var(--display);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--bone-faint);
    display: block;
    margin-bottom: 26px;
}
.card h3 { margin-bottom: 14px; color: var(--bone); }
.card p { color: var(--bone-dim); font-size: 0.98rem; }

/* CTA banner */
.cta-banner {
    border: 1px solid var(--line);
    padding: 60px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    flex-wrap: wrap;
    background:
        radial-gradient(ellipse at top left, rgba(242, 239, 232, 0.04), transparent 60%);
}
.cta-banner__mark { display: block; color: var(--bone); margin-bottom: 22px; opacity: 0.85; }
.cta-banner h2 { margin-bottom: 10px; max-width: 18ch; }
.cta-banner p { color: var(--bone-dim); max-width: 46ch; }

/* ---------- 11. Footer ---------- */
.footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: var(--bg-2);
    position: relative; z-index: 1;
}
.footer__inner {
    display: flex; justify-content: space-between; gap: 40px;
    padding: 64px 28px 40px; flex-wrap: wrap;
}
.footer__brand { display: flex; gap: 16px; align-items: flex-start; }
.footer__brand .brand__name { font-family: var(--display); letter-spacing: 0.14em; color: var(--bone); }
.footer__tag { color: var(--bone-faint); margin-top: 8px; max-width: 34ch; font-size: 0.92rem; }
.footer__links { display: flex; flex-direction: column; gap: 12px; }
.footer__links a {
    color: var(--bone-dim); font-size: 0.86rem; letter-spacing: 0.04em;
    transition: color 0.25s ease;
}
.footer__links a:hover { color: var(--bone); }
.footer__base {
    border-top: 1px solid var(--line);
    text-align: center;
    padding: 24px;
    color: var(--bone-faint);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
}

/* ---------- 12. Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------- 13. Responsive ---------- */
@media (max-width: 900px) {
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 18px 28px 24px;
        background: rgba(12, 10, 8, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--line);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }
    .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .nav-link { padding: 12px 0; }
    .nav-link.is-active::after { display: none; }
    .nav-cta { margin: 10px 0 0; text-align: center; }
}
@media (max-width: 620px) {
    .grid--2, .grid--3 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
    .stat { border-right: 0; border-bottom: 1px solid var(--line); }
    .stat:last-child { border-bottom: 0; }
    .cta-banner { text-align: center; justify-content: center; padding: 44px 28px; }
    .cta-banner__mark { margin-left: auto; margin-right: auto; }
    .footer__inner { flex-direction: column; }
}

/* =================================================================
   14. Apps, app pages, legal pages, contact
   ================================================================= */
.section--tight { padding: 40px 0; }
.section__head--left { text-align: left; margin: 0 0 24px; }

.tag {
    font-family: var(--display);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--bone-faint);
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-block;
}
.tag--live { color: var(--bone); border-color: var(--line-strong); }
.tag--live::before {
    content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: #9fd8a8; margin-right: 8px; vertical-align: 1px;
}
.tag--dev::before {
    content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    border: 1px solid var(--bone-dim); margin-right: 8px; vertical-align: 1px;
}

.link-arrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--display);
    font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--bone-soft);
    transition: gap 0.25s ease, color 0.25s ease;
}
.link-arrow:hover, .card--link:hover .link-arrow { gap: 14px; color: var(--bone); }
.underline { text-decoration: underline; text-underline-offset: 3px; color: var(--bone); }

/* App cards */
.app-card {
    background: var(--bg);
    padding: 40px 36px;
    display: flex; flex-direction: column;
    transition: background 0.3s ease;
}
.app-card:hover { background: var(--surface); }
.app-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.app-card__logo, .app-hero__logo {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    font-family: var(--display); font-size: 1.4rem; color: var(--bone);
}
.app-card h3 { font-size: 1.5rem; margin-bottom: 4px; }
.app-card__tagline { color: var(--bone-faint); font-size: 0.9rem; margin-bottom: 16px; }
.app-card p { color: var(--bone-dim); }
.app-card__foot { margin-top: auto; padding-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.platforms { display: flex; gap: 8px; }
.platform { font-size: 0.78rem; color: var(--bone-faint); border-bottom: 1px solid var(--line); }
.group-title { font-size: 0.82rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bone-dim); margin: 0 0 18px; }
.app-group { margin-bottom: 64px; }
.card--empty { background: var(--bg); }
.card--link { display: flex; flex-direction: column; gap: 4px; }
.card--link p { margin-bottom: 20px; }

/* App detail hero */
.back-link { display: inline-block; color: var(--bone-faint); font-size: 0.85rem; margin-bottom: 36px; }
.back-link:hover { color: var(--bone); }
.app-hero { display: flex; gap: 36px; align-items: flex-start; }
.app-hero__logo { width: 96px; height: 96px; border-radius: 22px; font-size: 2.4rem; flex-shrink: 0; }
.app-hero__title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 300; margin: 18px 0 6px; }
.app-hero__tagline { color: var(--bone-faint); font-size: 1.05rem; margin-bottom: 22px; }
.app-hero__summary { max-width: 60ch; color: var(--bone-dim); font-size: 1.08rem; margin-bottom: 34px; }
.hero__actions--left { justify-content: flex-start; }
.pill--inline { margin: 0; align-self: center; }
.note { color: var(--bone-faint); font-size: 0.92rem; margin-top: 22px; max-width: 70ch; }

/* Long-form pages: privacy policies, support, account deletion */
.prose { max-width: 740px; margin: 0 auto; color: var(--bone-soft); font-weight: 400; }
.prose__crumbs { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 44px; font-size: 0.82rem; letter-spacing: 0.04em; }
.prose__crumbs a { color: var(--bone-faint); padding-bottom: 4px; border-bottom: 1px solid transparent; }
.prose__crumbs a:first-child { color: var(--bone-dim); }
.prose__crumbs a:hover { color: var(--bone); }
.prose__crumbs a.is-active { color: var(--bone); border-bottom-color: var(--bone); }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 300; margin-bottom: 8px; }
.prose h2 { font-size: 1.3rem; margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.02rem; margin: 28px 0 8px; font-weight: 500; }
.prose p, .prose li { margin-bottom: 12px; }
.prose ul, .prose ol { padding-left: 1.3rem; margin-bottom: 16px; }
.prose a { color: var(--bone); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.prose a:hover { text-decoration-color: var(--bone); }
.prose strong { color: var(--bone); font-weight: 500; }
.prose .updated { color: var(--bone-faint); font-size: 0.9rem; margin-bottom: 32px; }
.prose .callout {
    border: 1px solid var(--line); border-left: 2px solid var(--bone);
    background: var(--surface); padding: 20px 24px; margin-bottom: 12px;
}
.prose .callout p:last-child { margin-bottom: 0; }
.prose .path {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px;
}
.prose__footer { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--bone-faint); font-size: 0.86rem; }
.prose__footer a { color: var(--bone-dim); text-decoration: underline; text-underline-offset: 3px; }

/* About page split */
.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; border-top: 1px solid var(--line); padding-top: 48px; }
.split h3 { font-size: 1.6rem; font-weight: 300; }
.split__body p { color: var(--bone-dim); margin-bottom: 18px; font-size: 1.04rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact__info, .contact__form { background: var(--bg); padding: 44px 40px; }
.contact__item { margin-bottom: 34px; }
.contact__item .eyebrow { margin-bottom: 10px; display: block; }
.contact__email { font-family: var(--display); font-size: 1.2rem; color: var(--bone); word-break: break-all; }
.contact__form { display: flex; flex-direction: column; gap: 20px; }
.contact__form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.82rem; letter-spacing: 0.04em; color: var(--bone-dim); }
.contact__form input, .contact__form select, .contact__form textarea {
    font: inherit; font-size: 1rem; color: var(--bone);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 14px; outline: none; transition: border-color 0.2s ease;
}
.contact__form select option { background: var(--bg); }
.contact__form input:focus, .contact__form select:focus, .contact__form textarea:focus { border-color: var(--bone-dim); }
.contact__form .is-invalid { border-color: #d98c7a; }
.contact__form .btn { align-self: flex-start; }
.form-note { font-size: 0.8rem; color: var(--bone-faint); }

/* Footer columns */
.footer__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__head { font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bone-faint); }
.footer__tag a:hover { color: var(--bone); }

@media (max-width: 760px) {
    .split, .contact { grid-template-columns: 1fr; }
    .split { gap: 20px; }
    .app-hero { flex-direction: column; gap: 20px; }
    .contact__info, .contact__form { padding: 32px 22px; }
    .app-card { padding: 32px 24px; }
    .footer__cols { gap: 36px; }
}
@media (max-width: 420px) {
    .container { padding: 0 16px; }
}

/* Founder's note (about page) */
.founder { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0; }
.founder .eyebrow { display: block; margin-bottom: 28px; }
.founder__quote { margin: 0; }
.founder__quote p { font-family: var(--display); font-weight: 300; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.6; color: var(--bone-soft); margin-bottom: 20px; }
.founder__sign { margin-top: 32px; display: flex; flex-direction: column; gap: 4px; }
.founder__name { font-family: var(--display); color: var(--bone); font-size: 1.05rem; letter-spacing: 0.04em; }
.founder__role { color: var(--bone-faint); font-size: 0.85rem; }

/* Idea voting (apps page) */
.ideas__lead { color: var(--bone-dim); margin: -6px 0 22px; }
.tag--idea { border-style: dashed; }
.vote-count { color: var(--bone-faint); font-size: 0.85rem; min-height: 1em; }
.vote-btn[disabled] { opacity: 0.45; cursor: default; }
.vote-btn.is-voted { background: var(--bone); color: var(--bg); border-color: var(--bone); }
.vote-note { margin-top: -40px; margin-bottom: 64px; max-width: 70ch; }
