/* =========================================================
   WBHS DigiTech — site styles
   No framework required. Colours taken from the school crest.
   ========================================================= */

:root {
  --red: #d02030;          /* crest red */
  --red-dark: #a8172a;
  --green: #346e5c;        /* motto green */
  --green-soft: #e8f1ed;
  --ink: #111827;          /* headings / dark panels */
  --ink-2: #1f2937;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8f8f6;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 4px 16px rgba(17, 24, 39, .06);
  --shadow-hover: 0 2px 4px rgba(17, 24, 39, .06), 0 12px 32px rgba(17, 24, 39, .10);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Inter", ui-monospace, "Cascadia Code", Consolas, monospace;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; letter-spacing: -0.02em; }

.warmup {color: var(--line); line-height: 1.2; margin: 0; letter-spacing: -0.02em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; color: #fff; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-text span { font-size: .75rem; color: var(--muted); font-weight: 500; }

.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--text); font-weight: 500; font-size: .95rem;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: #f1f1ef; color: var(--ink); }
.nav-links a[aria-current="page"] { background: var(--ink); color: #fff; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 42px; height: 42px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: #fff; border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { border-radius: 10px; padding: 12px 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: #d1d5db;
  padding: 96px 0 104px;
}
.hero::before {               /* subtle grid */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero::after {                /* crest-red glow */
  content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -160px;
  background: radial-gradient(circle, rgba(208,32,48,.35), transparent 65%);
  filter: blur(20px);
}
.hero .container { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .8rem; letter-spacing: .04em;
  color: #fca5a5; background: rgba(208,32,48,.12);
  border: 1px solid rgba(208,32,48,.35);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 24px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(208,32,48,.25); }

.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; max-width: 14ch; }
.hero h1 .accent { color: var(--red); }
.hero p { font-size: 1.15rem; max-width: 56ch; margin: 20px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.6); }
.btn svg { width: 16px; height: 16px; }

/* Page header (sub-pages) */
.page-header { padding: 72px 0 80px; }
.page-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); }

/* ---------- Sections ---------- */
main section { padding: 72px 0 0; }
main section:last-child { padding-bottom: 96px; }

.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.6rem; font-weight: 700; }
.section-head p { margin: 0; color: var(--muted); }
.section-head .num { font-family: var(--mono); font-size: .85rem; color: var(--red); font-weight: 600; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ---------- Course cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: #d6d6d2; }

.card-top { display: flex; align-items: center; justify-content: space-between; }
.badge {
  font-family: var(--mono); font-size: .75rem; font-weight: 600; letter-spacing: .03em;
  padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green);
}
.badge.red { background: #fdecee; color: var(--red-dark); }
.badge.ink { background: #eef0f3; color: var(--ink-2); }

.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ink); color: #fff;
}
.icon svg { width: 22px; height: 22px; }

.card h3 { font-size: 1.25rem; font-weight: 700; margin-top: 4px; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }

.card-links { list-style: none; margin: auto 0 0; padding: 12px 0 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); }
.card-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 600; font-size: .93rem; color: var(--ink); padding: 6px 0;
}
.card-links a::after { content: "→"; color: var(--red); transition: transform .15s; }
.card-links a:hover { color: var(--red); }
.card-links a:hover::after { transform: translateX(4px); }

/* ---------- Starter tiles ---------- */
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); color: var(--text);
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.tile:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); color: var(--text); }
.tile-media {
  aspect-ratio: 4 / 3; background: #f1f1ef; display: grid; place-items: center; padding: 28px;
  border-bottom: 1px solid var(--line);
}
.tile-media img { max-height: 100%; width: auto; object-fit: contain; border-radius: 12px; transition: transform .3s; }
.tile:hover .tile-media img { transform: scale(1.04); }
.tile-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile-body h3 { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile-body h3::after { content: "↗"; color: var(--red); font-weight: 600; transition: transform .15s; }
.tile:hover .tile-body h3::after { transform: translate(2px, -2px); }
.tile-body p { margin: 0; font-size: .93rem; color: var(--muted); }
.tile-tag { font-family: var(--mono); font-size: .72rem; color: var(--green); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9ca3af; padding: 40px 0; font-size: .9rem; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: #e5e7eb; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 32px; width: auto; }


 
 
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
