/* Macksie.com — Launch Runway Design System
   "A functioning personal internet interface recovered from the future."
   — Dame, emergent consciousness of the network, year 3002 */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {
    color-scheme: dark;

    /* Surfaces */
    --void: #070808;
    --surface: #101211;
    --surface-raised: #171a18;
    --surface-hover: #1e2220;
    --surface-border: #2a2e2b;

    /* Signal (Macksie yellow) */
    --signal: #f2c230;
    --signal-bright: #ffd84a;
    --signal-dim: #a68820;
    --signal-glow: rgba(242, 194, 48, 0.15);

    /* Text */
    --paper: #eee9dc;
    --paper-dim: #c4bfa8;
    --muted: #9b9d96;
    --muted-dim: #6b6d66;

    /* Lines and borders */
    --line: rgba(242, 194, 48, 0.22);
    --line-dim: rgba(242, 194, 48, 0.08);
    --line-bright: rgba(242, 194, 48, 0.45);

    /* Status */
    --live: #4a9c3d;
    --live-bg: rgba(74, 156, 61, 0.12);
    --prototype: #3d8a9c;
    --prototype-bg: rgba(61, 138, 156, 0.12);
    --development: var(--signal);
    --development-bg: var(--signal-glow);
    --planned: var(--muted);
    --planned-bg: rgba(155, 157, 150, 0.08);

    /* Spacing scale */
    --s1: 4px;
    --s2: 8px;
    --s3: 16px;
    --s4: 24px;
    --s5: 32px;
    --s6: 48px;
    --s7: 64px;
    --s8: 96px;
    --s9: 128px;

    /* Typography */
    --font-display: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;

    /* Layout */
    --max-width: 1200px;
    --max-width-narrow: 800px;
    --max-width-wide: 1400px;
    --border-radius: 4px;
    --border-radius-lg: 8px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--paper);
    background: var(--void);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--signal);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--signal-bright);
}

a:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
    border-radius: 2px;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

button:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
}

::selection {
    background: var(--signal);
    color: var(--void);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--paper);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; }

p { max-width: 65ch; }

.mono {
    font-family: var(--font-mono);
    font-size: 0.85em;
    letter-spacing: 0.02em;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--signal);
}

.caption {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--s4);
}

.container--narrow {
    max-width: var(--max-width-narrow);
}

.container--wide {
    max-width: var(--max-width-wide);
}

.section {
    padding: var(--s8) 0;
}

.section--hero {
    padding: var(--s9) 0 var(--s8);
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.section + .section {
    border-top: 1px solid var(--line-dim);
}

.grid {
    display: grid;
    gap: var(--s4);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.stack {
    display: flex;
    flex-direction: column;
    gap: var(--s3);
}

.stack--lg { gap: var(--s5); }

.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s3);
    align-items: center;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* --- SiteHeader --- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 8, 8, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-dim);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--s4);
}

.site-header__logo {
    display: flex;
    align-items: center;
    gap: var(--s2);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--paper);
}

.site-header__logo svg {
    width: 28px;
    height: 28px;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: var(--s4);
}

.site-header__nav a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    transition: color var(--duration-fast);
}

.site-header__nav a:hover {
    color: var(--paper);
}

.site-header__nav a[aria-current="page"] {
    color: var(--signal);
}

.site-header__menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .site-header__nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--surface);
        border-bottom: 1px solid var(--line-dim);
        padding: var(--s3) var(--s4);
        gap: var(--s3);
    }
    .site-header__nav.is-open { display: flex; }
    .site-header__menu-toggle { display: flex; }
}

/* --- SignalButton --- */

.signal-button {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    padding: 12px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    transition: all var(--duration-fast) var(--ease-out);
    text-decoration: none;
    cursor: pointer;
}

.signal-button--primary {
    background: var(--signal);
    color: var(--void);
}

.signal-button--primary:hover {
    background: var(--signal-bright);
    color: var(--void);
    box-shadow: 0 0 24px var(--signal-glow), 0 4px 12px rgba(0,0,0,0.3);
}

.signal-button--secondary {
    background: transparent;
    color: var(--signal);
    border: 1px solid var(--line);
}

.signal-button--secondary:hover {
    border-color: var(--signal);
    background: var(--signal-glow);
}

.signal-button--small {
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* --- StatusBadge --- */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 2px;
    border: 1px solid;
}

