/* ============================================================
   Website Kelas X TJKT 3
   Design direction: friendly vocational-school info site,
   Indonesian identity. Dials: ENERGY 2 / RHYTHM 2 / MOTION 2.

   Palette reason (R-31):
   - Navy  = stable, "networking/tech" class identity (core)
   - Teal  = secondary core, used to separate schedule blocks
   - Amber = single deliberate accent for active state + highlights
   ============================================================ */

:root {
  /* Core colors */
  --navy:        #16324f;
  --navy-deep:   #0e2135;
  --teal:        #1f8a80;
  --amber:       #f2a52c;

  /* Neutrals */
  --bg:          #f6f4ef;
  --surface:     #ffffff;
  --surface-2:   #fbfaf7;
  --ink:         #17202e;
  --ink-soft:    #4b5768;
  --line:        #e4e0d6;

  /* Type */
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2.25rem;
  --sp-7: 3.5rem;

  /* Radii (deliberate variation, not everything pill) */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;

  /* Elevation (shadow as hierarchy marker, used sparingly) */
  --sh-1: 0 1px 2px rgba(23, 32, 46, .06);
  --sh-2: 0 8px 24px -12px rgba(23, 32, 46, .22);
  --sh-lift: 0 18px 40px -22px rgba(23, 32, 46, .45);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 3px;
}

.container {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

/* Visually hidden, accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Navbar
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: box-shadow .35s var(--ease), background .35s var(--ease);
}
.nav.is-stuck {
  box-shadow: var(--sh-2);
  background: var(--navy-deep);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .55rem;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  letter-spacing: .01em;
  font-size: 1.05rem;
}
.brand__tag {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--amber);
}
.brand__name { line-height: 1; }

.nav__list {
  display: flex;
  gap: var(--sp-1);
  list-style: none;
  padding: 0;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: .55rem .85rem;
  border-radius: var(--r-sm);
  color: #dfe6f0;
  text-decoration: none;
  font-weight: 600;
  font-size: .93rem;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav__link:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* Active underline slide = one deliberate accent moment */
.nav__link[aria-current="page"] { color: #fff; }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: .85rem;
  right: .85rem;
  bottom: .3rem;
  height: 3px;
  border-radius: 3px;
  background: var(--amber);
  transform-origin: left;
  animation: underline-in .45s var(--ease) both;
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  padding: .5rem;
  cursor: pointer;
  color: #fff;
}
.nav__toggle svg { display: block; }
.nav__toggle line {
  transform-origin: center;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
/* Morph hamburger -> X when open */
.nav__toggle[aria-expanded="true"] .bar-top    { transform: translateY(5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .bar-mid    { opacity: 0; }
.nav__toggle[aria-expanded="true"] .bar-bottom { transform: translateY(-5px) rotate(-45deg); }

/* ============================================================
   Page header
   ============================================================ */
.page-head {
  padding: var(--sp-7) 0 var(--sp-5);
  text-align: center;
  animation: fade-up .6s var(--ease) both;
}
.page-head--home { padding-top: var(--sp-6); }

.page-head__eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--sp-3);
}
.page-head h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--navy);
  font-weight: 800;
}
.page-head p {
  margin: var(--sp-3) auto 0;
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ============================================================
   Hero image
   ============================================================ */
.hero-figure {
  margin-top: var(--sp-5);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-lift);
  animation: fade-up .7s .1s var(--ease) both;
}
.hero-figure img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.hero-figure:hover img { transform: scale(1.03); }
.hero-figure figcaption {
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  font-size: .85rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* ============================================================
   Section + card
   ============================================================ */
.section { padding: var(--sp-6) 0; }

.section__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.section__title::before {
  content: "";
  width: 14px;
  height: 26px;
  border-radius: 3px;
  background: linear-gradient(var(--amber), var(--teal));
  flex: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}

.prose { max-width: 62ch; margin-inline: auto; }
.prose p + p { margin-top: var(--sp-4); }

/* Quick links (home) */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}
.quick {
  display: block;
  padding: var(--sp-5);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
}
.quick:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lift);
  border-color: color-mix(in srgb, var(--amber) 60%, var(--line));
}
.quick__num {
  font-size: .8rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: .04em;
}
.quick__title {
  display: block;
  margin-top: var(--sp-2);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--navy);
}
.quick__desc {
  display: block;
  margin-top: var(--sp-2);
  font-size: .9rem;
  color: var(--ink-soft);
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: .95rem;
}

thead th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: var(--sp-3) var(--sp-4);
  white-space: nowrap;
}

tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--line);
  vertical-align: top;
}
tbody tr { transition: background .2s var(--ease); }
tbody tr:hover { background: var(--surface-2); }

/* Alternating time column emphasis on schedule */
.schedule td:first-child {
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  background: var(--surface-2);
}

/* Break row = real state, teal tint */
tr.is-break td {
  background: color-mix(in srgb, var(--teal) 12%, #fff);
  color: var(--navy);
  text-align: center;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .82rem;
}
tr.is-break:hover td { background: color-mix(in srgb, var(--teal) 12%, #fff); }

/* Piket name list */
.piket-day { padding: var(--sp-5); }
.piket-day__name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 2px solid color-mix(in srgb, var(--amber) 70%, #fff);
  display: inline-block;
}
.name-list { list-style: none; padding: 0; display: grid; gap: var(--sp-2); }
.name-list li {
  padding: .35rem .6rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border-left: 3px solid color-mix(in srgb, var(--teal) 55%, #fff);
}

/* Struktur: 2 columns, no forced wide min-width */
.struktur { min-width: 320px; }
.struktur td:first-child { font-weight: 700; color: var(--navy); white-space: nowrap; }

/* Struktur links */
.person-link {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.person-link:hover {
  color: var(--navy);
  border-bottom-color: var(--amber);
}

/* ============================================================
   Footer
   ============================================================ */
main { flex: 1 0 auto; }

.footer {
  margin-top: var(--sp-7);
  padding: var(--sp-5) 0;
  background: var(--navy-deep);
  color: #b9c4d3;
  font-size: .88rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  justify-content: space-between;
}
.footer a { color: var(--amber); text-decoration: none; font-weight: 600; }
.footer a:hover { text-decoration: underline; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes underline-in {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Scroll reveal, toggled by JS */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 720px) {
  .container { width: min(1080px, 100% - 1.75rem); }

  .nav__toggle { display: block; }
  .nav__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: var(--sp-1);
    background: var(--navy-deep);
    padding: var(--sp-3);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: var(--sh-2);
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
    transition: clip-path .4s var(--ease), opacity .3s var(--ease);
  }
  .nav__list.is-open {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__link { display: block; padding: .8rem 1rem; min-height: 44px; }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__link[aria-current="page"] { background: rgba(255, 255, 255, .1); }

  .page-head { padding: var(--sp-6) 0 var(--sp-4); }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
