/**
 * Citra Harmoni — Design System
 * Profesional · internasional · konsisten
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    /* Brand */
    --ch-primary: #1d4ed8;
    --ch-primary-hover: #1e40af;
    --ch-primary-light: #3b82f6;
    --ch-accent: #6366f1;
    --ch-ink: #0f172a;
    --ch-ink-muted: #64748b;
    --ch-ink-subtle: #94a3b8;
    --ch-surface: #ffffff;
    --ch-surface-muted: #f8fafc;
    --ch-surface-elevated: #ffffff;
    --ch-border: #e2e8f0;
    --ch-border-subtle: #f1f5f9;

    /* Radius */
    --ch-radius-sm: 10px;
    --ch-radius-md: 14px;
    --ch-radius-lg: 20px;
    --ch-radius-xl: 28px;
    --ch-radius-full: 9999px;

    /* Shadow — soft, premium */
    --ch-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --ch-shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
    --ch-shadow-md: 0 12px 32px -8px rgba(15, 23, 42, 0.12);
    --ch-shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.18);
    --ch-shadow-glow: 0 0 0 1px rgba(29, 78, 216, 0.08), 0 8px 24px rgba(29, 78, 216, 0.12);

    /* Layout */
    --ch-header-h: 72px;
    --ch-container: 1280px;
    --ch-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Motion */
    --ch-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ch-duration: 0.25s;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.ch-body {
    font-family: var(--ch-font);
    color: var(--ch-ink);
    background: var(--ch-surface-muted);
    line-height: 1.6;
}

/* Typography */
.ch-display {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.ch-h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.ch-h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; }
.ch-h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.ch-lead { font-size: 1.0625rem; color: var(--ch-ink-muted); line-height: 1.65; max-width: 42ch; }
.ch-caption { font-size: 0.75rem; font-weight: 600; color: var(--ch-ink-subtle); letter-spacing: 0.04em; text-transform: uppercase; }

.ch-gradient-text {
    background: linear-gradient(135deg, var(--ch-primary) 0%, var(--ch-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Container */
.ch-container {
    width: 100%;
    max-width: var(--ch-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 1024px) {
    .ch-container { padding-left: 2rem; padding-right: 2rem; }
}

/* Header */
.ch-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--ch-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: box-shadow var(--ch-duration) var(--ch-ease);
}
.ch-header.is-scrolled {
    box-shadow: var(--ch-shadow-sm);
}
@media (min-width: 1024px) {
    .ch-header { padding: 0 2rem; }
}

.ch-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--ch-ink);
}
.ch-brand img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: var(--ch-shadow-xs);
    border: 1px solid var(--ch-border-subtle);
}
@media (min-width: 1024px) {
    .ch-brand img { width: 44px; height: 44px; border-radius: 14px; }
}
.ch-brand-title {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
@media (min-width: 1024px) {
    .ch-brand-title { font-size: 1.35rem; }
}

.ch-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}
@media (min-width: 1024px) {
    .ch-nav { display: flex; }
}
.ch-nav a {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ch-ink-muted);
    text-decoration: none;
    transition: color var(--ch-duration);
    position: relative;
}
.ch-nav a:hover { color: var(--ch-primary); }
.ch-nav a.is-active {
    color: var(--ch-primary);
}
.ch-nav a.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--ch-primary);
    border-radius: 2px;
}

/* Buttons */
.ch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--ch-font);
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1;
    padding: 0.75rem 1.35rem;
    border-radius: var(--ch-radius-full);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--ch-duration) var(--ch-ease),
                box-shadow var(--ch-duration) var(--ch-ease),
                background var(--ch-duration);
}
.ch-btn:active { transform: scale(0.98); }
.ch-btn-primary {
    background: var(--ch-ink);
    color: #fff;
    box-shadow: var(--ch-shadow-sm);
}
.ch-btn-primary:hover {
    background: var(--ch-primary);
    color: #fff;
    box-shadow: var(--ch-shadow-glow);
}
.ch-btn-secondary {
    background: var(--ch-surface);
    color: var(--ch-ink);
    border: 1.5px solid var(--ch-border);
}
.ch-btn-secondary:hover {
    border-color: var(--ch-primary-light);
    color: var(--ch-primary);
}
.ch-btn-ghost {
    background: transparent;
    color: var(--ch-ink-muted);
    padding: 0.5rem 1rem;
}
.ch-btn-ghost:hover { color: var(--ch-primary); background: rgba(29, 78, 216, 0.06); }

