/* ==========================================================
   IMT Trade & Investment Fair - Riau Expo 2026
   Satu halaman penuh (tanpa scroll), tema dark blue #071f4a + gold
   Latar poster: assets/images/bg-*.webp (dibuat sedikit transparan)
   Font dimuat lewat <link> di index.php (Fraunces + Public Sans)
   ========================================================== */

:root {
    --navy: #071f4a;
    --gold: #d9b865;
    --gold-bright: #f0d98f;
    --gold-warm: #f6b92e;
    --gold-line: rgba(217, 184, 101, .30);
    --ivory: #f6f1e4;
    --mist: #b4c2de;

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

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

html {
    background: #00224d;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ivory);
    background:
        radial-gradient(ellipse 80% 55% at 50% 62%, #003a78 0%, rgba(0, 58, 120, 0) 75%),
        #00224d;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Latar poster (transparan) ---------- */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.bg-layer {
    position: absolute;
    left: 0;
    right: 0;
    background-repeat: no-repeat;
}

/* Pemandangan rumah selaso, sungai, dan jembatan */
.bg-scene {
    top: 28svh;
    height: 58svh;
    background-image: url('assets/images/bg-scene-1200.webp');
    background-size: cover;
    background-position: 50% 38%;
    opacity: .58;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 72%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 72%, transparent 100%);
}

/* Pita emas dan batik di sudut atas + teratai */
.bg-top {
    top: 0;
    height: 27svh;
    background-image: url('assets/images/bg-top-1200.webp');
    background-size: cover;
    background-position: 50% 0%;
    opacity: .8;
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}

/* Pita emas dan batik di sudut bawah + teratai */
.bg-bottom {
    bottom: 0;
    height: 22svh;
    background-image: url('assets/images/bg-bottom-1200.webp');
    background-size: cover;
    background-position: 50% 100%;
    opacity: .8;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 35%);
    mask-image: linear-gradient(180deg, transparent 0, #000 35%);
}

/* ---------- Pilih resolusi gambar sesuai lebar layar (tajam tapi tetap ringan) ---------- */
@media (min-width: 761px) {
    .bg-scene  { background-image: url('assets/images/bg-scene.webp'); }
    .bg-top    { background-image: url('assets/images/bg-top.webp'); }
    .bg-bottom { background-image: url('assets/images/bg-bottom.webp'); }
}

@media (min-width: 1200px) {
    .bg-scene  { background-image: url('assets/images/bg-scene-2560.webp'); }
    .bg-top    { background-image: url('assets/images/bg-top-2560.webp'); }
    .bg-bottom { background-image: url('assets/images/bg-bottom-2560.webp'); }
}

/* Lapisan navy halus di atas gambar: menyatukan warna tanpa menggelapkan detail */
.bg-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 31, 74, .20) 0%, rgba(7, 31, 74, .10) 45%, rgba(7, 31, 74, .22) 100%);
}

/* Bayangan lembut di sisi teks agar judul tetap terbaca di atas pemandangan */
.bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 28, 66, .72) 0%, rgba(0, 28, 66, .35) 45%, rgba(0, 28, 66, 0) 70%);
    -webkit-mask-image: linear-gradient(180deg, transparent 20%, #000 40%, #000 72%, transparent 90%);
    mask-image: linear-gradient(180deg, transparent 20%, #000 40%, #000 72%, transparent 90%);
}

/* ---------- Susunan halaman ---------- */
.stage {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 96px));
    min-height: 100svh;
    margin-inline: auto;
    padding-block: 21svh 13svh;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(380px, .8fr);
    column-gap: clamp(40px, 6vw, 88px);
    align-items: center;
}

/* ---------- Hero ---------- */
.hero {
    animation: rise .8s cubic-bezier(.2, .7, .2, 1) both;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(18px, 3.4svh, 34px);
}

.brand-logo {
    height: clamp(44px, 7svh, 60px);
    width: auto;
}

.brand-name {
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--mist);
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 1svh, 10px);
}

.hero-title .fair {
    font-size: clamp(1rem, 2.3vw, 1.75rem);
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    line-height: 1.25;
    color: var(--ivory);
    text-shadow: 0 2px 10px rgba(0, 10, 40, .7);
}

.hero-title .expo {
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 144;
    font-size: clamp(2.6rem, 5.2vw, 5rem);
    font-weight: 700;
    line-height: 1.02;
    white-space: nowrap;
    letter-spacing: -.01em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffe596 0%, #f6b92e 55%, #d89a1c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold-warm);
    filter: drop-shadow(0 4px 14px rgba(0, 10, 40, .6));
}

