/* 
  Pre-Beta Club — Landing Page Styles
  Derived from PRD and style.md
*/

:root {
    /* Colors */
    --bg-primary: #F4F1EA;
    /* Warmer, more paper-like background */
    --bg-contrast: #141414;
    /* Deeper black for more drama */
    --accent: #FFCC64;
    --text-primary: #1A1A1A;
    --text-on-dark: #F4F1EA;
    --text-secondary: #5A5A5A;

    /* Typography */
    --font-display: "PP Neue Montreal", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "DM Mono", monospace;

    /* Font Weights */
    --fw-book: 400;
    --fw-medium: 500;
    --fw-bold: 700;

    /* Spacing Grid (8px base) */
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;
    --space-48: 48px;
    --space-64: 64px;
    --space-80: 80px;
    --space-120: 120px;
    --space-160: 160px;
    --space-200: 200px;

    /* Layout */
    --max-width: 1200px;
    --content-width: 720px;
}

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

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

body {
    background-color: var(--bg-primary);
    background-image: url("https://www.transparenttextures.com/patterns/notebook.png");
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    -webkit-tap-highlight-color: rgba(20, 20, 20, 0.12);
}

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

a,
button {
    touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
iframe:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Typography Rules */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    text-wrap: balance;
    line-height: 1.1;
}

p {
    max-width: var(--content-width);
}

.mono {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85em;
}

/* --- Layout Utilities --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-24);
}

.section {
    padding: var(--space-120) 0;
    position: relative;
    overflow: hidden;
}

/* Anchor landing offset for fixed header navigation */
#upcoming,
#community,
#about {
    scroll-margin-top: 96px;
}

.section--dark {
    background-color: var(--bg-contrast);
    color: var(--text-on-dark);
}

.section--dark p {
    color: var(--text-on-dark);
}

/* --- Components --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    min-height: auto;
}

.btn--primary {
    background-color: var(--accent);
    color: var(--bg-contrast);
    border: 1px solid var(--accent);
}

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

.btn--secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
}

.btn--secondary:hover,
.section--dark .btn--secondary:hover {
    background-color: var(--accent);
    color: var(--bg-contrast);
    border-color: var(--accent);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-icon {
    margin-left: 8px;
    display: flex;
    align-items: center;
}

.btn-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Base Hyperlinks */
a:not(.btn):not(.nav-link):not(.logo):not(.footer-bottom a) {
    background: linear-gradient(0deg, var(--accent) 0%, var(--accent) 100%) no-repeat;
    background-size: 100% 20%;
    background-position: 0 90%;
    text-decoration: none;
    color: inherit;
    transition: background-size 0.2s ease;
    padding: 0 2px;
}

a:not(.btn):not(.nav-link):not(.logo):not(.footer-bottom a):hover {
    background-size: 100% 100%;
}

/* --- Specific Sections --- */

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--space-80);
}

/* Hero Scatter */
.hero-scatter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.scatter-item {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    z-index: 10;
}

.scatter-item--sm {
    width: clamp(80px, 10vw, 150px);
}

.scatter-item--xs {
    width: clamp(60px, 8vw, 100px);
    z-index: 5;
}

.scatter-item img {
    width: 100%;
    height: auto;
    mix-blend-mode: multiply;
    filter: sepia(0.2) contrast(1.1);
}

.scatter-annotation {
    font-size: 10px;
    background: var(--accent);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 2px;
    white-space: nowrap;
    box-shadow: 2px 2px 0 var(--text-primary);
}

.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-64);
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-24);
    position: relative;
    z-index: 20;
}

.hero-content-wrapper--centered {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.justify-center {
    justify-content: center;
}

.hero-headline {
    font-size: clamp(48px, 11vw, 110px);
    margin-bottom: var(--space-48);
    letter-spacing: -0.04em;
    font-weight: 800;
    line-height: 0.95;
}

.hero-text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: auto;
    filter: sepia(0.3) contrast(1.1) brightness(0.95);
    mix-blend-mode: multiply;
    transform: rotate(1deg);
}

.hero-subheadline {
    font-size: clamp(20px, 3vw, 24px);
    font-weight: var(--fw-medium);
    margin-bottom: var(--space-48);
    opacity: 0.9;
    max-width: 36ch;
}

.sketch-img,
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.3) contrast(1.05);
    mix-blend-mode: multiply;
}

.sketch-box,
.sketch-avatar {
    border: none;
    background: transparent;
    overflow: hidden;
    position: relative;
}

.hero-ctas {
    display: flex;
    gap: var(--space-16);
    flex-wrap: wrap;
}

/* --- Layout & Grid --- */
.grid {
    display: grid;
    gap: var(--space-48);
}

