/* ============================================
   TEDxSelwynHouseSchool Youth - Stylesheet
   TED Brand Colors: Red #e62b1e, Black, White
   Font: Helvetica
   ============================================ */

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

:root {
  --ted-red: #e62b1e;
  --ted-red-dark: #c41e13;
  --ted-red-light: rgba(230, 43, 30, 0.08);
  --black: #000000;
  --dark: #111111;
  --gray-900: #1a1a1a;
  --gray-800: #2a2a2a;
  --gray-700: #444;
  --gray-500: #777;
  --gray-400: #999;
  --gray-300: #bbb;
  --gray-200: #e0e0e0;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: var(--white);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Utility --- */
.text-red { color: var(--ted-red); }
.text-white { color: var(--white); }
.text-gray { color: var(--gray-400); }
.bg-white { background: var(--white); }
.bg-light { background: var(--gray-100); }
.bg-black { background: var(--black); color: var(--white); }

.link-red {
  color: var(--ted-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-red:hover { color: var(--ted-red-dark); }

.content-narrow { max-width: 780px; margin: 0 auto; }

/* --- Header / Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, box-shadow 0.4s;
}

.header.scrolled,
.header.scrolled-always {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.6rem 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.nav {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — matches the official TEDxSelwynHouseSchool Youth logo */
.logo {
  display: flex;
  align-items: flex-start;
  gap: 0;
  text-decoration: none;
  flex-direction: column;
  line-height: 1;
}

.logo-ted {
  font-family: var(--font-primary);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--ted-red);
  line-height: 1;
  letter-spacing: -0.5px;
}

.logo-ted sup {
  font-size: 0.6em;
  vertical-align: super;
  color: var(--ted-red);
  font-weight: 900;
}

.logo-school {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--black);
  font-weight: 400;
  letter-spacing: 0.2px;
}

.logo-youth {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ted-red);
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ted-red);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  width: 100%;
}

.nav-btn {
  background: var(--ted-red) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 4px;
  font-weight: 600 !important;
  transition: background 0.3s, transform 0.3s !important;
}

.nav-btn::after { display: none !important; }

.nav-btn:hover {
  background: var(--ted-red-dark) !important;
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-family: var(--font-primary);
}

.btn-red {
  background: var(--ted-red);
  color: var(--white);
}
.btn-red:hover {
  background: var(--ted-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230, 43, 30, 0.25);
}

.btn-red-outline {
  background: transparent;
  color: var(--ted-red);
  border: 2px solid var(--ted-red);
}
.btn-red-outline:hover {
  background: var(--ted-red);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--gray-200);
}
.btn-outline-dark:hover {
  border-color: var(--dark);
  transform: translateY(-2px);
}

.btn-full { width: 100%; }

/* --- Hero (Homepage) --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(230, 43, 30, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(230, 43, 30, 0.04) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 6rem 2rem 2rem;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ted-red);
  margin-bottom: 1.5rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(230, 43, 30, 0.25);
  border-radius: 50px;
}

.hero-title {
  font-family: var(--font-primary);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--black);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--gray-500);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--ted-red), transparent);
  animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- Page Hero (Sub-pages) --- */
.page-hero {
  padding: 10rem 0 4rem;
  background: var(--black);
  color: var(--white);
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 0.5rem;
}

.page-hero-desc {
  font-size: 1.1rem;
  color: var(--gray-400);
  max-width: 500px;
  margin: 0 auto;
}

/* --- Sections --- */
.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-family: var(--font-primary);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--gray-500);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

.label-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ted-red);
  margin-bottom: 1rem;
}

