/* =========================================================
   RSUD Kawali — Design System
   Signature motif: the pulse/EKG line — a hospital "reads vitals"
   and this site borrows that line as a recurring mark of care.
   ========================================================= */

:root {
    /* Color */
    --c-primary: #0F6E6B;          /* Kawali Teal */
    --c-primary-dark: #0A4C4A;
    --c-primary-darker: #0B2A28;   /* Night Teal — deep ink */
    --c-primary-light: #E8F5F1;    /* Soft Mint */
    --c-primary-lighter: #F4FAF8;
    --c-accent: #F2A93B;           /* Warm Amber */
    --c-accent-dark: #D98F1E;
    --c-ink: #12211E;
    --c-slate: #55665F;
    --c-slate-light: #8A9A94;
    --c-bg: #FBFBF8;               /* Cloud White */
    --c-white: #FFFFFF;
    --c-border: #E3EAE7;
    --c-danger: #D0483A;

    /* Type */
    --f-display: 'Fraunces', 'Georgia', serif;
    --f-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --f-mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;

    /* Radius & shadow */
    --r-sm: 10px;
    --r-md: 18px;
    --r-lg: 28px;
    --r-pill: 999px;
    --shadow-sm: 0 2px 10px rgba(11, 42, 40, 0.06);
    --shadow-md: 0 14px 34px rgba(11, 42, 40, 0.10);
    --shadow-lg: 0 26px 60px rgba(11, 42, 40, 0.16);

    --container: 1220px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--f-body);
    color: var(--c-ink);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
    font-family: var(--f-display);
    color: var(--c-primary-darker);
    font-weight: 600;
    letter-spacing: -0.01em;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }

::selection { background: var(--c-accent); color: var(--c-primary-darker); }

:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.container { max-width: var(--container); }

/* -------------------------------------------------------
   Eyebrow label
   ------------------------------------------------------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-primary);
    font-weight: 600;
}

.eyebrow::before {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--c-accent);
    display: inline-block;
}

/* -------------------------------------------------------
   Pulse divider — the signature element.
   An EKG-style line used to separate/introduce sections.
   ------------------------------------------------------- */
.pulse-divider {
    width: 100%;
    max-width: 220px;
    height: 28px;
    color: var(--c-accent);
    margin: 14px 0 22px;
}

.pulse-divider path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pulse-draw path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: pulseDraw 1.6s ease-out forwards;
}

@keyframes pulseDraw {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pulse-draw path { animation: none; stroke-dashoffset: 0; }
    html { scroll-behavior: auto; }
}

/* -------------------------------------------------------
   Buttons
   ------------------------------------------------------- */
.btn {
    font-family: var(--f-body);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: var(--r-pill);
    padding: 0.75rem 1.6rem;
    border: 1.5px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary-solid {
    background: var(--c-primary);
    color: var(--c-white);
    box-shadow: var(--shadow-sm);
}
.btn-primary-solid:hover { background: var(--c-primary-dark); color: var(--c-white); box-shadow: var(--shadow-md); }

.btn-accent-solid {
    background: var(--c-accent);
    color: var(--c-primary-darker);
    box-shadow: var(--shadow-sm);
}
.btn-accent-solid:hover { background: var(--c-accent-dark); color: var(--c-primary-darker); box-shadow: var(--shadow-md); }

.btn-outline-light {
    background: transparent;
    border-color: rgba(255,255,255,0.55);
    color: var(--c-white);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.14); color: var(--c-white); border-color: #fff; }

.btn-ghost {
    background: var(--c-white);
    border-color: var(--c-border);
    color: var(--c-primary-darker);
}
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.82rem; }

/* -------------------------------------------------------
   Section rhythm & surfaces
   ------------------------------------------------------- */
.section { padding: 5.5rem 0; }
.section-tight { padding: 3.5rem 0; }
.bg-mint { background: var(--c-primary-light); }
.bg-ink { background: var(--c-primary-darker); color: #DCEAE7; }
.bg-ink h1, .bg-ink h2, .bg-ink h3, .bg-ink h4 { color: var(--c-white); }

.surface-card {
    background: var(--c-white);
    border-radius: var(--r-md);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
}

.section-head { max-width: 640px; margin-bottom: 2.75rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin: 0 0 0.75rem; }
.section-head p { color: var(--c-slate); font-size: 1.02rem; }

/* -------------------------------------------------------
   Reveal-on-scroll (vanilla JS, IntersectionObserver)
   ------------------------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* -------------------------------------------------------
   Utility scrollers (native scroll-snap "carousels")
   ------------------------------------------------------- */
.scroller {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--c-primary) transparent;
}
.scroller::-webkit-scrollbar { height: 6px; }
.scroller::-webkit-scrollbar-thumb { background: var(--c-primary); border-radius: 10px; }
.scroller > * { scroll-snap-align: start; flex-shrink: 0; }

.scroller-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--c-border);
    background: var(--c-white);
    color: var(--c-primary-darker);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    flex-shrink: 0;
}
.scroller-nav:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* -------------------------------------------------------
   Responsive helpers
   ------------------------------------------------------- */
@media (max-width: 767.98px) {
    .section { padding: 3.25rem 0; }
    .section-tight { padding: 2.25rem 0; }

    /* Below tablet: carousels show exactly one card per view, paged with
       the prev/next buttons (and auto-advanced via JS) instead of asking
       the user to discover a free-form horizontal swipe area. */
    .scroller > * {
        width: 100% !important;
        max-width: 100% !important;
        scroll-snap-align: center;
    }
    /* Buttons + auto-advance handle navigation on mobile, so the raw
       scrollbar thumb is just visual noise here. */
    .scroller { scrollbar-width: none; }
    .scroller::-webkit-scrollbar { display: none; }
}


