/* Tunas Bangsa design system: tokens (light + dark) and tb- component classes.
   Source of truth: design-system/tokens.json. See DESIGN-SYSTEM.md. */

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

:root, [data-theme="light"] {
  --surface: #fffcf6;
  --surface-cream: #fdf4e3;
  --surface-raised: #ffffff;
  --surface-sunken: #f4f4f9;
  --line: #e0e0e0;
  --line-strong: #7d8799;
  --ink: #1c2536;
  --ink-muted: #5a6272;
  --heading: #134686;
  --navy: #134686;
  --navy-deep: #0b2f56;
  --on-navy: #fdf4e3;
  --gold: #feb21a;
  --gold-hover: #ffc34d;
  --on-gold: #134686;
  --gold-soft: #ffe0a1;
  --on-gold-soft: #6b4500;
  --gold-text: #8a5a00;
  --leaf: #2e7d32;
  --leaf-soft: #e3f1e0;
  --on-leaf-soft: #1f5e22;
  --danger: #c62828;
  --danger-soft: #fde4e1;
  --on-danger-soft: #9b1c1c;
  --whatsapp: #25d366;
  --focus: #134686;
  --overlay: rgba(19, 70, 134, 0.9);
  --shadow-sm: 0 2px 4px rgba(11, 47, 86, 0.06);
  --shadow-md: 0 4px 12px rgba(11, 47, 86, 0.10);
  --shadow-lg: 0 10px 24px rgba(11, 47, 86, 0.18);
}

@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --surface: #0c1a2e;
  --surface-cream: #13233b;
  --surface-raised: #172a45;
  --surface-sunken: #091424;
  --line: #2a3d5a;
  --line-strong: #6b7f9e;
  --ink: #eef2f8;
  --ink-muted: #a7b3c6;
  --heading: #9cc2f2;
  --navy: #1c5aa6;
  --navy-deep: #2567b8;
  --on-navy: #fdf4e3;
  --gold: #feb21a;
  --gold-hover: #ffc34d;
  --on-gold: #0b2f56;
  --gold-soft: #3d2e0c;
  --on-gold-soft: #ffd780;
  --gold-text: #ffc54d;
  --leaf: #7cc47f;
  --leaf-soft: #16341a;
  --on-leaf-soft: #a5dba7;
  --danger: #ff8a80;
  --danger-soft: #3e1512;
  --on-danger-soft: #ffb4ab;
  --whatsapp: #25d366;
  --focus: #ffc54d;
  --overlay: rgba(9, 20, 36, 0.9);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.55);
}
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #0c1a2e;
  --surface-cream: #13233b;
  --surface-raised: #172a45;
  --surface-sunken: #091424;
  --line: #2a3d5a;
  --line-strong: #6b7f9e;
  --ink: #eef2f8;
  --ink-muted: #a7b3c6;
  --heading: #9cc2f2;
  --navy: #1c5aa6;
  --navy-deep: #2567b8;
  --on-navy: #fdf4e3;
  --gold: #feb21a;
  --gold-hover: #ffc34d;
  --on-gold: #0b2f56;
  --gold-soft: #3d2e0c;
  --on-gold-soft: #ffd780;
  --gold-text: #ffc54d;
  --leaf: #7cc47f;
  --leaf-soft: #16341a;
  --on-leaf-soft: #a5dba7;
  --danger: #ff8a80;
  --danger-soft: #3e1512;
  --on-danger-soft: #ffb4ab;
  --whatsapp: #25d366;
  --focus: #ffc54d;
  --overlay: rgba(9, 20, 36, 0.9);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.55);
}

:root {
  --font-sans: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  --space-1: 5px;
  --space-2: 10px;
  --space-3: 15px;
  --space-4: 20px;
  --space-5: 25px;
  --space-6: 30px;
  --space-8: 40px;
  --space-12: 60px;
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --z-dropdown: 100;
  --z-header: 1000;
  --z-toast: 9998;
}

.tb-text-display { font-family: var(--font-sans); font-size: 40px; line-height: 48px; font-weight: 800; letter-spacing: -0.02em; }
.tb-text-title { font-family: var(--font-sans); font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.01em; }
.tb-text-heading { font-family: var(--font-sans); font-size: 24px; line-height: 32px; font-weight: 700; }
.tb-text-subheading { font-family: var(--font-sans); font-size: 20px; line-height: 28px; font-weight: 700; }
.tb-text-body-lg { font-family: var(--font-sans); font-size: 18px; line-height: 28px; font-weight: 400; }
.tb-text-body { font-family: var(--font-sans); font-size: 16px; line-height: 26px; font-weight: 400; }
.tb-text-label { font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 700; }
.tb-text-small { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 400; }
.tb-text-caption { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }


/* Tunas Bangsa components. Every class is prefixed tb-; every value comes from a token. */

body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 26px; background: var(--surface); color: var(--ink); }
.tb-stage { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-4); }
.tb-stage-col { display: grid; gap: var(--space-4); padding: var(--space-4); }

/* Focus: a surface-coloured gap, then a solid focus ring. */
.tb-btn:focus-visible, .tb-field-input:focus-visible, .tb-nav-link:focus-visible, .tb-link:focus-visible, .tb-card-link:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}

/* Button */
.tb-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); font: inherit; font-size: 15px; line-height: 20px; font-weight: 700; min-height: 40px; padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color .2s, border-color .2s; }
.tb-btn-primary { background: var(--navy); color: var(--on-navy); }
.tb-btn-primary:hover { background: var(--navy-deep); }
.tb-btn-accent { background: var(--gold); color: var(--on-gold); }
.tb-btn-accent:hover { background: var(--gold-hover); }
.tb-btn-quiet { background: transparent; color: var(--heading); border-color: var(--line-strong); }
.tb-btn-quiet:hover { background: var(--surface-cream); }
.tb-btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.tb-btn-danger:hover { background: var(--danger-soft); }
.tb-btn-sm { min-height: 32px; padding: var(--space-1) var(--space-3); font-size: 14px; }
.tb-btn-block { display: flex; width: 100%; }
.tb-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Text field */
.tb-field { display: grid; gap: var(--space-1); max-width: 360px; }
.tb-field-label { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--ink); }
.tb-field-input { font: inherit; font-size: 16px; padding: 11px var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); }
.tb-field-input::placeholder { color: var(--ink-muted); }
.tb-field-hint { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.tb-field-error .tb-field-input { border-color: var(--danger); }
.tb-field-error .tb-field-hint { color: var(--danger); }

/* Badge */
.tb-badge { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px var(--space-2); border-radius: var(--radius-full); background: var(--surface-sunken); color: var(--ink-muted); border: 1px solid var(--line); }
.tb-badge-success { background: var(--leaf-soft); color: var(--on-leaf-soft); border-color: transparent; }
.tb-badge-warning { background: var(--gold-soft); color: var(--on-gold-soft); border-color: transparent; }
.tb-badge-danger { background: var(--danger-soft); color: var(--on-danger-soft); border-color: transparent; }
.tb-badge-info { background: var(--navy); color: var(--on-navy); border-color: transparent; }

/* Section title: centered heading with the gold underline the whole site uses */
.tb-section-title { text-align: center; display: grid; justify-items: center; gap: var(--space-1); margin: var(--space-4) 0 var(--space-6); }
.tb-section-eyebrow { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
.tb-section-heading { margin: 0; font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -.01em; color: var(--heading); padding-bottom: var(--space-2); border-bottom: 3px solid var(--gold); text-wrap: balance; }

/* Ticker: the running welcome text (.sambutan / .teks-berjalan) */
.tb-ticker { overflow: hidden; white-space: nowrap; background: var(--gold); color: var(--on-gold); padding: var(--space-2) 0; }
.tb-ticker-track { display: inline-block; padding-left: 100%; font-size: 18px; line-height: 28px; font-weight: 700; animation: tb-marquee 18s linear infinite; }
.tb-ticker:hover .tb-ticker-track { animation-play-state: paused; }
@keyframes tb-marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .tb-ticker { white-space: normal; padding-inline: var(--space-4); } .tb-ticker-track { animation: none; padding-left: 0; } }

/* Site header: navy top bar + cream nav band */
.tb-header { box-shadow: var(--shadow-md); }
.tb-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); background: var(--navy); color: var(--on-navy); padding: var(--space-2) var(--space-4); }
.tb-brand { display: flex; align-items: center; gap: var(--space-2); color: inherit; text-decoration: none; }
.tb-brand img { width: 40px; height: auto; }
.tb-brand-name { display: block; font-weight: 800; font-size: 16px; line-height: 20px; }
.tb-brand-sub { display: block; font-size: 12px; line-height: 16px; opacity: .9; letter-spacing: .04em; }
.tb-nav { display: flex; flex-wrap: wrap; gap: var(--space-1); background: var(--surface-cream); padding: var(--space-1) var(--space-4); margin: 0; list-style: none; }
.tb-nav-link { display: block; padding: var(--space-1) var(--space-2); font-size: 15px; line-height: 20px; font-weight: 700; color: var(--heading); text-decoration: none; border-radius: var(--radius-sm); border-bottom: 2px solid transparent; }
.tb-nav-link:hover { background: var(--gold); color: var(--on-gold); }
.tb-nav-link[aria-current="page"] { border-bottom-color: var(--navy-deep); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

/* Program card: jurusan photo with a navy overlay on hover */
.tb-program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-2); }
.tb-program { position: relative; height: 160px; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-sunken) center / cover no-repeat; transition: transform .3s, box-shadow .3s; }
.tb-program:hover, .tb-program:focus-within { transform: scale(1.03); box-shadow: var(--shadow-lg); }
.tb-program-label { position: absolute; left: 0; bottom: 0; margin: 0; padding: var(--space-1) var(--space-2); background: var(--surface-cream); color: var(--heading); font-size: 14px; line-height: 20px; font-weight: 700; border-top-right-radius: var(--radius-sm); }
.tb-program-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: var(--space-1); padding: var(--space-3); background: var(--overlay); color: var(--on-navy); opacity: 0; transition: opacity .3s; }
.tb-program:hover .tb-program-overlay, .tb-program:focus-within .tb-program-overlay { opacity: 1; }
.tb-program-overlay h3 { margin: 0; font-size: 20px; line-height: 28px; color: var(--gold); }
.tb-program-overlay p { margin: 0; font-size: 14px; line-height: 20px; }
@media (hover: none) { .tb-program-overlay { opacity: 1; background: linear-gradient(to top, var(--overlay), transparent 70%); justify-content: flex-end; } .tb-program-label { display: none; } }

