/**
 * SPP Design Tokens — PT Sarana Pembangunan Pekanbaru
 * v2.0 — September 2026
 * -------------------------------------------------------
 * Central CSS custom-property file. Import this in every
 * view that opts into the new design system.
 */

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Font families */
    --font-heading : 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --font-body    : 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;

    /* Type scale */
    --text-xs   : 0.75rem;    /* 12px */
    --text-sm   : 0.875rem;   /* 14px */
    --text-base : 1rem;       /* 16px */
    --text-lg   : 1.125rem;   /* 18px */
    --text-xl   : 1.25rem;    /* 20px */
    --text-2xl  : 1.5rem;     /* 24px */
    --text-3xl  : 1.875rem;   /* 30px */
    --text-4xl  : 2.25rem;    /* 36px */
    --text-5xl  : 3rem;       /* 48px */
    --text-6xl  : 3.75rem;    /* 60px */

    /* Line heights */
    --leading-tight   : 1.25;
    --leading-snug    : 1.375;
    --leading-normal  : 1.5;
    --leading-relaxed : 1.625;
    --leading-loose   : 2;

    /* ============================================================
       COLOR PALETTE — SPP Brand (Official Digital Guidelines)
       ============================================================ */

    /* 1. Primary Blues */
    --color-blue-primary : #008ED6;  /* Primary Accent Blue */
    --color-blue-dark    : #2D649B;  /* Deep Corporate Blue */

    /* 2. Primary Greens */
    --color-green-dark   : #187D53;  /* Forest Corporate Green */
    --color-green-vibrant: #34CC67;  /* Vibrant Emerald Green */
    --color-green-soft   : #99FF97;  /* Soft Mint Tint */

    /* 3. Warm Accent & Warning */
    --color-yellow       : #FFCC00;  /* Yellow Accent */
    --color-orange       : #FFA300;  /* Vibrant Orange CTA */

    /* Central Brand Semantic Aliases */
    --primary-accent : var(--color-blue-primary);
    --primary-brand  : var(--color-green-dark);
    --hero-gradient  : linear-gradient(135deg, #187D53 0%, #2D649B 100%);
    --badge-bg       : rgba(52, 204, 103, 0.15);
    --badge-border   : rgba(52, 204, 103, 0.4);
    --badge-text     : #187D53;
    --badge-text-dark: #34CC67;

    /* Primary — Corporate Green Scale */
    --clr-primary-50  : rgba(52, 204, 103, 0.08);
    --clr-primary-100 : rgba(52, 204, 103, 0.15);
    --clr-primary-200 : #99FF97;  /* Soft Mint */
    --clr-primary-300 : #6ee79c;
    --clr-primary-400 : #34CC67;  /* Vibrant Emerald */
    --clr-primary-500 : #187D53;  /* Forest Corporate Green */
    --clr-primary-600 : #187D53;  /* Forest Corporate Green */
    --clr-primary-700 : #146845;
    --clr-primary-800 : #105237;
    --clr-primary-900 : #0c3e29;

    /* Corporate Blues Scale */
    --clr-blue-accent : #008ED6;
    --clr-blue-dark   : #2D649B;

    /* Navy — Authority & corporate text */
    --clr-navy-900 : #0D1B40;
    --clr-navy-800 : #172554;
    --clr-navy-700 : #2D649B;
    --clr-navy-600 : #008ED6;

    /* Slate — Neutral backgrounds & borders */
    --clr-slate-50  : #f8fafc;
    --clr-slate-100 : #f1f5f9;
    --clr-slate-200 : #e2e8f0;
    --clr-slate-300 : #cbd5e1;
    --clr-slate-400 : #94a3b8;
    --clr-slate-500 : #64748b;
    --clr-slate-600 : #475569;
    --clr-slate-700 : #334155;
    --clr-slate-800 : #1e293b;
    --clr-slate-900 : #0f172a;

    /* Semantic */
    --clr-text-primary   : #0f172a;
    --clr-text-secondary : #475569;
    --clr-text-muted     : #94a3b8;
    --clr-bg-base        : #ffffff;
    --clr-bg-subtle      : #f8fafc;
    --clr-bg-muted       : #f1f5f9;
    --clr-border         : #e2e8f0;
    --clr-border-strong  : #cbd5e1;

    /* Status & Warm Accents */
    --clr-success : #34CC67;
    --clr-warning : #FFA300;
    --clr-yellow  : #FFCC00;
    --clr-error   : #ef4444;
    --clr-info    : #008ED6;

    /* ============================================================
       SPACING
       ============================================================ */
    --space-1  : 0.25rem;
    --space-2  : 0.5rem;
    --space-3  : 0.75rem;
    --space-4  : 1rem;
    --space-5  : 1.25rem;
    --space-6  : 1.5rem;
    --space-8  : 2rem;
    --space-10 : 2.5rem;
    --space-12 : 3rem;
    --space-16 : 4rem;
    --space-20 : 5rem;
    --space-24 : 6rem;

    /* ============================================================
       BORDERS & RADII
       ============================================================ */
    --radius-sm   : 0.375rem;   /* 6px */
    --radius-md   : 0.5rem;     /* 8px */
    --radius-lg   : 0.75rem;    /* 12px */
    --radius-xl   : 1rem;       /* 16px */
    --radius-2xl  : 1.5rem;     /* 24px */
    --radius-full : 9999px;

    /* ============================================================
       SHADOWS
       ============================================================ */
    --shadow-xs  : 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm  : 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md  : 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg  : 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl  : 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.05);
    --shadow-card-hover : 0 12px 32px rgba(13,27,64,0.10);

    /* ============================================================
       Z-INDEX STACK
       ============================================================ */
    --z-below    : -1;
    --z-base     : 0;
    --z-raised   : 10;
    --z-dropdown : 100;
    --z-sticky   : 200;
    --z-drawer   : 300;
    --z-overlay  : 400;
    --z-modal    : 500;
    --z-toast    : 600;

    /* ============================================================
       TRANSITIONS
       ============================================================ */
    --transition-fast   : 150ms cubic-bezier(0.4,0,0.2,1);
    --transition-base   : 250ms cubic-bezier(0.4,0,0.2,1);
    --transition-slow   : 400ms cubic-bezier(0.4,0,0.2,1);

    /* ============================================================
       LAYOUT
       ============================================================ */
    --navbar-height : 72px;
    --container-max : 1280px;
    --container-pad : clamp(1rem, 5vw, 6rem);
}