.grid--3-col {
    grid-template-columns: repeat(3, 1fr);
}

.grid--split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: var(--space-24);
}

/* --- Navigation --- */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(244, 241, 234, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(26, 26, 26, 0.05);
}

.nav {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo span {
    display: block;
    font-size: 10px;
    margin-top: -4px;
    color: var(--text-secondary);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 16px;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    opacity: 0.6;
}

/* --- Premise --- */
.massive-text {
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.2;
    max-width: 900px;
}

.reveal-text span {
    display: inline;
    position: relative;
    padding: 0 4px;
    background: linear-gradient(0deg, var(--accent), var(--accent)) no-repeat;
    background-size: 0% 100%;
    background-position: 0 0;
    transition: background-size 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    background-clip: padding-box;
}

.reveal-text.active span {
    background-size: 100% 100%;
}

/* --- Cards (Paper Stack Style) --- */
.process-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-80);
    max-width: 800px;
    margin: var(--space-80) auto 0;
}

.card {
    padding: var(--space-48);
    border: 1px solid rgba(26, 26, 26, 0.08);
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:nth-child(1) {
    transform: rotate(-1deg);
    z-index: 3;
}

.card:nth-child(2) {
    transform: rotate(1.5deg) translateX(20px);
    z-index: 2;
}

.card:nth-child(3) {
    transform: rotate(-0.5deg) translateX(-10px);
    z-index: 1;
}

.card:hover {
    transform: translateY(-5px) scale(1.02) rotate(0deg);
    z-index: 10;
}

.card-num {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: var(--space-16);
    display: block;
}

.card-title {
    font-size: 24px;
    margin-bottom: var(--space-16);
}

.card-text {
    font-size: 16px;
    color: var(--text-secondary);
}

/* --- Vibe Section --- */
.vibe {
    padding: var(--space-200) 0;
}

.vibe-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-48);
    min-height: 80vh;
    justify-content: center;
}

.vibe-statement {
    font-family: var(--font-display);
    font-size: clamp(48px, 12vw, 160px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: var(--text-on-dark);
    opacity: 0.05;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.vibe-statement.active {
    opacity: 1;
    color: var(--accent);
}

.vibe-ethos {
    margin-top: var(--space-120);
    font-size: clamp(24px, 4vw, 40px);
    color: var(--accent);
    font-weight: var(--fw-medium);
    max-width: 800px;
}

/* --- Luma Custom Event List --- */
.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-32);
    margin-top: var(--space-64);
}

.event-card {
    background-color: #fff;
    border: 1px solid rgba(26, 26, 26, 0.08);
    border-radius: 4px;
    padding: var(--space-32);
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    text-decoration: none;
    color: inherit;
}

.event-card:nth-child(even) {
    transform: rotate(1deg);
}

.event-card:nth-child(odd) {
    transform: rotate(-1deg);
}

