/* ==========================================================================
   PKKM MAN 2 Bulukumba — Design System
   ========================================================================== */

:root {
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;

    --ink: #0a2018;
    --ink-soft: #4a5f55;
    --muted: #6b7f75;

    --emerald-950: #031b13;
    --emerald-900: #04241a;
    --emerald-800: #063a28;
    --emerald-700: #0e7c54;
    --emerald-600: #129060;
    --emerald-500: #17a06a;
    --emerald-100: #e2f5ec;
    --emerald-50: #f0faf5;

    --gold: #d9b26a;
    --gold-light: #f3e4c4;

    --surface: #ffffff;
    --line: rgba(6, 58, 40, 0.10);
    --line-strong: rgba(6, 58, 40, 0.18);

    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(4, 36, 26, 0.05), 0 10px 30px -18px rgba(4, 36, 26, 0.28);
    --shadow-lg: 0 32px 64px -36px rgba(4, 36, 26, 0.5);

    --wrap: 1160px;
}

html {
    font-variant-numeric: lining-nums;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background:
        radial-gradient(1100px 560px at 8% -12%, #dff3e8 0%, rgba(223, 243, 232, 0) 62%),
        radial-gradient(900px 520px at 102% 2%, #f8eed8 0%, rgba(248, 238, 216, 0) 58%),
        #f5f7f3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

::selection {
    background: var(--emerald-500);
    color: #fff;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid rgba(23, 160, 106, 0.45);
    outline-offset: 3px;
    border-radius: 8px;
}

/* Page transitions -------------------------------------------------------- */
@view-transition {
    navigation: auto;
}

/* Subtle dotted texture ---------------------------------------------------- */
.page-texture {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(6, 58, 40, 0.075) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 78%);
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 78%);
}

.wrap {
    position: relative;
    z-index: 1;
    width: min(var(--wrap), calc(100% - 40px));
    margin-inline: auto;
}

/* Top bar ----------------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 247, 243, 0.75);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(150deg, var(--emerald-700), var(--emerald-900));
    box-shadow: 0 10px 22px -12px rgba(4, 36, 26, 0.75);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.brand-text b {
    display: block;
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.brand-text span {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.topnav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topnav a {
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.topnav a:hover {
    color: var(--emerald-800);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

/* Buttons ----------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.3s ease,
        background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: translateX(4px);
}

.btn:active {
    transform: translateY(0) scale(0.985);
}

.btn-primary {
    background: linear-gradient(135deg, #ead6a1, var(--gold));
    color: #2e2108;
    box-shadow: 0 20px 34px -22px rgba(217, 178, 106, 0.95);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 42px -22px rgba(217, 178, 106, 1);
}

.btn-ghost {
    color: #eaf6ef;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.32);
}

/* Section headers --------------------------------------------------------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--emerald-700);
}

.eyebrow::before {
    content: '';
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.section-head {
    max-width: 640px;
    margin-bottom: clamp(24px, 3vw, 38px);
}

.section-head h2 {
    margin: 12px 0 10px;
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.section-head p {
    margin: 0;
    font-size: 0.98rem;
    color: var(--ink-soft);
}

/* Chips ------------------------------------------------------------------- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.chip {
    padding: 5px 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
    color: #dcefe3;
    font-size: 0.71rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Social ------------------------------------------------------------------ */
.social-media-section {
    position: relative;
    margin-top: clamp(56px, 7vw, 92px);
    padding: clamp(28px, 4vw, 46px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(700px 240px at 88% -20%, rgba(217, 178, 106, 0.22), transparent 70%),
        linear-gradient(140deg, #eaf7f0, #f8f1e2);
    overflow: hidden;
}

.social-media-section::after {
    content: '✦';
    position: absolute;
    right: 32px;
    top: -18px;
    font-size: 120px;
    line-height: 1;
    color: rgba(6, 58, 40, 0.05);
    pointer-events: none;
}

.social-copy {
    position: relative;
    max-width: 480px;
}

.social-title {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--emerald-900);
}

.social-sub {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.social-icons {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--emerald-900);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), background 0.3s ease,
        color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.social-icon svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.social-icon:hover {
    transform: translateY(-5px) rotate(-4deg);
    background: var(--emerald-900);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 18px 30px -18px rgba(4, 36, 26, 0.8);
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: clamp(40px, 5vw, 64px);
    padding: 22px 0 36px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--muted);
}

.site-footer b {
    color: var(--ink);
    font-weight: 700;
}

.site-footer .dot {
    margin: 0 6px;
    opacity: 0.5;
}

/* Scroll reveal ----------------------------------------------------------- */
.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.7, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-in {
    opacity: 1;
    transform: none;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 900px) {
    .topnav {
        display: none;
    }
}

@media (max-width: 640px) {
    .wrap {
        width: calc(100% - 32px);
    }

    .topbar .wrap {
        min-height: 64px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-text b {
        font-size: 0.86rem;
    }

    .social-media-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-icon {
        width: 46px;
        height: 46px;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
