/* =========================================
   GLOBAL.CSS
   Style umum global:
   - reset
   - font
   - warna utama
   - container
   - button
   - shadow
   - utility
   - responsive system
========================================= */

:root {
    --primary: #109300;
    --primary-dark: #0a7300;
    --green-900: #165c14;
    --green-800: #1e6e18;
    --accent: #f4c81f;
    --warning: #f3b235;

    --bg: #f1f3f0;
    --surface: #ffffff;
    --surface-soft: #f7faf5;

    --text: #29412c;
    --text-muted: #607060;

    --shadow-soft: 0 14px 30px rgba(18, 44, 18, 0.12);
    --shadow-card: 0 12px 24px rgba(0, 0, 0, 0.10);

    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;

    --container: 1240px;
    --container-lg: 1140px;
    --container-md: 960px;
    --container-sm: 720px;

    --section-space: 90px;
    --section-space-md: 70px;
    --section-space-sm: 54px;

    --gutter-desktop: 32px;
    --gutter-tablet: 24px;
    --gutter-mobile: 18px;
    --gutter-mobile-xs: 14px;

    /* Skala font global agar semua halaman konsisten */
    --font-sans: "Inter", "Segoe UI", Arial, sans-serif;
    --font-heading: "MadeTommy", "Inter", "Segoe UI", Arial, sans-serif;

    --font-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
    --font-sm: clamp(0.8125rem, 0.78rem + 0.18vw, 0.875rem);
    --font-base: clamp(0.875rem, 0.84rem + 0.20vw, 0.9375rem);
    --font-md: clamp(0.9375rem, 0.90rem + 0.22vw, 1rem);
    --font-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
    --font-xl: clamp(1.25rem, 1.08rem + 0.70vw, 1.5rem);
    --font-2xl: clamp(1.5rem, 1.20rem + 1.05vw, 2rem);
    --font-3xl: clamp(1.875rem, 1.35rem + 1.80vw, 2.625rem);
    --font-4xl: clamp(2.25rem, 1.60rem + 2.50vw, 3.25rem);
}

/* =========================
   RESET DASAR
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    min-width: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--font-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

picture {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
    background: none;
}

input,
textarea,
select {
    width: 100%;
    outline: none;
}

textarea {
    resize: vertical;
}

table {
    width: 100%;
    border-collapse: collapse;
}

ul,
ol {
    padding-left: 1.2rem;
    margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--green-900);
    overflow-wrap: break-word;
}

h1 { font-size: var(--font-4xl); }
h2 { font-size: var(--font-3xl); }
h3 { font-size: var(--font-2xl); }
h4 { font-size: var(--font-xl); }
h5 { font-size: var(--font-lg); }
h6 { font-size: var(--font-md); }

p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text);
    overflow-wrap: break-word;
}

small {
    font-size: var(--font-sm);
}

/* =========================
   TYPOGRAPHY UTILITY
========================= */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

/* =========================
   CONTAINER
========================= */
.container {
    width: min(var(--container), calc(100% - var(--gutter-desktop)));
    margin-inline: auto;
}

.container-sm {
    width: min(var(--container-md), calc(100% - var(--gutter-desktop)));
    margin-inline: auto;
}

/* =========================
   BUTTON
========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, opacity .25s ease;
    cursor: pointer;
    text-transform: none;
    letter-spacing: .2px;
    white-space: nowrap;
    text-align: center;
    user-select: none;
    max-width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(180deg, #26b000 0%, #0b7d07 100%);
    color: #fff;
    padding: 12px 28px;
    box-shadow: 0 18px 20px rgba(12, 125, 7, 0.25);
}

.btn-warning {
    background: linear-gradient(180deg, #f7cb4d 0%, #e8a913 100%);
    color: #fff;
    padding: 12px 28px;
    box-shadow: 0 10px 20px rgba(232, 169, 19, 0.28);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(16, 147, 0, 0.18);
    color: var(--primary);
    padding: 12px 24px;
}

.btn-lg {
    min-height: 58px;
    padding-inline: 34px;
    font-size: var(--font-xl);
}

.btn-md {
    min-height: 48px;
    padding-inline: 22px;
    font-size: var(--font-base);
}

.btn-sm {
    min-height: 42px;
    padding-inline: 18px;
    font-size: var(--font-sm);
}

/* tombol bisa wrap kalau isi panjang */
.btn span,
.btn i,
.btn svg {
    flex-shrink: 0;
}

.btn-wrap {
    white-space: normal;
    line-height: 1.35;
}

/* =========================
   CARD / SURFACE
========================= */
.surface {
    background: var(--surface);
}

.shadow-soft {
    box-shadow: var(--shadow-soft);
}

