/**
 * ICAST 2026 — Modern Classical Academic Theme
 * Inspired by Indian university conference landing pages (IIT, SASTRA, deemed universities)
 */

:root {
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --bg: #faf9f7;
  --surface: #f3f1ec;
  --surface-elevated: #ffffff;
  --text: #1c2430;
  --muted: #5c6675;
  --border: #ddd6cb;
  --border-strong: #c4b8a8;
  --primary: #0a4d8c;
  --primary-dark: #063566;
  --primary-soft: #e8f1fa;
  --gold: #a67c00;
  --gold-light: #d4af37;
  --gold-soft: #faf5e8;
  --maroon: #6b1d2a;
  --navy-start: #001a33;
  --navy-end: #003366;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(0, 26, 51, 0.06);
  --shadow-md: 0 12px 32px rgba(0, 26, 51, 0.1);
  --shadow-lg: 0 20px 48px rgba(0, 26, 51, 0.14);
  --transition: 0.22s ease;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.hero-banner__title,
.section-title,
.header-title {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ─── Header ─── */
.site-header {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--gold-light);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--gold-light);
}

.header-bar {
  border-bottom: none;
}

.header-title {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  color: var(--navy-start);
  letter-spacing: 0.08em;
}

.header-title:hover {
  color: var(--primary);
}

.nav-row {
  background: transparent;
  border: none;
  padding: 0;
  gap: 0.2rem;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: #3d4a5c;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.72rem;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: var(--shadow-sm);
}

.nav-toggle {
  border-color: var(--border-strong);
  top: 0.85rem;
}

/* ─── Hero ─── */
.hero-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--navy-start) 0%, #002b55 45%, var(--navy-end) 100%);
  padding: clamp(2.8rem, 6vw, 4.5rem) 1.25rem clamp(2.6rem, 5vw, 4rem);
}

.hero-banner__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    radial-gradient(circle at 20% 30%, #ffffff 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, #ffffff 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-banner__inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.hero-banner__eyebrow {
  display: inline-block;
  margin: 0 0 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.hero-banner__title {
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  line-height: 1.18;
  color: #ffffff;
  margin-bottom: 0.9rem;
}

.hero-banner__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0 auto 1rem;
  max-width: 280px;
}

.hero-banner__rule::before,
.hero-banner__rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.85));
}

.hero-banner__rule::after {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.85), transparent);
}

.hero-banner__rule span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold-light);
  transform: rotate(45deg);
  background: transparent;
}

.hero-banner__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: #e8eef5;
  margin-bottom: 0.75rem;
}

.hero-banner__tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  font-style: italic;
  font-weight: 500;
  color: #c9daf0;
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.45;
}

/* ─── Home details ─── */
.home-details {
  padding: clamp(1.5rem, 3vw, 2.25rem) 0 0.5rem;
  margin-top: -1.5rem;
  position: relative;
  z-index: 2;
}

.content-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
}

.hero-institution-card {
  border-color: var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #faf9f7 100%);
}

.hero-divider span {
  border-top: 1px solid var(--border-strong);
  position: relative;
}

.hero-divider span::after {
  content: "◆";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: var(--gold);
  font-size: 0.55rem;
  padding: 0 0.5rem;
}

.badge {
  border-color: #c5d9f0;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.badge-gold {
  border-color: #e8d49a;
  background: var(--gold-soft);
  color: #7a5a00;
}

.hero-meta-item {
  background: var(--surface);
  border-color: var(--border);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.hero-meta-item:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow-sm);
}

.hero-meta-item svg {
  color: var(--primary);
}

.countdown-item {
  background: linear-gradient(180deg, #ffffff, var(--surface));
  border-color: var(--border-strong);
  min-width: clamp(64px, 14vw, 80px);
}

.countdown-item span {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  color: var(--navy-start);
}

/* ─── Important dates band ─── */
.dates-strip {
  background: linear-gradient(135deg, var(--navy-start), #002b55);
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  margin: 0;
}

.dates-grid {
  gap: clamp(0.6rem, 2vw, 1rem);
}

.date-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: clamp(0.75rem, 2vw, 1rem);
  text-align: center;
  transition: background var(--transition), transform var(--transition);
}

.date-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.date-label {
  color: #b8c9de;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.date-value {
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.date-card.highlight {
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08));
  border-color: var(--gold-light);
}

.date-card.highlight .date-label {
  color: #f0dfa0;
}

/* ─── Sections ─── */
.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-alt,
main > .section:nth-of-type(even) {
  background: var(--surface);
}

.section-tag {
  font-family: var(--font-sans);
  color: var(--gold);
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-tag::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  background: var(--gold-light);
}

.section-header.center .section-tag::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-header:not(.center) .section-tag::after {
  left: 0;
  transform: none;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.45rem);
  color: var(--navy-start);
  line-height: 1.2;
}

.section-title em {
  color: var(--primary);
  font-style: italic;
}

.section-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.7;
}

