/* ==========================================================================
   Components — header/nav chrome, buttons, cards, icons, and the small
   recurring pieces (kicker labels, stats) that pages will assemble from.
   ========================================================================== */

/* ---- Header brand ---- */
.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

/* Logo replaces the old text wordmark. width/height attributes on the
   <img> (see header.html) set the intrinsic aspect ratio for CLS
   prevention; actual rendered size is controlled here, responsively,
   with the HTML attributes never dictating display size.

   Sized by WIDTH, not height, on purpose: this is the primary circular
   badge (with "Shantha Technical Institute" set in its ring), not a
   compact wordmark — at a typical ~50-60px header height it reads as an
   illegible dot. 180-220px wide keeps the badge's own text legible,
   which makes the header row taller than a conventional slim nav bar;
   that's an accepted, explicit tradeoff for this temporary asset, not an
   oversight. */
.site-header__logo {
  display: block;
  width: 220px;
  height: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .site-header__logo {
    width: 230px;
  }
}

@media (min-width: 1024px) {
  .site-header__logo {
    width: 240px;
  }
}

/* ---- Mobile nav toggle ---- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: background var(--duration-fast) var(--ease-standard);
}

.nav-toggle:hover {
  background: var(--color-bg-raised);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .nav-toggle__icon--close {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__icon--open {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__icon--close {
  display: inline-flex;
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
}

/* ---- Primary navigation ---- */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-standard);
}

.site-nav.is-open {
  max-height: 28rem;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--content-padding-inline) var(--space-6);
}

.site-nav__list li + li {
  margin-top: var(--space-1);
}

.site-nav__list a {
  display: block;
  padding: var(--space-3) var(--space-3);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}

.site-nav__list a:hover {
  color: var(--color-primary);
  background: var(--color-bg-raised);
}

@media (min-width: 1024px) {
  .site-nav {
    position: static;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: var(--space-2);
  }

  .site-nav__list li + li {
    margin-top: 0;
  }

  .site-nav__list a {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-weight: var(--weight-medium);
  font-size: var(--font-size-sm);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--color-button-bg);
  color: var(--color-button-text);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-button-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-bg-raised);
  transform: translateY(-1px);
}

.btn--ghost {
  padding-inline: var(--space-1);
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 0.15em;
}

.btn--ghost svg {
  transition: transform var(--duration-fast) var(--ease-standard);
}

.btn--ghost:hover svg {
  transform: translateX(3px);
}

/* Contact action buttons — used on the (dark) footer band. Hover goes to a
   solid white fill (matching the dark-context button pattern elsewhere):
   the footer's own background is already deep green, so hovering to
   --color-primary here would land on almost the same color and read as no
   feedback at all — verified by looking at it, not assumed. */
.btn--call,
.btn--whatsapp,
.btn--email,
.btn--directions {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn--call:hover,
.btn--whatsapp:hover,
.btn--email:hover,
.btn--directions:hover {
  background: var(--white);
  color: var(--green-deep);
  border-color: var(--white);
  transform: translateY(-1px);
}

/* ---- Cards ---- */
.card {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    border-color var(--duration-base) var(--ease-standard);
}

.card:hover {
  transform: translateY(-4px);
  /* A ring via box-shadow, not a border-color swap: bright yellow has very
     low contrast against white/mist, so a 1px border hover would be nearly
     invisible. A 2px ring reads clearly without a layout-shifting border
     change. */
  box-shadow: var(--shadow-md), 0 0 0 2px var(--gold);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(34, 163, 94, 0.14);
  /* Icon glyphs are non-text UI (WCAG 1.4.11, 3:1 threshold) so the
     brighter --green-fresh accent is safe here even though it fails the
     stricter 4.5:1 text threshold used by --color-primary. */
  color: var(--green-fresh);
  margin-bottom: var(--space-4);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--weight-regular);
  margin-bottom: var(--space-2);
}

.card__body {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
  max-width: none;
}

/* ---- Kicker / eyebrow label — a small pill badge, not bare text. Gives
   every section opener a deliberate spot of color instead of leaning on
   green/gold only at a handful of one-off moments. ---- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-kicker);
  background: var(--color-kicker-bg);
  padding: 0.3em 0.7em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}

/* ---- Stat (mono numeral + label) ---- */
.stat__value {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--font-size-2xl);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  line-height: 1;
}

.stat__label {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.stat__label::before {
  content: '';
  display: block;
  /* Thicker than a hairline on purpose: bright yellow reads very low-
     contrast against white/mist, so this needs enough area to stay
     visible without relying on a strong contrast ratio it can't get. */
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-gold);
  margin-bottom: var(--space-2);
}

/* ---- Gold accent rule — extremely limited use (e.g. "Est. 1974") ---- */
.rule-gold {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--color-gold);
  margin-block: var(--space-3);
}

/* ---- Icon sizing ---- */
.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon--lg {
  width: 28px;
  height: 28px;
}

/* ---- Footer detail ---- */
.site-footer__name {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  margin: 0 0 var(--space-1);
}

.site-footer__address {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--font-size-sm);
  margin: 0;
}

.site-footer__legal,
.site-footer__credit {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.6);
  margin: var(--space-1) 0 0;
}

.site-footer__credit a {
  /* --aqua-light, not raw --aqua: at this small (xs) text size against the
     deep-green footer, raw aqua only reaches ~4.5:1 — right at the WCAG AA
     edge. The lighter tint verifies at ~6.6:1. */
  color: var(--aqua-light);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-footer__links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--font-size-sm);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.site-footer__quicklinks {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-footer__heading {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aqua-light);
  margin: 0 0 var(--space-1);
}

