/* BRAVEMOVE – custom styles layered on top of Tailwind */

/* ===================== LINE Seed Sans TH (local) ===================== */
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_Th.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_Th.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_Rg.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_Rg.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_Bd.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_Bd.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_XBd.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_XBd.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'LINE Seed Sans TH';
    src: url('../../font/LINESeedSansTH_W_He.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_He.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --burgundy: #6e1f2a;
    --navy: #16233f;
    --cream: #f6dac6;
    --bottom-nav-h: 4.25rem;
}

body {
    -webkit-font-smoothing: antialiased;
    font-family: 'LINE Seed Sans TH', system-ui, sans-serif;
}

/* Use LINE Seed Sans TH everywhere, including elements that used serif before */
.font-display,
.font-heraldic,
.font-sans {
    font-family: 'LINE Seed Sans TH', system-ui, sans-serif;
}

/* Heading kerning */
.font-display { letter-spacing: -0.01em; }
.font-heraldic { letter-spacing: 0.04em; }

/* Logo wordmark — keeps the original heraldic serif, must NOT be changed. */
.logo-text {
    font-family: 'Cinzel', serif !important;
    letter-spacing: 0.08em;
}

/* Nav underline animation */
.nav-underline {
    position: absolute;
    left: 50%;
    bottom: 4px;
    height: 2px;
    background: var(--burgundy);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width .3s ease;
}
.nav-link:hover .nav-underline { width: 1.5rem; }

/* Section eyebrow label */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: 'LINE Seed Sans TH', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    font-size: .72rem;
    color: var(--burgundy);
}
.eyebrow::before {
    content: '';
    width: 1.75rem;
    height: 1px;
    background: currentColor;
    opacity: .6;
}

/* Decorative heraldic divider */
.crest-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--burgundy);
}
.crest-divider::before,
.crest-divider::after {
    content: '';
    height: 1px;
    width: 3.5rem;
    background: linear-gradient(90deg, transparent, currentColor);
}
.crest-divider::after { transform: scaleX(-1); }

/* Reveal on scroll — content is ALWAYS visible by default.
   JavaScript adds `.is-hidden` itself right before animating, so if the
   script never runs (blocked, 404, error) nothing is ever hidden. */
.reveal {
    transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-hidden {
    opacity: 0;
    transform: translateY(28px);
}

/* Hero background pattern */
.hero-pattern {
    background-image:
        radial-gradient(circle at 15% 20%, rgba(110,31,42,.06), transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(22,35,63,.07), transparent 40%),
        radial-gradient(circle at 70% 90%, rgba(229,166,127,.18), transparent 45%);
}

/* Service card hover accent bar */
.service-card { position: relative; overflow: hidden; }
.service-card::after {
    content: '';
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    width: 4px;
    background: var(--burgundy);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .35s ease;
}
.service-card:hover::after { transform: scaleY(1); }

/* ===================== Hero slider ===================== */
.hero-track {
    transition: transform .7s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}
.hero-slide img { pointer-events: none; }

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(253,249,245,.75);
    color: var(--burgundy);
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 24px -10px rgba(22,35,63,.45);
    opacity: 0;
    transition: opacity .3s ease, background .2s ease, transform .2s ease;
    z-index: 2;
}
@media (min-width: 768px) { .hero-arrow { width: 3rem; height: 3rem; } }
.hero-slider:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: #fff; }
.hero-prev { left: .75rem; }
.hero-next { right: .75rem; }
.hero-prev:hover { transform: translateY(-50%) translateX(-2px); }
.hero-next:hover { transform: translateY(-50%) translateX(2px); }

.hero-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 9999px;
    background: rgba(253,249,245,.6);
    border: 1px solid rgba(110,31,42,.25);
    cursor: pointer;
    transition: all .3s ease;
}
.hero-dot.active {
    width: 1.6rem;
    background: var(--burgundy);
    border-color: var(--burgundy);
}

@media (max-width: 640px) { .hero-arrow { opacity: 1; } }