.event-date {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: clamp(16px, 3.2svh, 32px);
    padding-top: clamp(14px, 2.4svh, 24px);
    border-top: 1px solid var(--gold-line);
    width: fit-content;
    font-family: var(--font-display);
    font-size: clamp(1.125rem, 2vw, 1.625rem);
    color: var(--ivory);
    text-shadow: 0 2px 10px rgba(0, 10, 40, .7);
}

.diamond {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    background: var(--gold);
    transform: rotate(45deg);
}

.event-venue {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: clamp(8px, 1.4svh, 14px);
    width: fit-content;
    font-family: var(--font-display);
    font-size: clamp(1.125rem, 2vw, 1.625rem);
    color: var(--ivory);
    text-shadow: 0 2px 10px rgba(0, 10, 40, .7);
}

/* ---------- Panel tautan (kaca transparan) ---------- */
.panel-wrap {
    animation: rise .8s .14s cubic-bezier(.2, .7, .2, 1) both;
}

.links-section {
    background: linear-gradient(160deg, rgba(10, 38, 88, .52), rgba(3, 16, 42, .62));
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    backdrop-filter: blur(14px) saturate(1.25);
    border: 1px solid var(--gold-line);
    border-top: 2px solid var(--gold);
    box-shadow:
        0 24px 60px rgba(0, 8, 30, .45),
        inset 0 1px 0 rgba(255, 255, 255, .06);
}

.links-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 20px 24px 16px;
}

.links-heading h2 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--ivory);
}

.links-count {
    font-size: .875rem;
    color: var(--mist);
}

.links-list {
    list-style: none;
    counter-reset: item;
}

.link-item {
    counter-increment: item;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    padding: 14px 24px;
    border-top: 1px solid var(--gold-line);
    color: inherit;
    text-decoration: none;
    transition: background-color .2s ease;
}

.link-item::before {
    content: counter(item, decimal-leading-zero);
    flex-shrink: 0;
    width: 1.6em;
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--gold);
}

.link-copy {
    flex: 1;
    min-width: 0;
}

.link-item:hover {
    background: rgba(217, 184, 101, .1);
}

.link-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ivory);
}

.link-domain {
    display: block;
    margin-top: 2px;
    font-size: .8125rem;
    color: var(--mist);
}

.link-arrow {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.link-arrow svg {
    width: 16px;
    height: 16px;
}

.link-item:hover .link-arrow {
    background: var(--gold);
    color: var(--navy);
    transform: translateX(3px);
}

.link-item:focus-visible {
    outline: 2px solid var(--gold-bright);
    outline-offset: -2px;
    background: rgba(217, 184, 101, .1);
}

.panel-foot {
    padding: 14px 24px;
    border-top: 1px solid var(--gold-line);
    font-size: .75rem;
    color: var(--mist);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Tablet & HP: satu kolom, tetap satu layar ---------- */
@media (max-width: 960px) {
    .stage {
        width: min(640px, calc(100% - 44px));
        grid-template-columns: 1fr;
        row-gap: clamp(16px, 3svh, 28px);
        align-content: center;
        padding-block: 18svh 11svh;
        text-align: center;
    }

    .bg::after {
        background: none;
    }

    .brand {
        justify-content: center;
        margin-bottom: clamp(8px, 1.6svh, 16px);
    }

    .brand-logo {
        height: 40px;
    }

    .brand-name {
        text-align: left;
    }

    .hero-title {
        align-items: center;
    }

    .hero-title .fair {
        font-size: clamp(.9rem, 3.6vw, 1.5rem);
    }

    .hero-title .expo {
        font-size: clamp(2.4rem, 11vw, 4.5rem);
    }

    .event-date {
        margin-inline: auto;
        font-size: clamp(1.0625rem, 4.4vw, 1.5rem);
    }

    .event-venue {
        margin-inline: auto;
        font-size: clamp(1.0625rem, 4.4vw, 1.5rem);
    }

    /* Gambar ditampilkan utuh selebar layar dengan rasio asli: tidak terpotong, tidak meregang */
    .bg-scene {
        top: 22svh;
        height: auto;
        aspect-ratio: 2000 / 770;
        background-size: 100% 100%;
        background-position: 50% 50%;
        opacity: .5;
    }

    .bg-top {
        height: auto;
        aspect-ratio: 2000 / 470;
        background-size: 100% 100%;
    }

    .bg-bottom {
        height: auto;
        aspect-ratio: 2000 / 374;
        background-size: 100% 100%;
    }
}

@media (max-width: 560px) {
    .links-heading {
        padding: 14px 18px 10px;
    }

    .links-heading h2 {
        font-size: 1.1875rem;
    }

    .link-item {
        min-height: 54px;
        padding: 8px 18px;
        gap: 12px;
        text-align: left;
    }

    .link-item::before {
        font-size: 1rem;
    }

    .link-title {
        font-size: .9375rem;
    }

    .link-arrow {
        width: 32px;
        height: 32px;
    }

    .panel-foot {
        padding: 9px 18px;
        font-size: .6875rem;
        text-align: left;
    }
}

/* Layar pendek (laptop kecil): rapatkan supaya tetap satu layar */
@media (min-width: 961px) and (max-height: 700px) {
    .stage {
        padding-block: 19svh 10svh;
    }

    .link-item {
        min-height: 60px;
        padding-block: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}


/* ---------- Contact Person WhatsApp ---------- */
.contact-section {
    border-top: 1px solid var(--gold-line);
    padding: 18px 24px 8px;
}

.contact-heading {
    margin-bottom: 8px;
}

.contact-heading h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ivory);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 9px 0;
    color: inherit;
    text-decoration: none;
    border-top: 1px solid rgba(217,184,101,.16);
    transition: background-color .2s ease, transform .2s ease;
}

.contact-item:first-of-type {
    border-top: 0;
}

.contact-item:hover {
    background: rgba(217,184,101,.07);
    transform: translateX(2px);
}

.contact-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(217,184,101,.65);
    border-radius: 50%;
    color: var(--gold);
}

