@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

/* ============================================
   Context Bank — Marketing Website
   ============================================
   1. Custom Properties
   2. Reset / Base
   3. Typography
   4. Layout
   5. Phone Frame Component
   6. App Store Badge
   7. Hero
   8. Feature Blocks
   9. Screenshots (within feature block)
   10. Feedback Page
   11. CTA
   12. Footer
   13. Privacy Page
   14. Animations
   15. Media Queries
   ============================================ */

/* ----- 1. Custom Properties ----- */

:root {
    --color-bg: #0D0D0F;
    --color-bg-elevated: #141416;
    --color-bg-card: #1A1A1E;
    --color-text: #E4E4E8;
    --color-text-muted: rgba(228, 228, 232, 0.6);
    --color-text-faint: rgba(228, 228, 232, 0.28);
    --color-border: rgba(255, 255, 255, 0.06);

    /* App accent colors — from ColorPalette.swift */
    --color-coral: #EF4D55;
    --color-gold: #FF8E3D;
    --color-green: #4ED45A;
    --color-blue: #5B52FF;
    --color-purple: #F070D0;
    --color-teal: #3BAFB9;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'SF Pro Text', system-ui, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Courier Prime', 'Courier New', Courier, monospace;

    /* Spacing */
    --section-padding: clamp(64px, 10vw, 120px);
    --container-max: 1080px;
    --container-padding: clamp(20px, 5vw, 40px);

    /* Phone mockup */
    --phone-width: 260px;
    --phone-height: 563px;
    --phone-radius: 40px;
    --phone-bezel: 8px;
}

/* ----- 2. Reset / Base ----- */

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

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    color: var(--color-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ----- 3. Typography ----- */

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 400;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.hero-headline {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

.hero-subheadline {
    font-size: clamp(1.0625rem, 2vw, 1.375rem);
    font-weight: 400;
    color: var(--color-text-muted);
    line-height: 1.5;
    max-width: 480px;
    margin-top: 20px;
}

.section-heading {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    text-align: left;
    margin-bottom: clamp(32px, 5vw, 56px);
}

/* Mono accent — used for labels, captions, small mechanical text */
.mono {
    font-family: var(--font-mono);
}

/* ----- 4. Layout ----- */

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

.container--narrow {
    max-width: 720px;
}

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

/* ----- 5. Phone Frame Component ----- */

.phone-frame {
    width: var(--phone-width);
    height: var(--phone-height);
    border-radius: var(--phone-radius);
    padding: var(--phone-bezel);
    background: #1a1a1a;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 3px #0D0D0F;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 25px;
    background: #000;
    border-radius: 20px;
    z-index: 10;
}

.phone-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--phone-radius) - var(--phone-bezel));
}

/* ----- 6. App Store Badge / Coming Soon ----- */

.coming-soon {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--color-text-faint);
    margin-top: 28px;
    letter-spacing: 0.02em;
}

.app-store-badge {
    display: inline-block;
    margin-top: 28px;
    transition: opacity 0.2s ease;
}

.app-store-badge:hover {
    opacity: 0.8;
    text-decoration: none;
}

.app-store-badge svg {
    height: 52px;
    width: auto;
}

/* ----- 7. Hero ----- */

.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    padding: 80px var(--container-padding) 80px;
    max-width: var(--container-max);
    margin: 0 auto;
    gap: 48px;
    position: relative;
}

.hero-content {
    max-width: 600px;
}

.hero-subheadline {
    margin-left: 0;
    margin-right: 0;
}

.phone-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(
        ellipse at center,
        rgba(239, 77, 85, 0.12) 0%,
        rgba(255, 142, 61, 0.06) 40%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    animation: glow-pulse 4s ease-in-out infinite alternate;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow-pulse {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Hero entrance animation */
.hero-animate {
    animation: hero-enter 1s ease-out both;
}

.hero-device {
    position: relative;
    animation: hero-enter 1s ease-out 0.2s both, float 6s ease-in-out 1.2s infinite;
}

@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text-faint);
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 0.8; }
}

/* ----- 8. Pitch ----- */

.pitch {
    padding: clamp(48px, 8vw, 80px) 0;
    background-color: var(--color-bg-elevated);
}

.pitch-lines {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2.5vw, 24px);
}