/* Agenda card: news and events */
.tb-agenda { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-raised); box-shadow: var(--shadow-md); transition: transform .3s, box-shadow .3s; max-width: 360px; }
.tb-agenda:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.tb-agenda-media { position: relative; height: 180px; background: var(--surface-sunken) center / cover no-repeat; }
.tb-agenda-date { position: absolute; left: 0; bottom: 0; padding: var(--space-1) var(--space-3); background: var(--gold); color: var(--on-gold); font-weight: 700; font-size: 15px; line-height: 20px; border-top-right-radius: var(--radius-lg); }
.tb-agenda-body { display: grid; gap: var(--space-2); padding: var(--space-4); }
.tb-agenda-meta { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.tb-agenda-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--heading); text-wrap: balance; }
.tb-agenda-excerpt { margin: 0; color: var(--ink); }
.tb-link { color: var(--gold-text); font-weight: 700; text-decoration: none; }
.tb-link:hover { text-decoration: underline; }

/* Testimonial card: alumni quote with a raised round photo */
.tb-testimonial { position: relative; margin-top: 45px; padding: 60px var(--space-4) var(--space-4); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); text-align: center; max-width: 340px; }
.tb-testimonial-photo { position: absolute; top: -45px; left: 50%; transform: translateX(-50%); width: 90px; height: 90px; border-radius: var(--radius-full); object-fit: cover; border: 5px solid var(--surface-raised); box-shadow: var(--shadow-sm); background: var(--surface-cream); }
.tb-testimonial-quote { margin: 0 0 var(--space-3); font-style: italic; color: var(--ink); }
.tb-testimonial-quote::before, .tb-testimonial-quote::after { color: var(--gold); font-family: Georgia, serif; font-size: 2em; line-height: 0; vertical-align: -0.35em; }
.tb-testimonial-quote::before { content: "\201C"; margin-right: 4px; }
.tb-testimonial-quote::after { content: "\201D"; margin-left: 4px; }
.tb-testimonial-name { display: block; font-weight: 700; color: var(--heading); }
.tb-testimonial-role { display: block; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Stat card: admin dashboard counts */
.tb-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); }
.tb-stat { display: grid; gap: var(--space-1); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-raised); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.tb-stat-label { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.tb-stat-value { font-size: 32px; line-height: 40px; font-weight: 800; color: var(--heading); font-variant-numeric: tabular-nums; }
.tb-stat-note { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.tb-stat-primary { background: var(--navy); border-color: var(--navy); }
.tb-stat-primary .tb-stat-label, .tb-stat-primary .tb-stat-value, .tb-stat-primary .tb-stat-note { color: var(--on-navy); }

/* Data table: admin lists */
.tb-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-raised); }
.tb-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.tb-table th { text-align: left; padding: var(--space-2) var(--space-3); background: var(--navy); color: var(--on-navy); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.tb-table td { padding: var(--space-2) var(--space-3); border-top: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.tb-table tbody tr:hover td { background: var(--surface-cream); }
.tb-table .tb-num { text-align: right; font-variant-numeric: tabular-nums; }
.tb-table-actions { display: flex; gap: var(--space-1); }
.tb-testimonial-initials { display: flex; align-items: center; justify-content: center; box-sizing: border-box; font-size: 28px; font-weight: 800; color: var(--heading); font-style: normal; }
.tb-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
