/* ==========================================================================
   Aralikatti International School, Mudhol
   Bespoke Design Tokens, Responsive Typography & Apple Design Motion
   Static Site Enhancement (No Server Dependency)
   ========================================================================== */

:root {
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;

  --bg-canvas: #FAF9F5;
  --bg-canvas-subtle: #F4F3ED;
  --bg-surface: #FFFFFF;
  --text-main: #141413;
  --text-secondary: #4A4944;
  --text-muted: #6B6A64;
  --border-light: #E2E0D8;

  --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 160ms;
  --duration-base: 240ms;
  --duration-slow: 480ms;
}

/* Base resets & typography smoothing (15px desktop base) */
html {
  font-size: 15px;
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.68;
  overflow-x: hidden;
}

/* Guard against uncomfortably small text across all viewports */
small, .text-xs {
  font-size: 14px !important;
  line-height: 1.45 !important;
}

/* Base comfortable input and control sizing */
input, textarea, select, button {
  font-family: inherit;
  font-size: 15px;
}

/* Prestigious serif headlines with optical balance */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  letter-spacing: -0.015em;
  font-weight: 600;
  line-height: 1.18;
}

/* Apple fluid tactile active press */
button:active, .btn-tactile:active, a.btn-tactile:active {
  transform: scale(0.978);
  transition: transform var(--duration-fast) var(--ease-apple);
}

/* Translucent Frosted Glass Header */
.frosted-glass {
  background-color: rgba(250, 249, 245, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Subtle scroll reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-apple), transform var(--duration-slow) var(--ease-apple);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Tab Switching in Disclosures */
.disclosure-tab-pane {
  display: none;
}

.disclosure-tab-pane.active {
  display: block;
  animation: tabAppear 240ms var(--ease-apple);
}

@keyframes tabAppear {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Table Wrapper with Touch Scroll */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.75rem;
}

.table-responsive-wrapper table {
  min-width: 620px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-responsive-wrapper th,
.table-responsive-wrapper td {
  white-space: normal;
}

/* Subtle scroll hint indicator on mobile */
@media (max-width: 640px) {
  .table-responsive-wrapper {
    box-shadow: inset -10px 0 10px -10px rgba(20, 20, 19, 0.12);
  }
}

/* Toast styling */
.toast-box {
  animation: toastSlide 260ms var(--ease-apple);
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Accessible Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Footer Light-Themed Logo Filter (turns dark crest into crisp light monochrome for dark footer) */
.footer-logo-light {
  filter: brightness(0) invert(1);
  -webkit-filter: brightness(0) invert(1);
}