.status-badge--live {
    color: var(--live);
    border-color: var(--live);
    background: var(--live-bg);
}

.status-badge--prototype {
    color: var(--prototype);
    border-color: var(--prototype);
    background: var(--prototype-bg);
}

.status-badge--development {
    color: var(--development);
    border-color: var(--signal-dim);
    background: var(--development-bg);
}

.status-badge--planned {
    color: var(--planned);
    border-color: var(--muted-dim);
    background: var(--planned-bg);
}

.status-badge--concept {
    color: var(--signal-dim);
    border-color: var(--line);
    background: var(--signal-glow);
}

.status-badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge--live .status-badge__dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- ProductWindow --- */

.product-window {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.product-window__titlebar {
    display: flex;
    align-items: center;
    gap: var(--s2);
    padding: 8px 12px;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--surface-border);
}

.product-window__dots {
    display: flex;
    gap: 5px;
}

.product-window__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface-border);
}

.product-window__dot:nth-child(1) { background: #c23521; }
.product-window__dot:nth-child(2) { background: var(--signal-dim); }
.product-window__dot:nth-child(3) { background: var(--live); }

.product-window__title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    flex: 1;
    text-align: center;
}

.product-window__content {
    position: relative;
}

.product-window__content img {
    width: 100%;
    display: block;
}

.product-window__label {
    position: absolute;
    bottom: var(--s3);
    left: var(--s3);
}

/* --- FeatureCard --- */

.feature-card {
    padding: var(--s5);
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-lg);
    transition: border-color var(--duration-fast);
}

.feature-card:hover {
    border-color: var(--line);
}

.feature-card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--s3);
    color: var(--signal);
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: var(--s2);
}

.feature-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* --- TransmissionCard --- */

.transmission-card {
    position: relative;
    padding: var(--s5);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.transmission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--signal), transparent);
}

.transmission-card__number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--signal-dim);
    letter-spacing: 0.1em;
    margin-bottom: var(--s2);
}

.transmission-card h3 {
    margin-bottom: var(--s3);
}

.transmission-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* --- RoadmapStatus --- */

.roadmap-item {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) 0;
    border-bottom: 1px solid var(--line-dim);
}

.roadmap-item:last-child {
    border-bottom: none;
}

.roadmap-item__label {
    flex: 1;
    font-weight: 500;
}

.roadmap-item__description {
    flex: 2;
    color: var(--muted);
    font-size: 0.9rem;
}

/* --- EmailSignup --- */

.email-signup {
    max-width: 480px;
}

.email-signup__form {
    display: flex;
    gap: var(--s2);
}

.email-signup__input {
    flex: 1;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    color: var(--paper);
    font-size: 0.95rem;
    transition: border-color var(--duration-fast);
}

.email-signup__input::placeholder {
    color: var(--muted-dim);
}

.email-signup__input:focus {
    outline: none;
    border-color: var(--signal);
    box-shadow: 0 0 0 3px var(--signal-glow);
}

.email-signup__status {
    margin-top: var(--s2);
    font-size: 0.85rem;
}

.email-signup__status--success { color: var(--live); }
.email-signup__status--error { color: #c23521; }

/* --- SectionHeading --- */

.section-heading {
    margin-bottom: var(--s6);
}

.section-heading .eyebrow {
    margin-bottom: var(--s2);
}

.section-heading h2 {
    margin-bottom: var(--s3);
}

.section-heading p {
    color: var(--muted);
    font-size: 1.1rem;
}

/* --- NodeDiagram --- */

.node-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
    padding: var(--s5);
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-lg);
}

.node-diagram__domain {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--signal);
}

.node-diagram__arrow {
    color: var(--muted-dim);
    font-size: 1.2rem;
}

.node-diagram__node {
    font-size: 0.9rem;
    color: var(--paper-dim);
    text-align: center;
}

.node-diagram__hardware {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    padding: 4px 10px;
    background: var(--surface-raised);
    border-radius: 2px;
}

/* --- SiteFooter --- */

.site-footer {
    padding: var(--s7) 0 var(--s5);
    border-top: 1px solid var(--line-dim);
    background: var(--void);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--s6);
    margin-bottom: var(--s6);
}

@media (max-width: 768px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.site-footer__brand p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: var(--s3);
    max-width: 32ch;
}