.contact-icon svg {
    width: 17px;
    height: 17px;
}

.contact-copy {
    flex: 1;
    min-width: 0;
}

.contact-name {
    display: block;
    color: var(--ivory);
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.3;
}

.contact-number {
    display: block;
    margin-top: 2px;
    color: var(--mist);
    font-size: .8rem;
}

.contact-arrow {
    color: var(--gold);
    font-size: 1rem;
}

.link-instagram .link-domain {
    color: #d7c9a5;
}

@media (max-width: 560px) {
    .contact-section {
        padding: 14px 18px 6px;
    }

    .contact-item {
        min-height: 52px;
    }

    .contact-name {
        font-size: .88rem;
    }

    .contact-number {
        font-size: .76rem;
    }
}


/* ==========================================================
   SOCIAL / CONTACT DI AREA YANG DITANDAI USER (KIRI BAWAH HERO)
   ========================================================== */
.hero-social {
    width: min(100%, 560px);
    margin-top: clamp(24px, 4svh, 42px);
    display: grid;
    gap: 10px;
    animation: rise .8s .2s cubic-bezier(.2,.7,.2,1) both;
}

.instagram-contact,
.wa-contact-item {
    color: inherit;
    text-decoration: none;
}

.instagram-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    min-width: 280px;
    padding: 9px 13px;
    border: 1px solid rgba(217,184,101,.34);
    border-radius: 999px;
    background: rgba(3,16,42,.20);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.instagram-contact:hover {
    background: rgba(217,184,101,.10);
    border-color: rgba(240,217,143,.72);
    transform: translateY(-1px);
}

.instagram-logo {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #f0d98f;
    background: rgba(217,184,101,.08);
    border: 1px solid rgba(217,184,101,.5);
    flex: 0 0 32px;
}

.instagram-logo svg { width: 19px; height: 19px; }

.social-copy { display: flex; flex-direction: column; min-width: 0; }
.social-label {
    font-size: .76rem;
    color: var(--mist);
    line-height: 1.1;
}
.social-value {
    margin-top: 2px;
    font-size: .93rem;
    font-weight: 600;
    color: var(--ivory);
}
.social-arrow { margin-left: auto; color: var(--gold); font-size: 1rem; }

.wa-contact-block {
    width: min(100%, 430px);
    margin-top: 2px;
    padding: 12px 14px 8px;
    border-top: 1px solid rgba(217,184,101,.30);
}

.wa-title {
    margin-bottom: 4px;
    font-family: var(--font-display);
    font-size: .95rem;
    color: var(--ivory);
}

.wa-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 6px 2px;
    border-top: 1px solid rgba(217,184,101,.12);
    transition: background .2s ease, transform .2s ease;
}
.wa-contact-item:first-of-type { border-top: 0; }
.wa-contact-item:hover { transform: translateX(2px); }

