/* ============================================
   WIP.computer — Manifesto Homepage
   Light mode. Apple aesthetic.
   ============================================ */

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

/* ============================================
   Design Tokens
   ============================================ */
:root {
    --bg: #ffffff;
    --bg-elevated: #f5f5f7;
    --bg-hover: #ebebed;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --border: #d2d2d7;
    --border-subtle: #e8e8ed;

    --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --font-body: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Menlo', 'Monaco', monospace;
    --font-system: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;

    --section-gap: 120px;
    --content-max: 980px;
    --content-narrow: 680px;
    --padding-x: 60px;

    --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-base: 0.3s var(--ease-out);
}

/* ============================================
   Base
   ============================================ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.47;
    color: var(--text);
    background: var(--bg);
    letter-spacing: 0.004em;
}

::selection {
    background: var(--accent);
    color: white;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--accent-hover);
}

/* ============================================
   Top Nav
   ============================================ */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 0;
}

.logo img {
    display: block;
    height: 80px;
    width: 80px;
    border-radius: 0;
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 80px var(--padding-x) 120px;
    padding-top: 100px;
}

main {
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
}

section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.15s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.25s; }
section:nth-child(5) { animation-delay: 0.3s; }
section:nth-child(6) { animation-delay: 0.35s; }
section:nth-child(7) { animation-delay: 0.4s; }
section:nth-child(8) { animation-delay: 0.45s; }
section:nth-child(9) { animation-delay: 0.5s; }
section:nth-child(10) { animation-delay: 0.55s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.025em;
}

h2 {
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.1;
    margin-bottom: 24px;
}

h3 {
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.15;
    margin-bottom: 20px;
}

h4 {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 8px;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.2em;
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: clamp(21px, 2.5vw, 26px);
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: var(--content-narrow);
}

strong {
    color: var(--text);
    font-weight: 600;
}

/* ============================================
   Header
   ============================================ */
header {
    text-align: left;
    margin-bottom: 40px;
    padding-top: 60px;
}

header h1 {
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 20px;
    color: var(--text);
}

.tagline {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 600;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: -0.02em;
}

/* ============================================
   Hero CTAs
   ============================================ */
.hero-ctas {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

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

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* ============================================
   Hero Image (mobile only)
   ============================================ */
.hero-image-mobile {
    display: none;
}

/* ============================================
   Problem Section
   ============================================ */
.problem {
    max-width: var(--content-narrow);
    margin-left: auto;
    margin-right: auto;
}

.problems-list {
    margin: 48px 0 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.problem-item h4 {
    font-family: var(--font-display);
    font-size: 21px;
    color: var(--text);
    margin-bottom: 6px;
}

.problem-item p {
    font-size: 17px;
    line-height: 1.53;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.problem-coda {
    font-size: 19px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ============================================
   Thesis Section
   ============================================ */
.thesis-section {
    max-width: var(--content-narrow);
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Architecture / Three Pillars
   ============================================ */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.pillar {
    display: block;
    background: var(--bg-elevated);
    border-radius: 18px;
    padding: 36px 32px;
    transition: all var(--transition-base);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.pillar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.pillar:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    color: inherit;
}

.pillar:hover::before {
    opacity: 1;
}

.pillar h4 {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 8px;
}

.pillar .pillar-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.pillar p {
    font-size: 16px;
    line-height: 1.53;
    color: var(--text-secondary);
}

.pillar .pillar-detail {
    font-size: 15px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

.pillar code {
    display: block;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-tertiary);
    margin-top: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: 10px;
}

/* ============================================
   Services
   ============================================ */
.services > p {
    max-width: var(--content-narrow);
}

.services-grid {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.service-category h4 {
    font-family: var(--font-system);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.service-item {
    display: block;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: background var(--transition-base);
    text-decoration: none;
    color: inherit;
}

.service-item:hover {
    background: var(--bg-hover);
    color: inherit;
}

.service-item strong {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    display: block;
    margin-bottom: 4px;
}

.service-item span {
    font-size: 15px;
    color: var(--text-secondary);
}

/* ============================================
   Teaching Surface
   ============================================ */
.teaching-surface {
    max-width: var(--content-narrow);
    margin-left: auto;
    margin-right: auto;
}

.teaching-surface .lead {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

/* ============================================
   Lifecycle
   ============================================ */
.lifecycle {
    max-width: var(--content-narrow);
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Fair Creation
   ============================================ */
.fair-creation {
    max-width: var(--content-narrow);
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Founder Quote (standalone closer)
   ============================================ */
.founder-section {
    text-align: center;
    max-width: var(--content-narrow);
    margin-left: auto;
    margin-right: auto;
}

.founder-quote {
    font-family: var(--font-display);
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 12px;
}

.founder-attribution {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ============================================
   Sovereignty
   ============================================ */
.sovereignty {
    max-width: var(--content-narrow);
    margin-left: auto;
    margin-right: auto;
}

blockquote {
    font-family: var(--font-display);
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 500;
    font-style: normal;
    line-height: 1.4;
    color: var(--text);
    margin: 40px 0 0;
    padding: 36px 40px;
    background: var(--bg-elevated);
    border-radius: 16px;
    border-left: 4px solid var(--accent);
}

/* ============================================
   Proof of Life
   ============================================ */
.proof {
    text-align: center;
    max-width: var(--content-narrow);
    margin-left: auto;
    margin-right: auto;
    padding: 48px 0;
}

.proof-line {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.5vw, 21px);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
    font-style: italic;
}

/* ============================================
   Close
   ============================================ */
.close {
    text-align: center;
    padding: 64px 48px;
    background: var(--bg-elevated);
    border-radius: 24px;
}

.close h2 {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 20px;
}

.github-link {
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 500;
    color: var(--accent);
}

.github-link:hover {
    color: var(--accent-hover);
}

.credits {
    font-size: 17px;
    color: var(--text-tertiary);
    margin-top: 16px;
}

/* ============================================
   Footer
   ============================================ */
footer {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-tagline {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

footer p {
    font-family: var(--font-system);
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

footer em {
    font-style: italic;
}

/* ============================================
   Responsive — Tablet
   ============================================ */
@media (max-width: 980px) {
    :root {
        --padding-x: 40px;
        --section-gap: 100px;
    }

    .pillars {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================
   Responsive — Mobile
   ============================================ */
@media (max-width: 600px) {
    :root {
        --padding-x: 24px;
        --section-gap: 80px;
    }

    body {
        font-size: 17px;
    }

    .hero-image-mobile {
        display: block !important;
        width: 100vw;
        height: auto;
        border-radius: 0;
        margin: 0;
        padding: 0;
    }

    .container {
        padding-top: 16px;
        padding-bottom: 80px;
    }

    .logo img {
        height: 60px;
        width: 60px;
    }

    header h1 {
        font-size: 36px;
    }

    header {
        padding-top: 0;
        margin-bottom: 40px;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }

    .pillar {
        padding: 28px 24px;
    }

    .pillar .pillar-name {
        font-size: 21px;
    }

    blockquote {
        padding: 28px 24px;
        font-size: 19px;
    }

    .close {
        padding: 48px 28px;
    }

    .service-item {
        padding: 14px 16px;
    }

    footer {
        margin-top: 60px;
        padding-top: 40px;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    section {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .pillar {
        transition: none;
    }

    .pillar:hover {
        transform: none;
    }
}

/* ============================================
   Print
   ============================================ */
@media print {
    .container {
        max-width: 100%;
        padding: 0;
    }

    section {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
