/* ═══════════════════════════════════════════════════════════
   WWLM — White Whale Language Model
   Ocean Blue / Teal / Silver Theme
   ═══════════════════════════════════════════════════════════ */

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

:root {
    --bg: #040810;
    --bg2: #0a1018;
    --bg3: #101820;
    --border: #1a2a3a;
    --text: #e8f0f8;
    --text2: #8aa4b8;
    --text3: #4a6478;
    --accent: #00d4ff;
    --accent2: #0099cc;
    --accent-glow: rgba(0, 212, 255, 0.15);
    --silver: #c0d0e0;
    --white: #ffffff;
    --green: #00ff88;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════════════════════════════════════════════════════════
   TOP NAV
   ═══════════════════════════════════════════════════════════ */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(4, 8, 16, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    text-decoration: none;
}

.nav-brand span {
    font-family: 'Space Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.1em;
    text-shadow: 0 0 20px var(--accent-glow);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-x {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg3);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-x:hover {
    background: var(--accent);
    color: var(--bg) !important;
}

@media (max-width: 600px) {
    .top-nav {
        padding: 12px 16px;
    }
    .nav-links {
        gap: 16px;
    }
    .nav-links a {
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(ellipse at 70% 50%, rgba(0, 80, 120, 0.15) 0%, transparent 50%),
                var(--bg);
    overflow: hidden;
}

.hero-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 40px 60px;
    gap: 20px;
}

.hero-whale {
    width: 100%;
    height: 650px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-whale canvas {
    display: block;
}

@media (max-width: 1000px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 120px 24px 40px;
    }
    .hero-whale {
        height: 500px;
        order: -1;
    }
}

@media (max-width: 600px) {
    .hero-whale {
        height: 400px;
    }
}

.hero-text {
    max-width: 550px;
    animation: fadeIn 1s ease both;
}

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

@media (max-width: 900px) {
    .hero-text {
        max-width: 100%;
    }
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--accent2);
    background: var(--accent-glow);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(56px, 10vw, 100px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: var(--white);
}

.hero-title span {
    background: linear-gradient(135deg, var(--accent) 0%, #66e0ff 50%, var(--white) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.hero-tagline {
    font-size: 18px;
    color: var(--text2);
    margin-bottom: 32px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 32px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.hero-cta svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.hero-cta:hover {
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.scroll-hint span {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--text3);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════ */

section:not(.hero) {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 40px;
}

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

.section-label {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 600;
    color: var(--white);
}

.section-desc {
    color: var(--text2);
    font-size: 15px;
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════
   TRACKER
   ═══════════════════════════════════════════════════════════ */

.tracker {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

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

.globe-wrapper {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

#globe-container {
    width: 100%;
    height: 450px;
}

#globe-container canvas {
    cursor: grab;
}

#globe-container canvas:active {
    cursor: grabbing;
}

.globe-expand-btn {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.globe-expand-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.globe-expand-btn:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.tracker-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 10px;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text3);
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
}

.stat-value.live {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.record-btn {
    padding: 18px 24px;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    color: var(--bg);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.record-btn:hover {
    background: var(--white);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   FULLSCREEN GLOBE MODAL
   ═══════════════════════════════════════════════════════════ */

.globe-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.globe-modal.open {
    opacity: 1;
    pointer-events: all;
}

.globe-modal-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid var(--border);
    gap: 24px;
}

.globe-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

.globe-modal-info {
    flex: 1;
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--text2);
}

.globe-modal-close {
    width: 40px;
    height: 40px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.globe-modal-close:hover {
    background: var(--accent);
    color: var(--bg);
}

#globe-fullscreen {
    flex: 1;
}

.globe-modal-legend {
    display: flex;
    gap: 24px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text2);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.whale {
    background: var(--white);
    box-shadow: 0 0 10px var(--white);
}

.legend-dot.sighting {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   IMMERSIVE CHAT MODAL
   ═══════════════════════════════════════════════════════════ */

.chat-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}

.chat-modal.open {
    opacity: 1;
    pointer-events: all;
}

.chat-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 28px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.chat-modal-close:hover {
    background: var(--accent);
    color: var(--bg);
}

.chat-modal-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
}

@media (max-width: 900px) {
    .chat-modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: 40vh 1fr;
    }
}

.chat-whale-display {
    background: radial-gradient(ellipse at center, rgba(0, 80, 120, 0.2) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.chat-whale-display canvas {
    width: 100% !important;
    height: 100% !important;
}

.chat-interface {
    display: flex;
    flex-direction: column;
    background: var(--bg2);
    border-left: 1px solid var(--border);
}

@media (max-width: 900px) {
    .chat-interface {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg3);
}

.chat-title {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--white);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text3);
}

.chat-status.connected {
    color: var(--green);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.whale-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.whale-loading span {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.15em;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.msg {
    display: flex;
    gap: 14px;
    max-width: 80%;
    animation: msgIn 0.4s ease both;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(10px); }
}

.msg.whale { align-self: flex-start; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.msg.user .msg-avatar {
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.msg-content {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
}

.msg.whale .msg-content { border-radius: 16px 16px 16px 4px; }
.msg.user .msg-content { 
    border-radius: 16px 16px 4px 16px;
    background: var(--accent-glow);
    border-color: var(--accent2);
}

.msg-wave {
    display: flex;
    gap: 3px;
    margin-bottom: 10px;
}

.msg-wave span {
    width: 3px;
    height: 16px;
    background: var(--accent);
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.msg-wave span:nth-child(1) { animation-delay: 0s; }
.msg-wave span:nth-child(2) { animation-delay: 0.1s; }
.msg-wave span:nth-child(3) { animation-delay: 0.2s; }
.msg-wave span:nth-child(4) { animation-delay: 0.3s; }
.msg-wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.msg-content p {
    font-size: 15px;
    line-height: 1.7;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg3);
}

#user-input {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border 0.3s ease;
}

#user-input:focus { border-color: var(--accent); }
#user-input::placeholder { color: var(--text3); }

#send-btn {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#send-btn svg {
    width: 22px;
    height: 22px;
    fill: var(--bg);
}

#send-btn:hover {
    background: var(--white);
    transform: scale(1.05);
}

#send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading-dots {
    display: flex;
    gap: 6px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); }
    40% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   COMMUNITY
   ═══════════════════════════════════════════════════════════ */

.community {
    background: var(--bg2);
    border-top: 1px solid var(--border);
}

.x-card {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
    padding: 24px 28px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.x-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.x-logo {
    width: 32px;
    height: 32px;
    fill: var(--text);
}

.x-info { flex: 1; }

.x-handle {
    display: block;
    font-weight: 600;
    font-size: 17px;
    color: var(--white);
}

.x-desc {
    font-size: 14px;
    color: var(--text2);
}

.x-arrow {
    font-size: 24px;
    color: var(--text3);
    transition: all 0.3s ease;
}

.x-card:hover .x-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

.community .x-card + .x-card {
    margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════
   MISSION / PRESERVATION
   ═══════════════════════════════════════════════════════════ */

.mission {
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.mission-statement {
    max-width: 700px;
    margin: 0 auto 48px;
    text-align: center;
}

.mission-statement p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text2);
    margin-bottom: 16px;
}

.mission-statement strong {
    color: var(--accent);
    font-weight: 600;
}

.adoption-card {
    max-width: 600px;
    margin: 0 auto 48px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(0, 100, 150, 0.08) 100%);
    border: 1px solid var(--accent2);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.adoption-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
}

.adoption-badge {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent);
    color: var(--bg);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin: 24px 24px 0;
    border-radius: 6px;
}

