/* ==========================================================================
   T2S Interactive STEM Platform - Unified Design System (t2s.css)
   ========================================================================== */

:root {
  --paper: #F6F5F0;
  --panel: #FFFFFF;
  --panel-elevated: #FFFFFF;
  --ink: #17141F;
  --muted: #6E6A78;
  --line: rgba(23, 20, 31, .14);
  --line-soft: rgba(23, 20, 31, .07);

  --purple: #6D4DF2;
  --purple-deep: #5A3BE4;
  --purple-soft: #EFECFD;
  --purple-line: rgba(109, 77, 242, 0.25);

  /* Subject colors */
  --math: #F43F5E;
  --physics: #3B82F6;
  --chem: #14B8A6;
  --bio: #F59E0B;
  --amber: #F59E0B;

  --dark: #0E0C17;
  --dark-panel: #16132A;
  --dark-line: rgba(255, 255, 255, .11);
  --dark-muted: rgba(233, 230, 245, .62);

  --font-d: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-b: 'Inter', system-ui, -apple-system, sans-serif;
  --font-m: 'JetBrains Mono', monospace;
  --font-s: 'Instrument Serif', Georgia, serif;

  --rad-sm: 6px;
  --rad-md: 10px;
  --rad-lg: 16px;
  --rad-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(23, 20, 31, 0.06);
  --shadow-md: 0 8px 24px -6px rgba(23, 20, 31, 0.08), 0 2px 6px -2px rgba(23, 20, 31, 0.04);
  --shadow-lg: 0 18px 40px -12px rgba(23, 20, 31, 0.12), 0 4px 12px -2px rgba(23, 20, 31, 0.04);
}

/* ============ RESET & BASE ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-b);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
}

main.page-main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ============ CONTAINERS & LAYOUT ============ */
.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-d);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
h4 { font-size: 1.15rem; font-weight: 600; }

em {
  font-family: var(--font-s);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.mono-label {
  font-family: var(--font-m);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.sec-no {
  font-family: var(--font-m);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 8px;
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.6;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-d);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--rad-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--purple-deep);
  border-color: var(--purple-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(109, 77, 242, 0.28);
}

.btn-purple {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.btn-purple:hover {
  background: var(--purple-deep);
  border-color: var(--purple-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(109, 77, 242, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: rgba(23, 20, 31, 0.04);
  border-color: var(--ink);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.86rem;
  border-radius: var(--rad-sm);
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1.05rem;
}

/* ============ NAVIGATION ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 245, 240, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: border-color 0.2s;
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.brand-name i {
  color: var(--purple);
  font-style: normal;
}

.brand-sub {
  font-family: var(--font-m);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-family: var(--font-d);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--purple);
}

.nav-link svg.arrow-down {
  transition: transform 0.2s;
}

.nav-item:hover .nav-link svg.arrow-down {
  transform: rotate(180deg);
}

/* Nav Dropdown Menu */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 230px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 120;
}

.nav-item:hover .nav-dropdown,
.nav-dropdown:focus-within {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: var(--rad-sm);
  text-decoration: none;
  transition: background 0.15s;
}

.dropdown-link:hover {
  background: var(--paper);
}

.dropdown-title {
  font-family: var(--font-d);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-desc {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: var(--rad-sm);
  cursor: pointer;
  color: var(--ink);
}

/* Mobile Menu */
.mmenu {
  display: none;
  flex-direction: column;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px 24px;
  gap: 14px;
}

.mmenu.open {
  display: flex;
}

.mmenu a {
  font-family: var(--font-d);
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.mmenu-section-label {
  font-family: var(--font-m);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 8px;
}

/* ============ PAGE HEADER / HERO BANNER ============ */
.page-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line-soft);
  background: radial-gradient(circle at top right, rgba(109, 77, 242, 0.04), transparent 60%);
}

.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.page-hero h1 {
  margin-bottom: 14px;
}

.page-hero p.page-lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.6;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-m);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: var(--muted);
  transition: color 0.15s;
}

.breadcrumbs a:hover {
  color: var(--purple);
}

.breadcrumbs span.sep {
  color: var(--line);
}

/* ============ CARDS & PANELS ============ */
.t2s-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.t2s-panel-soft {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line-soft);
  border-radius: var(--rad-md);
  padding: 24px;
}

/* ============ FORM CONTROLS ============ */
.t2s-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.t2s-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.t2s-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.t2s-label {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.t2s-label .req {
  color: var(--math);
  margin-left: 4px;
}

.t2s-label .opt {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 400;
  font-family: var(--font-m);
}

.t2s-input,
.t2s-select,
.t2s-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-b);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  outline: none;
  transition: all 0.18s ease;
}

