/* 
  ========================================
  STYLESHEET
  ========================================
  */

:root {
    --header-bg: rgba(255, 255, 255, 0.85);
    --footer-bg: rgba(255, 255, 255, 0.85);
    --header-border: rgba(255, 255, 255, 0.45);
    --footer-border: rgba(255, 255, 255, 0.45);
    --header-title-color: #01416b;
    --footer-text: #475569;
    --footer-link: #01416b;
    --footer-link-hover: #0284c7;

    /* Middle Background*/
    --middle-bg: #0c233c;
    --middle-bg-gradient: radial-gradient(circle at 50% 25%, #14375b 0%, #0c233c 65%, #071728 100%);

    /* Content on Middle Section */
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-tertiary: #94a3b8;
    --accent: #38bdf8;
    --accent-gold: #ddc736;

    /* Card & Banner */
    --card-bg: rgba(255, 255, 255, 0.12);
    --card-border: rgba(255, 255, 255, 0.22);
    --card-border-top: rgba(56, 189, 248, 0.45);
    --btn-primary-bg: linear-gradient(135deg, #0284c7 0%, #01416b 100%);
    --btn-primary-hover: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);

    /* Dimensions */
    --header-height: 72px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 35px rgba(2, 65, 107, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--middle-bg);
    background-image: var(--middle-bg-gradient);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.bg-photo-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.png');
    background-size: 100% auto;
    background-position: center 18%;
    background-repeat: no-repeat;
    opacity: 0.52;
    filter: contrast(1.06) saturate(1.1);
    z-index: -2;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 88%, transparent 100%);
    transition: opacity 0.3s ease;
}

@media (max-aspect-ratio: 16/10) {
    .bg-photo-layer {
        background-size: 100% auto;
        background-position: center 15%;
    }
}

@media (max-width: 768px),
(orientation: portrait) {
    .bg-photo-layer {
        position: absolute;
        height: 100%;
        min-height: 100vh;
        background-size: cover;
        background-position: center 12%;
        opacity: 0.44;
        mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 80%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 80%, transparent 100%);
    }
}

.ambient-glow-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(12, 35, 60, 0.68) 0%,
            rgba(12, 35, 60, 0.46) 50%,
            rgba(7, 23, 40, 0.78) 100%);
    z-index: -1;
    pointer-events: none;
}

#underwater-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.site-header {
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    width: min(1200px, 94vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 12px 0;
    min-height: var(--header-height);
    position: relative;
}

.logo-start {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
}

#header-logo {
    display: block;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease, opacity 0.3s ease;
}

#header-logo:hover {
    transform: scale(1.08) rotate(-3deg);
    filter: drop-shadow(0 2px 8px rgba(1, 65, 107, 0.25));
}

#header-logo:active {
    transform: scale(0.96);
}

.site-logo {
    display: block;
    object-fit: contain;
}

.site-logo--emblem {
    height: 48px;
    width: auto;
}

.logo-end {
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.site-logo--text {
    height: 38px;
    width: auto;
    filter: none;
    transition: filter 0.25s ease, transform 0.2s ease;
}

.logo-end:hover .site-logo--text,
.site-logo--text:hover {
    filter: drop-shadow(0 0 6px rgba(2, 132, 199, 0.55)) drop-shadow(0 0 14px rgba(56, 189, 248, 0.4));
    transform: scale(1.04);
}

.logo-end:active .site-logo--text {
    transform: scale(0.97);
}

.header-center {
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.header-title {
    margin: 0;
    padding: 0 12px;
    font-size: clamp(14px, 1.5vw, 17px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--header-title-color);
    line-height: 1.3;
    white-space: nowrap;
}

/* EASTER EGG */
#easter-egg-arrow-tip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#easter-egg-arrow-tip.is-active {
    opacity: 1;
    transform: translateY(0);
    animation: arrowFloat 0.65s infinite alternate ease-in-out;
}

@keyframes arrowFloat {
    0% {
        transform: translateY(0px) scale(1);
    }

    100% {
        transform: translateY(-8px) scale(1.04);
    }
}

.arrow-svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 10px rgba(220, 38, 38, 0.65));
}

