/* ===========================
   ILM Pathways — Design Tokens
   =========================== */
:root {
  /* Core palette (HSL) */
  --uk-blue: 211 62% 27%;
  --union-red: 350 76% 47%;

  --background: hsl(0 0% 100%);
  --foreground: hsl(211 62% 27%);

  --card: hsl(0 0% 100%);
  --card-foreground: hsl(211 62% 27%);

  --primary: hsl(211 62% 27%);
  --primary-foreground: hsl(0 0% 100%);

  --muted-foreground: hsl(211 30% 38%);

  --accent: hsl(350 76% 47%);
  --accent-foreground: hsl(0 0% 100%);

  --border: hsl(214.3 31.8% 91.4%);
  --section-bg: hsl(220 14% 96%);

  /* Gradients & Shadows */
  --hero-gradient: linear-gradient(135deg, hsl(211 62% 27%) 0%, hsl(211 55% 40%) 100%);
  --card-shadow: 0 4px 20px rgba(26, 60, 109, 0.08);
  --card-shadow-hover: 0 8px 30px rgba(26, 60, 109, 0.15);
  --button-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);

  --radius: 0.75rem;
}

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

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* Focus-visible for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out forwards; }
.animate-delay-200  { animation-delay: 0.2s; opacity: 0; }
.animate-delay-400  { animation-delay: 0.4s; opacity: 0; }

/* ===========================
   Layout helpers
   =========================== */
section[id] {
  scroll-margin-top: 6rem;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--narrow { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.section-padding { padding: 5rem 1.5rem; }
.section-bg { background-color: var(--section-bg); }
.text-center { text-align: center; }

/* ===========================
   Navigation
   =========================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: opacity 0.2s;
}
.nav__logo:hover { opacity: 0.9; }
.nav__logo img { height: 5rem; width: auto; }
.nav__toggle {
  display: none;
  color: var(--primary);
}
.nav__toggle svg { width: 28px; height: 28px; }
.nav__links {
  display: flex;
  gap: 2.5rem;
}
.nav__links button {
  color: var(--primary);
  font-weight: 500;
  font-size: 1.125rem;
  text-transform: capitalize;
  transition: color 0.2s;
}
.nav__links button:hover { color: var(--accent); }

/* Mobile nav */
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-top: 1rem;
}
.nav__mobile.open { display: flex; }
.nav__mobile button {
  color: var(--primary);
  font-weight: 500;
  font-size: 1.125rem;
  text-transform: capitalize;
  text-align: left;
  width: 100%;
  transition: color 0.2s;
}
.nav__mobile button:hover { color: var(--accent); }

/* ===========================
   Hero
   =========================== */
.hero {
  background: var(--hero-gradient);
  position: relative;
  overflow: hidden;
  padding: 6rem 1.5rem;
  text-align: center;
}
.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(255,255,255,0.12) 0%, transparent 45%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='white' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E");
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.5rem;
  color: var(--primary-foreground);
  margin-bottom: 1.5rem;
}
.hero p {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.95);
  margin-bottom: 2.5rem;
}
.btn-hero {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 1rem 3rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1.125rem;
  box-shadow: var(--button-shadow);
  transition: all 0.3s;
}
.btn-hero:hover { opacity: 0.9; transform: translateY(-2px); }

.hero__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25D366;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1.125rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-whatsapp svg { flex-shrink: 0; }

/* ===========================
   Section headings
   =========================== */
.section-title {
  font-size: 2.5rem;
  color: var(--foreground);
  margin-bottom: 1rem;
  text-align: center;
}
.section-subtitle {
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 3rem;
}

/* ===========================
   Highlight cards (Why Choose)
   =========================== */
