/* ==========================================================================
   XSECURE — BASE STYLES (shared by every page)
   --------------------------------------------------------------------------
   1. Design tokens
   2. Reset & global
   3. Typography
   4. Navbar & dropdown
   5. Hero (shared layout)
   6. Buttons
   7. Scroll-reveal animation
   8. Responsive
   Page-specific styles live in: home.css (index) and services.css (services/*)
   ========================================================================== */

/* 1. DESIGN TOKENS ======================================================== */
:root {
    --color-bg: #0d122b;
    --color-accent: #00d9e8;
    --color-accent-glow: rgba(0, 217, 232, 0.5);
    --color-text: #ffffff;
    --color-text-muted: #cbd5e1;
    --color-danger: #ff4d4d;
    --color-nav-bg: rgba(10, 10, 15, 0.75);

    --font-heading: 'Urbanist', sans-serif;
    --font-body: 'Inter', sans-serif;

    --container-width: 1350px;
    --nav-height: 80px;
    --page-gutter: 8%;
    --radius: 16px;
    --transition: 0.3s ease;
}

/* 2. RESET & GLOBAL ======================================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    overflow-x: clip;   /* clip keeps position: sticky working; hidden is the fallback */
}

body {
    font-family: var(--font-body);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.main-wrapper {
    width: 100%;
    background-image: url('../assets/svg/xsecurebg.png');
    background-position: center;
    background-repeat: no-repeat;
}

/* 3. TYPOGRAPHY =========================================================== */
.page-title,
.section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--color-accent), #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.page-title    { font-size: 5rem; }
.section-title { font-size: 2.8rem; }

.highlight-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--color-accent-glow);
}

.highlight-text--bar {
    border-left: 2px solid var(--color-accent);
    padding-left: 12px;
}

.main-desc {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-muted);
}

.solution-text {
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.8;
    color: var(--color-accent);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
}

/* Bullet list used in hero sections */
.feature-list {
    list-style: none;
    margin-top: 20px;
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.8;
    color: var(--color-accent);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.feature-list li::before {
    content: "• ";
}

/* 4. NAVBAR & DROPDOWN ==================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: var(--nav-height);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 6%;
    background: var(--color-nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 217, 232, 0.1);
}

.brand-logos {
    display: flex;
    text-decoration: none;
    align-items: center;
    gap: 20px;
}

.logo-mora,
.logo-cism {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 30px;
}

.nav-links a,
.dropbtn {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.dropbtn:hover {
    color: var(--color-accent);
}

.dropdown {
    position: relative;
}

.dropbtn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    padding: 10px 0;
    background-color: var(--color-bg);
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
    z-index: 1001;
}

/* Invisible bridge so the menu does not close while moving the mouse down */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    transition: background-color var(--transition), color var(--transition);
}

.dropdown-content a:hover,
.dropdown-content a[aria-current="page"] {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content,
.dropdown.is-open .dropdown-content {
    display: block;
}

/* Coming-soon product in the dropdown (XPOSURE) */
.dropdown-content a.dd-soon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    border-top: 1px dashed rgba(255, 181, 71, 0.35);
    color: #d9c8ff;
}

.dd-soon__tag {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a0f3d;
    background: linear-gradient(90deg, #ffb547, #ff7a59);
}

.dropdown-content a.dd-soon:hover,
.dropdown-content a.dd-soon[aria-current="page"] {
    background-color: rgba(155, 107, 255, 0.85);
    color: #ffffff;
}

/* "Coming soon" pill with a blinking dot (XPOSURE page + Get Started card) */
.soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1a0f3d;
    background: linear-gradient(90deg, #ffb547, #ff7a59);
}

.soon-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1a0f3d;
    animation: soon-blink 1.4s ease-in-out infinite;
}

@keyframes soon-blink {
    50% { opacity: 0.2; }
}

