/* ============================================
   quirk.one - Inflated 3D Ocean Deep Aesthetic
   ============================================ */

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

:root {
    --abyss-blue: #0A1628;
    --deep-water: #14304A;
    --ocean-teal: #1B6B8A;
    --coral-warm: #E87461;
    --marble-vein: #4A6B80;
    --pearl-white: #E8F0F4;
    --bioluminescent: #4AE8C8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.7;
    color: var(--pearl-white);
    background: var(--abyss-blue);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

h2 {
    font-size: clamp(28px, 4vw, 52px);
}

h3 {
    font-size: clamp(20px, 2.5vw, 28px);
}

/* ============================================
   DEEP DIVE ENTRY
   ============================================ */
.deep-dive {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(180deg, var(--abyss-blue) 0%, var(--deep-water) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Marble texture overlay */
.marble-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.marble-overlay svg {
    display: block;
}

/* Fish container */
.fish-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.fish {
    position: absolute;
    opacity: 0;
    will-change: transform;
}

.fish-1 {
    animation: swim-1 18s linear infinite;
    animation-delay: 0.6s;
    top: 0;
    left: 0;
}

.fish-2 {
    animation: swim-2 22s linear infinite;
    animation-delay: 1.2s;
    top: 0;
    left: 0;
}

.fish-3 {
    animation: swim-3 15s linear infinite;
    animation-delay: 0.8s;
    top: 0;
    left: 0;
}

.fish-4 {
    animation: swim-4 20s linear infinite;
    animation-delay: 1.5s;
    top: 0;
    left: 0;
}

.fish-5 {
    animation: swim-5 25s linear infinite;
    animation-delay: 2s;
    top: 0;
    left: 0;
}

.fish.swimming {
    opacity: 1;
}

@keyframes swim-1 {
    0%   { transform: translate(-60px, 30vh); }
    25%  { transform: translate(25vw, 25vh); }
    50%  { transform: translate(55vw, 35vh); }
    75%  { transform: translate(80vw, 28vh); }
    100% { transform: translate(110vw, 32vh); }
}

@keyframes swim-2 {
    0%   { transform: translate(110vw, 55vh) scaleX(-1); }
    25%  { transform: translate(75vw, 60vh) scaleX(-1); }
    50%  { transform: translate(40vw, 50vh) scaleX(-1); }
    75%  { transform: translate(15vw, 58vh) scaleX(-1); }
    100% { transform: translate(-70px, 52vh) scaleX(-1); }
}

@keyframes swim-3 {
    0%   { transform: translate(-80px, 70vh); }
    30%  { transform: translate(30vw, 65vh); }
    60%  { transform: translate(65vw, 75vh); }
    100% { transform: translate(110vw, 68vh); }
}

@keyframes swim-4 {
    0%   { transform: translate(110vw, 15vh) scaleX(-1); }
    35%  { transform: translate(60vw, 20vh) scaleX(-1); }
    65%  { transform: translate(25vw, 12vh) scaleX(-1); }
    100% { transform: translate(-60px, 18vh) scaleX(-1); }
}

@keyframes swim-5 {
    0%   { transform: translate(-50px, 45vh); }
    20%  { transform: translate(20vw, 40vh); }
    50%  { transform: translate(50vw, 48vh); }
    80%  { transform: translate(80vw, 42vh); }
    100% { transform: translate(110vw, 46vh); }
}

/* Bioluminescent glow */
.bio-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 232, 200, 0.25) 0%, rgba(74, 232, 200, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    z-index: 2;
}

.bio-glow.pulse {
    animation: bio-pulse 2s ease-out forwards;
}

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

/* Wordmark */
.wordmark-container {
    position: relative;
    z-index: 3;
    text-align: center;
    transform: scale(0.8);
    opacity: 0;
}

.wordmark-container.revealed {
    animation: wordmark-reveal 0.8s ease-out forwards;
}

@keyframes wordmark-reveal {
    0%   { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.wordmark {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(48px, 10vw, 120px);
    color: var(--pearl-white);
    text-shadow:
        0 2px 0 rgba(74, 232, 200, 0.3),
        0 4px 8px rgba(10, 22, 40, 0.3),
        0 8px 16px rgba(10, 22, 40, 0.2),
        0 16px 32px rgba(10, 22, 40, 0.15),
        0 -2px 4px rgba(255, 255, 255, 0.1);
    letter-spacing: -0.02em;
}

.wordmark .dot {
    color: var(--bioluminescent);
}

.tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.8vw, 20px);
    color: var(--marble-vein);
    margin-top: 12px;
    letter-spacing: 0.15em;
    text-transform: lowercase;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--marble-vein);
    border-bottom: 2px solid var(--marble-vein);
    transform: rotate(45deg);
    animation: scroll-bounce 2s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes scroll-bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
    50%      { transform: rotate(45deg) translateY(8px); opacity: 0.8; }
}

/* ============================================
   SPECIMEN GRID SECTION
   ============================================ */
.specimen-grid-section {
    position: relative;
    padding: 100px 24px 120px;
    background: linear-gradient(180deg, var(--deep-water) 0%, var(--abyss-blue) 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    color: var(--pearl-white);
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow:
        0 2px 4px rgba(10, 22, 40, 0.3),
        0 4px 12px rgba(10, 22, 40, 0.15);
}

.section-header p {
    color: var(--marble-vein);
    font-size: clamp(15px, 1.5vw, 18px);
}

/* Grid layout */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Cards - inflated 3D */
.card {
    position: relative;
    border-radius: 24px;
    padding: 32px;
    background: var(--pearl-white);
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(10, 22, 40, 0.1),
        0 10px 20px rgba(10, 22, 40, 0.15),
        0 20px 40px rgba(10, 22, 40, 0.1),
        inset 0 -2px 4px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, opacity 0.3s ease;
    cursor: default;
}

.card-tall {
    grid-row: span 2;
}

/* Marble texture on cards */
.card-marble {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 80px,
            rgba(74, 107, 128, 0.15) 80px,
            rgba(74, 107, 128, 0.15) 82px
        ),
        repeating-linear-gradient(
            -30deg,
            transparent,
            transparent 120px,
            rgba(27, 107, 138, 0.1) 120px,
            rgba(27, 107, 138, 0.1) 121px
        );
    border-radius: 24px;
}

/* Card content */
.card-content {
    position: relative;
    z-index: 1;
}

.card-tag {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: var(--ocean-teal);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding: 4px 12px;
    background: rgba(27, 107, 138, 0.1);
    border-radius: 20px;
}

.card h3 {
    color: var(--deep-water);
    margin-bottom: 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    transition: font-weight 0.3s ease;
}

.card p {
    color: var(--marble-vein);
    font-size: clamp(14px, 1.3vw, 16px);
    line-height: 1.7;
}

/* Zoom-focus interaction */
.card:hover {
    transform: scale(1.05);
    box-shadow:
        0 8px 12px rgba(10, 22, 40, 0.15),
        0 20px 40px rgba(10, 22, 40, 0.2),
        0 40px 80px rgba(10, 22, 40, 0.15),
        inset 0 -2px 6px rgba(255, 255, 255, 0.15);
    z-index: 2;
}

/* Sibling dimming */
.grid:hover .card:not(:hover) {
    opacity: 0.85;
}

/* Responsive grid */
@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-tall {
        grid-row: span 1;
    }
}