.highlights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.highlight-card {
  background: var(--card);
  padding: 2.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s;
}
.highlight-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}
.highlight-card__icon {
  width: 5rem;
  height: 5rem;
  background: var(--accent);
  color: var(--accent-foreground);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.highlight-card__icon svg { width: 32px; height: 32px; }
.highlight-card h3 {
  font-size: 1.5rem;
  color: var(--card-foreground);
  margin-bottom: 1rem;
}
.highlight-card p {
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ===========================
   About section
   =========================== */
.about-text {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.about-text p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.mission-box {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  margin-top: 1rem;
}
.mission-box h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.mission-box p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.95);
}

/* ===========================
   Service cards
   =========================== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.service-card {
  background: var(--card);
  border-left: 5px solid var(--accent);
  padding: 2.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s;
}
.service-card:hover { transform: translateX(8px); }
.service-card h3 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.service-card > p {
  color: var(--card-foreground);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.service-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
}
.service-card li .check-icon {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ===========================
   Contact form
   =========================== */
.contact-form {
  background: var(--card);
  padding: 2rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-weight: 600;
  color: var(--card-foreground);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--foreground);
  background: var(--background);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(211, 62%, 27%, 0.15);
}
.form-group textarea { min-height: 150px; resize: vertical; }
.btn-submit {
  width: 100%;
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 1rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1.125rem;
  box-shadow: var(--button-shadow);
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}
.btn-submit:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Form validation */
.form-error {
  display: none;
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}
.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px hsla(350, 76%, 47%, 0.15);
}
.form-group.invalid .form-error {
  display: block;
}

/* Contact info row */
.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
}
.contact-info__item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.contact-info__icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-info__icon svg { width: 24px; height: 24px; }
.contact-info__text { text-align: left; }
.contact-info__text strong { display: block; color: var(--foreground); }
.contact-info__text a {
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.contact-info__text a:hover { color: var(--accent); }

/* ===========================
   Footer
   =========================== */
.footer {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 3rem 1.5rem;
  text-align: center;
}
.footer__nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.footer__nav button {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  transition: color 0.2s;
}
.footer__nav button:hover { color: var(--accent-foreground); }
.footer__email {
  margin-bottom: 1.5rem;
}
.footer__email a {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  transition: color 0.2s;
}
.footer__email a:hover { color: var(--accent-foreground); }
.footer p { font-size: 1.125rem; }
.footer .sub { margin-top: 0.5rem; font-size: 0.875rem; opacity: 0.8; }

/* ===========================
   Toast notification
   =========================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  z-index: 100;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  max-width: 380px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast__title { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.25rem; }
.toast__desc { font-size: 0.9rem; opacity: 0.9; }

/* ===========================
   Scroll-reveal animations
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children in grids */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ===========================
   Responsive
   =========================== */
@media (min-width: 768px) {
  .nav__logo img { height: 5rem; }
  .hero { padding: 8rem 1.5rem; }
  .hero h1 { font-size: 3.75rem; }
  .hero p { font-size: 1.5rem; }
  .section-title { font-size: 3rem; }
  .highlights-grid { grid-template-columns: 1fr 1fr; }
  .contact-form { padding: 3rem; }
  .contact-info { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}

@media (min-width: 1024px) {
  .nav__logo img { height: 5.5rem; }
  .highlights-grid { grid-template-columns: repeat(4, 1fr); }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__logo img { height: 3.5rem; }
  .nav__inner { padding: 0.5rem 1rem; }
  .hero { padding: 4rem 1rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; margin-bottom: 1.5rem; }
  .section-padding { padding: 3rem 1rem; }
  .section-title { font-size: 1.75rem; }
  .section-subtitle { font-size: 1rem; margin-bottom: 2rem; }
  .hero__buttons { flex-direction: column; }
  .btn-hero, .btn-whatsapp { width: 100%; text-align: center; justify-content: center; }
  .footer__nav { gap: 1rem; flex-wrap: wrap; }
  .service-card:hover { transform: none; }
  .highlight-card:hover { transform: none; }
  .contact-info__item { width: 100%; }

  /* Mobile tap feedback */
  .btn-hero:active,
  .btn-submit:active:not(:disabled) {
    transform: scale(0.97);
    opacity: 0.85;
  }
  .highlight-card:active,
  .service-card:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

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