/* ═══════════════════════════════════════════════════════════
   Thongpin Enterprise — spacing, hero, luxury IT systems brand
   ═══════════════════════════════════════════════════════════ */

:root {
    --header-h: 80px;
    --hero-min-h: min(92vh, 960px);
    --section-y: clamp(72px, 9vw, 112px);
    --section-y-sm: clamp(48px, 6vw, 72px);
    --content-max: 1280px;
    --gold-line: linear-gradient(90deg, transparent, var(--gold), transparent);
    --enterprise-shadow: 0 24px 64px rgba(61, 43, 31, 0.12);
    --enterprise-shadow-lg: 0 32px 80px rgba(61, 43, 31, 0.18);
}

html {
    scroll-padding-top: calc(var(--header-h) + 12px);
}

section[id] {
    scroll-margin-top: calc(var(--header-h) + 12px);
}

.container {
    max-width: var(--content-max);
}

/* ── Header — full viewport width, logo/actions at screen edges ── */
.header-inner {
    height: var(--header-h);
    gap: 24px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.header-logo {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
}

.header-actions {
    gap: 14px;
    padding-right: max(12px, env(safe-area-inset-right, 0px));
}

.logo-img {
    height: 52px;
    max-width: min(280px, 34vw);
}

.nav-link {
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .02em;
}

/* ── Hero — full cinematic, no overlap with fixed header ── */
.hero {
    position: relative;
    min-height: var(--hero-min-h);
    height: auto;
    padding-top: var(--header-h);
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    min-height: calc(var(--hero-min-h) - var(--header-h));
}

.hero-slider,
.hero-slide {
    min-height: calc(var(--hero-min-h) - var(--header-h));
}

.hero-slide {
    align-items: center;
}

.hero-content {
    max-width: 820px;
    padding-top: clamp(40px, 7vh, 88px);
    padding-bottom: clamp(88px, 14vh, 160px);
}

.hero-badge {
    padding: 8px 20px;
    margin-bottom: 20px;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1.08;
    margin-bottom: 20px;
    letter-spacing: -.03em;
}

.hero p {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    max-width: 580px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    gap: 18px;
}

.hero-buttons .btn {
    padding: 16px 36px;
    font-size: .95rem;
}

.hero-overlay {
    background: linear-gradient(108deg,
        rgba(26, 20, 16, 0.92) 0%,
        rgba(45, 32, 24, 0.72) 45%,
        rgba(61, 43, 31, 0.45) 72%,
        rgba(61, 43, 31, 0.28) 100%) !important;
}

.hero-dots {
    bottom: clamp(32px, 5vh, 56px);
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
}

.hero-dot {
    width: 48px;
    height: 3px;
}

.hero-dot.active {
    width: 64px;
}

.hero-scroll {
    bottom: clamp(32px, 5vh, 56px);
    right: clamp(24px, 4vw, 48px);
}

.hero-decor .orb-1 {
    width: 680px;
    height: 680px;
    opacity: .6;
}

/* ── Stats — subtle float, clear separation ── */
.stats {
    margin-top: clamp(-56px, -5vw, -32px);
    padding: 0 0 var(--section-y-sm);
    position: relative;
    z-index: 3;
}

.stats-grid {
    border-radius: 20px;
    box-shadow: var(--enterprise-shadow-lg);
}

.stat-item {
    padding: clamp(28px, 4vw, 40px) 24px;
}

.stat-num {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
}

.stat-label {
    font-size: .88rem;
    margin-top: 10px;
    letter-spacing: .04em;
}

/* ── Credibility strip (new) ── */
.credibility {
    padding: var(--section-y-sm) 0;
    background: linear-gradient(180deg, var(--warm-white, #FFFCF8) 0%, var(--cool-light, #FAF6F0) 100%);
    border-bottom: 1px solid rgba(201, 162, 39, 0.12);
}

.credibility-head {
    text-align: center;
    margin-bottom: clamp(28px, 4vw, 40px);
}

.credibility-head .section-tag {
    margin-bottom: 12px;
}

.credibility-head h2 {
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--on-light, #4A3728);
}

.credibility-head p {
    margin-top: 10px;
    font-size: .92rem;
    color: var(--on-light-muted, #6B5344);
    max-width: 640px;
    margin-inline: auto;
    line-height: 1.65;
}

.credibility-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cred-card {
    position: relative;
    padding: 28px 24px;
    background: var(--card-light, #FFFCF8);
    border: 1px solid rgba(201, 162, 39, 0.22);
    border-radius: 16px;
    box-shadow: var(--card-light-shadow, 0 8px 28px rgba(92, 64, 51, 0.09));
    transition: var(--transition);
    overflow: hidden;
}

.cred-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
}

.cred-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--enterprise-shadow);
    border-color: rgba(201, 162, 39, 0.4);
}

.cred-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(201, 162, 39, 0.18), rgba(201, 162, 39, 0.06));
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 12px;
    color: var(--gold-dark);
    margin-bottom: 16px;
    font-size: 1.35rem;
}

