/* ===========================================================
   CTC Vocational Institute
   Palette and type lifted from chiuteng.com.sg:
   crimson #E51937 / #C10D34, ink #2D2D2D, light #E2E2E2,
   condensed uppercase headings (Oswald) over a humanist body.
   =========================================================== */

:root {
  --red: #e51937;
  --red-dark: #c10d34;
  --ink: #2d2d2d;
  --ink-soft: #686868;
  --line: #e2e2e2;
  --bg: #ffffff;
  --bg-alt: #f6f6f7;
  --bg-dark: #1c1c1e;
  --white: #ffffff;

  --wrap: 1180px;
  --radius: 2px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --t: .25s ease;

  --font-head: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--red); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0 0 .6em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600; letter-spacing: .04em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.12rem; letter-spacing: .08em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(var(--wrap), 100% - 3rem); margin-inline: auto; }

.muted { color: var(--ink-soft); }
.lead { font-size: 1.12rem; color: var(--ink-soft); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--red); color: #fff; padding: .6rem 1rem;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .86rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .95rem 1.8rem;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  transition: background var(--t), color var(--t), border-color var(--t);
  cursor: pointer;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-sm { padding: .6rem 1.15rem; font-size: .76rem; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }

.brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-logo { flex: none; height: 48px; width: auto; }
.brand-text strong {
  display: block; font-family: var(--font-head); font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em; font-size: .98rem; line-height: 1.2;
}
.brand-text small { display: block; font-size: .72rem; color: var(--ink-soft); letter-spacing: .04em; }

.primary-nav { display: flex; align-items: center; gap: 1.6rem; }
.primary-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  font-family: var(--font-head); font-size: .82rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink); position: relative; padding: .4rem 0;
}
.primary-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--red); transition: width var(--t);
}
.primary-nav a:hover::after, .primary-nav a.is-active::after { width: 100%; }
.primary-nav a.is-active { color: var(--red); }
/* Scoped to beat `.primary-nav a`, which otherwise wins on specificity and
   strips the CTA's white text and horizontal padding. */
.primary-nav a.nav-cta {
  color: #fff;
  padding: .62rem 1.3rem;
  border-radius: 999px;
  font-size: .76rem;
  letter-spacing: .13em;
  white-space: nowrap;
  background: var(--red);
  border: 1px solid var(--red);
}
.primary-nav a.nav-cta:hover,
.primary-nav a.nav-cta:focus-visible {
  color: #fff;
  background: var(--red-dark);
  border-color: var(--red-dark);
}
.primary-nav a.nav-cta::after { display: none; }

.nav-toggle {
  display: none; width: 44px; height: 38px; background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px; padding: 0;
  flex: none; /* never let the brand squeeze the toggle out of existence */
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); transition: transform var(--t), opacity var(--t); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    linear-gradient(115deg, rgba(20,20,22,.93) 0%, rgba(20,20,22,.72) 55%, rgba(229,25,55,.55) 100%),
    url('../img/hero.svg') center / cover no-repeat,
    var(--bg-dark);
}
.hero-inner { padding: clamp(4.5rem, 11vw, 8.5rem) 0; max-width: 820px; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero .eyebrow { color: #fff; }
.hero p { font-size: 1.14rem; color: rgba(255,255,255,.88); max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.eyebrow {
  font-family: var(--font-head); font-size: .78rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--red); display: inline-flex; align-items: center;
  gap: .7rem; margin-bottom: 1rem;
}
.eyebrow::before { content: ''; width: 34px; height: 2px; background: currentColor; }

.page-head {
  background: var(--bg-dark);
  background-image: linear-gradient(115deg, rgba(20,20,22,.95), rgba(229,25,55,.45));
  color: #fff; padding: clamp(3rem, 7vw, 5rem) 0;
}
.page-head h1 { color: #fff; margin-bottom: .5rem; }
.page-head p { color: rgba(255,255,255,.85); max-width: 70ch; margin: 0; }

.breadcrumb { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-head); color: rgba(255,255,255,.65); margin-bottom: .9rem; }
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: #fff; }

/* ---------- Stat band ---------- */
.stats { background: var(--ink); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 2.2rem 1.5rem; text-align: center; border-right: 1px solid rgba(255,255,255,.12); }
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 600; color: var(--red); line-height: 1; display: block; }
.stat .label { font-family: var(--font-head); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.75); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: rgba(255,255,255,.82); }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head { max-width: 760px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.6rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.8rem; transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--ink-soft); font-size: .96rem; }
.card .icon { width: 34px; height: 34px; color: var(--red); margin-bottom: 1.1rem; }
.card-link { margin-top: auto; padding-top: 1.2rem; font-family: var(--font-head); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }

.card-num {
  font-family: var(--font-head); font-size: .8rem; letter-spacing: .16em; color: var(--red);
  border-bottom: 2px solid var(--line); padding-bottom: .7rem; margin-bottom: 1.1rem; display: block;
}

/* ---------- Trade cards ---------- */
.trade-card { position: relative; overflow: hidden; }
.trade-card::before {
  content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.trade-card:hover::before { transform: scaleX(1); }

/* ---------- Lists ---------- */
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 1.9rem; margin-bottom: .7rem; color: var(--ink-soft); }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: .62em; width: 9px; height: 9px;
  background: var(--red); border-radius: 50%;
}
.section-dark .ticks li { color: rgba(255,255,255,.8); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 2.2rem 2.2rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -9px; top: .35rem; width: 16px; height: 16px;
  background: #fff; border: 3px solid var(--red); border-radius: 50%;
}
.timeline h3 { margin-bottom: .3rem; }
.timeline p { color: var(--ink-soft); margin: 0; }

/* ---------- CTA strip ---------- */
.cta-strip { background: var(--red); color: #fff; padding: 3rem 0; }
.cta-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-strip h2 { color: #fff; margin-bottom: .3rem; }
.cta-strip p { color: rgba(255,255,255,.9); margin: 0; }
/* Inline links sit on the red band, so the default red link colour would be
   invisible. Buttons (.btn) keep their own styling. */
.cta-strip p a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cta-strip p a:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,.72); padding: 4rem 0 1.5rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer h3 { color: #fff; font-size: .85rem; letter-spacing: .16em; margin-bottom: 1rem; }
.site-footer .muted { color: rgba(255,255,255,.62); }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: var(--red); }
.brand-footer { margin-bottom: 1.2rem; }
.brand-footer .brand-text strong { color: #fff; }
.muted-link { font-family: var(--font-head); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .82rem;
}
.footer-bottom p { margin: 0; color: rgba(255,255,255,.5); }
.footer-bottom nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-bottom nav a { font-family: var(--font-head); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-head); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: .45rem; color: var(--ink);
}
.field .req { color: var(--red); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: .8rem .95rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: border-color var(--t), box-shadow var(--t);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,25,55,.12);
}
.field textarea { resize: vertical; min-height: 140px; }
.field .error { color: var(--red); font-size: .82rem; margin-top: .35rem; }
.field input.has-error, .field select.has-error, .field textarea.has-error { border-color: var(--red); }
.hp { position: absolute; left: -9999px; }

