/* =========================================
   ROSIMON MIDJAJA
   CINEMATIC MARITIME INTRO
   ========================================= */

:root {
    --ocean: #071a2e;
    --ocean-light: #0b2942;
    --ocean-deep: #020914;
    --gold: #d4af62;
    --gold-light: #ffe4a1;
    --white: #e7eef5;
    --muted: #9db2c4;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--ocean);
}

body {
    margin: 0;
    color: var(--white);
    font-family: "Segoe UI", Arial, sans-serif;
}

.intro-page {
    overflow: hidden;
    background: var(--ocean);
}

.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--ocean-deep);

    opacity: 1;
    visibility: visible;

    transition:
        opacity 500ms ease,
        visibility 500ms ease;
}

.intro-screen.is-exiting {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* OCEAN BACKGROUND */

.ocean-background {
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: hidden;

    background:
        linear-gradient(180deg,
            #06172b 0%,
            #0a2b47 40%,
            #10405a 56%,
            #071a2e 68%,
            #020914 100%);
}

.ocean-glow {
    position: absolute;
    left: 50%;
    top: 43%;

    width: min(95vw, 1000px);
    height: 55vh;

    transform: translate(-50%, -50%);

    background: radial-gradient(ellipse,
            rgba(235, 181, 91, 0.26),
            rgba(83, 137, 166, 0.09) 38%,
            transparent 72%);

    animation: dawn-glow 3s ease-in-out infinite alternate;
}

/* Animated ocean surface */

.ocean-wave {
    position: absolute;
    left: -50%;
    bottom: -12%;
    width: 200%;
    height: 43%;

    border-top: 1px solid rgba(176, 213, 232, 0.15);
    border-radius: 48% 52% 0 0;

    background: linear-gradient(180deg,
            rgba(22, 75, 105, 0.28),
            rgba(4, 20, 37, 0.95));

    will-change: transform;
}

.wave-one {
    bottom: -15%;
    animation: ocean-drift 8s ease-in-out infinite alternate;
}

.wave-two {
    bottom: -21%;
    opacity: 0.8;
    transform: rotate(3deg);
    animation: ocean-drift 10s ease-in-out infinite alternate-reverse;
}

.wave-three {
    bottom: -27%;
    opacity: 0.55;
    transform: rotate(-3deg);
    animation: ocean-drift 12s ease-in-out infinite alternate;
}

/* A fine golden line at the horizon */

.horizon-light {
    position: absolute;
    top: 57%;
    left: -10%;
    width: 120%;
    height: 1px;

    background: linear-gradient(90deg,
            transparent,
            rgba(212, 175, 98, 0.12),
            var(--gold-light),
            rgba(212, 175, 98, 0.15),
            transparent);

    box-shadow: 0 0 18px rgba(255, 213, 133, 0.5);

    transform: scaleX(0);
    animation: horizon-reveal 1.5s ease-out 0.3s forwards;
}

/* COMPASS */

.compass {
    position: absolute;
    left: 50%;
    top: 47%;

    width: clamp(220px, 34vw, 400px);
    aspect-ratio: 1;

    transform: translate(-50%, -50%);
    /* opacity: 0; */
    opacity: 100;

    animation: compass-appear 1.2s ease-out 0.35s forwards;
}

.compass-ring {
    position: absolute;
    inset: 4%;

    /* border: 1px solid rgba(212, 175, 98, 0.28); */
    border: 2px solid rgba(212, 175, 98, 0.28);
    border-radius: 50%;

    box-shadow:
        0 0 0 12px rgba(212, 175, 98, 0.025),
        inset 0 0 30px rgba(38, 109, 148, 0.1);
}

.compass-ring::before,
.compass-ring::after {
    content: "";
    position: absolute;
    /* border: 1px solid rgba(212, 175, 98, 0.18); */
    border: 3px solid rgba(212, 175, 98, 0.18);
    border-radius: 50%;
}

.compass-ring::before {
    inset: 12%;
}

.compass-ring::after {
    inset: 25%;
}

.compass-cross {
    position: absolute;
    inset: 12%;

    background:
        linear-gradient(90deg,
            transparent 49.8%,
            rgba(212, 175, 98, 0.3) 50%,
            transparent 50.2%),
        linear-gradient(0deg,
            transparent 49.8%,
            rgba(212, 175, 98, 0.3) 50%,
            transparent 50.2%);
}

.compass-needle {
    position: absolute;
    left: 50%;
    top: 50%;

    width: 0;
    height: 0;

    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-bottom: 43% solid var(--gold);

    transform: translate(-50%, -90%);
    filter: drop-shadow(0 0 8px rgba(212, 175, 98, 0.45));
}

.compass-needle::after {
    content: "";
    position: absolute;
    left: -13px;
    top: 43%;

    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 43% solid #789bb3;
}

.compass-north,
.compass-south,
.compass-east,
.compass-west {
    position: absolute;
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 11px;
    letter-spacing: 0.15em;
}

.compass-north {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.compass-south {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.compass-east {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.compass-west {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* PARTICLES */

.marine-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.marine-particles span {
    position: absolute;

    width: 2px;
    height: 2px;

    border-radius: 50%;
    background: var(--gold-light);

    box-shadow: 0 0 8px var(--gold);
    opacity: 0;

    animation: marine-particle 3s ease-out infinite;
}

.marine-particles span:nth-child(1) {
    left: 15%;
    top: 55%;
    animation-delay: .2s;
}

.marine-particles span:nth-child(2) {
    left: 26%;
    top: 67%;
    animation-delay: .8s;
}

.marine-particles span:nth-child(3) {
    left: 38%;
    top: 48%;
    animation-delay: 1.1s;
}

.marine-particles span:nth-child(4) {
    left: 49%;
    top: 62%;
    animation-delay: .5s;
}

.marine-particles span:nth-child(5) {
    left: 62%;
    top: 52%;
    animation-delay: 1.4s;
}

.marine-particles span:nth-child(6) {
    left: 73%;
    top: 64%;
    animation-delay: .9s;
}

.marine-particles span:nth-child(7) {
    left: 84%;
    top: 49%;
    animation-delay: 1.7s;
}

.marine-particles span:nth-child(8) {
    left: 21%;
    top: 39%;
    animation-delay: 1.2s;
}

.marine-particles span:nth-child(9) {
    left: 79%;
    top: 37%;
    animation-delay: .4s;
}

.marine-particles span:nth-child(10) {
    left: 43%;
    top: 72%;
    animation-delay: 1.9s;
}

.marine-particles span:nth-child(11) {
    left: 57%;
    top: 35%;
    animation-delay: 1.5s;
}

.marine-particles span:nth-child(12) {
    left: 91%;
    top: 58%;
    animation-delay: .7s;
}

/* NAME REVEAL */

.name-wrapper {
    position: relative;
    z-index: 2;

    width: 100%;
    padding: 24px;

    text-align: center;

    animation: name-arrive 900ms ease-out 400ms both;
}

.intro-label {
    margin: 0 0 22px;

    font-size: clamp(8px, 1.2vw, 16px);
    letter-spacing: 0.35em;
    /* color: #c6d5df; */
    color: #e0e8ee;

    opacity: 0;
    animation: fade-up 600ms ease-out 600ms forwards;
}

.name-first,
.name-last {
    margin: 0;

    font-family: "Palatino Linotype", "Book Antiqua",
        Palatino, Georgia, serif;

    font-weight: 400;
    line-height: 1.12;

    color: var(--gold-light);

    background: linear-gradient(110deg,
            #a77a38,
            #f4d795,
            #fff0c6,
            #c79b4f,
            #ffe4a1);

    background-size: 220% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.name-first {
    font-size: clamp(2.2rem, 7.5vw, 6rem);
    letter-spacing: 0.17em;
    padding-left: 0.17em;

    opacity: 0;
    animation:
        name-reveal 900ms ease-out 850ms forwards,
        gold-shimmer 4s linear 2s infinite;
}

.name-last {
    font-size: clamp(1.7rem, 5.2vw, 4rem);
    letter-spacing: 0.28em;
    padding-left: 0.28em;

    opacity: 0;
    animation: name-reveal 900ms ease-out 1.4s forwards;
}

.marine-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    width: min(340px, 65vw);
    margin: 24px auto 15px;

    opacity: 0;
    animation: fade-up 600ms ease-out 2s forwards;
}

.marine-divider>span:not(.anchor-symbol) {
    flex: 1;
    height: 1px;

    background: linear-gradient(90deg,
            transparent,
            var(--gold));
}

.marine-divider>span:last-child {
    transform: rotate(180deg);
}

.anchor-symbol {
    color: var(--gold);
    font-size: 21px;
    line-height: 1;
}

.name-tagline {
    margin: 0;

    font-size: clamp(9px, 1.5vw, 12px);
    letter-spacing: 0.38em;
    color: var(--white);

    opacity: 0;
    animation: fade-up 650ms ease-out 2.15s forwards;
}

.name-motto {
    margin: 17px 0 0;

    font-family: Georgia, serif;
    font-style: italic;
    font-size: clamp(11px, 1.6vw, 14px);
    letter-spacing: 0.04em;
    color: #c4d2dd;

    opacity: 0;
    animation: fade-up 650ms ease-out 2.4s forwards;
}

.intro-footer {
    position: absolute;
    bottom: max(28px, env(safe-area-inset-bottom));
    left: 0;
    right: 0;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 13px;

    color: #9eb5c6;
    font-size: 8px;
    letter-spacing: 0.2em;

    opacity: 0;
    animation: fade-up 600ms ease-out 2.5s forwards;
}

.footer-dot {
    color: var(--gold);
    font-size: 6px;
}

/* ANIMATION KEYFRAMES */

@keyframes dawn-glow {
    from {
        opacity: .55;
        transform: translate(-50%, -50%) scale(.92);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.08);
    }
}

@keyframes ocean-drift {
    from {
        transform: translateX(-2%) rotate(-2deg);
    }

    to {
        transform: translateX(2%) rotate(2deg);
    }
}

@keyframes horizon-reveal {
    from {
        transform: scaleX(0);
        opacity: 0;
    }

    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes compass-appear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-25deg) scale(.8);
    }

    to {
        opacity: .72;
        transform: translate(-50%, -50%) rotate(0) scale(1);
    }
}

@keyframes marine-particle {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(.5);
    }

    35% {
        opacity: .8;
    }

    100% {
        opacity: 0;
        transform: translateY(-30px) scale(1);
    }
}

@keyframes name-arrive {
    from {
        transform: translateY(12px);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes name-reveal {
    from {
        opacity: 0;
        transform: translateY(15px);
        filter: blur(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes gold-shimmer {
    from {
        background-position: 100% center;
    }

    to {
        background-position: -120% center;
    }
}

/* RESPONSIVE */

@media (max-width: 600px) {
    .name-wrapper {
        padding: 20px 14px;
    }

    .intro-label {
        letter-spacing: .2em;
        margin-bottom: 25px;
    }

    .name-first {
        font-size: clamp(2rem, 9.5vw, 3.3rem);
        letter-spacing: .1em;
        padding-left: .1em;
    }

    .name-last {
        font-size: clamp(1.65rem, 7.5vw, 2.5rem);
        letter-spacing: .16em;
        padding-left: .16em;
    }

    .name-motto {
        max-width: 300px;
        margin-inline: auto;
        line-height: 1.7;
    }

    .compass {
        width: 75vw;
        top: 45%;
        opacity: .4;
    }

    .intro-footer {
        gap: 8px;
        font-size: 7px;
        letter-spacing: .1em;
    }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* MARITIME HOMEPAGE */

.home-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 80% 10%,
            rgba(25, 91, 127, .25), transparent 45%),
        var(--ocean-deep);
    color: var(--white);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 24px clamp(20px, 6vw, 90px);
    border-bottom: 1px solid rgba(212, 175, 98, .2);
}

.brand {
    color: var(--white);
    font: 20px Georgia, serif;
    letter-spacing: .08em;
    text-decoration: none;
}

.brand span {
    color: var(--gold);
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.site-header nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
}

.site-header nav a:hover {
    color: var(--gold-light);
}

.hero {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px clamp(24px, 10vw, 150px);

    background:
        linear-gradient(90deg, rgba(2, 9, 20, .85),
            rgba(2, 9, 20, .15)),
        radial-gradient(ellipse at 75% 40%,
            #16415b, var(--ocean-deep) 65%);
}

.hero-eyebrow,
.section-label {
    color: var(--gold);
    font-size: 10px;
    letter-spacing: .25em;
    line-height: 1.8;
}

.hero h1 {
    margin: 22px 0;
    font: 400 clamp(3rem, 8vw, 7rem)/1.08 Georgia, serif;
}

.hero h1 span {
    color: var(--gold);
}

.hero-description {
    max-width: 500px;
    color: #bdcbd7;
    line-height: 1.9;
}

.gold-button {
    display: inline-flex;
    gap: 20px;
    margin-top: 24px;
    padding: 15px 22px;
    border: 1px solid var(--gold);
    color: var(--gold-light);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: .12em;
}

.gold-button:hover {
    background: rgba(212, 175, 98, .12);
}

.content-section {
    padding: 70px clamp(24px, 10vw, 150px);
    border-top: 1px solid rgba(212, 175, 98, .15);
}

.content-section h2 {
    font: 400 clamp(2rem, 4vw, 3.5rem) Georgia, serif;
}

.content-section>p:last-child {
    max-width: 680px;
    color: var(--muted);
    line-height: 1.9;
}

.site-footer {
    padding: 28px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid rgba(212, 175, 98, .15);
}

@media (max-width: 600px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        min-height: 70vh;
    }
}


/* Cinematic maritime video background */

.ocean-background {
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: hidden;
    background: #071a2e;
}

.ocean-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;

    transform: scale(1.06);
    animation: cinematic-zoom 8s ease-out both;
}

.ocean-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(90deg,
            rgba(2, 12, 26, .72),
            rgba(4, 20, 37, .25) 55%,
            rgba(2, 12, 26, .50)),
        linear-gradient(0deg,
            rgba(2, 9, 20, .82),
            transparent 65%,
            rgba(2, 9, 20, .20));
}

.cinematic-vignette {
    position: absolute;
    inset: 0;

    background: radial-gradient(ellipse at center,
            /* transparent 30%, */
            transparent 10%,
            rgba(0, 7, 17, .40) 100%);
}

@keyframes cinematic-zoom {
    from {
        transform: scale(1.06);
    }

    to {
        transform: scale(1.14);
    }
}

/* Reduced motion: stop camera movement */

@media (prefers-reduced-motion: reduce) {
    .ocean-video {
        animation: none;
        transform: none;
    }
}