/* ============================================
   P9R.XYZ — Playful Coastal Tech Journal
   Colors: #1A2830, #3A4850, #6090A0, #D0B898,
           #F8F4EE, #FEFCF8, #284050, #D08868
   Fonts: Lora, Space Grotesk
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    color: #3A4850;
    background-color: #F8F4EE;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Lora', Georgia, serif;
    color: #1A2830;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 500;
}

p {
    margin-bottom: 1.2em;
    color: #3A4850;
}

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

.tech-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6090A0;
}

/* --- Parallax Sections --- */
.parallax-section {
    position: relative;
    min-height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.parallax-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.parallax-fg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    pointer-events: none;
    will-change: transform;
}

.circuit-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    background-color: #F8F4EE;
    text-align: center;
    flex-direction: column;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-overline {
    display: inline-block;
    padding: 0.4em 1.2em;
    border: 1px solid #6090A0;
    border-radius: 2px;
    opacity: 0;
    animation: fadeRevealUp 600ms 300ms forwards;
}

.hero-title {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 700;
    color: #1A2830;
    letter-spacing: 0.04em;
    opacity: 0;
    animation: fadeRevealUp 700ms 500ms forwards;
}

.hero-subtitle {
    font-family: 'Lora', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #3A4850;
    max-width: 600px;
    line-height: 1.9;
    opacity: 0;
    animation: fadeRevealUp 700ms 750ms forwards;
}

.hero-wave-divider {
    width: 100%;
    max-width: 500px;
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeRevealUp 600ms 1000ms forwards;
}

.hero-wave-divider svg {
    width: 100%;
    height: 40px;
    display: block;
}

.fg-wave {
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, rgba(208, 184, 152, 0.12), transparent);
}

/* --- About Section --- */
.about-section {
    background-color: #FEFCF8;
}

.section-inner {
    width: 100%;
}

.section-heading {
    margin-top: 0.8rem;
    margin-bottom: 2.5rem;
}

.content-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* --- Features Section --- */
.features-section {
    background-color: #F8F4EE;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.feature-card .tech-label {
    display: block;
    margin-bottom: 0.8rem;
}

.card-title {
    margin-bottom: 1rem;
    color: #1A2830;
}

.card-text {
    color: #3A4850;
    font-size: 0.95rem;
}

.card-circuit-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #6090A0, transparent);
    opacity: 0;
    transition: opacity 400ms ease;
}

.feature-card:hover .card-circuit-accent {
    opacity: 0.25;
}

/* --- Leather-Texture Panels --- */
.leather-panel {
    background-color: #FEFCF8;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(140, 100, 60, 0.03),
            rgba(140, 100, 60, 0.03) 1px,
            transparent 1px,
            transparent 4px
        );
    border: 1px solid rgba(208, 184, 152, 0.3);
    transition: border-color 400ms ease, box-shadow 400ms ease;
}

.leather-panel:hover {
    border-color: rgba(208, 184, 152, 0.55);
    box-shadow: 0 4px 24px rgba(26, 40, 48, 0.06);
}

/* --- Journal Section --- */
.journal-section {
    background-color: #284050;
    min-height: 80vh;
}

.journal-section .section-heading {
    color: #F8F4EE;
}

.journal-section .tech-label {
    color: #6090A0;
}

.parallax-bg-deep {
    background-color: #1A2830;
}

.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2.5rem;
}

.journal-entry {
    padding: 2.5rem;
    border-radius: 4px;
    background-color: rgba(254, 252, 248, 0.04);
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(140, 100, 60, 0.02),
            rgba(140, 100, 60, 0.02) 1px,
            transparent 1px,
            transparent 4px
        );
    border: 1px solid rgba(96, 144, 160, 0.12);
    transition: border-color 400ms ease, background-color 400ms ease;
}

.journal-entry:hover {
    border-color: rgba(96, 144, 160, 0.25);
    background-color: rgba(254, 252, 248, 0.07);
}

.journal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.journal-date {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.78rem;
    color: #D0B898;
    letter-spacing: 0.05em;
}

.journal-title {
    color: #F8F4EE;
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    margin-bottom: 1rem;
}

.journal-excerpt {
    color: rgba(248, 244, 238, 0.7);
    font-size: 0.95rem;
    line-height: 1.85;
}

/* --- Approach Section --- */
.approach-section {
    background-color: #FEFCF8;
}

.approach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2.5rem;
}

.approach-item {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid #D0B898;
}

.approach-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #1A2830;
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}

.approach-item p {
    color: #3A4850;
    font-size: 0.95rem;
}

/* --- Footer --- */
.site-footer {
    background-color: #1A2830;
    position: relative;
    padding: 0;
}

.footer-circuit {
    position: relative;
    width: 100%;
    height: 12px;
    overflow: hidden;
}

.circuit-lines-footer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.footer-logo {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #F8F4EE;
    letter-spacing: 0.04em;
}

.footer-tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    color: #6090A0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-link {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(248, 244, 238, 0.6);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 300ms ease;
}

.footer-link:hover {
    color: #D0B898;
}

.footer-note {
    width: 100%;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(96, 144, 160, 0.1);
}

.footer-note .tech-label {
    font-size: 0.7rem;
    color: rgba(96, 144, 160, 0.5);
}

/* --- Fade-Reveal Tidal Rhythm --- */
.fade-reveal {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.fade-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Animations --- */
@keyframes fadeRevealUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .content-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .approach-grid {
        grid-template-columns: 1fr;
    }

    .parallax-content {
        padding: 4rem 1.5rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

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

    .footer-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .journal-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .journal-entry {
        padding: 1.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .parallax-content {
        padding: 3rem 1rem;
    }

    .feature-card {
        padding: 1.8rem 1.4rem;
    }

    .approach-grid {
        gap: 2rem;
    }
}

/* --- Selection Color --- */
::selection {
    background: rgba(208, 136, 104, 0.25);
    color: #1A2830;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F8F4EE;
}

::-webkit-scrollbar-thumb {
    background: #D0B898;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D08868;
}