/* ============================================================
   GLOBAL RESETS & BASE (Design-system scope)
   ============================================================ */

/* Apply font family globally when this token file is loaded */
body {
    font-family : var(--font-body);
    color       : var(--clr-text-primary);
    line-height : var(--leading-relaxed);
    background  : var(--clr-bg-base);
}

h1, h2, h3, h4, h5, h6 {
    font-family : var(--font-heading);
    font-weight : 700;
    line-height : var(--leading-tight);
    color       : var(--clr-text-primary);
}

/* ============================================================
   SHARED UTILITY CLASSES (cross-page)
   ============================================================ */

/* Section wrapper */
.spp-section {
    padding-block : var(--space-20);
}

.spp-section--sm {
    padding-block : var(--space-12);
}

/* Container */
.spp-container {
    width     : 100%;
    max-width : var(--container-max);
    margin    : 0 auto;
    padding   : 0 var(--container-pad);
}

/* Eyebrow label */
.spp-eyebrow {
    display       : inline-flex;
    align-items   : center;
    gap           : var(--space-2);
    font-family   : var(--font-heading);
    font-size     : var(--text-xs);
    font-weight   : 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color         : #187D53;
    background    : rgba(52, 204, 103, 0.15);
    border        : 1px solid rgba(52, 204, 103, 0.4);
    padding       : var(--space-1) var(--space-3);
    border-radius : var(--radius-full);
    margin-bottom : var(--space-4);
}

/* Section heading */
.spp-section-title {
    font-family   : var(--font-heading);
    font-size     : clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
    font-weight   : 800;
    color         : var(--clr-text-primary);
    line-height   : var(--leading-tight);
    margin-bottom : var(--space-4);
}

.spp-section-desc {
    font-size   : var(--text-lg);
    color       : var(--clr-text-secondary);
    max-width   : 640px;
    line-height : var(--leading-relaxed);
}

/* Card base */
.spp-card {
    background    : var(--clr-bg-base);
    border        : 1px solid var(--clr-border);
    border-radius : var(--radius-2xl);
    box-shadow    : var(--shadow-sm);
    overflow      : hidden;
    transition    : transform var(--transition-base),
                    box-shadow var(--transition-base);
}

.spp-card:hover {
    transform  : translateY(-4px);
    box-shadow : var(--shadow-card-hover);
}

/* Pill badge */
.spp-badge {
    display       : inline-flex;
    align-items   : center;
    font-size     : var(--text-xs);
    font-weight   : 600;
    border-radius : var(--radius-full);
    padding       : 3px 12px;
    white-space   : nowrap;
}

.spp-badge--primary {
    background : rgba(52, 204, 103, 0.15);
    color      : #187D53;
    border     : 1px solid rgba(52, 204, 103, 0.4);
}

.spp-badge--navy {
    background : var(--clr-navy-900);
    color      : #ffffff;
}

.spp-badge--white {
    background : rgba(255,255,255,0.15);
    color      : #ffffff;
    border     : 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
}

/* Primary button */
.spp-btn {
    display       : inline-flex;
    align-items   : center;
    gap           : var(--space-2);
    font-family   : var(--font-heading);
    font-weight   : 600;
    border-radius : var(--radius-full);
    padding       : 0.75rem 1.75rem;
    text-decoration : none;
    border        : 2px solid transparent;
    cursor        : pointer;
    transition    : all var(--transition-base);
    white-space   : nowrap;
}

.spp-btn--primary {
    background : #187D53;
    color      : #ffffff;
}