.cred-card h3 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--on-light, #4A3728);
    margin-bottom: 8px;
    letter-spacing: -.01em;
}

.cred-card p {
    font-size: .82rem;
    line-height: 1.6;
    color: var(--on-light-muted, #6B5344);
}

/* ── Trust strip ── */
.trust-strip {
    padding: var(--section-y-sm) 0;
}

.trust-inner {
    padding: clamp(24px, 3vw, 32px) clamp(24px, 4vw, 40px);
    border-radius: 16px;
}

.trust-label {
    font-size: .72rem;
    letter-spacing: .22em;
    margin-bottom: 16px;
}

.trust-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.trust-tags span {
    padding: 8px 16px;
    font-size: .78rem;
    border-radius: 8px;
}

/* ── Global sections ── */
.section {
    padding: var(--section-y) 0;
}

.section-header {
    margin-bottom: clamp(32px, 4vw, 48px);
}

.section-header h2 {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    letter-spacing: -.035em;
}

.section-header p {
    font-size: .98rem;
    margin-top: 12px;
    max-width: 680px;
    line-height: 1.65;
}

.section-header--compact {
    margin-bottom: clamp(28px, 3.5vw, 40px);
}

/* Decorative section divider */
.section::after {
    content: none;
}

.about-v2 {
    padding: var(--section-y) 0;
}

.about-v2-inner {
    gap: clamp(24px, 3vw, 36px);
}

.about-feature {
    padding: clamp(32px, 4vw, 48px);
    border-radius: 20px;
    gap: clamp(32px, 5vw, 56px);
    box-shadow: var(--enterprise-shadow);
}

.about-feature-copy h2 {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.about-feature .about-lead {
    font-size: .95rem;
    line-height: 1.75;
    margin-bottom: 20px;
}

.about-feature-media {
    min-height: clamp(260px, 32vw, 360px);
    border-radius: 14px;
}

.about-duo {
    gap: 20px;
}

.about-duo-card {
    padding: clamp(24px, 3vw, 32px);
}

.about-values {
    padding: clamp(24px, 3vw, 32px);
    border-radius: 16px;
}

.about-values-grid {
    gap: 14px;
}

.about-value {
    padding: 20px 18px;
}

/* ── Services ── */
.services {
    padding: var(--section-y) 0;
}

.service-tabs {
    margin-bottom: clamp(32px, 4vw, 48px);
    max-width: 760px;
    padding: 8px;
    border-radius: 16px;
}

.tab-btn {
    padding: 14px 22px;
    font-size: .88rem;
}

.services-intro--compact {
    padding: clamp(24px, 3vw, 32px) clamp(28px, 4vw, 40px);
    margin-bottom: clamp(28px, 3vw, 36px);
    border-radius: 18px;
}

.services-intro-text h3 {
    font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.services-intro-text p {
    font-size: .92rem;
    line-height: 1.65;
}

.services-grid--enterprise,
.services-grid--compact {
    gap: clamp(16px, 2vw, 24px);
}

.service-card {
    border-radius: 18px;
}

.service-card-head {
    padding: 28px 28px 0;
}

.service-icon {
    width: 52px;
    height: 52px;
}

.service-card h3 {
    padding: 20px 28px 0;
    font-size: 1.02rem;
}

.service-card p {
    padding: 12px 28px 0;
    font-size: .88rem;
    line-height: 1.7;
}

.service-card-foot {
    padding: 20px 28px 28px;
}

/* ── Process ── */
.process-grid {
    gap: clamp(16px, 2vw, 24px);
}

.process-step {
    padding: clamp(28px, 3vw, 36px) clamp(20px, 2.5vw, 28px);
    border-radius: 16px;
}

.process-num {
    font-size: clamp(2.25rem, 3vw, 2.75rem);
    margin-bottom: 14px;
}

.process-step h4 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.process-step p {
    font-size: .88rem;
    line-height: 1.65;
}

/* ── Portfolio ── */
.portfolio {
    padding: var(--section-y) 0;
}

.portfolio-grid {
    gap: clamp(20px, 2.5vw, 28px);
}

.portfolio-mock {
    height: clamp(200px, 22vw, 260px);
}

.portfolio-info {
    padding: clamp(20px, 2.5vw, 28px);
}

.portfolio-info h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.portfolio-info p {
    font-size: .88rem;
    line-height: 1.6;
}

.portfolio-slider {
    min-height: 380px;
}

.portfolio-pager {
    margin-top: clamp(24px, 3vw, 36px);
    gap: 10px;
}

/* ── Why / Tech ── */
.why-grid {
    gap: clamp(16px, 2vw, 24px);
}

.why-card {
    padding: clamp(28px, 3vw, 36px) clamp(22px, 2.5vw, 28px);
    border-radius: 16px;
}

.why-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.why-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.why-card p {
    font-size: .88rem;
    line-height: 1.65;
}

.tech-grid {
    gap: 12px;
}

.tech-badge {
    padding: 12px 22px;
    font-size: .85rem;
}

/* ── CTA ── */
.cta {
    padding: clamp(80px, 10vw, 120px) 0;
}

.cta-inner h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    margin-bottom: 16px;
}

.cta-inner p {
    font-size: 1.05rem;
    margin-bottom: 32px;
    max-width: 560px;
}

.cta .btn-lg {
    padding: 18px 44px;
    font-size: 1rem;
}

/* ── Contact ── */
.contact-grid {
    gap: clamp(40px, 5vw, 64px);
}

.contact-item {
    padding: 20px 22px;
    margin-bottom: 16px;
    border-radius: 14px;
}

.contact-item span {
    width: 48px;
    height: 48px;
}

.contact-map--photo {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(201, 162, 39, 0.25);
    box-shadow: var(--card-light-shadow);
    min-height: 220px;
}

.contact-map--photo img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}

.contact-map--photo:hover img {
    transform: scale(1.04);
}

.contact-map-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    padding: 10px 18px;
    background: rgba(26, 20, 16, 0.85);
    backdrop-filter: blur(12px);
    color: var(--gold-light);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 8px;
    border: 1px solid rgba(201, 162, 39, 0.35);
}

