/* ============================================================
   Instructional Technology Hub — shared styles
   School colors: navy #043675  |  green #098740
   Fonts: Space Grotesk (display), Inter (body), JetBrains Mono (labels)
   ============================================================ */

:root {
  --navy: #043675;
  --navy-deep: #032a5c;
  --green: #098740;
  --green-deep: #076e34;

  --ink: #0f1e2e;
  --ink-soft: #45566b;
  --paper: #f7f9fc;
  --surface: #ffffff;
  --line: #dbe3ee;
  --navy-tint: #eaf0f8;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(4, 54, 117, .06), 0 8px 24px rgba(4, 54, 117, .08);
  --shadow-lift: 0 4px 8px rgba(4, 54, 117, .08), 0 18px 40px rgba(4, 54, 117, .16);

  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 48px);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 .4em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0 0 .9rem;
}
.eyebrow::before { content: "› "; color: var(--green); }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; text-decoration: none; }

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

/* ============================================================
   Header / top navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.brand__logo {
  height: 42px;
  width: auto;
  max-width: 180px;
  display: block;
  flex: none;
  object-fit: contain;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-size: 1.02rem; }
.brand__role {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  border-radius: var(--radius-sm);
}
.nav__link:hover { text-decoration: none; color: var(--navy); background: var(--navy-tint); }

/* green underline that draws in */
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--navy); }

/* Hamburger button — hidden on desktop */
.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav__toggle span { position: relative; }
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after  { position: absolute; top: 6px; }

/* animated X when open */
body.menu-open .nav__toggle span { background: transparent; }
body.menu-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
body.menu-open .nav__toggle span::after  { transform: translateY(-6px) rotate(-45deg); }

.nav__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 54, 117, .38);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 90;
}
body.menu-open .nav__backdrop { opacity: 1; visibility: visible; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}
/* faint dotted-grid backdrop — the "instructional technology" signature */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}
.hero > .wrap { position: relative; z-index: 1; }

.hero__title {
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  max-width: 16ch;
}
.hero__title em {
  font-style: normal;
  color: var(--green);
}
.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 56ch;
}

.hero__meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-soft);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta span::before {
  content: "";
  width: 7px; height: 7px; border-radius: 2px; background: var(--green);
}

/* ============================================================
   Section cards (the four destinations)
   ============================================================ */
.section {
  padding: clamp(40px, 6vw, 72px) 0;
}
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }

.section__head { max-width: 60ch; margin-bottom: 32px; }
.section__title { font-size: clamp(1.5rem, 3vw, 2rem); }

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--navy);
}
.card:nth-child(even)::before { background: var(--green); }

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: #c7d4e6;
  text-decoration: none;
}

.card__index {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-soft);
  letter-spacing: .05em;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  margin: 8px 0 6px;
}
.card__desc { color: var(--ink-soft); font-size: .96rem; margin: 0; flex: 1; }
.card__cue {
  margin-top: 18px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--green-deep);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card__cue::after { content: "→"; transition: transform .2s ease; }
.card:hover .card__cue::after { transform: translateX(4px); }

/* ============================================================
   Generic content page pieces
   ============================================================ */
.page-head {
  padding: clamp(44px, 7vw, 80px) 0 clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 88%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 88%);
  z-index: 0;
}
.page-head > .wrap { position: relative; z-index: 1; }
.page-head__title { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.page-head__lead { color: var(--ink-soft); max-width: 62ch; font-size: 1.08rem; margin: 0; }

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.breadcrumbs a { color: var(--ink-soft); }

.stack { padding: clamp(36px, 5vw, 60px) 0; }

.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 66ch; }

/* Resource list */
.reslist { display: grid; gap: 14px; max-width: 820px; }
.res {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: border-color .2s ease, transform .2s ease;
}
.res:hover { border-color: #c7d4e6; transform: translateX(3px); text-decoration: none; }
.res__tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  background: var(--navy);
  padding: 4px 8px;
  border-radius: 6px;
  flex: none;
  margin-top: 3px;
}
.res__tag--tool { background: var(--green); }
.res__body h3 { margin: 0 0 2px; font-size: 1.05rem; }
.res__body p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* Tool grid */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.tool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tool:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); text-decoration: none; }
.tool__name { font-family: var(--font-display); color: var(--navy); font-size: 1.1rem; margin: 0 0 4px; }
.tool__meta { font-family: var(--font-mono); font-size: .7rem; color: var(--green-deep); text-transform: uppercase; letter-spacing: .04em; }
.tool__desc { color: var(--ink-soft); font-size: .92rem; margin: 10px 0 0; }

/* Video tutorials */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 24px;
  max-width: 960px;
}
.video {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video__body { padding: 16px 20px 20px; }
.video__title {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.1rem;
  margin: 0 0 6px;
}
.video__caption { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* "Coming soon" placeholder */
.placeholder {
  border: 1px dashed #c2cfe0;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 44px 24px;
  text-align: center;
  max-width: 960px;
}
.placeholder__big {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.5rem;
  margin: 0 0 6px;
}
.placeholder__sub {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0;
}

/* Callout / note box */
.note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  max-width: 760px;
  margin: 8px 0 0;
}
.note strong { color: var(--navy); }

/* Data / portal grid of buttons */
.linkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  max-width: 900px;
}
.linkbtn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 18px 18px;
  font-weight: 600;
  transition: background .2s ease, transform .2s ease;
}
.linkbtn:hover { background: var(--navy-deep); text-decoration: none; transform: translateY(-2px); }
.linkbtn small { font-family: var(--font-mono); font-weight: 400; font-size: .68rem; opacity: .82; letter-spacing: .03em; }
.linkbtn--green { background: var(--green); }
.linkbtn--green:hover { background: var(--green-deep); }

/* Placeholder tile for links not yet available */
.linkbtn--soon {
  background: var(--navy-tint);
  color: var(--ink-soft);
  border: 1px dashed #c2cfe0;
  cursor: default;
}
.linkbtn--soon:hover { background: var(--navy-tint); transform: none; text-decoration: none; }
.linkbtn--soon small { color: var(--ink-soft); opacity: 1; }

/* Live-data demo region (Google Web App fetch target) */
.feed { max-width: 820px; margin-top: 22px; }
.feed__status {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.feed__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); }
.feed__dot.is-live { background: var(--green); }
.feed__dot.is-error { background: #b4331f; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: #cdd9ec;
  margin-top: 8px;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0 24px;
}
.site-footer h4 { color: #fff; font-family: var(--font-display); font-size: 1rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer p { color: #cdd9ec; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 16px 0 40px;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: #9fb3d2;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================================
   Responsive — top nav collapses to hamburger pullout
   ============================================================ */
@media (max-width: 1024px) {
  .nav__toggle { display: inline-flex; }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 84vw);
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: -12px 0 40px rgba(4,54,117,.14);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 88px 18px 24px;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,.0,.2,1);
    z-index: 95;
  }
  body.menu-open .nav__links { transform: translateX(0); }

  .nav__link {
    padding: 14px 14px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] { background: var(--navy-tint); }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