.arrow-bubble-text {
    background: #dc2626;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 800;
    padding: 7px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5), 0 0 0 2.5px #ffffff;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#easter-egg-turtle {
    position: fixed;
    width: 88px;
    height: 98px;
    z-index: 9998;
    pointer-events: auto;
    cursor: grab;
    user-select: none;
    will-change: transform, left, top;
    transform-origin: center center;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
    transition: opacity 0.3s ease;
}

#easter-egg-turtle:active {
    cursor: grabbing;
}

#easter-egg-turtle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.turtle-spawn-anim {
    animation: turtlePopOut 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes turtlePopOut {
    0% {
        transform: scale(0.1) rotate(-180deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.25) rotate(15deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.bubble-burst-particle {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9) 0%, rgba(56, 189, 248, 0.5) 60%, rgba(2, 132, 199, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    pointer-events: none;
    z-index: 9997;
    will-change: transform, opacity;
}

#turtle-status-pill {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: rgba(3, 43, 66, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.2);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9990;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

#turtle-status-pill.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

#turtle-status-pill:hover {
    background: rgba(2, 132, 199, 0.95);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
    padding: 0 16px;
}

.hero-section {
    padding: clamp(50px, 8vw, 85px) 0 clamp(40px, 6vw, 65px);
    text-align: center;
    position: relative;
    width: 100%;
}

.hero-title {
    font-size: clamp(30px, 5vw, 50px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, #38bdf8 80%, #ddc736 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(15px, 2vw, 17.5px);
    color: var(--text-secondary);
    max-width: 780px;
    margin: 0 auto 36px;
    line-height: 1.7;
    font-style: italic;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.portal-banner-card {
    width: min(980px, 100%);
    margin: 20px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 32px);
    padding: clamp(22px, 3.5vw, 32px) clamp(24px, 4vw, 40px);
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-top: 1px solid var(--card-border-top);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: left;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portal-banner-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 35px rgba(56, 189, 248, 0.25);
}

.portal-banner-text {
    flex: 1;
    min-width: 0;
}

.portal-banner-text h2 {
    margin: 0 0 8px;
    font-size: clamp(17px, 2.1vw, 23px);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .portal-banner-text h2 {
        white-space: nowrap;
    }
}

.portal-banner-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14.5px;
    line-height: 1.55;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
    box-shadow: 0 6px 22px rgba(56, 189, 248, 0.45);
    transform: translateY(-2px);
}

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

.about-section {
    padding: clamp(30px, 5vw, 50px) 0 clamp(40px, 6vw, 60px);
    width: 100%;
}

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

.section-title {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.site-footer {
    width: 100%;
    background: var(--footer-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid var(--footer-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-inner {
    width: min(1200px, 94vw);
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13.5px;
    flex-wrap: wrap;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--footer-link);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--footer-link-hover);
    text-decoration: underline;
}

.footer-icon {
    display: inline-block;
    flex-shrink: 0;
    color: var(--footer-link);
}

.footer-divider {
    color: #cbd5e1;
    font-size: 12px;
    user-select: none;
}

.footer-bottom {
    color: var(--footer-text);
    font-size: 13px;
}

.footer-bottom small {
    font-size: inherit;
}

@media (max-width: 768px) {
    .portal-banner-card {
        flex-direction: column;
        text-align: center;
        gap: 18px;
        padding: 24px 20px;
    }

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

    .portal-banner-text h2 {
        white-space: normal;
        text-wrap: balance;
    }

    .portal-banner-card .btn {
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
    }
}

@media (max-width: 680px) {
    .header-actions {
        display: none !important;
    }

    .header-inner {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        min-height: 52px;
        gap: 10px;
    }

    .logo-start {
        flex-shrink: 0;
        width: 38px;
        display: flex;
        align-items: center;
        order: unset;
    }

    .header-center {
        flex: 1;
        width: auto;
        margin-top: 0;
        text-align: center;
        order: unset;
    }

    .header-title {
        white-space: nowrap;
        font-size: clamp(11.5px, 3.3vw, 14px);
        letter-spacing: 0.03em;
        padding: 0 4px;
    }

    .header-inner::after {
        content: "";
        width: 38px;
        flex-shrink: 0;
        display: block;
    }

    .site-logo--emblem {
        height: 38px;
        width: auto;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 14px 0;
    }

    .footer-contact {
        justify-content: center;
        gap: 10px;
    }
}