.pitch-line {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 500;
    color: var(--color-text-muted);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* ----- 10. Feedback Page ----- */

.feedback-page {
    background-color: var(--color-bg);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.feedback-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(48px, 10vw, 100px) var(--container-padding);
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.feedback-shell > .back-link {
    margin-bottom: clamp(56px, 10vw, 80px);
}

.feedback-card {
    width: 100%;
}

.feedback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(78, 212, 90, 0.1);
    color: var(--color-green);
    margin-bottom: 28px;
}

.feedback-card h1 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.feedback-subtitle {
    font-size: 1.0625rem;
    color: var(--color-text-muted);
    margin-top: 14px;
    line-height: 1.55;
    margin-bottom: clamp(40px, 8vw, 56px);
}

/* Form */
.feedback-form {
    width: 100%;
}

.feedback-form .honeypot {
    display: none;
}

.feedback-field {
    margin-bottom: 28px;
}

.feedback-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.feedback-optional {
    font-weight: 400;
    color: var(--color-text-faint);
    text-transform: none;
    letter-spacing: 0;
    margin-left: 4px;
}

.feedback-form textarea {
    width: 100%;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 160px;
    transition: border-color 0.2s ease;
}

.feedback-form textarea:focus {
    outline: none;
    border-color: var(--color-green);
}

.feedback-form textarea::placeholder {
    color: var(--color-text-faint);
}

.feedback-form input[type="email"] {
    width: 100%;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.feedback-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-green);
}

.feedback-form input[type="email"]::placeholder {
    color: var(--color-text-faint);
}

.feedback-submit {
    width: 100%;
    background: var(--color-green);
    color: #000;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.feedback-submit:hover {
    opacity: 0.9;
}

.feedback-submit:active {
    transform: scale(0.98);
}

.feedback-fine-print {
    font-size: 0.6875rem;
    color: var(--color-text-faint);
    margin-top: clamp(40px, 8vw, 56px);
    line-height: 1.6;
}

/* ----- 11. CTA ----- */

.cta {
    text-align: left;
    padding: clamp(48px, 8vw, 80px) 0 clamp(60px, 10vw, 100px);
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--container-padding);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, var(--color-coral), transparent);
    opacity: 0.4;
}

.cta-headline {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.cta-subheadline {
    font-size: clamp(1.0625rem, 2vw, 1.375rem);
    color: var(--color-text-muted);
    margin-top: 16px;
}

.cta .coming-soon {
    margin-top: 28px;
}

/* ----- 12. Footer ----- */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 32px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.footer-brand {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.footer-colophon {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-faint);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-legal {
    font-size: 0.75rem;
    color: var(--color-text-faint);
}

/* ----- 13. Privacy Page ----- */

.privacy-page {
    background-color: var(--color-bg);
}

.privacy-header {
    padding: clamp(40px, 8vw, 80px) 0 clamp(24px, 4vw, 40px);
}

.privacy-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 24px;
}

.effective-date {
    font-size: 0.875rem;
    color: var(--color-text-faint);
    margin-top: 8px;
}

.back-link {
    font-size: 0.9375rem;
    color: var(--color-blue);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.privacy-content {
    padding-bottom: var(--section-padding);
}

.privacy-content section {
    padding: 0;
    margin-bottom: 32px;
}

.privacy-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.privacy-content p {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.privacy-content a {
    color: var(--color-blue);
}

/* ----- 14. Animations ----- */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger pitch lines */
.pitch-lines .fade-in:nth-child(2) { transition-delay: 0.1s; }
.pitch-lines .fade-in:nth-child(3) { transition-delay: 0.2s; }
.pitch-lines .fade-in:nth-child(4) { transition-delay: 0.3s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-animate {
        animation: none;
        opacity: 1;
    }

    .hero-device {
        animation: none;
        opacity: 1;
    }

    .phone-glow {
        animation: none;
    }

    .scroll-indicator {
        animation: none;
        opacity: 0.5;
    }

    .screenshot-pair .phone-frame--dark,
    .screenshot-pair .phone-frame--light {
        transform: none;
    }

    .step:hover .step-number {
        transform: none;
    }

    [data-parallax] {
        transform: none !important;
    }
}

/* ----- 15. Media Queries ----- */

/* Tablet (768px+) */
@media (min-width: 768px) {
    .hero {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: clamp(40px, 6vw, 80px);
        padding: 0 var(--container-padding);
    }

    .hero-content {
        flex: 1;
    }

    .hero-subheadline {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-device {
        flex: 0 0 auto;
    }

    .footer-content {
        flex-direction: row;
        justify-content: flex-start;
        gap: 24px;
        align-items: baseline;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    :root {
        --phone-width: 300px;
        --phone-height: 650px;
        --phone-radius: 44px;
    }
}
