/* ============================================
   Litmus Science — Stylesheet
   A scientific, editorial aesthetic with 
   litmus paper-inspired gradients
   ============================================ */

:root {
    /* Litmus Paper Color Scale - pH inspired */
    --acid-red: #E63946;
    --acid-orange: #F4A261;
    --neutral-yellow: #E9C46A;
    --neutral-green: #8AB17D;
    --base-teal: #2A9D8F;
    --base-blue: #264653;
    
    /* Core palette */
    --primary: #264653;
    --primary-light: #2A9D8F;
    --accent: #E63946;
    --accent-soft: #F4A261;
    
    /* Neutrals */
    --white: #FDFCFB;
    --off-white: #F7F5F3;
    --gray-100: #EDEAE7;
    --gray-200: #D4CFC9;
    --gray-300: #9A9590;
    --gray-400: #6B6560;
    --gray-500: #3D3835;
    --black: #1A1614;
    
    /* Typography */
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'DM Mono', 'SF Mono', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============================================
   Reset & Base
   ============================================ */

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

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-500);
    background: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
    color: var(--black);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button, input, select, textarea {
    font: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) 0;
    background: rgba(253, 252, 251, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.nav.scrolled {
    border-color: var(--gray-100);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-mark {
    width: 28px;
    height: 28px;
    background: linear-gradient(
        135deg,
        var(--acid-red) 0%,
        var(--acid-orange) 25%,
        var(--neutral-yellow) 50%,
        var(--neutral-green) 75%,
        var(--base-teal) 100%
    );
    border-radius: 4px;
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--black);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--black);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}

.btn-nav {
    background: var(--gray-100);
    color: var(--gray-500);
}

.btn-nav:hover {
    background: var(--gray-200);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: var(--space-md) var(--space-xl);
}

.btn-primary:hover {
    background: var(--base-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 70, 83, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
    padding: var(--space-md) var(--space-xl);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
}

.btn-large {
    padding: var(--space-md) var(--space-2xl);
    font-size: 1rem;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(80px + var(--space-4xl)) var(--space-lg) var(--space-4xl);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--acid-red);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--neutral-yellow);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--base-teal);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

.hero-content {
    max-width: 720px;
    animation: fadeUp 1s var(--ease-out) both;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: var(--space-xl);
    animation: fadeUp 1s var(--ease-out) 0.1s both;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--base-teal);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
    animation: fadeUp 1s var(--ease-out) 0.2s both;
}

.title-accent {
    background: linear-gradient(
        135deg,
        var(--acid-red),
        var(--base-teal)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-400);
    max-width: 540px;
    margin-bottom: var(--space-2xl);
    animation: fadeUp 1s var(--ease-out) 0.3s both;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
    animation: fadeUp 1s var(--ease-out) 0.4s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    animation: fadeUp 1s var(--ease-out) 0.5s both;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-300);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--gray-200);
}

/* Litmus Strip Visual */
.hero-visual {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    animation: fadeUp 1s var(--ease-out) 0.6s both;
}

.litmus-strip {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.strip-segment {
    width: 120px;
    height: 40px;
    border-radius: 4px;
    animation: colorShift 6s ease-in-out infinite;
    animation-delay: calc(var(--delay) * 0.3s);
}

.strip-segment:nth-child(1) { background: var(--acid-red); }
.strip-segment:nth-child(2) { background: var(--acid-orange); }
.strip-segment:nth-child(3) { background: var(--neutral-yellow); }
.strip-segment:nth-child(4) { background: #C5D86D; }
.strip-segment:nth-child(5) { background: var(--neutral-green); }
.strip-segment:nth-child(6) { background: var(--base-teal); }
.strip-segment:nth-child(7) { background: var(--base-blue); }

@keyframes colorShift {
    0%, 100% { opacity: 0.9; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.02); }
}

/* ============================================
   Section Styles
   ============================================ */

.section-header {
    margin-bottom: var(--space-3xl);
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--base-teal);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.02em;
}

/* ============================================
   Problem Section
   ============================================ */

.problem {
    padding: var(--space-4xl) 0;
    background: var(--off-white);
}

.problem-lead {
    font-size: 1.35rem;
    color: var(--gray-400);
    max-width: 700px;
    margin-bottom: var(--space-3xl);
}

.problem-lead em {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--black);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.problem-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    padding: var(--space-xl);
    border-radius: 12px;
    border: 1px solid var(--gray-100);
    transition: all 0.3s var(--ease-out);
}

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

.problem-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 10px;
    margin-bottom: var(--space-lg);
}

.problem-icon svg {
    width: 24px;
    height: 24px;
    color: var(--gray-400);
}

.problem-card h3 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.problem-card p {
    font-size: 0.95rem;
    color: var(--gray-400);
    margin-bottom: var(--space-lg);
}

.problem-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-xs) var(--space-sm);
    background: var(--acid-red);
    color: var(--white);
    border-radius: 4px;
    opacity: 0.9;
    margin-top: auto;
}

/* ============================================
   How It Works
   ============================================ */

.how-it-works {
    padding: var(--space-4xl) 0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-4xl);
}

