/* ============================================================
   PairPal Landing Page — Styles
   Premium dark aesthetic, Opal header + Dropset layout DNA
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
    /* Backgrounds */
    --bg-primary: #030303;
    --bg-elevated: #141414;
    --bg-surface: #1A1A1A;

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-tertiary: #6B7280;

    /* Accents */
    --accent-primary: #3B82F6;
    --accent-secondary: #8B5CF6;
    --accent-warm: #F59E0B;

    /* Borders */
    --border-subtle: #1F2937;
    --border-card: rgba(255, 255, 255, 0.06);

    /* Fonts */
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    /* Spacing */
    --section-pad-y: clamp(80px, 10vw, 160px);
    --container-pad: clamp(24px, 5vw, 64px);
    --max-width: 1200px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

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

input {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

/* ---------- GRAIN OVERLAY ---------- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---------- UTILITIES ---------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
}

.section-headline {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    border-radius: 9999px;
    transition: all 0.3s var(--ease-smooth);
    white-space: nowrap;
}

.btn--primary {
    background: var(--accent-primary);
    color: var(--text-primary);
    padding: 14px 32px;
    position: relative;
    overflow: hidden;
}

.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.35);
}

.btn--primary:hover::before {
    opacity: 1;
}

.btn--primary:active {
    transform: translateY(0);
}

/* ============================================================
   HEADER — Opal-inspired sticky pill
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    padding: 24px var(--container-pad);
    pointer-events: none;
}

.header__pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: calc(var(--max-width) - (var(--container-pad) * 2));
    height: 56px;
    padding: 0 8px 0 24px;
    border-radius: 9999px;
    border: 1px solid var(--border-card);
    background: rgba(20, 20, 20, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s var(--ease-smooth);
    pointer-events: auto;
}

.header--scrolled .header__pill {
    background: rgba(20, 20, 20, 0.35);
    border-color: var(--border-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header__logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.header__cta {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 9999px;
    background: var(--accent-primary);
    color: var(--text-primary);
    transition: all 0.3s var(--ease-smooth);
}

.header__cta:hover {
    background: #4B91FF;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    overflow: hidden;
}

.hero__glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse at center,
            rgba(59, 130, 246, 0.12) 0%,
            rgba(139, 92, 246, 0.06) 40%,
            transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.hero__content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    z-index: 1;
}

.hero__headline {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(48px, 10vw, 80px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    opacity: 0;
}

.hero__sub {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 520px;
    opacity: 0;
}

.hero__email-form {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 9999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-card);
    opacity: 0;
}

.hero__email-input {
    min-width: 240px;
    padding: 10px 16px;
    font-size: 16px;
    color: var(--text-primary);
}

.hero__email-input::placeholder {
    color: var(--text-tertiary);
}

.hero__email-btn {
    font-size: 18px;
    padding: 12px 26px;
}

.hero__email-form {
    min-height: 52px;
}

.hero__success {
    font-size: 18px;
    color: var(--accent-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 24px;
}

.hero__phone-wrap {
    position: relative;
    z-index: 1;
    margin-top: 48px;
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
    max-height: none;
}

.hero__phone-img {
    width: 380px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    opacity: 0;
}

/* ============================================================
   APP SHOWCASE — Dropset-inspired floating cards
   ============================================================ */
.showcase {
    padding: var(--section-pad-y) 0;
    position: relative;
}

.showcase__heading {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: clamp(48px, 6vw, 80px);
}

.showcase__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.showcase__phone-col {
    position: relative;
    height: 100%;
}

.showcase__phone-sticky {
    position: sticky;
    top: clamp(96px, 12vh, 140px);
    transform: none;
    display: flex;
    justify-content: center;
}

.showcase__phone-img {
    width: 380px;
    height: auto;
    object-fit: contain;
}

.showcase__cards-col {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding: 80px 0;
}

.showcase__card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 32px;
    max-width: 380px;
    opacity: 0;
    transition: border-color 0.3s var(--ease-smooth);
}

.showcase__card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.showcase__card--left {
    align-self: flex-start;
}

.showcase__card--right {
    align-self: flex-end;
}

.showcase__card-icon {
    font-size: 28px;
    margin-bottom: 16px;
    display: inline-block;
}