@media (max-width: 580px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   OCEAN FLOOR SECTION
   ============================================ */
.ocean-floor-section {
    position: relative;
    padding: 100px 24px 120px;
    background: linear-gradient(180deg, var(--abyss-blue) 0%, #060E1A 50%, var(--abyss-blue) 100%);
}

.ocean-floor-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.ocean-panel {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--deep-water) 0%, #0D2236 100%);
    box-shadow:
        0 4px 6px rgba(10, 22, 40, 0.15),
        0 10px 20px rgba(10, 22, 40, 0.2),
        0 20px 40px rgba(10, 22, 40, 0.15),
        inset 0 1px 0 rgba(74, 232, 200, 0.08);
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
}

.ocean-panel:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 8px 12px rgba(10, 22, 40, 0.2),
        0 20px 40px rgba(10, 22, 40, 0.25),
        0 40px 80px rgba(10, 22, 40, 0.2),
        inset 0 1px 0 rgba(74, 232, 200, 0.12);
}

.panel-marble {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 100px,
            rgba(74, 107, 128, 0.2) 100px,
            rgba(74, 107, 128, 0.2) 102px
        ),
        repeating-linear-gradient(
            -20deg,
            transparent,
            transparent 150px,
            rgba(27, 107, 138, 0.15) 150px,
            rgba(27, 107, 138, 0.15) 151px
        );
}

