/* UNITeS ICT home page */
:root {
  --charcoal: #1F2328;
  --charcoal-2: #2A2F36;
  --line-dark: #383E46;
  --ink: #18181B;
  --body: #52525B;
  --muted: #63636B;
  --ground: #F4F4F5;
  --white: #FFFFFF;
  --orange: #C2410C; /* buttons, links: passes contrast on white */
  --orange-dark: #9A3412;
  --orange-tint: #FFEDD5;
  --orange-bright: #F97316; /* accents on dark grey */
  --border: #E4E4E7;
  --on-dark: #D4D4D8;
  --on-dark-muted: #A1A1AA;
  --radius: 16px;
  --display: "Sora", system-ui, sans-serif;
  --text: "IBM Plex Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--text); color: var(--ink); background: var(--ground); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
a { color: var(--orange); }
a:hover { color: var(--orange-dark); }
h1, h2, h3 { font-family: var(--display); margin: 0; }
p { margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--orange-bright); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 10px; font-weight: 600; font-size: 16px; text-decoration: none; transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 8px 24px rgba(194, 65, 12, .35); }
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }
.btn-ghost { color: var(--white); border: 1px solid #52525B; }
.btn-ghost:hover { color: var(--white); background: rgba(255, 255, 255, .06); }
.btn-accent { background: var(--orange-bright); color: var(--charcoal); min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-accent:hover { color: var(--charcoal); background: #FB8B3C; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(4px); }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.arrow { display: inline-block; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(31, 35, 40, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-dark); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.nav { display: flex; align-items: center; gap: 32px; padding: 14px 24px; }
.logo { display: flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--white); }
.logo:hover { color: var(--white); }
.logo-word { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.5px; }
.logo-tag { font-family: var(--display); font-weight: 500; font-size: 14px; color: var(--orange-bright); letter-spacing: 2px; }
.nav-links { display: flex; gap: 24px; flex: 1; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--on-dark); text-decoration: none; font-size: 15px; position: relative; padding: 10px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--orange-bright); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { transform: scaleX(1); }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid #52525B; border-radius: 10px; background: transparent; color: var(--white); cursor: pointer; align-items: center; justify-content: center; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--charcoal); color: var(--white); padding: 72px 0 104px; overflow: hidden; }
#network { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(to bottom, transparent, var(--charcoal)); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.eyebrow-pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; border: 1px solid #3F444C; border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--on-dark); background: rgba(31, 35, 40, .6); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange-bright); box-shadow: 0 0 0 0 rgba(249, 115, 22, .6); animation: pulse 2s infinite; }
.hero h1 { font-weight: 700; font-size: clamp(38px, 5vw, 58px); line-height: 1.07; letter-spacing: -1.5px; }
.rotator { display: inline-grid; color: var(--orange-bright); }
.rotator span { grid-area: 1 / 1; opacity: 0; transform: translateY(.4em); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.rotator span.on { opacity: 1; transform: none; }
.hero-sub { font-size: 19px; line-height: 1.55; color: var(--on-dark); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; color: var(--on-dark-muted); padding-top: 8px; }

/* ---------- Chat panel ---------- */
.chat { flex: 1 1 420px; min-width: 0; max-width: 500px; background: var(--white); color: var(--ink); border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.hero .chat.reveal { animation: fade-up .8s var(--ease) both, glow 4s ease-in-out infinite; animation-delay: var(--d, 0s), 1.2s; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--orange); color: var(--white); }
.chat-avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--white); display: flex; align-items: center; justify-content: center; flex: none; }
.chat-title { font-family: var(--display); font-weight: 600; font-size: 17px; }
.chat-status { font-size: 13px; color: #FFE4CC; display: flex; align-items: center; gap: 6px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #7CF0B4; animation: blink 2.4s infinite; }
.chat-reset { margin-left: auto; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, transform .4s var(--ease); }
.chat-reset:hover { background: rgba(255, 255, 255, .15); transform: rotate(-90deg); }
.chat-log { padding: 20px; display: flex; flex-direction: column; gap: 12px; height: 340px; overflow-y: auto; scroll-behavior: smooth; }
.msg { display: flex; animation: msg-in .35s var(--ease) both; }
.msg.user { justify-content: flex-end; }
.bubble { max-width: 86%; padding: 11px 14px; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.msg.bot .bubble { background: #F4F4F5; border-radius: 16px 16px 16px 4px; }
.msg.user .bubble { background: var(--orange); color: var(--white); border-radius: 16px 16px 4px 16px; }
.msg.error .bubble { background: #FDECEA; color: #8A1C13; border-radius: 12px; }
.bubble a { color: inherit; }
.typing .bubble { display: flex; gap: 4px; padding: 14px 16px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 14px; }
.chip { font: inherit; font-size: 14px; color: var(--orange); background: var(--white); border: 1px solid var(--orange); border-radius: 999px; padding: 8px 14px; min-height: 36px; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease); animation: msg-in .35s var(--ease) both; }
.chip:hover { background: var(--orange); color: var(--white); transform: translateY(-2px); }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); align-items: center; }
.chat-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid #D4D4D8; border-radius: 12px; color: var(--ink); min-height: 44px; transition: border-color .2s, box-shadow .2s; }
.chat-form input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(194, 65, 12, .15); }
.send-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: var(--orange); color: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, transform .2s var(--ease); }
.send-btn:hover { background: var(--orange-dark); transform: scale(1.06); }
.send-btn:disabled { opacity: .5; cursor: wait; transform: none; }
.chat-foot { font-size: 12px; color: var(--muted); text-align: center; padding: 0 16px 12px; }