.contact-form {
    padding: clamp(32px, 4vw, 44px);
    border-radius: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
}

/* ── Footer ── */
.footer {
    padding: clamp(64px, 8vw, 88px) 0 32px;
}

.footer-grid {
    gap: clamp(40px, 5vw, 64px);
    margin-bottom: clamp(40px, 5vw, 56px);
}

.footer-brand p {
    margin-top: 20px;
    font-size: .95rem;
    line-height: 1.75;
    max-width: 360px;
}

/* ── Night theme tweaks ── */
[data-theme="night"] .credibility {
    background: transparent;
    border-bottom-color: rgba(201, 162, 39, 0.1);
}

[data-theme="night"] .cred-card {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--glass-blur));
}

[data-theme="night"] .cred-card h3 {
    color: var(--text-primary);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .credibility-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-h: 72px;
        --hero-min-h: min(88vh, 780px);
    }

    .header-inner {
        height: var(--header-h);
    }

    .header-logo {
        padding-left: max(12px, env(safe-area-inset-left, 0px));
    }

    .header-actions {
        padding-right: max(12px, env(safe-area-inset-right, 0px));
    }

    .logo-img {
        height: 44px;
    }

    .hero-content {
        padding-top: 32px;
        padding-bottom: 100px;
    }

    .hero h1 {
        font-size: clamp(1.85rem, 7vw, 2.5rem);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .stats {
        margin-top: -24px;
    }

    .credibility-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: clamp(56px, 12vw, 72px) 0;
    }
}
