/* ============================================
   CKH Accounting - PlayStation Design System
   Three-canvas (black / white / blue) · weight-300 display
   Flat surfaces · pill CTAs · 8px cards · hairline dividers
   ============================================ */

/* Base */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}
body {
    font-family: 'Inter', 'IBM Plex Sans Thai', sans-serif;
    color: #000000;
    background-color: #ffffff;
    overflow-x: hidden;
    line-height: 1.5;
}
/* Display tier renders light; neutralise any decorative italics (PS: no italic) */
.font-display { font-style: normal; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f3f3f3; }
::-webkit-scrollbar-thumb { background: #0070d1; }
::-webkit-scrollbar-thumb:hover { background: #0064b7; }

/* Selection */
::selection { background: #0070d1; color: #ffffff; }

/* Focus visible (accessibility) */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0070d1;
    outline-offset: 2px;
}

/* ============================================
   LOADING SCREEN
   ============================================ */
#loading-screen { transition: opacity 0.6s ease, visibility 0.6s ease; }
#loading-screen.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo { animation: loader-fade 1.6s ease-in-out infinite alternate; }
.loader-line { width: 0; animation: loader-line 1.6s ease-in-out forwards; }
@keyframes loader-fade {
    from { opacity: 0.45; }
    to { opacity: 1; }
}
@keyframes loader-line { to { width: 180px; } }

/* ============================================
   NAVBAR (persistent dark, hairline on scroll)
   ============================================ */
#navbar { background-color: transparent; }
#navbar.scrolled {
    background-color: #000000;
    border-bottom: 1px solid rgba(229,229,229,0.2);
}
#navbar.scrolled #nav-inner {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
#navbar.scrolled #logo-text { font-size: 1.75rem; }

.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0070d1;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ============================================
   BUTTONS  (pills · rounded-full)
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', 'IBM Plex Sans Thai', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.45px;
    line-height: 1.25;
    padding: 12px 28px;
    min-height: 48px;
    border-radius: 9999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    text-align: center;
}
.btn-sm {
    font-size: 14px;
    letter-spacing: 0.324px;
    padding: 9px 20px;
    min-height: 40px;
}
.btn:active { transform: translateY(1px); }