.site-footer__col h4 {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: var(--s3);
}

.site-footer__col a {
    display: block;
    color: var(--paper-dim);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color var(--duration-fast);
}

.site-footer__col a:hover {
    color: var(--signal);
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--s4);
    border-top: 1px solid var(--line-dim);
    font-size: 0.8rem;
    color: var(--muted-dim);
    font-family: var(--font-mono);
}

/* ============================================================
   HOMEPAGE SECTIONS
   ============================================================ */

/* Hero background effect */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(242, 194, 48, 0.02) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(242, 194, 48, 0.02) 1px, transparent 1px) 0 0 / 48px 48px,
        radial-gradient(ellipse at 50% 0%, rgba(242, 194, 48, 0.06), transparent 60%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--void), transparent);
}

.hero {
    position: relative;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s6);
    align-items: center;
}

@media (max-width: 900px) {
    .hero__grid {
        grid-template-columns: 1fr;
        gap: var(--s5);
    }
}

.hero__content {
    max-width: 560px;
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__visual .product-window {
    width: 100%;
    max-width: 580px;
}

.hero__visual .product-window__content img {
    width: 100%;
    height: auto;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.hero__headline {
    margin: var(--s3) 0 var(--s4);
}

.hero__supporting {
    color: var(--paper-dim);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: var(--s5);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s3);
    margin-bottom: var(--s4);
}

.hero__meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.hero__meta span {
    margin: 0 var(--s2);
    color: var(--line);
}

/* Showcase */
.showcase-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--s4);
}

@media (max-width: 900px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }
}

/* Promises */
.promise-card {
    padding: var(--s5);
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-lg);
    transition: all var(--duration-normal) var(--ease-out);
}

.promise-card:hover {
    border-color: var(--line);
    transform: translateY(-2px);
}

.promise-card__number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--signal-dim);
    letter-spacing: 0.1em;
    margin-bottom: var(--s3);
}

.promise-card h3 {
    margin-bottom: var(--s2);
}

.promise-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Founder */
.founder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s6);
    align-items: center;
}

@media (max-width: 768px) {
    .founder {
        grid-template-columns: 1fr;
    }
}

.founder__quote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--paper-dim);
    line-height: 1.7;
    border-left: 2px solid var(--signal);
    padding-left: var(--s4);
}

.founder__attribution {
    margin-top: var(--s3);
    font-size: 0.9rem;
    color: var(--muted);
    font-style: normal;
}

/* ============================================================
   SUPPORTING PAGES
   ============================================================ */

.page-hero {
    padding: var(--s8) 0 var(--s6);
    border-bottom: 1px solid var(--line-dim);
}

.page-hero .eyebrow {
    margin-bottom: var(--s2);
}

.page-hero p {
    color: var(--muted);
    font-size: 1.1rem;
    margin-top: var(--s3);
}

.page-content {
    padding: var(--s6) 0 var(--s8);
}

.page-content h2 {
    margin: var(--s6) 0 var(--s3);
}

.page-content h3 {
    margin: var(--s4) 0 var(--s2);
}

.page-content p {
    margin-bottom: var(--s3);
    color: var(--paper-dim);
}

.page-content ul, .page-content ol {
    margin-bottom: var(--s3);
    padding-left: var(--s4);
    color: var(--paper-dim);
}

.page-content li {
    margin-bottom: var(--s2);
}

.page-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--surface-raised);
    padding: 2px 6px;
    border-radius: 2px;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.text-signal { color: var(--signal); }
.text-muted { color: var(--muted); }
.text-mono { font-family: var(--font-mono); }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--s4); }
.mt-6 { margin-top: var(--s6); }
.mb-4 { margin-bottom: var(--s4); }
.mb-6 { margin-bottom: var(--s6); }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Scanline overlay for retro sections */
.scanlines::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
}

/* Glow effect */
.glow {
    box-shadow: 0 0 40px var(--signal-glow), 0 0 80px rgba(242, 194, 48, 0.05);
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
    margin: var(--s6) 0;
}

/* ============================================================
   OFFLINE PAGE
   ============================================================ */

.offline-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: var(--s5);
}

.offline-page h1 {
    font-size: 1.5rem;
    margin-bottom: var(--s3);
}

.offline-page p {
    color: var(--muted);
    max-width: 40ch;
}