/* ---------- Ticker ---------- */
.ticker { background: var(--charcoal-2); color: var(--on-dark); border-top: 1px solid var(--line-dark); overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 48px; padding: 16px 0; animation: marquee 40s linear infinite; font-family: var(--display); font-size: 15px; font-weight: 500; }
.ticker-track span::before { content: "◆"; color: var(--orange-bright); font-size: 10px; margin-right: 48px; vertical-align: 2px; }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 40px; }
.section-head > div { display: flex; flex-direction: column; gap: 12px; max-width: 660px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--orange); }
.section h2 { font-weight: 700; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -1px; }

/* Tracks */
.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.track { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 16px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.track:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(24, 24, 27, .1); border-color: #FED7AA; }
.track-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--orange-tint); display: flex; align-items: center; justify-content: center; transition: transform .4s var(--ease), background .3s; }
.track:hover .track-icon { transform: rotate(-8deg) scale(1.08); background: #FED7AA; }
.track h3 { font-size: 22px; font-weight: 600; }
.track p { font-size: 15px; line-height: 1.55; color: var(--body); }
.track ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.track li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #F0F0F2; padding-top: 10px; }
.track li span:last-child { color: var(--muted); white-space: nowrap; }
.track .ask { margin-top: auto; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; font-size: 15px; color: var(--orange); cursor: pointer; text-align: left; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.track .ask:hover .arrow { transform: translateX(4px); }
.track .ask .arrow { transition: transform .2s var(--ease); }

/* CCNA path */
.path-card { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 40px; display: flex; flex-direction: column; gap: 28px; }
.path-card .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.path-card h2 { font-size: 28px; letter-spacing: -.5px; }
.path-card .row span { font-size: 15px; color: var(--muted); }
.path-progress { height: 6px; border-radius: 99px; background: var(--orange-tint); overflow: hidden; }
.path-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--orange-bright)); border-radius: inherit; transition: width 1.8s var(--ease) .3s; }
.path-card.in .path-progress i { width: 100%; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.step { border-radius: 14px; background: var(--orange-tint); padding: 24px; display: flex; flex-direction: column; gap: 8px; transition: background .3s, color .3s, transform .3s var(--ease); }
.step .k { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--orange); }
.step .t { font-family: var(--display); font-size: 20px; font-weight: 600; }
.step .d { font-size: 15px; line-height: 1.5; color: var(--body); }
.step:hover { background: var(--orange); color: var(--white); transform: translateY(-4px); }
.step:hover .k { color: #FFE4CC; }
.step:hover .d { color: #FFEDD5; }

/* Programmes */
.programmes { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.prog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.prog { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius); background: var(--ground); position: relative; overflow: hidden; transition: transform .3s var(--ease); }
.prog::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.prog:hover { transform: translateY(-4px); }
.prog:hover::before { transform: scaleX(1); }
.prog h3 { font-size: 19px; font-weight: 600; }
.prog p { font-size: 15px; line-height: 1.55; color: var(--body); }
.prog .link-arrow { margin-top: auto; font-size: 15px; }
.prog.dark { background: var(--charcoal); color: var(--white); }
.prog.dark p { color: var(--on-dark); }
.prog.dark .link-arrow { color: var(--orange-bright); }
.prog.dark::before { background: var(--orange-bright); }

/* How it works */
.how { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.how-copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.how-copy p { font-size: 17px; line-height: 1.6; color: var(--body); }
.how-steps { flex: 1 1 480px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; counter-reset: s; }
.how-steps li { display: flex; gap: 20px; align-items: flex-start; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.how-steps li::before { counter-increment: s; content: counter(s); font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--orange); width: 40px; height: 40px; border-radius: 12px; background: var(--orange-tint); display: flex; align-items: center; justify-content: center; flex: none; }
.how-steps strong { display: block; font-size: 17px; margin-bottom: 4px; }
.how-steps span { font-size: 15px; color: var(--body); line-height: 1.5; }

/* Footer */
.site-footer { background: var(--charcoal); color: var(--on-dark); padding: 64px 0 40px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; margin-bottom: 40px; }
.foot-grid > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.foot-grid > div:first-child { flex-basis: 280px; }
.foot-grid strong { color: var(--white); }
.foot-grid a { color: var(--orange-bright); text-decoration: none; font-weight: 600; }
.foot-bottom { border-top: 1px solid var(--line-dark); padding-top: 24px; font-size: 13px; color: #A1A1AA; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Floating launcher */
.launcher { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; background: var(--orange); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 28px rgba(24, 24, 27, .35); transform: scale(0); transition: transform .35s var(--ease), background .2s; }
.launcher.show { transform: scale(1); }
.launcher:hover { background: var(--orange-dark); color: var(--white); }
.launcher::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--orange); animation: ring 2.4s infinite; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { animation: fade-up .8s var(--ease) both; animation-delay: var(--d, 0s); opacity: 1; transform: none; transition: none; }

/* ---------- Keyframes ---------- */
@keyframes glow { 0%, 100% { box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 0 0 0 rgba(249, 115, 22, 0); } 50% { box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 0 0 6px rgba(249, 115, 22, .22); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .6); } 70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); } 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav { flex-wrap: wrap; gap: 12px; }
  .nav .btn-accent { display: none; }
  .nav-links { display: none; flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: 8px; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; border-top: 1px solid var(--line-dark); }
  .hero { padding: 48px 0 80px; }
  .chat { max-width: none; }
  .section { padding: 72px 0; }
  .path-card { padding: 24px; }
}
@media (max-width: 480px) {
  .chat-log { height: 300px; }
  .chat-form input { font-size: 16px; }
  .launcher { right: 16px; bottom: 16px; }
}

/* Respect people who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  #network { display: none; }
}

/* Skip link becomes visible when focused */
a.visually-hidden:focus { position: fixed; left: 16px; top: 16px; width: auto; height: auto; clip: auto; z-index: 100; background: var(--white); color: var(--ink); padding: 12px 16px; border-radius: 10px; }