.adoption-content {
    padding: 24px;
}

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

.adoption-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}

.adoption-id {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--text3);
    margin-bottom: 20px;
}

.adoption-details {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.adoption-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text3);
    text-transform: uppercase;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--silver);
}

.detail-value.live {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--green);
}

.adoption-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text2);
    max-width: 450px;
    margin: 0 auto;
}

.mission-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    .mission-pillars {
        grid-template-columns: 1fr;
        max-width: 350px;
    }
}

.pillar {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.pillar:hover {
    border-color: var(--accent2);
    transform: translateY(-4px);
}

.pillar-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.pillar h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.pillar p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   TOKEN SECTION
   ═══════════════════════════════════════════════════════════ */

.token-section {
    padding: 40px 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.token-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 20px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.token-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.token-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text3);
}

.token-ca {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--silver);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.token-ca:hover {
    color: var(--accent);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text2);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.copy-btn.copied {
    background: var(--green);
    border-color: var(--green);
    color: var(--bg);
}

@media (max-width: 500px) {
    .token-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .token-ca {
        font-size: 11px;
    }
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-logo {
    font-family: 'Space Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.1em;
    text-shadow: 0 0 30px var(--accent-glow);
}

.footer p {
    color: var(--text3);
    font-size: 13px;
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.open {
    opacity: 1;
    pointer-events: all;
}

.modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    max-width: 380px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
}

.modal-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.modal-body {
    padding: 24px;
}

.modal-body h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--white);
}

