/* =============================================================================
   PT. Ichikara — Global Stylesheet
   =============================================================================
   Design direction: "Japanese Premium Minimal" (Ma / 間 — beauty of empty space).
   Custom styles that extend Tailwind CSS. Keep Tailwind utilities in HTML;
   put only component-level or non-Tailwind styles here.

   INDEX:
   1. Base & typography
   2. Material Symbols
   3. Decorative watermark & section divider
   4. Accent borders
   5. Header / Nav (transparent → solid on scroll)
   6. Accordion (FAQ)
   7. Cards (service / story / generic hover)
   8. Image placeholder
   9. Tab navigation
   10. Animations & transitions (fade-in on scroll)
   11. Client logo marquee
   ============================================================================= */


/* =============================================================================
   1. Base & typography
   ============================================================================= */

html {
    scroll-behavior: smooth;
}

/* Slightly larger base body text for premium readability (17px) */
body {
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus ring for keyboard accessibility (uses new vivid red) */
:focus-visible {
    outline: 2px solid #c0392b;
    outline-offset: 2px;
}

/* Wide-tracked uppercase label helper */
.label-kicker {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 12px;
    font-weight: 600;
}


/* =============================================================================
   2. Material Symbols
   ============================================================================= */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}


/* =============================================================================
   3. Decorative watermark & section divider
   ============================================================================= */

/* Large kanji used as a quiet background accent */
.japanese-watermark {
    font-family: 'Noto Serif JP', serif;
    opacity: 0.05;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

/* Thin horizontal rule used to separate sections instead of color blocks */
.ma-divider {
    height: 1px;
    width: 100%;
    background-color: #e8e1d6;
    border: 0;
}


/* =============================================================================
   4. Accent borders
   Thin left-border highlight used on cards and content blocks.
   ============================================================================= */

.accent-red  { border-left: 3px solid #c0392b; } /* secondary  */
.accent-navy { border-left: 3px solid #0a0a0a; } /* primary    */
.accent-gold { border-left: 3px solid #b8960c; } /* tertiary   */

/* Legacy aliases from original design (kept for backward compat) */
.accent-border-red  { border-left: 3px solid #c0392b; }
.accent-border-navy { border-left: 3px solid #0a0a0a; }


/* =============================================================================
   5. Header / Nav
   Transparent over the hero at the top of the page; turns to a warm-white
   solid bar once the user scrolls (class "scrolled" toggled by header-loader.js).
   ============================================================================= */

#main-header {
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

#main-header.scrolled {
    background-color: rgba(253, 252, 250, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom-color: rgba(10, 10, 10, 0.08);
}

/* Logo: white (inverted) over the dark hero, full color once scrolled */
.hdr-logo {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}
#main-header.scrolled .hdr-logo {
    filter: none;
}

/* Nav links: white at top, ink once scrolled */
.hdr-link {
    color: #ffffff;
    transition: color 0.25s ease;
}
.hdr-link:hover {
    color: #ffb4a9;
}
#main-header.scrolled .hdr-link {
    color: #1a1a1a;
}
#main-header.scrolled .hdr-link:hover {
    color: #c0392b;
}

/* Hamburger / icon buttons inherit the same color treatment */
.hdr-icon {
    color: #ffffff;
    transition: color 0.25s ease;
}
#main-header.scrolled .hdr-icon {
    color: #1a1a1a;
}

/* Active nav link (set by header-loader.js based on current page) */
.nav-active {
    color: #c0392b !important;
    position: relative;
}
.nav-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background-color: #c0392b;
}


/* =============================================================================
   6. Accordion (FAQ)
   Toggle open state by adding class "open" to .accordion-item via JS.
   ============================================================================= */

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
}

.accordion-item.open .accordion-content {
    max-height: 600px;
}

.accordion-arrow {
    transition: transform 0.25s ease;
}

.accordion-item.open .accordion-arrow {
    transform: rotate(180deg);
}

/* Native <details> accordion */
details > summary {
    list-style: none;
    cursor: pointer;
}
details > summary::-webkit-details-marker {
    display: none;
}
details > summary .details-arrow {
    transition: transform 0.25s ease;
}
details[open] > summary .details-arrow {
    transform: rotate(180deg);
}


/* =============================================================================
   7. Cards
   ============================================================================= */

/* Service card: thin border that warms to red, gentle lift, smooth scale */
.service-card {
    border-color: #e8e1d6;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    border-color: #c0392b;
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(10, 10, 10, 0.08);
}

/* Story card: red accent line on the left appears on hover (no layout shift) */
.story-card {
    border-left: 3px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.story-card:hover {
    border-left-color: #c0392b;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(10, 10, 10, 0.08);
}

/* Generic card lift on hover */
.card-hover {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.card-hover:hover {
    border-color: #c0392b;
    box-shadow: 0 12px 32px rgba(10, 10, 10, 0.08);
    transform: translateY(-4px);
}


/* =============================================================================
   8. Image placeholder
   ============================================================================= */

.img-placeholder {
    background-color: #f0ebe4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #6b6660;
    font-size: 12px;
    font-family: Inter, sans-serif;
    text-align: center;
    padding: 16px;
    width: 100%;
    height: 100%;
}

.img-placeholder-icon {
    font-size: 28px;
    line-height: 1;
}

.img-placeholder-label {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #0a0a0a;
    opacity: 0.6;
}


/* =============================================================================
   9. Tab navigation
   ============================================================================= */

.tab-active {
    border-bottom: 3px solid #c0392b;
    color: #1a1a1a;
}

/* Filter tabs on success-story.html keep a pill look when active */
.filter-tab.tab-active {
    background-color: #0a0a0a;
    color: #ffffff;
    border-bottom: 0;
}


/* =============================================================================
   10. Animations & transitions
   ============================================================================= */

/* Soft hover lift used across multiple pages */
.hover-lift {
    transition: transform 0.25s ease;
}
.hover-lift:hover {
    transform: translateY(-3px);
}

/* Soft all-property transition */
.transition-soft {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll-triggered fade-in (observer added in header-loader.js).
   Elements get .fade-in; the observer adds .visible when in view. */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .service-card:hover,
    .story-card:hover,
    .card-hover:hover,
    .hover-lift:hover {
        transform: none;
    }
    .marquee-track {
        animation: none;
    }
}


/* =============================================================================
   11. Client logo marquee (2-row, opposite directions, edge-fade mask)
   Structure (see beranda.html #client-strip):
     .marquee-wrap > .marquee-row (x2) > .marquee-track (x2, 2nd is the
     aria-hidden duplicate that keeps the loop seamless).
   ============================================================================= */

.marquee-wrap {
    display: flex;
    flex-direction: column;
    gap: 40px;
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-row {
    display: flex;
    overflow: hidden;
    width: 100%;
}

.marquee-track {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 72px;
    padding-right: 72px;
    animation: marquee-left 28s linear infinite;
}

.marquee-row--right .marquee-track {
    animation-name: marquee-right;
}

/* Pause both tracks in a row together when hovered anywhere on that row */
.marquee-row:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

@keyframes marquee-right {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}
