/* Heriot-Watt Malaysia landing page — official hw.ac.uk palette */
:root {
  --navy: #0a3e65;         /* HW deep blue */
  --ink: #031b39;          /* HW dark navy — text, buttons, footer */
  --blue: #0095db;         /* HW bright blue — links */
  --gold: #f5d1a7;         /* HW sand accent */
  --gold-light: #f7d6a8;   /* HW light sand */
  --whatsapp: #25d366;
  --text: #16283a;
  --muted: #63707f;
  --bg: #ede8e8;           /* HW warm light grey */
  --card: #ffffff;
  --line: #ddd6cf;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-sm: 14px;
  --shadow: 0 6px 24px rgba(3, 27, 57, 0.08);
  --shadow-lg: 0 20px 60px rgba(3, 27, 57, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  line-height: 1.65;
  padding-bottom: 68px; /* room for sticky bar on mobile */
  background: var(--bg);
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }

h1 {
  font-size: 2.4rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.75rem; color: var(--ink); }

.section { padding: 72px 0; }
.alt-bg { background: #fff; }

/* Entrance animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-copy > * { animation: fadeUp 0.7s ease both; }
.hero-copy > *:nth-child(2) { animation-delay: 0.10s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.20s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.30s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.40s; }
.hero-visual { animation: fadeUp 0.8s ease 0.25s both; }

/* Header — solid deep navy like hw.ac.uk */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .logo { color: #fff; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo-img { height: 34px; width: auto; display: block; }
.logo { font-size: 1rem; font-weight: 800; color: var(--navy); letter-spacing: -0.01em; }

/* Buttons — dark pills, fintech style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(3, 27, 57, 0.25); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 8px 24px rgba(37, 211, 102, 0.30); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--ink); box-shadow: 0 8px 24px rgba(245, 209, 167, 0.35); }
.btn-sm { padding: 10px 22px; font-size: 0.9rem; }
.btn-block { width: 100%; font-size: 1.1rem; padding: 17px; }

/* Hero — light, two-column, photo card with floating chips */
.hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(245, 209, 167, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(89, 123, 157, 0.10) 0%, transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; gap: 44px; align-items: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.nowrap { white-space: nowrap; }
.highlight {
  position: relative;
  white-space: nowrap;
}
.highlight::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 4px;
  height: 0.38em;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 4px;
  z-index: -1;
  opacity: 0.85;
}
.hero-sub { margin: 20px 0 28px; max-width: 560px; font-size: 1.12rem; color: var(--muted); }
.hero-sub strong { color: var(--ink); }
.cta-group { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 18px; font-size: 0.88rem; color: var(--muted); font-weight: 600; }

.hero-visual { position: relative; }
.hero-visual img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
}
.float-chip {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  animation: floatY 4s ease-in-out infinite;
}
.chip-1 { top: 18px; left: -8px; }
.chip-2 { bottom: 22px; right: -6px; animation-delay: 2s; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Stats strip */
.stats { padding: 8px 0 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
}
.stat strong {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.stat span { font-size: 0.82rem; color: var(--muted); font-weight: 600; }

/* Form */
.enquire h2 { text-align: center; }
.enquire > .container > p.center { color: var(--muted); }
form {
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 24px;
}
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field label { font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  padding: 14px 16px;
  border: 1.5px solid #d6cfc7;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: #fcfaf8;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(3, 27, 57, 0.10);
}
.field input.invalid, .field select.invalid { border-color: #d64545; }
.field-row { display: grid; gap: 0 16px; }
.consent label { display: flex; gap: 10px; font-weight: 400; font-size: 0.84rem; color: var(--muted); }
.consent input { margin-top: 3px; }
.form-status { min-height: 1.4em; font-size: 0.92rem; margin-bottom: 10px; }
.form-status.error { color: #d64545; }
.form-status.ok { color: #1e7d46; }

/* Quiz-style multi-step form */
.quiz-progress {
  height: 6px;
  background: #e4ded7;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.quiz-progress-bar {
  height: 100%;
  width: 33.3%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.quiz-step-label { font-size: 0.8rem; color: var(--muted); font-weight: 700; margin-bottom: 16px; }
.quiz-step { border: 0; }
.quiz-step legend { font-size: 1.2rem; font-weight: 800; color: var(--ink); margin-bottom: 16px; padding: 0; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opt {
  padding: 18px 12px;
  border: 1.5px solid #d6cfc7;
  border-radius: var(--radius-sm);
  background: #fcfaf8;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.quiz-opt:hover, .quiz-opt:focus-visible {
  border-color: var(--ink);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
}
.quiz-back {
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  text-decoration: underline;
}
.quiz-back:hover { color: var(--ink); }

/* How it works */
.how-grid { display: grid; gap: 16px; margin-top: 28px; }
.how-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}
.how-item .num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-weight: 800;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.how-item h3 { color: var(--ink); font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.how-item p { font-size: 0.92rem; color: var(--muted); }

/* Programme photo cards */
.card-grid { display: grid; gap: 20px; margin-top: 32px; }
.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pcard img { width: 100%; height: 176px; object-fit: cover; display: block; }
.pcard-body { padding: 20px 22px 24px; }
.pcard h3 { color: var(--ink); font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.pcard p { font-size: 0.92rem; color: var(--muted); margin-bottom: 10px; }
.pcard .pcard-link { font-weight: 700; color: var(--blue); font-size: 0.95rem; }

/* About */
.why p { font-size: 1.02rem; color: var(--muted); }
.why p strong { color: var(--ink); }

/* FAQ */
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  padding: 16px 18px;
  transition: border-color 0.15s ease;
}
.faq details[open] { border-color: var(--gold); }
.faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--gold); font-weight: 800; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; color: var(--text); }

/* Pre-footer CTA banner */
.cta-banner-wrap { padding-top: 0; }
.cta-banner {
  background:
    radial-gradient(ellipse 70% 90% at 90% 10%, rgba(245, 209, 167, 0.22) 0%, transparent 55%),
    linear-gradient(150deg, var(--navy) 0%, var(--ink) 80%);
  border-radius: var(--radius-lg);
  padding: 56px 28px;
  text-align: center;
  color: #fff;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255, 255, 255, 0.8); margin-bottom: 26px; font-size: 1.05rem; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #b9c7d6;
  padding: 48px 0 40px;
  font-size: 0.92rem;
  text-align: center;
}
.footer-logo { height: 52px; width: auto; margin-bottom: 18px; opacity: 0.95; }
.site-footer a { color: var(--gold); }
.site-footer .small { font-size: 0.8rem; margin-top: 12px; opacity: 0.75; }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 20px rgba(3, 27, 57, 0.16);
  z-index: 30;
}
.sticky-cta .btn { flex: 1; padding: 13px 8px; font-size: 0.95rem; }

/* Tablet and up */
@media (min-width: 640px) {
  h1 { font-size: 3.4rem; }
  h2 { font-size: 2.1rem; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .how-grid { grid-template-columns: repeat(3, 1fr); }
  .quiz-options { grid-template-columns: repeat(3, 1fr); }
  form { padding: 40px; }
  .logo-img { height: 40px; }
  .cta-banner { padding: 72px 40px; }
}

/* Desktop: two-column hero, hide sticky bar */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .sticky-cta { display: none; }
  .hero { padding: 88px 0 72px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  .hero-visual img { height: 420px; }
  .stats { margin-top: -8px; }
}

/* Respect reduced-motion users */
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-visual { animation: none; }
  .float-chip { animation: none; }
  .btn, .pcard { transition: none; }
}
