/*
 * AquaWorlds visual candidate
 * Hanya untuk halaman publik.
 * Tidak mengubah logic, route, form, upload, atau database.
 */

.public-portal {
    --visual-bg: #07141b;
    --visual-bg-soft: #0d222b;
    --visual-panel: rgba(11, 34, 43, 0.88);
    --visual-text: #f5f7f7;
    --visual-muted: #b8c8cc;
    --visual-accent: #f15a24;
    --visual-accent-dark: #bd3d14;
    --visual-border: rgba(255, 255, 255, 0.16);
    color: var(--visual-text);
    background: var(--visual-bg);
}

.public-portal,
.public-portal * {
    box-sizing: border-box;
}

.public-portal {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 85% 10%, rgba(241, 90, 36, 0.12), transparent 32rem),
        var(--visual-bg);
    color: var(--visual-text);
}

.public-portal a {
    color: inherit;
}

.public-portal .nav {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem clamp(1rem, 4vw, 4rem);
    background: rgba(4, 15, 21, 0.86);
    border-bottom: 1px solid var(--visual-border);
    backdrop-filter: blur(12px);
}

.public-portal .brand {
    color: var(--visual-text);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.public-portal .nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.8rem 1.2rem;
}

.public-portal .nav-links a {
    color: var(--visual-muted);
    text-decoration: none;
    transition: color 160ms ease;
}

.public-portal .nav-links a:hover,
.public-portal .nav-links a:focus-visible {
    color: var(--visual-text);
}

.public-portal .events,
.public-portal .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--visual-accent);
    border-radius: 999px;
    background: var(--visual-accent);
    color: #170c07;
    font-weight: 800;
    text-decoration: none;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.public-portal .events:hover,
.public-portal .button:hover,
.public-portal .events:focus-visible,
.public-portal .button:focus-visible {
    border-color: #ff8a5d;
    background: #ff8a5d;
    transform: translateY(-1px);
}

.public-portal .hero {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: min(70vh, 720px);
    align-items: center;
    background:
        linear-gradient(90deg, rgba(3, 13, 18, 0.94) 0%, rgba(3, 13, 18, 0.7) 38%, rgba(3, 13, 18, 0.18) 78%),
        url("/images/visual-reference/aquaworld-hero-reference.jpg") center / cover no-repeat;
}

.public-portal .hero-content {
    width: min(100% - 2rem, 78rem);
    margin: 0 auto;
    padding: clamp(4rem, 10vw, 9rem) 0;
}

.public-portal .hero-content h1 {
    max-width: 11ch;
    margin: 0;
    color: var(--visual-text);
    font-size: clamp(2.8rem, 8vw, 7.5rem);
    line-height: 0.9;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.public-portal .hero-content p {
    max-width: 38rem;
    color: var(--visual-muted);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.7;
}

.public-portal .content {
    width: min(100% - 2rem, 78rem);
    margin: 0 auto;
    padding: clamp(3rem, 7vw, 6rem) 0;
}

.public-portal .cards,
.public-portal .news-grid,
.public-portal .products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.public-portal .card,
.public-portal .news-card,
.public-portal .product {
    overflow: hidden;
    border: 1px solid var(--visual-border);
    border-top: 3px solid var(--visual-accent);
    border-radius: 0.75rem;
    background: var(--visual-panel);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
}

.public-portal .card > *,
.public-portal .news-card > *,
.public-portal .product > * {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
}

.public-portal .card h2,
.public-portal .news-card h2,
.public-portal .product h2 {
    color: var(--visual-text);
}

.public-portal .card p,
.public-portal .news-card p,
.public-portal .product p,
.public-portal .category {
    color: var(--visual-muted);
    line-height: 1.65;
}

.public-portal .news-card a,
.public-portal .product a {
    color: #ff916d;
    font-weight: 700;
}

.public-portal .product-image,
.public-portal .placeholder {
    min-height: 12rem;
    background:
        linear-gradient(135deg, rgba(241, 90, 36, 0.22), transparent),
        var(--visual-bg-soft);
}

@media (max-width: 800px) {
    .public-portal .nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-portal .nav-links {
        justify-content: flex-start;
    }

    .public-portal .hero {
        min-height: 620px;
        background-position: 68% center;
    }

    .public-portal .hero-content h1 {
        max-width: 9ch;
    }

    .public-portal .cards,
    .public-portal .news-grid,
    .public-portal .products {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-portal *,
    .public-portal *::before,
    .public-portal *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* Option C: tampilkan gambar hero dengan rasio asli */

.public-portal .hero {
    position: relative;
    isolation: isolate;
    display: block;
    min-height: 0;
    overflow: hidden;
    background: var(--visual-bg);
}

.public-portal .hero::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    background:
        linear-gradient(
            90deg,
            rgba(3, 13, 18, 0.90) 0%,
            rgba(3, 13, 18, 0.58) 38%,
            rgba(3, 13, 18, 0.08) 82%
        );
    content: "";
    pointer-events: none;
}

.public-portal .hero-image {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: auto;
}

.public-portal .hero-content {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    width: min(100% - 2rem, 78rem);
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 5rem) 0;
}

@media (max-width: 800px) {
    .public-portal .hero-content {
        padding: 2rem 0;
    }

    .public-portal .hero-content h1 {
        font-size: clamp(2.3rem, 12vw, 4.5rem);
    }
}

/* Readable hero description */
.public-portal .hero-content p {
    display: block;
    width: min(100%, 30rem);
    max-width: 30rem;
    margin: 1.25rem 0 1.5rem;
    padding: 1rem 1.2rem;
    border-left: 4px solid var(--visual-accent);
    border-radius: 0 0.65rem 0.65rem 0;
    background: rgba(3, 13, 18, 0.82);
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.28);
    color: #ffffff;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    font-weight: 600;
    line-height: 1.65;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

@media (max-width: 800px) {
    .public-portal .hero-content p {
        width: 100%;
        max-width: 30rem;
        margin-top: 1rem;
        padding: 0.85rem 1rem;
        font-size: 1rem;
        line-height: 1.55;
    }
}

/* Indo AquaWorld header logo */
.public-portal .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.public-portal .brand-logo {
    display: block;
    width: 3.2rem;
    height: 3.2rem;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
}

.public-portal .brand span {
    color: var(--visual-text);
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .public-portal .brand-logo {
        width: 2.7rem;
        height: 2.7rem;
    }

    .public-portal .brand span {
        font-size: 1rem;
    }
}

/* Reference layout: intro row above hero */
.public-portal .hero-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: min(100% - 4rem, 78rem);
    margin: 1.25rem auto 1.35rem;
}