.modal-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-stats div {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.modal-stats span:first-child {
    color: var(--text3);
}

.modal-stats span:last-child {
    color: var(--silver);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: var(--white);
    color: var(--bg);
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════ */

/* Small tablets and large phones */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    section:not(.hero) {
        padding: 60px 0;
    }
    
    /* Nav */
    .top-nav {
        padding: 10px 16px;
    }
    
    .nav-brand span {
        font-size: 16px;
    }
    
    .nav-links {
        gap: 12px;
    }
    
    .nav-links a:not(.nav-x) {
        display: none;
    }
    
    .nav-x {
        width: 32px;
        height: 32px;
    }
    
    /* Hero */
    .hero-content {
        padding: 80px 16px 30px;
        gap: 10px;
    }
    
    .hero-whale {
        height: 350px;
    }
    
    .hero-badge {
        padding: 6px 12px;
        font-size: 9px;
        margin-bottom: 16px;
    }
    
    .hero-title {
        font-size: clamp(40px, 12vw, 60px);
        margin-bottom: 12px;
    }
    
    .hero-tagline {
        font-size: 15px;
        margin-bottom: 24px;
    }
    
    .hero-cta {
        padding: 14px 24px;
        font-size: 11px;
        width: 100%;
        justify-content: center;
    }
    
    .scroll-hint {
        bottom: 16px;
    }
    
    .scroll-line {
        height: 24px;
    }
    
    /* Section headers */
    .section-header {
        margin-bottom: 24px;
    }
    
    .section-label {
        font-size: 10px;
    }
    
    .section-desc {
        font-size: 13px;
    }
    
    /* Tracker */
    .tracker-content {
        gap: 24px;
    }
    
    #globe-container {
        height: 300px;
    }
    
    .globe-expand-btn {
        padding: 10px 14px;
        font-size: 10px;
    }
    
    .globe-expand-btn span {
        display: none;
    }
    
    .stat-card {
        padding: 14px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .record-btn {
        padding: 14px 16px;
        font-size: 13px;
    }
    
    /* Globe Modal */
    .globe-modal-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .globe-modal-header h3 {
        font-size: 14px;
        width: 100%;
        order: 1;
    }
    
    .globe-modal-info {
        flex-direction: column;
        gap: 4px;
        font-size: 11px;
        order: 2;
    }
    
    .globe-modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    
    .globe-modal-legend {
        padding: 10px 16px;
        gap: 16px;
        flex-wrap: wrap;
    }
    
    .legend-item {
        font-size: 11px;
    }
    
    /* Chat Modal */
    .chat-modal-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .chat-modal-content {
        grid-template-rows: 30vh 1fr;
    }
    
    .chat-header {
        padding: 14px 16px;
    }
    
    .chat-title {
        font-size: 12px;
    }
    
    .chat-status {
        font-size: 10px;
    }
    
    .chat-messages {
        padding: 16px;
        gap: 12px;
    }
    
    .msg {
        max-width: 90%;
        gap: 10px;
    }
    
    .msg-avatar {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    
    .msg-content {
        padding: 12px 14px;
    }
    
    .msg-content p {
        font-size: 14px;
    }
    
    .msg-wave {
        margin-bottom: 8px;
    }
    
    .msg-wave span {
        height: 12px;
    }
    
    .chat-input-area {
        padding: 12px 16px;
        gap: 10px;
    }
    
    #user-input {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 12px;
    }
    
    #send-btn {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    
    #send-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Community */
    .x-card {
        padding: 16px 20px;
        gap: 14px;
    }
    
    .x-logo {
        width: 28px;
        height: 28px;
    }
    
    .x-handle {
        font-size: 15px;
    }
    
    .x-desc {
        font-size: 12px;
    }
    
    /* Mission */
    .mission-statement {
        margin-bottom: 32px;
    }
    
    .mission-statement p {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .adoption-card {
        margin-bottom: 32px;
        border-radius: 16px;
    }
    
    .adoption-badge {
        margin: 16px 16px 0;
        padding: 8px 14px;
        font-size: 10px;
    }
    
    .adoption-content {
        padding: 16px;
    }
    
    .adoption-name {
        font-size: 22px;
    }
    
    .adoption-id {
        font-size: 11px;
        margin-bottom: 16px;
    }
    
    .adoption-details {
        gap: 20px;
        margin-bottom: 16px;
    }
    
    .detail-label {
        font-size: 9px;
    }
    
    .detail-value {
        font-size: 12px;
    }
    
    .adoption-desc {
        font-size: 13px;
    }
    
    .pillar {
        padding: 24px 20px;
    }
    
    .pillar-icon {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .pillar h4 {
        font-size: 16px;
    }
    
    .pillar p {
        font-size: 13px;
    }
    
    /* Token */
    .token-section {
        padding: 30px 0;
    }
    
    .token-card {
        padding: 14px 16px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0;
    }
    
    .footer-logo {
        font-size: 22px;
    }
    
    .footer p {
        font-size: 12px;
    }
    
    /* Sighting Modal */
    .modal-content {
        max-width: 90%;
        border-radius: 16px;
    }
    
    .modal-img {
        height: 140px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-body h3 {
        font-size: 18px;
    }
    
    .modal-stats div {
        font-size: 13px;
    }
    
    .share-btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* Extra small phones */
@media (max-width: 400px) {
    .hero-whale {
        height: 280px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-tagline {
        font-size: 14px;
    }
    
    #globe-container {
        height: 250px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .chat-modal-content {
        grid-template-rows: 25vh 1fr;
    }
    
    .msg {
        max-width: 95%;
    }
    
    .msg-avatar {
        width: 30px;
        height: 30px;
    }
    
    .adoption-details {
        flex-direction: column;
        gap: 12px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) {
    .hero-cta:hover,
    .x-card:hover,
    .pillar:hover,
    .globe-expand-btn:hover,
    .record-btn:hover,
    .copy-btn:hover,
    #send-btn:hover {
        transform: none;
    }
}

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .chat-input-area {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    
    .globe-modal-legend {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    
    .footer {
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
}