/* ─── Cards & panels ─── */
.info-card,
.leader-card,
.track-card,
.chair-card,
.workshop-card,
.highlight-item,
.tour-card,
.reg-table-wrapper,
.reg-includes,
.contact-form,
.advisory-col,
.cfp-content,
.cfp-publishers {
  border-color: var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.cmt-acknowledgment {
  background: var(--surface);
  border-color: var(--border);
}

.cmt-acknowledgment__heading {
  font-family: var(--font-serif);
  color: var(--navy-start);
}

.info-card:hover,
.leader-card:hover,
.track-card:hover,
.highlight-item:hover,
.workshop-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.leader-role,
.chair-role {
  color: var(--gold);
}

.track-card__head {
  background: linear-gradient(180deg, var(--surface), #ffffff);
  border-bottom: 2px solid var(--gold-soft);
}

.track-card__badge {
  color: var(--primary);
}

.stat {
  background: var(--surface-elevated);
  border-color: var(--border);
}

.stat-num {
  font-family: var(--font-serif);
  color: var(--navy-start);
  font-size: 1.35rem;
}

.lead {
  font-family: var(--font-serif);
  font-size: clamp(1.08rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.info-card.special {
  border-left: 4px solid var(--gold-light);
  background: var(--gold-soft);
}

.take-home {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
}

/* ─── Schedule ─── */
.schedule-tabs {
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.schedule-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.pdf-viewer {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

.pdf-viewer__toolbar {
  border-bottom-color: var(--border);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
}

.pdf-viewer__label {
  font-family: var(--font-serif);
  color: var(--navy-start);
}

.pdf-viewer__btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
}

.programme-tab.active {
  background: linear-gradient(145deg, var(--navy-start) 0%, #002b55 55%, var(--navy-end) 100%);
}

.programme-panel__intro h3,
.agenda-item__title {
  font-family: var(--font-serif);
}

.agenda-parallel__card {
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.agenda-parallel__card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.programme-note {
  color: var(--muted);
}

.timeline-item .time {
  background: var(--surface);
  color: var(--navy-start);
  font-family: var(--font-serif);
}

/* ─── Registration table ─── */
.reg-table thead th {
  background: var(--navy-start);
  color: #ffffff;
  border-color: #003366;
}

.reg-table tbody tr:hover {
  background: var(--primary-soft);
}

/* ─── Buttons ─── */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(10, 77, 140, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #042a4d);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(10, 77, 140, 0.32);
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--primary);
  background: #ffffff;
}

.btn-outline:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* ─── Footer ─── */
.footer {
  background: linear-gradient(180deg, var(--navy-start) 0%, #001225 100%);
  border-top: 4px solid var(--gold-light);
  margin-top: 0;
  padding: clamp(2rem, 4vw, 3rem) 0 1.25rem;
}

.footer-links h4,
.footer-brand h4,
.footer-partners h4 {
  font-family: var(--font-serif);
  color: var(--gold-light);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.footer-links,
.footer-brand,
.footer-partners {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(212, 175, 55, 0.2);
}

.footer-links a:hover {
  color: var(--gold-light);
}

.blessing {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-light);
}

/* ─── Forms ─── */
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 77, 140, 0.15);
}

/* ─── Contact (simple card layout) ─── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 880px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.contact-card--wide {
  grid-column: 1 / -1;
}

.contact-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
}

.contact-card__icon svg {
  width: 22px;
  height: 22px;
}

.contact-card__body {
  min-width: 0;
}

.contact-card__title {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.45rem;
}

.contact-card__text {
  margin: 0;
  color: #3d4a5c;
  line-height: 1.65;
  font-size: 0.96rem;
}

.contact-card__link {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
  line-height: 1.5;
}

.contact-card__link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .contact-card {
    padding: 1rem;
  }

  .contact-card--wide {
    grid-column: auto;
  }
}

/* Poster — full-width responsive display handled in styles.css */

/* ─── Focus accessibility ─── */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.reg-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.contact-wrapper,
.cfp-wrapper,
.venue-grid,
.registration-grid,
.about-grid {
  gap: clamp(0.85rem, 2vw, 1.25rem);
}

.leadership-highlight {
  border-left: 3px solid var(--gold-light);
  background: var(--surface-elevated);
}

.leadership-intro {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  font-family: var(--font-serif);
  font-size: clamp(1.02rem, 1.85vw, 1.14rem);
  font-weight: 500;
  line-height: 1.8;
  color: #3d4a5c;
  max-width: 860px;
  margin: 1.1rem auto 0;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(145deg, #ffffff 0%, #faf8f4 100%);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold-light);
  border-bottom: 3px solid var(--gold-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.leader-photo-wrap {
  background: linear-gradient(180deg, #faf9f7 0%, #ece8e0 100%);
}

/* ─── Responsive ─── */
@media (max-width: 992px) {
  .nav-row.active {
    border-bottom: 3px solid var(--gold-light);
    box-shadow: var(--shadow-md);
  }

  .nav-link {
    margin: 0 0.5rem;
    border-radius: var(--radius-sm);
  }

  .nav-link.active {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .dates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .home-details {
    margin-top: -1rem;
  }
}

@media (max-width: 640px) {
  .hero-banner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-banner__eyebrow {
    letter-spacing: 0.14em;
    font-size: 0.74rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .countdown {
    gap: 0.35rem;
  }

  .countdown-sep {
    display: none;
  }

  .countdown-item {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
  }

  .dates-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2.75rem 0;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    text-align: center;
  }

  .footer-bottom__legal {
    flex-direction: column;
    align-items: center;
  }

  .tracks-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .tracks-cta .btn {
    width: 100%;
  }
}

@media (min-width: 1200px) {
  .container {
    width: min(1140px, calc(100% - 2.5rem));
  }

  .header-bar,
  .container {
    width: min(1140px, calc(100% - 2.5rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .btn:hover {
    transform: none;
  }

  .date-card:hover {
    transform: none;
  }
}