.wa-icon {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(217,184,101,.55);
    border-radius: 50%;
    color: var(--gold);
}
.wa-icon svg { width: 15px; height: 15px; }
.wa-copy { display: flex; flex-direction: column; line-height: 1.2; }
.wa-copy span { font-size: .84rem; font-weight: 600; color: var(--ivory); }
.wa-copy small { margin-top: 2px; font-size: .73rem; color: var(--mist); }

/* Slider benar-benar menjadi bagian dari bidang background, bukan card. */
.slider-section {
    width: 100%;
    padding-top: clamp(34px, 6svh, 72px);
    margin-inline: auto;
}
.slider {
    width: min(1280px, calc(100% - 80px));
    margin-inline: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}
.slider-viewport {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}
.slider.is-ready .slide-img,
.slide.is-contain .slide-img {
    padding: 0;
    filter: none;
}
.slide.is-contain::after { display: none; }

@media (max-width: 960px) {
    .hero-social { margin-inline: auto; text-align: left; }
    .slider { width: 100%; }
    .slider-section { padding-top: 30px; }
}

@media (max-width: 560px) {
    .hero-social { width: 100%; margin-top: 22px; }
    .instagram-contact { min-width: 0; width: 100%; }
    .wa-contact-block { width: 100%; }
    .slider-section { padding-top: 18px; }
}


/* ==========================================================
   MOBILE FLOW v2
   Links first; Instagram + WhatsApp become the true bottom
   ========================================================== */
@media (max-width:960px){
    .stage{
        display:grid;
        grid-template-columns:1fr;
    }

    /* Remove the wrapper from the visual layout so its children can
       participate in the same mobile ordering as the links panel. */
    .hero{
        display:contents;
    }

    .stage > .brand{order:1;}
    .stage > .hero-title{order:2;}
    .stage > .event-date{order:3;}
    .stage > .event-venue{order:4;}
    .stage > .panel-wrap{order:5;}
    .stage > .hero-social{order:6;}

    .hero-social{
        width:min(100%,640px);
        margin:clamp(18px,4svh,34px) auto 0;
    }

    .panel-wrap{
        width:100%;
    }
}

@media (max-width:560px){
    .stage{
        width:calc(100% - 24px);
        row-gap:0;
        padding-block:42px 8svh;
    }

    .hero-social{
        width:100%;
        margin-top:24px;
        padding-bottom:18px;
    }

    .instagram-contact{
        width:100%;
        min-width:0;
        padding:12px 14px;
    }

    .instagram-logo{
        width:36px;
        height:36px;
        flex-basis:36px;
    }

    .instagram-logo svg{width:20px;height:20px;}

    .social-label{font-size:.78rem;}
    .social-value{font-size:1rem;}

    .wa-contact-block{
        width:100%;
        padding:14px 4px 4px;
        margin-top:4px;
    }

    .wa-title{
        font-size:1.05rem;
        margin-bottom:8px;
    }

    .wa-contact-item{
        min-height:50px;
        padding:8px 2px;
    }

    .wa-icon{
        width:32px;
        height:32px;
        flex-basis:32px;
    }

    .wa-copy span{font-size:.92rem;}
    .wa-copy small{font-size:.78rem;}
}

/* Professional footer breathing room on very small phones. */
@media (max-width:380px){
    .stage{width:calc(100% - 18px);}
    .hero-social{margin-top:20px;}
    .social-value{font-size:.93rem;}
}

/* ==========================================================
   FIX: URUTAN MOBILE — LINKS DAHULU, INSTAGRAM & WA PALING BAWAH
   Selector memakai descendant (bukan child) karena elemen berada
   di dalam .hero yang memakai display: contents.
   Desktop tidak berubah.
   ========================================================== */
@media (max-width: 960px) {
    .stage { display: grid; grid-template-columns: minmax(0, 1fr); }
    .stage > .hero { display: contents; }
    .stage .brand { order: 1; }
    .stage .hero-title { order: 2; }
    .stage .event-date { order: 3; }
    .stage .event-venue { order: 4; }
    .stage > .panel-wrap { order: 5; }
    .stage .hero-social { order: 6; }

    .stage .hero-social {
        width: min(100%, 640px);
        margin: clamp(28px, 5svh, 44px) auto 0;
    }
}

@media (max-width: 560px) {
    .stage { row-gap: 0; }
    .stage > .panel-wrap { width: 100%; }
    .stage .hero-social {
        width: 100%;
        margin: 28px auto 0;
        padding: 22px 0 28px;
    }
}
