/* ==========================================================================
   Turikale Print — Design System & Global Styles
   main.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GOOGLE FONTS (preloaded via <link> in head, declared here for reference)
   -------------------------------------------------------------------------- */
/* Inter: 400, 500, 600, 700, 800, 900 */


/* --------------------------------------------------------------------------
   2. TAILWIND CONFIG — defined in <script> block, referenced here
   Colors  : primary #136dec | secondary #10b981
   BG-Light: #f6f7f8 | BG-Dark: #101822
   -------------------------------------------------------------------------- */


/* --------------------------------------------------------------------------
   3. BASE RESETS & GLOBAL
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Material Symbols config */
.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    user-select: none;
    -webkit-user-select: none;
}


/* --------------------------------------------------------------------------
   4. HERO SLIDER
   -------------------------------------------------------------------------- */
.hero-slide {
    position: absolute;
    inset: 0;
    transition: opacity 700ms ease;
}


/* --------------------------------------------------------------------------
   5. KALKULATOR HARGA — Section Animations
   -------------------------------------------------------------------------- */
@keyframes calcFadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(20px, -25px) scale(1.08); }
}

@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(-18px, 20px) scale(1.05); }
}

@keyframes calcShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-8px); }
    40%       { transform: translateX(8px); }
    60%       { transform: translateX(-5px); }
    80%       { transform: translateX(5px); }
}

@keyframes calcPop {
    0%   { transform: scale(0.8); opacity: 0; }
    70%  { transform: scale(1.05); }
    100% { transform: scale(1);   opacity: 1; }
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#calc-section {
    opacity: 0;
    animation: calcFadeUp 0.8s ease forwards;
    animation-play-state: paused;
}
#calc-section.visible {
    animation-play-state: running;
}

.calc-blob-1 { animation: floatBlob1 7s ease-in-out infinite; }
.calc-blob-2 { animation: floatBlob2 9s ease-in-out infinite; }

.calc-card {
    position: relative;
    border-radius: 1.25rem;
    padding: 2.5px;
    background: linear-gradient(135deg, #136dec33, #10b98133, #136dec33);
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
}

.calc-card-inner {
    background: #f1f5f9;
    border-radius: 1.1rem;
    padding: 2rem;
}
.dark .calc-card-inner {
    background: rgb(30 41 59 / 0.5);
}

.calc-input {
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.calc-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(19, 109, 236, 0.25), 0 4px 16px rgba(19, 109, 236, 0.12);
    border-color: #136dec !important;
    transform: translateY(-2px);
}

#hitungHargaBtn {
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#hitungHargaBtn:active { transform: scale(0.97); }

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: ripple 0.55s linear;
    pointer-events: none;
}

#hasilHarga.calc-pop {
    animation: calcPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.calc-shake {
    animation: calcShake 0.4s ease;
}


/* --------------------------------------------------------------------------
   6. FEATURE SECTION — Typewriter & Card Animations
   -------------------------------------------------------------------------- */
@keyframes featureTyping {
    from { width: 0; }
    to   { width: 100%; }
}

@keyframes featureCaret {
    0%, 100% { border-color: transparent; }
    50%       { border-color: #136dec; }
}

@keyframes iconPop {
    0%   { transform: scale(0.5) rotate(-15deg); opacity: 0; }
    100% { transform: scale(1)   rotate(0deg);   opacity: 1; }
}

#feature-title {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #136dec;
    width: 0;
}
#feature-title.type-start {
    animation:
        featureTyping 1.4s steps(28, end) forwards,
        featureCaret  0.7s step-end 6 1.4s;
}

#feature-sub {
    opacity: 0;
    transition: opacity 0.6s ease 1.6s;
}
#feature-sub.fade-in { opacity: 1; }

.feat-card {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.feat-card.card-visible {
    opacity: 1;
    transform: translateY(0);
}
.feat-card:nth-child(2) { transition-delay: 0.15s; }
.feat-card:nth-child(3) { transition-delay: 0.30s; }

.feat-card.card-visible .feat-icon {
    animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.feat-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(19, 109, 236, 0.10);
}


/* --------------------------------------------------------------------------
   7. PRODUK UNGGULAN — Typewriter, Cards, Mobile Carousel
   -------------------------------------------------------------------------- */
@keyframes produkTyping {
    from { width: 0; }
    to   { width: 100%; }
}

@keyframes produkCaret {
    0%, 100% { border-color: transparent; }
    50%       { border-color: #136dec; }
}

#produk-title {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #136dec;
    width: 0;
}
#produk-title.type-start {
    animation:
        produkTyping 1s steps(16, end) forwards,
        produkCaret  0.7s step-end 5 1s;
}

#produk-sub {
    opacity: 0;
    transition: opacity 0.6s ease 1.2s;
}
#produk-sub.fade-in { opacity: 1; }

.prod-card {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.prod-card.card-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile carousel */
#produk-track-wrap {
    overflow: hidden;
    border-radius: 1rem;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
#produk-track-wrap.dragging { cursor: grabbing; }

#produk-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.prod-slide {
    flex: 0 0 78vw;
    max-width: 300px;
}

/* Show/hide desktop vs mobile */
@media (max-width: 639px) {
    #produk-grid   { display: none !important; }
    #produk-mobile { display: block !important; }
}
@media (min-width: 640px) {
    #produk-mobile { display: none !important; }
    #produk-grid   { display: grid !important; }
}