/* Cards */
.ch-card {
    background: var(--ch-surface-elevated);
    border: 1px solid var(--ch-border-subtle);
    border-radius: var(--ch-radius-xl);
    box-shadow: var(--ch-shadow-sm);
    transition: box-shadow var(--ch-duration) var(--ch-ease), transform var(--ch-duration) var(--ch-ease);
}
.ch-card:hover {
    box-shadow: var(--ch-shadow-md);
}
.ch-card-pad { padding: 1.25rem; }
@media (min-width: 1024px) {
    .ch-card-pad { padding: 1.75rem; }
}

/* Badge */
.ch-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: var(--ch-radius-full);
}
.ch-badge-primary {
    background: rgba(29, 78, 216, 0.1);
    color: var(--ch-primary);
    border: 1px solid rgba(29, 78, 216, 0.15);
}
.ch-badge-dark {
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    backdrop-filter: blur(8px);
}

/* Hero */
.ch-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--ch-radius-xl);
    min-height: 240px;
}
@media (min-width: 1024px) {
    .ch-hero {
        border-radius: 0;
        min-height: 420px;
        margin-left: calc(-1 * 2rem);
        margin-right: calc(-1 * 2rem);
        width: calc(100% + 4rem);
        max-width: none;
    }
}
.ch-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 8s var(--ch-ease);
}
.ch-hero:hover img { transform: scale(1.03); }
.ch-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.92) 0%,
        rgba(15, 23, 42, 0.45) 45%,
        rgba(15, 23, 42, 0.15) 100%
    );
}
.ch-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 1.5rem;
}
@media (min-width: 1024px) {
    .ch-hero-content { padding: 3rem 2rem; max-width: var(--ch-container); margin: 0 auto; }
}

/* Section */
.ch-section { padding-top: 2rem; padding-bottom: 2rem; }
@media (min-width: 1024px) {
    .ch-section { padding-top: 3rem; padding-bottom: 3rem; }
}
.ch-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (min-width: 1024px) {
    .ch-section-title { margin-bottom: 1.75rem; }
}

/* Service icon grid */
.ch-service-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--ch-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: all var(--ch-duration) var(--ch-ease);
    border: 1px solid transparent;
}
@media (min-width: 1024px) {
    .ch-service-icon { width: 4.5rem; height: 4.5rem; font-size: 1.75rem; border-radius: var(--ch-radius-lg); }
}
.ch-service-link:hover .ch-service-icon {
    transform: translateY(-2px);
    box-shadow: var(--ch-shadow-sm);
}

/* Bottom nav mobile */
.ch-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.65rem 0.5rem calc(0.65rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--ch-border);
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
}
@media (min-width: 1024px) {
    .ch-bottom-nav { display: none; }
}
.ch-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ch-ink-subtle);
    text-decoration: none;
    transition: color var(--ch-duration);
}
.ch-bottom-nav a.is-active,
.ch-bottom-nav a:hover { color: var(--ch-primary); }

/* Auth enhancements (with app.css) */
.auth-wrapper { font-family: var(--ch-font); }
.auth-sidebar {
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.88) 0%, rgba(29, 78, 216, 0.75) 100%),
        url('../img/rapat.jpeg') center/cover no-repeat;
}
.auth-sidebar h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}
.auth-card--pro {
    background: var(--ch-surface);
    border: 1px solid var(--ch-border-subtle);
    border-radius: var(--ch-radius-xl);
    box-shadow: var(--ch-shadow-md);
    padding: 2rem 2.25rem;
}
@media (max-width: 768px) {
    .auth-card--pro {
        border-radius: 0;
        border: none;
        box-shadow: none;
        min-height: 100vh;
        padding: 1.75rem 1.25rem;
    }
}
.btn-premium {
    font-family: var(--ch-font);
    background: linear-gradient(135deg, var(--ch-primary) 0%, var(--ch-accent) 100%);
    border-radius: var(--ch-radius-md);
    font-weight: 700;
    letter-spacing: 0.01em;
}
.btn-google {
    font-family: var(--ch-font);
    border-radius: var(--ch-radius-md);
    border-width: 1.5px;
}
.form-floating > .form-control {
    font-family: var(--ch-font);
    border-radius: var(--ch-radius-md);
    border-color: var(--ch-border);
}
.form-floating > .form-control:focus {
    border-color: var(--ch-primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

/* Utility */
.ch-animate-in {
    animation: chFadeUp 0.7s var(--ch-ease) forwards;
    opacity: 0;
}
@keyframes chFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