/* Primary — PlayStation Blue (universal action) */
.btn-primary { background: #0070d1; color: #ffffff; }
.btn-primary:hover { background: #0064b7; }
.btn-primary:active { background: #004d8d; }

/* Commerce — Orange (buy / subscribe / package) */
.btn-commerce { background: #d53b00; color: #ffffff; }
.btn-commerce:hover { background: #aa2f00; }
.btn-commerce:active { background: #aa2f00; }

/* Secondary outline — light canvas */
.btn-ghost-light {
    background: transparent;
    color: #000000;
    border-color: #cccccc;
}
.btn-ghost-light:hover { background: #f3f3f3; border-color: #000000; }

/* Secondary outline — dark canvas */
.btn-ghost-dark {
    background: transparent;
    color: #ffffff;
    border-color: rgba(229,229,229,0.2);
}
.btn-ghost-dark:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }

/* ============================================
   HERO
   ============================================ */
/* Soft active shadow token reused for the floating light mini-card */
.shadow-soft { box-shadow: 0 4px 12px rgba(0,0,0,0.16); }

/* Hero text reveal */
.hero-line {
    transform: translateY(36px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.hero-line.show { opacity: 1 !important; transform: translateY(0); }
.hero-line:nth-child(1) { transition-delay: 0.15s; }
.hero-line:nth-child(2) { transition-delay: 0.30s; }
.hero-line:nth-child(3) { transition-delay: 0.45s; }

[data-hero-anim] {
    transform: translateY(28px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
[data-hero-anim].show { opacity: 1 !important; transform: translateY(0); }
[data-hero-anim="1"] { transition-delay: 0.10s; }
[data-hero-anim="2"] { transition-delay: 0.65s; }
[data-hero-anim="3"] { transition-delay: 0.85s; }
[data-hero-anim="4"] { transition-delay: 1.05s; }
[data-hero-anim="5"] { transition-delay: 0.45s; }

.hero-float { animation: hero-float 6s ease-in-out infinite; }
@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
.floating-card-1 { animation: float-card-1 5s ease-in-out infinite; }
.floating-card-2 { animation: float-card-2 6s ease-in-out infinite; }
@keyframes float-card-1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes float-card-2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Hero progress bars */
.hero-bar-1 { animation: grow-bar-1 1.8s cubic-bezier(0.4,0,0.2,1) 1.4s forwards; }
.hero-bar-2 { animation: grow-bar-2 1.8s cubic-bezier(0.4,0,0.2,1) 1.6s forwards; }
.hero-bar-3 { animation: grow-bar-3 1.8s cubic-bezier(0.4,0,0.2,1) 1.8s forwards; }
@keyframes grow-bar-1 { to { width: 85%; } }
@keyframes grow-bar-2 { to { width: 45%; } }
@keyframes grow-bar-3 { to { width: 70%; } }

.scroll-indicator { animation: scroll-pulse 2s ease-in-out infinite; }
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.25); }
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee-container { overflow: hidden; white-space: nowrap; }
.marquee-content {
    display: inline-flex;
    align-items: center;
    animation: marquee 40s linear infinite;
    gap: 2.5rem;
}
.marquee-item {
    font-family: 'Roboto', 'IBM Plex Sans Thai', sans-serif;
    font-weight: 300;
    font-size: 1.05rem;
    color: #cccccc;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.marquee-dot { color: #0070d1; font-size: 1.25rem; }
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ============================================
   "ON PLAYSTATION" gradient band (Why Us)
   The single allowed chrome gradient: elevated -> black
   ============================================ */
.why-band {
    background: linear-gradient(180deg, #121314 0%, #000000 100%);
}

/* ============================================
   SERVICE CARDS  (flat · 8px · hairline -> blue on hover)
   ============================================ */
.service-card {
    position: relative;
    background: #f5f7fa;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 2.5rem 2rem;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    border-color: #0070d1;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.16);
}
.service-number {
    position: absolute;
    top: 1.75rem;
    right: 1.75rem;
    font-size: 2.5rem;
    font-weight: 300;
    color: rgba(0,0,0,0.08);
    line-height: 1;
    transition: color 0.3s ease;
}
.service-card:hover .service-number { color: rgba(0,112,209,0.25); }

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: rgba(0,112,209,0.1);
    color: #0070d1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.service-card:hover .service-icon { background: #0070d1; color: #ffffff; }

.service-title {
    font-family: 'Inter', 'IBM Plex Sans Thai', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}
.service-desc {
    color: rgba(0,0,0,0.6);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0070d1;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.324px;
    transition: gap 0.3s ease;
}
.service-card:hover .service-link { gap: 0.875rem; }

/* ============================================
   WHY US CARDS  (dark · hairline)
   ============================================ */
.why-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: #181818;
    border: 1px solid rgba(229,229,229,0.2);
    border-radius: 8px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.why-card:hover { border-color: #0070d1; transform: translateY(-4px); }
.why-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: rgba(0,112,209,0.15);
    color: #0070d1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.why-card:hover .why-icon { background: #0070d1; color: #ffffff; }
.why-title {
    font-family: 'Inter', 'IBM Plex Sans Thai', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.75rem;
}
.why-desc {
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    line-height: 1.5;
}

/* ============================================
   TEAM CARDS
   ============================================ */
.team-card { transition: transform 0.3s ease; }
.team-card:hover { transform: translateY(-4px); }
.team-avatar {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 220px;
}
.team-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.team-card:hover .team-avatar-inner { box-shadow: 0 4px 12px rgba(0,0,0,0.16); }
.team-badge {
    position: absolute;
    bottom: -8px;
    left: 1rem;
    background: #0070d1;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 12px;
    padding: 0.25rem 0.85rem;
    border-radius: 9999px;
    letter-spacing: 0.08em;
}

/* ============================================
   PRICING CARDS  (dark tier band; popular = blue card)
   ============================================ */
.pricing-card { position: relative; transition: transform 0.3s ease; }
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card-inner {
    background: #181818;
    border: 1px solid rgba(229,229,229,0.2);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    height: 100%;
    transition: border-color 0.3s ease;
}
.pricing-card:hover .pricing-card-inner { border-color: #0070d1; }

.pricing-card.popular .pricing-card-inner {
    background: #0070d1;
    border-color: #0070d1;
}
.pricing-card.popular { transform: scale(1.03); }
.pricing-card.popular:hover { transform: scale(1.03) translateY(-4px); }

.popular-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #0070d1;
    padding: 0.35rem 1.1rem;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 2;
}
.pricing-price { line-height: 1; padding: 0.5rem 0; }
.pricing-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 16px;
    color: rgba(255,255,255,0.7);
}
.pricing-feature-off { opacity: 0.4; }
.pricing-check { width: 18px; height: 18px; color: #0070d1; flex-shrink: 0; }
.pricing-check-on-blue { color: #ffffff; }

/* ============================================
   ARTICLE CARDS  (light · 8px · flat)
   ============================================ */
.article-card {
    background: #ffffff;
    border: 1px solid #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.article-card:hover {
    border-color: #0070d1;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.16);
}
.article-image {
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-image-text {
    font-size: 3.5rem;
    font-weight: 300;
    color: rgba(255,255,255,0.95);
    letter-spacing: 0.05em;
    transition: transform 0.4s ease;
}
.article-card:hover .article-image-text { transform: scale(1.06); }
.article-content { padding: 1.5rem; }
.article-category {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0,112,209,0.1);
    color: #0070d1;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.article-date { font-size: 12px; color: #6b6b6b; }
.article-title {
    font-family: 'Roboto', 'IBM Plex Sans Thai', sans-serif;
    font-weight: 300;
    font-size: 22px;
    color: #000000;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}
.article-card:hover .article-title { color: #0070d1; }
.article-excerpt {
    color: rgba(0,0,0,0.6);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}
.article-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0070d1;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.324px;
    transition: gap 0.3s ease;
}
.article-card:hover .article-link { gap: 0.875rem; }

/* ============================================
   TESTIMONIALS  (dark cards · blue stars)
   ============================================ */
.testimonials-swiper { padding-bottom: 3rem !important; }
.swiper-slide { height: auto; }
.testimonial-card {
    background: #181818;
    border: 1px solid rgba(229,229,229,0.2);
    border-radius: 8px;
    padding: 2.5rem;
    height: 100%;
    position: relative;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.testimonial-card:hover { border-color: #0070d1; transform: translateY(-4px); }
.testimonial-quote {
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 5rem;
    line-height: 1;
    color: rgba(0,112,209,0.25);
    font-weight: 300;
}
.testimonial-stars {
    color: #0070d1;
    margin-bottom: 1rem;
    font-size: 1rem;
    letter-spacing: 0.15em;
}
.testimonial-text {
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 2rem;
    min-height: 7em;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(229,229,229,0.2);
}
.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 400;
    flex-shrink: 0;
}
.testimonial-name {
    font-family: 'Inter', 'IBM Plex Sans Thai', sans-serif;
    font-weight: 600;
    color: #ffffff;
    font-size: 15px;
}
.testimonial-company { font-size: 12px; color: #cccccc; margin-top: 0.125rem; }

.testimonials-swiper .swiper-pagination-bullet {
    background: rgba(255,255,255,0.3);
    opacity: 1;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
}
.testimonials-swiper .swiper-pagination-bullet-active {
    background: #0070d1;
    width: 28px;
    border-radius: 4px;
}

/* ============================================
   FAQ  (support-row style · hairline divider)
   ============================================ */
.faq-item { border-bottom: 1px solid #f3f3f3; }
.faq-item:first-child { border-top: 1px solid #f3f3f3; }
.faq-question {
    list-style: none;
    cursor: pointer;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: 'Inter', 'IBM Plex Sans Thai', sans-serif;
    font-weight: 600;
    color: #000000;
    font-size: 18px;
    user-select: none;
    transition: color 0.3s ease;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { color: #0070d1; }
.faq-icon {
    font-size: 1.5rem;
    color: #0070d1;
    transition: transform 0.4s ease;
    flex-shrink: 0;
    line-height: 1;
    font-weight: 300;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-answer {
    padding: 0 0 20px;
    color: rgba(0,0,0,0.6);
    font-size: 16px;
    line-height: 1.6;
    max-width: 60ch;
    animation: faq-fade 0.4s ease;
}
@keyframes faq-fade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   CONTACT FORM  (white card · 4px inputs)
   ============================================ */
.contact-form {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid #f3f3f3;
}
.form-group { position: relative; }
.form-label {
    display: block;
    font-size: 13px;
    color: #000000;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    color: #000000;
    font-family: 'Inter', 'IBM Plex Sans Thai', sans-serif;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}
.form-input::placeholder { color: rgba(0,0,0,0.4); }
.form-input:focus {
    border-color: #0070d1;
    box-shadow: 0 0 0 1px #0070d1;  /* simulates 2px focus border, no layout shift */
}
.form-input.error { border-color: #c81b3a; box-shadow: 0 0 0 1px #c81b3a; }
.form-error {
    display: none;
    color: #c81b3a;
    font-size: 12px;
    margin-top: 0.375rem;
}
.form-group.has-error .form-error { display: block; }

/* ============================================
   CONTACT INFO CARDS
   ============================================ */
.contact-info-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #f3f3f3;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.contact-info-card:hover { border-color: #0070d1; transform: translateX(4px); }
.contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(0,112,209,0.1);
    color: #0070d1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.contact-info-card:hover .contact-icon { background: #0070d1; color: #ffffff; }
.contact-label {
    font-size: 12px;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}
.contact-value {
    display: block;
    font-family: 'Inter', 'IBM Plex Sans Thai', sans-serif;
    font-weight: 600;
    color: #000000;
    font-size: 16px;
    transition: color 0.3s ease;
}
.contact-value:hover { color: #0070d1; }
.contact-value-sub {
    display: block;
    font-size: 14px;
    color: #6b6b6b;
    margin-top: 0.125rem;
    transition: color 0.3s ease;
}
.contact-value-sub:hover { color: #0070d1; }
.contact-value-text { color: #000000; font-size: 14px; line-height: 1.6; }

/* ============================================
   FOOTER  (blue band)
   ============================================ */
.footer-link {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}
.footer-link:hover { color: #ffffff; transform: translateX(4px); }
.social-link {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.25);
}
.social-link:hover { background: #ffffff; color: #0070d1; transform: translateY(-3px); }

/* ============================================
   BACK TO TOP
   ============================================ */
#back-to-top.show { opacity: 1; visibility: visible; }
#back-to-top:hover { transform: translateY(-3px); }

/* ============================================
   AOS pointer-events guard
   ============================================ */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .testimonial-card { padding: 1.75rem; }
    .testimonial-text { min-height: auto; }
    .contact-form { padding: 1.75rem; }
    .pricing-card.popular { transform: scale(1); }
    .pricing-card.popular:hover { transform: scale(1) translateY(-4px); }
    .marquee-item { font-size: 0.9rem; }
    .service-card { padding: 2rem 1.5rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hero-line, [data-hero-anim] { opacity: 1 !important; transform: none !important; }
}