.step {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.step-number {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 500;
    color: var(--gray-100);
    line-height: 1;
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.step-content p {
    color: var(--gray-400);
    max-width: 400px;
}

.step-visual {
    justify-self: end;
}

/* Code Block Visual */
.code-block {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: var(--base-blue);
    color: var(--gray-200);
    padding: var(--space-xl);
    border-radius: 12px;
    min-width: 320px;
}

.code-comment {
    display: block;
    color: var(--gray-300);
    margin-bottom: var(--space-sm);
}

.code-line {
    display: block;
    margin-bottom: var(--space-xs);
}

.code-key {
    color: var(--base-teal);
}

/* Request Preview Visual */
.request-preview {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    min-width: 280px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
}

.request-type {
    font-weight: 500;
    color: var(--black);
}

.request-price {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--base-teal);
}

.request-body {
    padding: var(--space-lg);
}

.request-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.request-row:last-child {
    margin-bottom: 0;
}

.request-label {
    font-size: 0.85rem;
    color: var(--gray-300);
}

.request-value {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* Result Preview Visual */
.result-preview {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: var(--space-lg);
    min-width: 260px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.result-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--base-teal);
    margin-bottom: var(--space-lg);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--base-teal);
    border-radius: 50%;
}

.result-data {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--gray-100);
}

.result-label {
    font-size: 0.85rem;
    color: var(--gray-300);
}

.result-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--black);
}

.result-meta {
    font-size: 0.8rem;
    color: var(--gray-300);
}

/* ============================================
   Operators Section
   ============================================ */

.operators {
    padding: var(--space-4xl) 0;
    background: var(--base-blue);
    color: var(--white);
}

.operators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.operators .section-tag {
    color: var(--base-teal);
}

.operators .section-title {
    color: var(--white);
}

.operators-lead {
    font-size: 1.1rem;
    color: var(--gray-200);
    margin-bottom: var(--space-xl);
}

.operators-benefits {
    list-style: none;
    margin-bottom: var(--space-2xl);
}

.operators-benefits li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    color: var(--gray-200);
}

.benefit-check {
    color: var(--base-teal);
    font-weight: 600;
}

.operators .btn-primary {
    background: var(--base-teal);
}

.operators .btn-primary:hover {
    background: var(--neutral-green);
}

.operators-requirements {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: var(--space-2xl);
}

.operators-requirements h4 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-300);
    margin-bottom: var(--space-xl);
}

.requirement {
    margin-bottom: var(--space-xl);
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement strong {
    display: block;
    color: var(--white);
    margin-bottom: var(--space-xs);
}

.requirement p {
    font-size: 0.9rem;
    color: var(--gray-300);
}

/* ============================================
   Open Science Section
   ============================================ */

.open-science {
    padding: var(--space-4xl) 0;
    background: var(--off-white);
}

.open-science-content {
    max-width: 900px;
}

.open-science p {
    font-size: 1.15rem;
    color: var(--gray-400);
    margin-bottom: var(--space-3xl);
}

.privacy-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.privacy-option {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: var(--space-xl);
    transition: all 0.3s var(--ease-out);
}

.privacy-option:hover {
    border-color: var(--base-teal);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.privacy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.privacy-header h4 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
}

.privacy-price {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--base-teal);
}

.privacy-option p {
    font-size: 0.9rem;
    color: var(--gray-400);
    margin-bottom: 0;
}

/* ============================================
   Trust Section
   ============================================ */

.trust {
    padding: var(--space-4xl) 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.trust-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: var(--space-xl);
    transition: all 0.3s var(--ease-out);
    border-color: var(--base-teal);
}

.trust-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.trust-item h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--black);
}

.trust-item p {
    font-size: 0.95rem;
    color: var(--gray-400);
    line-height: 1.6;
}

/* ============================================
   Waitlist Section
   ============================================ */

.waitlist {
    padding: var(--space-4xl) 0;
    background: linear-gradient(
        135deg,
        var(--base-blue) 0%,
        #1a3a47 100%
    );
    text-align: center;
}

.waitlist-content {
    max-width: 560px;
    margin: 0 auto;
}

.waitlist h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    color: var(--white);
    margin-bottom: var(--space-md);
}

.waitlist > .container > .waitlist-content > p {
    color: var(--gray-200);
    margin-bottom: var(--space-2xl);
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

.waitlist-form input,
.waitlist-form select {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1rem;
}

.waitlist-form input::placeholder {
    color: var(--gray-300);
}

.waitlist-form select {
    cursor: pointer;
}

.waitlist-form select option {
    background: var(--base-blue);
    color: var(--white);
}

.waitlist-form .btn {
    width: 100%;
}

.waitlist-note {
    font-size: 0.85rem;
    color: var(--gray-300);
    margin-top: var(--space-md);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: var(--space-4xl) 0 var(--space-2xl);
    background: var(--black);
    color: var(--gray-300);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-3xl);
    padding-bottom: var(--space-3xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand p {
    margin-top: var(--space-md);
    font-size: 0.9rem;
}

.footer-links h5 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    margin-bottom: var(--space-lg);
}

.footer-links a {
    display: block;
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    transition: color 0.2s ease;
}

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

.footer .logo-mark {
    width: 24px;
    height: 24px;
}

.footer .logo-text {
    color: var(--white);
    font-size: 1.25rem;
}

.footer-bottom {
    padding-top: var(--space-2xl);
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-400);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .hero-visual {
        display: none;
    }
    
    .step {
        grid-template-columns: auto 1fr;
    }
    
    .step-visual {
        display: none;
    }
    
    .operators-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-stats {
        flex-wrap: wrap;
    }
    
    .stat-divider {
        display: none;
    }
    
    .privacy-options {
        grid-template-columns: 1fr;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .step {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .step-number {
        font-size: 2.5rem;
    }
}

/* ============================================
   Animations on Scroll
   ============================================ */

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

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