.event-card:hover {
    transform: translateY(-8px) scale(1.02) rotate(0deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.event-date {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 14px;
    text-transform: uppercase;
    background: var(--bg-contrast);
    padding: 4px 8px;
    align-self: flex-start;
    border-radius: 2px;
}

.event-title {
    font-size: 24px;
    line-height: 1.1;
    margin: 0;
}

.event-desc {
    font-size: 16px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-status {
    font-size: 14px;
    font-family: var(--font-mono);
    opacity: 0.6;
}

.event-btn {
    background: var(--accent);
    color: var(--bg-contrast);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: var(--fw-bold);
    transition: background 0.2s ease;
}

.event-card:hover .event-btn {
    background: var(--bg-contrast);
    color: var(--accent);
}

/* Loading State */
.event-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-80);
    opacity: 0.5;
}

/* Luma Embed Fallback */
.luma-embed-wrapper {
    grid-column: 1 / -1;
    max-width: 720px;
    margin: 0 auto;
}

/* --- Sketch Aesthetic --- */
.sketch-box {
    aspect-ratio: 4/3;
    border: 2px solid rgba(26, 26, 26, 0.1);
    border-radius: 4px;
    position: relative;
    background-image:
        linear-gradient(rgba(26, 26, 26, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 26, 26, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.pencil-mark {
    position: absolute;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border: 2px solid var(--accent);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: rotate(-5deg);
}

.about-visual {
    display: flex;
    justify-content: flex-end;
    padding-right: var(--space-48);
}

.sketch-avatar {
    width: 240px;
    height: 240px;
    background-color: var(--bg-primary);
    border-radius: 50%;
    /* Match circular photo */
    position: relative;
    overflow: hidden;
    border: 4px solid var(--accent);
    /* Frame it with accent */
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.05);
}

.mb-32 {
    margin-bottom: var(--space-32);
}

.sketch-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sketch-avatar::after {
    display: none;
    /* Remove old pencil circle helper */
}

/* --- Helpers --- */
.label {
    display: inline-block;
    color: var(--text-secondary);
    margin-bottom: var(--space-16);
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-16 {
    margin-bottom: var(--space-16);
}

.mt-24 {
    margin-top: var(--space-24);
}

.mt-80 {
    margin-top: var(--space-80);
}

.border-top {
    border-top: 1px solid rgba(250, 249, 246, 0.1);
}

.pt-32 {
    padding-top: var(--space-32);
}

.link-subtle {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: var(--space-24);
    left: var(--space-24);
    width: auto;
    height: auto;
    background: var(--accent);
    color: var(--bg-contrast);
    padding: 12px 24px;
    z-index: 10000;
}

/* --- Responsive --- */
@media (max-width: 1023px) {
    .section {
        padding: var(--space-64) 0;
    }

    body {
        font-size: 16px;
    }

    .hero {
        height: auto;
        min-height: auto;
        padding-top: calc(var(--space-120) + var(--space-24));
        padding-bottom: var(--space-64);
        display: block;
    }

    .hero-content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-32);
        padding: 0 var(--space-24);
    }

    .hero-ctas {
        width: 100%;
        max-width: 560px;
        justify-content: center;
    }

    .hero-ctas .btn {
        flex: 1 1 220px;
    }

    .grid--3-col,
    .grid--split {
        grid-template-columns: 1fr;
    }

    .vibe-statement {
        opacity: 0.35;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-scatter {
        opacity: 0.65;
    }

    .scatter-item--sm {
        width: clamp(72px, 11vw, 96px);
    }

    .scatter-item--xs {
        display: none;
    }

    .nav {
        height: auto;
        min-height: 80px;
        padding-top: var(--space-16);
        padding-bottom: var(--space-16);
        align-items: flex-start;
        flex-direction: column;
        gap: var(--space-16);
    }

    .nav-links {
        width: 100%;
        gap: var(--space-24);
        flex-wrap: wrap;
    }
}

@media (max-width: 767px) {
    html {
        scroll-padding-top: 120px;
    }

    #upcoming,
    #community,
    #about {
        scroll-margin-top: 120px;
    }

    .container {
        padding: 0 var(--space-16);
    }

    .nav {
        height: auto;
        min-height: 84px;
        padding-top: var(--space-12);
        padding-bottom: var(--space-12);
        align-items: flex-start;
        flex-direction: column;
        gap: var(--space-8);
    }

    .nav-links {
        width: 100%;
        gap: var(--space-16);
        flex-wrap: wrap;
    }

    .nav-link {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
    }

    .hero-headline {
        line-height: 1;
    }

    .hero-subheadline {
        font-size: clamp(18px, 4.5vw, 22px);
    }

    .hero-ctas {
        max-width: 100%;
        gap: var(--space-12);
    }

    .hero-ctas .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .hero-scatter {
        opacity: 0.45;
    }

    .scatter-item--sm {
        width: clamp(64px, 16vw, 92px);
    }

    .scatter-item--xs {
        display: none;
    }

    .process-grid {
        gap: var(--space-32);
        margin-top: var(--space-48);
    }

    .card {
        padding: var(--space-24);
    }

    .card:nth-child(1),
    .card:nth-child(2),
    .card:nth-child(3) {
        transform: none;
    }

    .vibe {
        padding: var(--space-120) 0;
    }

    .vibe-content {
        min-height: auto;
    }

    .vibe-ethos {
        margin-top: var(--space-32);
    }


    .about-visual {
        justify-content: flex-start;
        padding-right: 0;
    }

}

@media (max-width: 374px) {
    .logo {
        font-size: 20px;
    }

    .hero-headline {
        font-size: clamp(40px, 13vw, 56px);
    }

    .label.mono {
        font-size: 0.75em;
    }

}

@media (min-width: 1024px) and (max-width: 1439px) {
    .hero-scatter {
        opacity: 0.85;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    .hero-content-wrapper {
        max-width: 1320px;
    }
}

/* --- Footer Redesign --- */
.footer-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-80);
    padding: var(--space-80) 0 0;
}

.footer-headline {
    font-size: clamp(40px, 8.5vw, 130px);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 0.85;
    text-transform: uppercase;
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: var(--space-64);
    margin-top: var(--space-80);
}

.footer-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.footer-logo.logo {
    font-size: clamp(32px, 5vw, 48px);
}

.opacity-50 {
    opacity: 0.5;
}

.footer a {
    color: var(--accent);
}

@media (max-width: 1023px) {
    .footer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-48);
    }
}

@media (max-width: 767px) {
    .footer-layout {
        gap: var(--space-48);
        padding-top: var(--space-48);
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}