.site-footer__quicklinks a {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--font-size-sm);
  text-decoration: none;
  width: fit-content;
}

.site-footer__quicklinks a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* ---- Callout panel — an inset dark CTA block, not a full-bleed section.
   Shares its token overrides with .section--dark (see tokens.css) so any
   component dropped inside adapts automatically. ---- */
.callout {
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-5);
  text-align: center;
}

@media (min-width: 768px) {
  .callout {
    padding: var(--space-9) var(--space-8);
  }
}

.callout__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* ---- Career pathway — a short, connected sequence of labeled steps.
   Horizontal with a connecting line at tablet+, stacked on mobile. ---- */
.pathway {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .pathway {
    flex-direction: row;
    align-items: flex-start;
  }
}

.pathway__step {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex: 1;
  position: relative;
}

@media (min-width: 768px) {
  .pathway__step {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }

  .pathway__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(50% + 28px);
    width: calc(100% - 56px);
    height: 1.5px;
    background: var(--color-border);
  }
}

.pathway__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-bg-raised);
  border: 1.5px solid var(--color-border);
  color: var(--green-fresh);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.pathway__icon svg {
  width: 24px;
  height: 24px;
}

.pathway__label {
  font-weight: var(--weight-medium);
  font-size: var(--font-size-sm);
}

/* ---- Steps — a numbered vertical timeline (Learning Journey). The
   connecting line is a deliberate echo of the hero's resolving stroke. ---- */
.steps {
  display: flex;
  flex-direction: column;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-5);
  position: relative;
  padding-bottom: var(--space-7);
}

.step:last-child {
  padding-bottom: 0;
}

.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: 0;
  width: 1.5px;
  background: var(--color-border);
}

.step__index {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-bg-raised);
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--weight-regular);
  margin: 0 0 var(--space-2);
}

.step__body {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
  max-width: 56ch;
}

/* ---- Reasons — icon + text rows ("Why Choose Us"). Deliberately plainer
   than .card: trust here comes from the writing, not the container. ---- */
.reasons {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .reasons {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6) var(--space-7);
  }
}

.reason {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.reason__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(34, 163, 94, 0.14);
  color: var(--green-fresh);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-standard);
}

.reason:hover .reason__icon {
  transform: scale(1.08);
}

/* One deliberate aqua variant, used exactly once (the language-related
   reason) so the reasons grid isn't all-green, without turning into a
   color-coding system nobody asked for. */
.reason__icon--aqua {
  background: rgba(63, 193, 201, 0.16);
  color: var(--aqua);
}

.reason__icon svg {
  width: 20px;
  height: 20px;
}

.reason__title {
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-base);
}

.reason__body {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
}

/* ---- Narrative + accent — pairs a text block with a large, quiet
   decorative numeral/mark, so single-column prose sections don't leave a
   wide empty column at desktop widths. Purely decorative: hidden below
   1024px, where the text block already uses the full width naturally. ---- */
.narrative {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .narrative {
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: var(--space-8);
  }
}

.narrative__accent {
  display: none;
}

@media (min-width: 1024px) {
  .narrative__accent {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 7rem;
    font-weight: var(--weight-medium);
    line-height: 1;
    color: rgba(14, 77, 60, 0.08);
    user-select: none;
  }

  .narrative__accent svg {
    width: 120px;
    height: 120px;
  }
}

/* ---- Page header — the lighter, non-hero opener used on every page
   except Home, so each page reads as intentionally designed rather than
   a bare content dump, without repeating the homepage's signature moment. ---- */
.page-header {
  padding-block: var(--space-8);
}

@media (min-width: 768px) {
  .page-header {
    padding-top: var(--space-9);
    padding-bottom: var(--space-6);
  }
}

.page-header h1 {
  margin-bottom: var(--space-4);
}

.page-header p {
  font-size: var(--font-size-md);
  max-width: 60ch;
  color: var(--color-text-muted);
}

/* ---- Placeholder panel — an honest, premium "coming soon" for content
   that doesn't exist yet (founder photo, gallery, etc.). Dashed border
   reads as deliberate, not broken. ---- */
.placeholder-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-5);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-raised);
}

.placeholder-panel svg {
  color: var(--green-fresh);
}

.placeholder-panel__title {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  font-size: var(--font-size-md);
  color: var(--color-text);
  margin: 0;
}

.placeholder-panel__body {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
  max-width: 40ch;
}

/* ---- Chip grid — a scannable list of short labels (e.g. "who this is
   for"), where a full icon+title+body reason card would be overkill. ---- */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.55em 1em;
  border-radius: var(--radius-full);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.chip svg {
  width: 16px;
  height: 16px;
  color: var(--green-fresh);
  flex-shrink: 0;
}

/* ---- Glass — tasteful, restrained glassmorphism. Used in exactly three
   places: the header once scrolled (layout.css), the hero's info badge,
   and stat tiles. Not a general-purpose utility to scatter everywhere. ---- */
.glass {
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.stat-tile {
  /* A tinted-green glass rather than white-on-white — reads regardless of
     whether the section behind it happens to be white or already tinted. */
  background: rgba(69, 179, 102, 0.09);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(69, 179, 102, 0.18);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
}

/* ---- Motion: scroll reveal (paired with main.js IntersectionObserver) ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-slow) var(--ease-standard),
    transform var(--duration-slow) var(--ease-standard);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