.shadow-card {
    box-shadow: var(--shadow-card);
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-sm {
    border-radius: var(--radius-sm);
}

/* =========================
   SPACING UTILITY
========================= */
.section-space {
    padding-block: var(--section-space);
}

.section-space-top {
    padding-top: var(--section-space);
}

.section-space-bottom {
    padding-bottom: var(--section-space);
}

/* =========================
   GRID UTILITY
========================= */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* auto responsive grid tambahan */
.grid-auto-280 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.grid-auto-240 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

/* =========================
   REVEAL ANIMATION
========================= */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   FONT MADE TOMMY
========================= */
@font-face {
    font-family: "MadeTommy";
    src: url("../fonts/MADE-TOMMY-Regular.woff2") format("woff2"),
         url("../fonts/MADE-TOMMY-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "MadeTommy";
    src: url("../fonts/MADE-TOMMY-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* =========================
   SEBARAN ALUMNI
========================= */
.sebaran-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 22px;
    align-items: stretch;
}

.sebaran-card {
    background: #fff;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    padding: 18px;
    min-width: 0;
    overflow: hidden;
    height: 100%;
}

.sebaran-card img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.wilayah-box {
    padding: 26px;
    height: 100%;
}

.wilayah-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wilayah-item {
    background: #f7faf5;
    color: var(--green-900);
    border-radius: 999px;
    padding: 12px 14px;
    text-align: center;
    font-weight: 800;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    word-break: break-word;
}

.quote-card {
    background: #fff;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

/* =========================
   RESPONSIVE PRO MAX
========================= */

/* Desktop besar */
@media (min-width: 1441px) {
    .container {
        width: min(1320px, calc(100% - 48px));
    }

    .container-sm {
        width: min(1080px, calc(100% - 48px));
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-auto-240,
    .grid-auto-280 {
        gap: 28px;
    }
}

/* Laptop / desktop sedang */
@media (max-width: 1280px) {
    :root {
        --section-space: 80px;
    }

    .btn-lg {
        font-size: var(--font-lg);
        padding-inline: 30px;
        min-height: 54px;
    }

    .grid-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Tablet landscape */
@media (max-width: 1024px) {
    :root {
        --section-space: var(--section-space-md);
        --radius-xl: 24px;
        --radius-lg: 20px;
        --radius-md: 14px;
    }

    .container,
    .container-sm {
        width: min(var(--container), calc(100% - var(--gutter-tablet)));
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        gap: 20px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sebaran-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .wilayah-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sebaran-card,
    .quote-card {
        border-radius: 22px;
    }

    .wilayah-box {
        padding: 22px;
    }
}

/* Tablet portrait / mobile besar */
@media (max-width: 768px) {
    :root {
        --section-space: var(--section-space-sm);
        --radius-xl: 22px;
        --radius-lg: 18px;
        --radius-md: 14px;
    }

    body {
        font-size: var(--font-base);
        line-height: 1.55;
    }

    .container,
    .container-sm {
        width: min(var(--container), calc(100% - var(--gutter-mobile)));
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-auto-240,
    .grid-auto-280 {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .btn-lg {
        min-height: 52px;
        padding-inline: 24px;
        font-size: var(--font-lg);
    }

    .btn-md {
        min-height: 44px;
        padding-inline: 18px;
        font-size: var(--font-sm);
    }

    .btn-sm {
        min-height: 40px;
        padding-inline: 16px;
        font-size: var(--font-sm);
    }

    h1 {
        font-size: var(--font-3xl);
        line-height: 1.12;
    }

    h2 {
        font-size: var(--font-2xl);
        line-height: 1.14;
    }

    h3 {
        font-size: var(--font-xl);
        line-height: 1.18;
    }

    h4 {
        font-size: var(--font-lg);
    }

    p {
        margin-bottom: 0.9rem;
    }

    .sebaran-card,
    .quote-card {
        border-radius: 20px;
        padding: 16px;
    }

    .wilayah-box {
        padding: 18px;
    }

    .wilayah-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .wilayah-item {
        min-height: 46px;
        font-size: var(--font-sm);
        border-radius: 16px;
    }

    /* elemen yang sering overflow di mobile */
    .table-responsive,
    .overflow-x-auto {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .text-center-mobile {
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .container,
    .container-sm {
        width: min(var(--container), calc(100% - var(--gutter-mobile)));
    }

    body {
        font-size: var(--font-sm);
    }

    .btn {
        width: auto;
        max-width: 100%;
    }

    .btn-block-mobile {
        width: 100%;
    }

    .btn-lg {
        min-height: 48px;
        padding-inline: 20px;
        font-size: var(--font-md);
    }

    .btn-md {
        min-height: 42px;
        padding-inline: 16px;
        font-size: var(--font-sm);
    }

    .btn-sm {
        min-height: 38px;
        padding-inline: 14px;
        font-size: var(--font-xs);
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        line-height: 1.16;
        margin-bottom: 0.65rem;
    }

    .sebaran-card,
    .quote-card {
        border-radius: 18px;
        padding: 14px;
    }

    .wilayah-box {
        padding: 16px;
    }

    .wilayah-item {
        padding: 11px 12px;
        border-radius: 14px;
        font-size: 0.84375rem;
    }
}

/* Mobile kecil */
@media (max-width: 390px) {
    .container,
    .container-sm {
        width: min(var(--container), calc(100% - var(--gutter-mobile-xs)));
    }

    .btn-lg,
    .btn-md,
    .btn-sm {
        width: 100%;
    }

    .btn {
        white-space: normal;
        line-height: 1.35;
        padding-inline: 14px;
    }

    .wilayah-item {
        font-size: var(--font-xs);
        min-height: 44px;
    }

    .sebaran-card,
    .quote-card {
        border-radius: 16px;
        padding: 12px;
    }

    .wilayah-box {
        padding: 14px;
    }
}

/* Device sangat kecil */
@media (max-width: 340px) {
    body {
        font-size: 0.84375rem;
    }

    h1 {
        font-size: var(--font-xl);
    }

    h2 {
        font-size: var(--font-lg);
    }

    h3 {
        font-size: var(--font-lg);
    }

    .btn-lg,
    .btn-md,
    .btn-sm {
        min-height: 42px;
        font-size: var(--font-xs);
    }
}