.showcase__card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.showcase__card-desc {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* ============================================================
   EMOTIONAL PITCH
   ============================================================ */
.pitch {
    padding: var(--section-pad-y) 0;
    position: relative;
}

.pitch__content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.pitch__lead {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 40px;
    opacity: 0;
}

.pitch__body {
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
    opacity: 0;
}

.pitch__body:last-child {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0;
}

/* ============================================================
   SOCIAL PROOF — Founder Note
   ============================================================ */
.proof {
    padding: var(--section-pad-y) 0;
}

.proof__content {
    display: flex;
    justify-content: center;
}

.proof__card {
    max-width: 640px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: clamp(32px, 5vw, 56px);
    position: relative;
    opacity: 0;
}

.proof__quote-mark {
    font-family: var(--font-display);
    font-size: 80px;
    font-weight: 800;
    line-height: 1;
    color: var(--accent-primary);
    opacity: 0.3;
    position: absolute;
    top: 20px;
    left: 32px;
}

.proof__quote {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
    color: var(--text-primary);
    font-style: normal;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.proof__author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.proof__author-info {
    display: flex;
    flex-direction: column;
}

.proof__author-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.proof__author-role {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how {
    padding: var(--section-pad-y) 0;
}

.how__headline {
    text-align: center;
    margin-bottom: clamp(48px, 6vw, 80px);
}

.how__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.how__step {
    background: var(--bg-elevated);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 40px 32px;
    opacity: 0;
    transition: border-color 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

.how__step:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.how__step-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 48px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 24px;
    line-height: 1;
}

.how__step-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.how__step-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.cta {
    padding: var(--section-pad-y) 0;
    position: relative;
    overflow: hidden;
}

.cta__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at center,
            rgba(59, 130, 246, 0.1) 0%,
            rgba(139, 92, 246, 0.05) 40%,
            transparent 70%);
    filter: blur(80px);
    pointer-events: none;
}

.cta__content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.cta__headline {
    margin-bottom: 4px;
}

.cta__sub {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.cta__form {
    width: 100%;
    max-width: 480px;
}

.cta__form-row {
    display: flex;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-card);
    border-radius: 9999px;
    padding: 6px;
    transition: border-color 0.3s var(--ease-smooth);
}

.cta__form-row:focus-within {
    border-color: rgba(59, 130, 246, 0.4);
}

.cta__input {
    flex: 1;
    min-width: 0;
    padding: 12px 20px;
    font-size: 16px;
    color: var(--text-primary);
    background: transparent;
}

.cta__input::placeholder {
    color: var(--text-tertiary);
}

.cta__btn {
    padding: 12px 28px;
    font-size: 15px;
    flex-shrink: 0;
}

.cta__btn-loading {
    display: none;
}

.cta__btn.is-loading .cta__btn-text {
    visibility: hidden;
}

.cta__btn.is-loading .cta__btn-loading {
    display: flex;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Loading dots */
.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.3;
}

/* Hero button loading state */
.hero__email-btn {
    position: relative;
    overflow: hidden;
}

.hero__email-btn.is-loading {
    pointer-events: none;
}

.hero__btn-dots {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hero__email-btn.is-loading .hero__btn-dots {
    display: flex;
}

.cta__fine-print {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

.cta__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cta__success[hidden] {
    display: none !important;
}

.cta__success-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: 700;
}

.cta__success-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-card);
}

.footer__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer__brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.footer__copy {
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer__links {
    display: flex;
    gap: 24px;
}

.footer__link {
    font-size: 13px;
    color: var(--text-tertiary);
    transition: color 0.2s var(--ease-smooth);
}

.footer__link:hover {
    color: var(--text-secondary);
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 1024px) {
    .showcase__layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .showcase__phone-col {
        display: flex;
        justify-content: center;
    }

    .showcase__phone-sticky {
        position: relative;
        top: auto;
        transform: none;
    }

    .showcase__phone-img {
        width: 300px;
    }

    .showcase__cards-col {
        padding: 0;
        align-items: center;
    }

    .showcase__card--left,
    .showcase__card--right {
        align-self: center;
    }

    .how__grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 640px) {
    .header {
        padding: 12px 16px;
    }

    .header__pill {
        max-width: 100%;
        height: 48px;
        padding: 0 6px 0 12px;
        gap: 8px;
    }

    .header__logo {
        font-size: 17px;
    }

    .header__cta {
        font-size: 13px;
        padding: 8px 16px;
    }

    .hero {
        padding-top: 80px;
        min-height: calc(100vh - 20px);
    }

    .hero__phone-wrap {
        margin-top: 32px;
        max-height: none;
    }

    .hero__phone-img {
        width: 80vw;
        max-width: none;
    }

    .hero__email-form {
        width: 100%;
        max-width: 360px;
        flex-direction: column;
        border-radius: 20px;
        padding: 4px;
    }

    .hero__email-input {
        min-width: 0;
        width: 100%;
        padding: 14px 18px;
        text-align: center;
    }

    .hero__email-btn {
        width: 100%;
        font-size: 16px;
        padding: 14px 24px;
    }

    .showcase__phone-col {
        width: 100%;
        margin-left: 0;
    }

    .showcase__phone-img {
        width: 80vw;
        max-width: none;
    }

    .showcase__cards-col {
        width: 100%;
    }

    .showcase__card {
        width: 100%;
        padding: 24px;
        max-width: 100%;
    }

    .pitch__content {
        text-align: left;
    }

    .proof__card {
        padding: 28px;
    }

    .proof__quote-mark {
        font-size: 56px;
        top: 12px;
        left: 20px;
    }

    .cta__form-row {
        flex-direction: column;
        border-radius: 20px;
        padding: 4px;
    }

    .cta__input {
        padding: 14px 18px;
        text-align: center;
    }

    .cta__btn {
        width: 100%;
        padding: 14px 24px;
    }

    .footer__content {
        flex-direction: column;
        text-align: center;
    }
}