.t2s-input:focus,
.t2s-select:focus,
.t2s-textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109, 77, 242, 0.12);
  background: #ffffff;
}

.t2s-input::placeholder,
.t2s-textarea::placeholder {
  color: #A09DA8;
}

.t2s-textarea {
  min-height: 120px;
  resize: vertical;
}

.t2s-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

/* File Drop Zone */
.t2s-file-drop {
  border: 1.5px dashed var(--line);
  border-radius: var(--rad-md);
  padding: 20px;
  text-align: center;
  background: var(--paper);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.t2s-file-drop:hover {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.t2s-file-drop input[type="file"] {
  display: none;
}

.t2s-file-drop .drop-text {
  font-size: 0.86rem;
  color: var(--ink);
  font-weight: 500;
}

.t2s-file-drop .drop-sub {
  font-family: var(--font-m);
  font-size: 0.72rem;
  color: var(--muted);
}

/* Category Choice Chips */
.t2s-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.t2s-chip {
  padding: 8px 16px;
  border-radius: var(--rad-pill);
  font-family: var(--font-d);
  font-size: 0.86rem;
  font-weight: 500;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.t2s-chip:hover {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.t2s-chip.selected {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Star Rating Component */
.star-rating-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stars-list {
  display: inline-flex;
  gap: 4px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #D1CECE;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
  padding: 2px;
}

.star-btn.active,
.star-btn.hover {
  color: var(--amber);
}

.star-btn:hover {
  transform: scale(1.18);
}

.star-rating-label {
  font-family: var(--font-m);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
}

/* Radio Group */
.t2s-radio-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.t2s-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
}

.t2s-radio-label input[type="radio"] {
  accent-color: var(--purple);
  width: 16px;
  height: 16px;
}

/* Alert / Callout Box */
.t2s-callout {
  padding: 18px 22px;
  border-radius: var(--rad-md);
  background: var(--purple-soft);
  border: 1px solid var(--purple-line);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.t2s-callout a {
  color: var(--purple-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.t2s-callout-success {
  background: #ECFDF5;
  border-color: rgba(16, 185, 129, 0.3);
  color: #065F46;
}

/* ============ ACCORDION (FAQs) ============ */
.t2s-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.t2s-acc-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.t2s-acc-item.open {
  border-color: var(--purple);
  box-shadow: var(--shadow-sm);
}

.t2s-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 16px;
}

.t2s-acc-q {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.t2s-acc-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition: transform 0.25s ease, background 0.2s;
}

.t2s-acc-item.open .t2s-acc-icon {
  transform: rotate(45deg);
  background: var(--purple);
  color: #fff;
}

.t2s-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 22px;
  color: #373344;
  font-size: 0.96rem;
  line-height: 1.65;
}

.t2s-acc-item.open .t2s-acc-body {
  padding-bottom: 22px;
  max-height: 500px;
}

/* ============ SEARCH BAR (Help Centre & FAQs) ============ */
.t2s-search-box {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.t2s-search-box svg.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.t2s-search-input {
  width: 100%;
  padding: 16px 20px 16px 54px;
  font-family: var(--font-b);
  font-size: 1.05rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad-pill);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  outline: none;
  transition: all 0.2s;
}

.t2s-search-input:focus {
  border-color: var(--purple);
  box-shadow: 0 10px 30px -4px rgba(109, 77, 242, 0.2);
}

/* ============ CONTACT SIDEBAR ============ */
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad-lg);
  padding: 28px;
}

.contact-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.contact-meta-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-meta-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--purple-soft);
  color: var(--purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-meta-content {
  display: flex;
  flex-direction: column;
}

.contact-meta-label {
  font-family: var(--font-m);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-meta-val {
  font-family: var(--font-d);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}

.contact-meta-val a:hover {
  color: var(--purple);
}

/* ============ FOOTER ============ */
footer.t2s-footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 64px 0 36px;
  margin-top: 80px;
}

.f-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.f-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 14px 0;
  max-width: 320px;
  line-height: 1.55;
}

.f-col h4 {
  font-family: var(--font-d);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.f-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.15s;
}

.f-col a:hover {
  color: var(--purple);
}

.f-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.82rem;
  color: var(--muted);
}

.socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.15s;
}

.socials a:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper);
}

/* ============ RESPONSIVE BREAKPOINTS ============ */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .f-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .t2s-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .f-grid { grid-template-columns: 1fr; }
  .f-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
  .t2s-panel { padding: 22px 18px; }
  .nav-cta a.btn-ghost { display: none; }
}