.alert { padding: 1.1rem 1.3rem; border-radius: var(--radius); margin-bottom: 1.8rem; border-left: 4px solid; }
.alert-ok { background: #edf7ef; border-color: #2f9e52; color: #1d6b37; }
.alert-err { background: #fdeef0; border-color: var(--red); color: var(--red-dark); }

.contact-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.info-box { background: var(--bg-alt); border: 1px solid var(--line); padding: 1.8rem; border-radius: var(--radius); margin-bottom: 1.3rem; }
.info-box h3 { margin-bottom: .6rem; }
.info-box p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* ---------- Footer CTA ---------- */
.cta-strip .btn-light { flex: none; }

/* ---------- Certificate verification ---------- */
.verify-result {
  border: 1px solid var(--line); border-left: 5px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; margin-bottom: 2.5rem; background: #fff;
}
.verify-valid { border-color: #c9e6d2; border-left-color: #2f9e52; background: #f4fbf6; }
.verify-invalid { border-color: #f6cdd3; border-left-color: var(--red); background: #fdf5f6; }

.verify-result-head { display: flex; align-items: flex-start; gap: 1.1rem; }
.verify-result-head h2 { margin-bottom: .25rem; font-size: 1.3rem; }
.verify-result-head p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

.verify-badge { width: 40px; height: 40px; flex: none; padding: .45rem; border-radius: 50%; color: #fff; }
.verify-valid .verify-badge { background: #2f9e52; }
.verify-invalid .verify-badge { background: var(--red); }

.verify-body { display: flex; gap: 1.8rem; margin-top: 1.8rem; flex-wrap: wrap; }
.verify-photo img {
  width: 132px; height: 160px; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}

.verify-details { flex: 1 1 320px; margin: 0; display: grid; gap: .1rem; }
.verify-details > div {
  display: grid; grid-template-columns: 170px 1fr; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid rgba(0, 0, 0, .07);
}
.verify-details > div:last-child { border-bottom: 0; }
.verify-details dt {
  font-family: var(--font-head); font-size: .76rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0;
}
.verify-details dd { margin: 0; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

.verify-foot {
  margin: 1.6rem 0 0; padding-top: 1.1rem; border-top: 1px solid rgba(0, 0, 0, .07);
  font-size: .85rem; color: var(--ink-soft);
}

.verify-steps { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); font-size: .95rem; }
.verify-steps li { margin-bottom: .55rem; }
.verify-steps li:last-child { margin-bottom: 0; }

@media (max-width: 520px) {
  .verify-details > div { grid-template-columns: 1fr; gap: .15rem; }
  .verify-photo img { width: 110px; height: 134px; }
}

/* ---------- Misc ---------- */
.media-panel {
  min-height: 360px; border-radius: var(--radius);
  background: linear-gradient(140deg, var(--ink) 0%, #3a3a3e 60%, var(--red-dark) 100%);
  position: relative; overflow: hidden; display: grid; place-items: center; color: #fff; text-align: center; padding: 2rem;
}
.media-panel::after {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 12px, transparent 12px 24px);
}
.media-panel .panel-copy { position: relative; z-index: 1; }
.media-panel .num { font-family: var(--font-head); font-size: 3.6rem; font-weight: 600; line-height: 1; display: block; }
.media-panel .label { font-family: var(--font-head); letter-spacing: .2em; text-transform: uppercase; font-size: .82rem; color: rgba(255,255,255,.8); }

.tag-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.tag {
  font-family: var(--font-head); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--line); padding: .4rem .8rem; border-radius: var(--radius); color: var(--ink-soft);
}
.section-dark .tag { border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.8); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,.12); }
}

/* The nav carries eight items plus a CTA, so it collapses earlier than the
   content grids do. */
@media (max-width: 1140px) {
  .primary-nav ul { gap: 1.1rem; }
  .primary-nav a { font-size: .78rem; letter-spacing: .1em; }
  .primary-nav a.nav-cta { font-size: .72rem; padding: .58rem 1.05rem; }
}

@media (max-width: 1040px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed; inset: 78px 0 auto 0; background: #fff; flex-direction: column;
    align-items: stretch; gap: 0; padding: 1rem 1.5rem 2rem; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none; max-height: calc(100vh - 78px); overflow-y: auto;
  }
  .primary-nav.open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav li { border-bottom: 1px solid var(--line); }
  .primary-nav a { display: block; padding: .95rem 0; font-size: .9rem; letter-spacing: .13em; }
  .primary-nav a::after { display: none; }
  .primary-nav a.nav-cta {
    margin-top: 1.2rem; text-align: center; display: block;
    padding: .9rem 1.3rem; font-size: .82rem;
  }
}

@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .split, .contact-layout, .form-grid { grid-template-columns: 1fr; }
  .cta-strip-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .wrap { width: calc(100% - 2rem); }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .footer-grid { grid-template-columns: 1fr; }
}