/* ===================== Client logo slider ===================== */
.client-logos-section { background-color: #ffffff; }
.client-slider { background-color: #ffffff; }
.client-track { will-change: transform; }
.client-logo-img {
    max-width: 100%;
    max-height: 5.5rem;
    opacity: .92;
    filter: grayscale(10%);
    transition: opacity .25s ease, filter .25s ease;
}
@media (min-width: 768px) {
    .client-logo-img { max-height: 7.5rem; }
}
@media (min-width: 1024px) {
    .client-logo-img { max-height: 9rem; }
}
.client-slide:hover .client-logo-img {
    opacity: 1;
    filter: none;
}
.client-dot {
    width: .45rem;
    height: .45rem;
    border-radius: 9999px;
    background: rgba(22,35,63,.2);
    border: 1px solid rgba(110,31,42,.2);
    cursor: pointer;
    transition: all .3s ease;
}
.client-dot.active {
    width: 1.4rem;
    background: var(--burgundy);
    border-color: var(--burgundy);
}

/* ===================== Services filter tabs ===================== */
.svc-tab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    font-weight: 600;
    padding: .5rem 1rem;
    border-radius: 9999px;
    background: #eef2f9;
    color: #28395c;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, box-shadow .25s ease, transform .15s ease;
}
.svc-tab:hover { background: #e2e9f3; transform: translateY(-1px); }
.svc-tab.active {
    background: var(--burgundy);
    color: #fdf9f5;
    box-shadow: 0 10px 24px -10px rgba(110,31,42,.55);
}
.svc-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .35rem;
    font-size: .68rem;
    border-radius: 9999px;
    background: rgba(22,35,63,.1);
    color: inherit;
}
.svc-tab.active .svc-count { background: rgba(255,255,255,.22); }

.svc-jump:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.svc-highlight { transition: background .2s ease, border-color .2s ease; }
.svc-highlight:hover { background: #fff; border-color: rgba(110,31,42,.25); }
.svc-stat { transition: transform .2s ease, box-shadow .2s ease; }
.svc-stat:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px rgba(22,35,63,.18); }

/* Section + card filter animations */
.svc-section.is-hidden-filter { display: none; }
@keyframes svcSectionIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
.svc-section.svc-anim { animation: svcSectionIn .45s cubic-bezier(.22,.61,.36,1); }
@keyframes svcCardIn {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.svc-section.svc-anim .svc-card {
    animation: svcCardIn .5s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: var(--d, 0ms);
}

/* Marquee for industries */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .reveal.is-hidden { opacity: 1; transform: none; transition: none; }
    .marquee-track { animation: none; }
}

/* ===================== Mobile bottom navigation ===================== */
@media (max-width: 1023px) {
    body {
        padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    }

    .to-top-btn {
        bottom: calc(var(--bottom-nav-h) + 0.75rem + env(safe-area-inset-bottom, 0px));
        right: 1rem;
        width: 2.75rem;
        height: 2.75rem;
    }
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: stretch;
    min-height: var(--bottom-nav-h);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(253, 249, 245, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(110, 31, 42, 0.12);
    box-shadow: 0 -8px 32px -12px rgba(22, 35, 63, 0.18);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.45rem 0.25rem 0.35rem;
    color: #28395c;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bottom-nav-item:active {
    background: rgba(110, 31, 42, 0.06);
}

.bottom-nav-item.is-active {
    color: var(--burgundy);
}

.bottom-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.bottom-nav-item.is-active .bottom-nav-icon {
    background: rgba(110, 31, 42, 0.1);
    transform: translateY(-1px);
}

.bottom-nav-label {
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.15rem;
}

@media (min-width: 380px) {
    .bottom-nav-label { font-size: 0.6875rem; }
}

/* ===================== Responsive utilities ===================== */
img, video, svg {
    max-width: 100%;
    height: auto;
}

@media (max-width: 639px) {
    .hero-arrow {
        width: 2.25rem;
        height: 2.25rem;
        opacity: 1;
    }
    .hero-prev { left: 0.5rem; }
    .hero-next { right: 0.5rem; }

    .client-logo-img { max-height: 4.5rem; }

    .svc-tab {
        font-size: 0.8125rem;
        padding: 0.45rem 0.75rem;
    }
}

@media (max-width: 1023px) {
    .svc-section .grid.sm\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
}