/* Hamburger (mobile only) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 26px;
    height: 2px;
    background: var(--color-text);
    transition: transform var(--transition), opacity var(--transition);
}

/* Language switch (EN / ID) — last navbar item, built by js/i18n.js */
.lang-item {
    display: flex;
    align-items: center;
    padding-left: 30px;
    border-left: 1px solid rgba(0, 217, 232, 0.25);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
}

.lang-switch span { color: rgba(255, 255, 255, 0.3); }

.lang-switch button {
    position: relative;
    padding: 4px 0;
    font: inherit;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition);
}

.lang-switch button::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 1px;
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent-glow);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.lang-switch button:hover { color: var(--color-accent); }

.lang-switch button[aria-pressed="true"] {
    color: var(--color-accent);
    text-shadow: 0 0 10px var(--color-accent-glow);
}

.lang-switch button[aria-pressed="true"]::after { transform: scaleX(1); }

.lang-switch button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* 5. HERO (shared layout) ================================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 60px) var(--page-gutter) 40px;
}

.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    gap: 40px;
}

.hero-left {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-right {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    padding-right: 1%;
}

.text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    max-width: 550px;
}

.img-xsecure {
    width: 500px;
    max-width: 100%;
    height: auto;
}

/* 6. BUTTONS ============================================================== */
.cta-area {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}

.btn-getstarted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding: 0 30px;
    border-radius: 999px;
    background: #05d1e4;
    color: #0d122b;
    font-family: 'Raleway', var(--font-heading);
    font-size: 1.43rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-getstarted:hover,
.btn-getstarted:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0 14px var(--color-accent-glow);
    outline: none;
}

/* FOOTER ==================================================================
   One row: copyright centred on the page, "member of sinarmas" logo in the
   right corner. The two outer 1fr columns keep the copyright truly centred.
   Tablets/phones (900px and below): stacked and centred.                  */
.site-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px 24px;
    padding: 22px 6%;
    color: var(--color-text-muted);
}

.site-footer__copy {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
    font-size: 0.72rem;           /* copyright text size */
    letter-spacing: 0.02em;
}

.site-footer__member {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    height: 24px;                 /* logo size */
    width: auto;
}

.site-footer__copy strong {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-accent);
}

.site-footer__copy .sep {
    margin: 0 6px;
    color: rgba(0, 217, 232, 0.4);
}

/* each part stays on one line; on narrow screens the line breaks between parts */
.site-footer__copy .seg {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .site-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
        padding: 20px 16px;
    }

    .site-footer__member {
        grid-column: 1;
        justify-self: center;
        height: 22px;
    }

    .site-footer__copy {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 576px) {
    /* "All rights reserved." on its own line, without a dangling divider */
    .site-footer__copy .sep ~ .sep { display: none; }
    .site-footer__copy .seg:last-child { display: block; margin-top: 2px; }
}

/* 7. SCROLL-REVEAL ========================================================
   Only active when JS is running (html.js), so content is never hidden
   for users without JavaScript.                                           */
.js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* 8. RESPONSIVE =========================================================== */
@media (max-width: 1366px) {
    .page-title  { font-size: 4rem; }
    .img-xsecure { width: 420px; }
    .hero-right  { padding-right: 0; }
}

@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-right,
    .text-content {
        align-items: center;
        text-align: center;
        padding-right: 0;
    }

    .cta-area {
        justify-content: center;
    }

    .highlight-text--bar {
        border-left: none;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .lang-item {
        padding-left: 0;
        border-left: none;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 10px 6% 20px;
        background: var(--color-bg);
        border-bottom: 1px solid rgba(0, 217, 232, 0.2);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links > li {
        width: 100%;
        padding: 12px 0;
    }

    .dropdown-content {
        position: static;
        margin-top: 10px;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    /* On mobile, open the sub-menu only by tapping */
    .dropdown:hover .dropdown-content {
        display: none;
    }

    .dropdown.is-open .dropdown-content {
        display: block;
    }

    .navbar.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .navbar.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .navbar.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 576px) {
    .logo-mora,
    .logo-cism   { height: 36px; }
    .page-title  { font-size: 3rem; }
    .img-xsecure { width: 100%; max-width: 320px; }
}