.spp-btn--primary:hover {
    background : #2D649B;
    color      : #ffffff;
    transform  : translateY(-1px);
    box-shadow : 0 8px 24px rgba(45, 100, 155, 0.35);
}

.spp-btn--outline {
    background : transparent;
    color      : #187D53;
    border     : 2px solid #187D53;
}

.spp-btn--outline:hover {
    background : #187D53;
    color      : #ffffff;
}

.spp-btn--warning,
.spp-btn--orange {
    background : #FFA300;
    color      : #0F172A;
    font-weight: 700;
}

.spp-btn--warning:hover,
.spp-btn--orange:hover {
    background : #FFCC00;
    color      : #0F172A;
}

.spp-btn--white {
    background : #ffffff;
    color      : var(--clr-navy-900);
    border     : 2px solid transparent;
}

.spp-btn--white:hover {
    background : var(--clr-primary-50);
    color      : var(--clr-primary-700);
}

.spp-btn--ghost-white {
    background : rgba(255,255,255,0.12);
    color      : #ffffff;
    border     : 2px solid rgba(255,255,255,0.4);
    backdrop-filter : blur(8px);
}

.spp-btn--ghost-white:hover {
    background : rgba(255,255,255,0.25);
    color      : #ffffff;
}

/* Divider */
.spp-divider {
    height     : 1px;
    background : var(--clr-border);
    border     : none;
    margin     : 0;
}

/* Back link */
.spp-back-link {
    display     : inline-flex;
    align-items : center;
    gap         : var(--space-2);
    font-size   : var(--text-sm);
    font-weight : 600;
    color       : var(--clr-text-secondary);
    text-decoration : none;
    transition  : color var(--transition-fast);
}

.spp-back-link:hover {
    color : #008ED6;
}

/* Breadcrumb */
.spp-breadcrumb {
    display     : flex;
    align-items : center;
    gap         : var(--space-2);
    font-size   : var(--text-sm);
    color       : var(--clr-text-muted);
    flex-wrap   : wrap;
}

.spp-breadcrumb a {
    color           : var(--clr-text-secondary);
    text-decoration : none;
    transition      : color var(--transition-fast);
}

.spp-breadcrumb a:hover {
    color : #008ED6;
}

.spp-breadcrumb span {
    color : var(--clr-text-primary);
    font-weight : 500;
}

/* Form floating label */
.spp-form-group {
    position : relative;
}

.spp-form-input,
.spp-form-select,
.spp-form-textarea {
    width         : 100%;
    font-family   : var(--font-body);
    font-size     : var(--text-base);
    color         : var(--clr-text-primary);
    background    : var(--clr-bg-base);
    border        : 1.5px solid var(--clr-border-strong);
    border-radius : var(--radius-lg);
    padding       : 0.875rem 1rem;
    outline       : none;
    transition    : border-color var(--transition-fast),
                    box-shadow var(--transition-fast);
    -webkit-appearance : none;
    appearance    : none;
}

.spp-form-input:focus,
.spp-form-select:focus,
.spp-form-textarea:focus {
    border-color : #187D53;
    box-shadow   : 0 0 0 3px rgba(24, 125, 83, 0.18);
}

.spp-form-label {
    display       : block;
    font-size     : var(--text-sm);
    font-weight   : 600;
    color         : var(--clr-text-secondary);
    margin-bottom : var(--space-2);
}

.spp-form-input::placeholder,
.spp-form-textarea::placeholder {
    color : var(--clr-text-muted);
}

/* Page hero banner — Unified SPP Corporate Brand Gradient */
.spp-page-hero {
    background: linear-gradient(135deg, #187D53 0%, #2D649B 100%);
    padding: 4rem 1.5rem 4.5rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.spp-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    mask-image: radial-gradient(circle at 60% 50%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at 60% 50%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
    pointer-events: none;
}

.spp-page-hero .spp-container {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.spp-page-hero .spp-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    flex-wrap: wrap;
}

.spp-page-hero .spp-breadcrumb a {
    color: rgba(153, 255, 151, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.spp-page-hero .spp-breadcrumb a:hover {
    color: #99FF97;
}

.spp-page-hero .spp-breadcrumb svg {
    width: 12px;
    height: 12px;
    stroke: rgba(255, 255, 255, 0.35);
}

.spp-page-hero .spp-breadcrumb span {
    color: #ffffff;
    font-weight: 600;
}

.spp-hero-badge,
.spp-page-hero .spp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    background: rgba(52, 204, 103, 0.15);
    border: 1px solid rgba(52, 204, 103, 0.4);
    color: #34CC67;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.875rem;
    font-family: var(--font-heading);
}

.spp-hero-badge svg,
.spp-page-hero .spp-eyebrow svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    flex-shrink: 0;
}

.spp-page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

.spp-page-hero p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: #CBD5E1;
    line-height: 1.6;
    max-width: 700px;
    margin: 0;
}

/* Responsive body offset for fixed navbar */
body {
    padding-top : var(--navbar-height);
}