.public-portal .hero-intro p {
    max-width: 31rem;
    margin: 0;
    padding: 0.75rem 1.35rem 0.75rem 1.4rem;
    border-left: 5px solid var(--visual-accent);
    border-radius: 0 0.25rem 0.25rem 0;
    background: rgba(8, 31, 42, 0.92);
    color: #ffffff;
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    font-weight: 700;
    line-height: 1.55;
}

.public-portal .hero-intro .button {
    min-width: 9.5rem;
    flex: 0 0 auto;
}

.public-portal .hero {
    position: relative;
    width: min(100% - 1.25rem, 78rem);
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.45rem;
    background: #06131b;
}

.public-portal .hero-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
}

.public-portal .hero::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(3, 13, 18, 0.72) 0%,
            rgba(3, 13, 18, 0.28) 35%,
            rgba(3, 13, 18, 0.02) 65%
        );
    content: "";
    pointer-events: none;
}

.public-portal .hero-content {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 2.5rem 4%;
}

.public-portal .hero-content h1 {
    max-width: 8ch;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.275rem, 5.075vw, 5.075rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.045em;
    text-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.55);
    text-transform: uppercase;
}

@media (max-width: 800px) {
    .public-portal .hero-intro {
        align-items: stretch;
        flex-direction: column;
        width: min(100% - 2rem, 78rem);
        gap: 1rem;
    }

    .public-portal .hero-intro p {
        max-width: none;
    }

    .public-portal .hero-intro .button {
        align-self: flex-start;
    }

    .public-portal .hero {
        width: calc(100% - 1rem);
    }

    .public-portal .hero-content {
        padding: 1.25rem;
    }

    .public-portal .hero-content h1 {
        font-size: clamp(1.75rem, 8.75vw, 3.5rem);
    }
}

/* Full dark viewport around the public layout */
html {
    background: #07141b;
}

body.public-portal {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(
            180deg,
            #07141b 0%,
            #06131b 55%,
            #041016 100%
        );
    color: var(--visual-text);
}

body.public-portal > header {
    width: 100%;
    margin: 0;
    background: #0b1c24;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body.public-portal > header .nav {
    width: min(100% - 2rem, 78rem);
    margin: 0 auto;
    background: transparent;
}

body.public-portal main {
    width: 100%;
    margin: 0;
    background: transparent;
}

body.public-portal .hero-intro,
body.public-portal .hero,
body.public-portal .content {
    position: relative;
}

@media (max-width: 800px) {
    body.public-portal > header .nav {
        width: calc(100% - 1rem);
    }
}

/* Layout untuk judul homepage baru */
.public-portal .hero-content h1 {
    max-width: 11ch;
    font-size: clamp(2rem, 4.35vw, 4.35rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
    overflow-wrap: normal;
    text-wrap: balance;
}

@media (max-width: 800px) {
    .public-portal .hero-content h1 {
        max-width: 10ch;
        font-size: clamp(1.8rem, 8vw, 3.2rem);
        line-height: 1;
    }
}