.label-tag-dark {
  color: var(--ted-red);
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.col-content h2 {
  font-family: var(--font-primary);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 1.25rem;
  color: var(--black);
}

.col-content p {
  color: var(--gray-700);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* --- Info Cards --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.info-card {
  padding: 2.5rem 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.info-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 1.25rem;
  color: var(--ted-red);
}

.info-card h3 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.info-card p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* --- CTA Grid (Get Involved) --- */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
}

.cta-card {
  padding: 2.25rem 1.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--ted-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.cta-card:hover::before { transform: scaleX(1); }

.cta-card:hover {
  border-color: rgba(230, 43, 30, 0.3);
  background: rgba(230, 43, 30, 0.05);
  transform: translateY(-4px);
}

.cta-card h3 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.cta-card p {
  font-size: 0.9rem;
  color: var(--gray-400);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.cta-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ted-red);
  transition: letter-spacing 0.3s;
}
.cta-link:hover { letter-spacing: 0.5px; }

/* --- Speakers Preview (Home) --- */
.speakers-coming-soon {
  text-align: center;
  padding: 4rem 2rem;
  border: 2px dashed var(--gray-200);
  border-radius: 12px;
}

.speakers-coming-soon p {
  font-size: 1.1rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

/* --- Speakers Page --- */
.speakers-grid-full {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.speaker-card-full {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.speaker-card-full:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.speaker-photo {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.speaker-details h3 {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.speaker-title {
  font-size: 0.85rem;
  color: var(--ted-red);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.speaker-desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.center-cta {
  text-align: center;
  padding-top: 2rem;
}

.center-cta p {
  font-size: 1rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

/* --- Team --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.team-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.team-avatar {
  margin-bottom: 1.25rem;
}

.avatar-placeholder {
  width: 90px;
  height: 90px;
  margin: 0 auto;
  color: var(--gray-300);
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.team-card h3 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: 0.8rem;
  color: var(--ted-red);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.team-bio {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* --- Schedule --- */
.schedule-notice {
  text-align: center;
  padding: 1.5rem 2rem;
  background: var(--ted-red-light);
  border-left: 4px solid var(--ted-red);
  border-radius: 0 8px 8px 0;
  margin-bottom: 3rem;
}

.schedule-notice p {
  color: var(--gray-700);
  font-size: 0.95rem;
}

.schedule-timeline {
  position: relative;
  margin-bottom: 3rem;
}

.schedule-timeline::before {
  content: '';
  position: absolute;
  left: 100px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.schedule-item {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 0;
  position: relative;
}

.schedule-item::before {
  content: '';
  position: absolute;
  left: 94px;
  top: 2rem;
  width: 14px;
  height: 14px;
  background: var(--white);
  border: 3px solid var(--ted-red);
  border-radius: 50%;
  z-index: 1;
}

.schedule-time {
  flex-shrink: 0;
  width: 80px;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ted-red);
  text-align: right;
  padding-top: 0.25rem;
}

.schedule-content {
  padding-left: 1.5rem;
}

.schedule-content h3 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.35rem;
}

.schedule-content p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.schedule-tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ted-red);
  background: var(--ted-red-light);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.contact-info h2 {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--black);
}

.contact-info > p {
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.contact-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--ted-red);
  margin-top: 2px;
}

.contact-detail h4 {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.15rem;
}

.contact-detail p,
.contact-detail a {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* --- Content Blocks (About page) --- */
.content-block {
  margin-bottom: 3.5rem;
}

.content-block h2 {
  font-family: var(--font-primary);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1.25rem;
  letter-spacing: -0.3px;
}

.content-block p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.85;
  margin-bottom: 1rem;
}

/* --- Footer --- */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand .logo { margin-bottom: 1rem; }

.footer-brand .logo-school,
.footer-brand .logo-youth {
  color: var(--gray-300);
}

.footer-brand .logo-youth {
  color: var(--white);
}

.footer-license {
  font-size: 0.8rem;
  color: var(--gray-400);
  line-height: 1.6;
  max-width: 320px;
}

.footer-nav h4,
.footer-event h4 {
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--white);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--gray-400);
}
.footer-nav a:hover { color: var(--white); }

.footer-event p {
  font-size: 0.85rem;
  color: var(--gray-400);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .cta-grid { grid-template-columns: 1fr; }
  .speakers-grid-full { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer-brand { grid-column: span 2; }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 5rem 2rem;
    gap: 1.25rem;
    transition: right 0.4s;
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    z-index: 1000;
    align-items: flex-start;
  }

  .nav-links.open { right: 0; }
  .hamburger { display: flex; }

  .two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .info-grid { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }

  .schedule-timeline::before { left: 12px; }
  .schedule-item { gap: 1rem; flex-direction: column; padding-left: 2.5rem; }
  .schedule-item::before { left: 6px; top: 0.25rem; }
  .schedule-time { width: auto; text-align: left; }
  .schedule-content { padding-left: 0; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { grid-column: span 1; }

  .section { padding: 4.5rem 0; }
  .page-hero { padding: 8rem 0 3rem; }
}

@media (max-width: 480px) {
  .hero-title { letter-spacing: -1px; }
  .container { padding: 0 1.25rem; }
  .team-grid { grid-template-columns: 1fr; }
}