.panel-inner {
    position: relative;
    padding: 56px 48px;
    z-index: 1;
}

.panel-label {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: var(--bioluminescent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding: 6px 16px;
    background: rgba(74, 232, 200, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(74, 232, 200, 0.15);
}

.ocean-panel h2 {
    color: var(--pearl-white);
    margin-bottom: 20px;
    text-shadow:
        0 2px 8px rgba(10, 22, 40, 0.3);
}

.ocean-panel p {
    color: rgba(232, 240, 244, 0.75);
    max-width: 700px;
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.8;
}

.panel-meta {
    display: flex;
    gap: 24px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.meta-item {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: var(--marble-vein);
    padding: 6px 14px;
    background: rgba(74, 107, 128, 0.12);
    border-radius: 16px;
    border: 1px solid rgba(74, 107, 128, 0.15);
}

@media (max-width: 640px) {
    .panel-inner {
        padding: 36px 24px;
    }
}

/* ============================================
   CORAL REEF FOOTER
   ============================================ */
.coral-footer {
    position: relative;
    padding: 100px 24px 60px;
    background: var(--abyss-blue);
    overflow: hidden;
}

.coral-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.coral-blob {
    position: absolute;
    border-radius: 50% 40% 60% 45% / 55% 45% 50% 40%;
    opacity: 0.15;
}

.coral-blob-1 {
    width: 350px;
    height: 280px;
    background: var(--coral-warm);
    bottom: -60px;
    left: -80px;
    border-radius: 45% 55% 40% 60% / 50% 45% 55% 40%;
    animation: coral-sway-1 8s ease-in-out infinite alternate;
}

.coral-blob-2 {
    width: 250px;
    height: 200px;
    background: var(--coral-warm);
    bottom: -30px;
    right: 10%;
    border-radius: 55% 45% 50% 40% / 45% 55% 40% 60%;
    animation: coral-sway-2 10s ease-in-out infinite alternate;
    opacity: 0.12;
}

.coral-blob-3 {
    width: 180px;
    height: 160px;
    background: var(--bioluminescent);
    bottom: -40px;
    left: 35%;
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 45%;
    animation: coral-sway-3 12s ease-in-out infinite alternate;
    opacity: 0.08;
}

@keyframes coral-sway-1 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(15px, -10px) rotate(3deg); }
}

@keyframes coral-sway-2 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-10px, -8px) rotate(-2deg); }
}

@keyframes coral-sway-3 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(8px, -12px) rotate(4deg); }
}

.footer-content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-brand {
    flex-shrink: 0;
}

.footer-wordmark {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: var(--pearl-white);
    text-shadow:
        0 2px 4px rgba(10, 22, 40, 0.3),
        0 4px 12px rgba(10, 22, 40, 0.2);
}

.footer-wordmark .dot {
    color: var(--bioluminescent);
}

.footer-nav {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.footer-nav a {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: var(--marble-vein);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bioluminescent);
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

.footer-nav a:hover::after {
    width: 100%;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    color: var(--marble-vein);
    font-size: 14px;
}

.footer-copy {
    margin-top: 8px;
    opacity: 0.5;
    font-size: 13px;
}

@media (max-width: 700px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-info {
        text-align: center;
    }
    .footer-nav {
        justify-content: center;
    }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.card,
.ocean-panel {
    opacity: 0;
    transform: translateY(30px);
}

.card.visible,
.ocean-panel.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Hover keeps zoom-focus working after reveal */
.card.visible:hover {
    transform: scale(1.05);
}

/* Re-apply sibling dimming after visible class is added */
.grid:hover .card.visible:not(:hover) {
    opacity: 0.85;
}