/* Dot indicators */
.prod-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #cbd5e1;
    transition: background 0.3s, width 0.3s;
    cursor: pointer;
    border: none;
    padding: 0;
}
.prod-dot.active {
    background: #136dec;
    width: 22px;
}


/* --------------------------------------------------------------------------
   8. PROFIL — TIMELINE SECTION
   -------------------------------------------------------------------------- */
#timeline-section {
    background: linear-gradient(160deg, #f0f4ff 0%, #f8faff 40%, #eef9f4 100%);
}
.dark #timeline-section {
    background: linear-gradient(160deg, #0c1424 0%, #101822 50%, #091520 100%);
}

.tl-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 1rem;
    border-radius: 9999px;
    background: linear-gradient(90deg, #136dec22, #10b98122);
    border: 1px solid #136dec33;
    color: #136dec;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tl-track { position: relative; }
.tl-track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    transform: translateX(-50%);
    background: #e2e8f0;
    border-radius: 9999px;
    z-index: 0;
}
.dark .tl-track::before { background: #1e293b; }

.tl-fill {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 0%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #136dec, #10b981);
    border-radius: 9999px;
    z-index: 1;
    transition: height 0.05s linear;
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 56px 1fr;
    align-items: center;
    gap: 0;
    margin-bottom: 4rem;
    z-index: 2;
}

@media (max-width: 767px) {
    .tl-track::before { left: 24px; }
    .tl-fill           { left: 24px; }
    .tl-item {
        grid-template-columns: 48px 1fr;
        grid-template-rows: auto;
        gap: 0 1rem;
        margin-bottom: 3rem;
    }
    .tl-node-col  { grid-column: 1; grid-row: 1; }
    .tl-card-left,
    .tl-card-right { grid-column: 2; grid-row: 1; text-align: left; }
    .tl-spacer    { display: none; }
}

.tl-node {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #cbd5e1;
    z-index: 3;
    transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}
.dark .tl-node { background: #0f172a; border-color: #334155; }

.tl-node .tl-dot-inner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.tl-item.active .tl-node {
    border-color: #136dec;
    transform: scale(1.12);
}
.tl-item.active .tl-dot-inner {
    background: linear-gradient(135deg, #136dec, #10b981);
    box-shadow: 0 0 0 6px rgba(19, 109, 236, 0.15), 0 0 20px rgba(19, 109, 236, 0.3);
}

@keyframes tlPulse {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50%       { opacity: 0;    transform: scale(1.35); }
}

.tl-node::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid #136dec;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s, transform 0.4s;
}
.tl-item.active .tl-node::after {
    opacity: 0.35;
    transform: scale(1);
    animation: tlPulse 2s ease-in-out infinite;
}

.tl-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1.25rem;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 24px rgba(19, 109, 236, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
}
.dark .tl-card {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(51, 65, 85, 0.6);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.tl-item.active .tl-card {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 8px 32px rgba(19, 109, 236, 0.12), 0 1px 4px rgba(0, 0, 0, 0.04);
}
.tl-item.active .tl-card-left  { transform: translateX(0); }
.tl-item.active .tl-card-right { transform: translateX(0); }

.tl-card-left  { transform: translateX(32px)  translateY(0); text-align: right; margin-right: 1.5rem; }
.tl-card-right { transform: translateX(-32px) translateY(0); text-align: left; margin-left: 1.5rem; }

@media (max-width: 767px) {
    .tl-card-left { text-align: left; margin-right: 0; }
}

.tl-year {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #136dec, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}
.tl-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.35rem;
}
.dark .tl-title { color: #f1f5f9; }
.tl-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
}
.dark .tl-desc { color: #94a3b8; }

.tl-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #136dec18, #10b98118);
    color: #136dec;
    font-size: 1rem;
    margin-bottom: 0.6rem;
}


/* --------------------------------------------------------------------------
   9. PROFIL — MOBILE SWIPE CAROUSEL (PKL section)
   -------------------------------------------------------------------------- */
.mobile-swipe-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mobile-swipe-track::-webkit-scrollbar { display: none; }

.mobile-swipe-item {
    flex: 0 0 85%;
    max-width: 280px;
    scroll-snap-align: center;
}

@media (min-width: 640px) {
    .mobile-swipe-track {
        display: grid;
        overflow-x: visible;
        scroll-snap-type: none;
    }
    .mobile-swipe-item {
        flex: none;
        max-width: none;
    }
}

.mobile-swipe-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}
@media (min-width: 640px) {
    .mobile-swipe-dots { display: none; }
}

.swipe-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #cbd5e1;
    transition: background 0.3s, width 0.3s;
    cursor: pointer;
    border: none;
    padding: 0;
}
.swipe-dot.active {
    background: #136dec;
    width: 22px;
}


/* --------------------------------------------------------------------------
   10. ACCESSIBILITY
   -------------------------------------------------------------------------- */
/* Visible focus ring for keyboard navigation */
:focus-visible {
    outline: 2px solid #136dec;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip to main content */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #136dec;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0 0.5rem 0.5rem;
    font-weight: 700;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}


/* --------------------------------------------------------------------------
   11. UTILITY
   -------------------------------------------------------------------------- */
/* WhatsApp floating button */
.wa-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 40;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}
.wa-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
}

/* Smooth image loading */
img {
    max-width: 100%;
    height: auto;
}

/* Pagination active state consistency */
.pagination-active {
    background: #136dec;
    color: white;
    border-color: #136dec;
}

/* Badge discount */
.badge-discount {
    background: #ff4d4f;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 0.125rem;
}
