/* ============================================================
   JAKESNR.CO.UK — DESIGN SYSTEM
   Course resources by Jake Bennett
   v1.0.0
   ============================================================ */

/* ---- Imports ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

/* ---- Tokens ---- */
:root {
  --navy:        #0d1f3c;
  --navy-mid:    #162d52;
  --navy-light:  #1e3a6e;
  --slate:       #3d5a80;
  --blue-accent: #2b7cb8;
  --blue-light:  #e8f2f9;
  --white:       #ffffff;
  --off-white:   #f5f7fa;
  --grey-100:    #eef0f3;
  --grey-200:    #dde1e7;
  --grey-400:    #8d96a3;
  --grey-500:    #6b7583;
  --grey-600:    #4a5568;
  --grey-800:    #1a2332;
  --text-body:   #2c3a4a;

  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-7:  1.75rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 28px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

  --max-w: 1140px;
  --transition: 0.22s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ---- Sections ---- */
.section        { padding: var(--space-20) 0; }
.section-sm     { padding: var(--space-12) 0; }
.bg-white       { background: var(--white); }
.bg-off-white   { background: var(--off-white); }
.bg-navy        { background: var(--navy); }
.bg-navy-mid    { background: var(--navy-mid); }
.bg-blue-light  { background: var(--blue-light); }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--navy);
}
h1 { font-size: clamp(2.2rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(1.7rem, 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(1.3rem, 2.5vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); font-weight: 600; }
p  { line-height: 1.75; color: var(--grey-600); }

.lead {
  font-size: var(--text-lg);
  color: var(--grey-500);
  line-height: 1.7;
  max-width: 680px;
}

/* ---- Eyebrow ---- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.eyebrow-line {
  display: block;
  width: 32px;
  height: 2px;
  background: var(--blue-accent);
  flex-shrink: 0;
}
.eyebrow-text {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-accent);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue-accent);
  color: var(--white);
  border-color: var(--blue-accent);
}
.btn-primary:hover { background: var(--navy-light); border-color: var(--navy-light); transform: translateY(-1px); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-mid); border-color: var(--navy-mid); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.45);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); }
.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }
.btn-lg { padding: 1rem 2rem; font-size: var(--text-base); }
.btn-sm { padding: 0.5rem 1rem; font-size: var(--text-xs); }
.btn-group { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13, 31, 60, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.25); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--space-6);
  max-width: var(--max-w);
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
}
.nav-name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.nav-subtitle {
  font-size: 10px;
  color: rgba(255,255,255,.5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,.75);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--white); }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--navy);
  z-index: 999;
  padding: var(--space-6);
  gap: var(--space-1);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  pointer-events: none;
}
.nav-mobile.open {
  transform: translateY(0);
  pointer-events: all;
}
.nav-mobile a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,.8);
  padding: var(--space-3) var(--space-2);
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: color var(--transition);
}
.nav-mobile a:hover { color: var(--white); }
.nav-mobile a.nav-mobile-cta {
  display: inline-block;
  margin-top: var(--space-4);
  background: var(--blue-accent);
  color: var(--white);
  text-align: center;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--r-md);
  border: none;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
}
.hero-page {
  min-height: 52vh;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,31,60,.92) 0%, rgba(22,45,82,.78) 100%);
}
.hero-solid {
  background: var(--navy);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--space-20) 0;
}
.hero h1 { color: var(--white); max-width: 720px; }
.hero .lead { color: rgba(255,255,255,.8); margin: var(--space-6) 0 var(--space-8); }
.hero-eyebrow { margin-bottom: var(--space-6); }
.hero-eyebrow .eyebrow-text { color: rgba(255,255,255,.65); }
.hero-eyebrow .eyebrow-line { background: rgba(255,255,255,.35); }

/* ---- Cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5);
}
.card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--r-xl);
  padding: var(--space-7);
  transition: all var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.card:hover {
  border-color: var(--blue-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-icon { font-size: 1.75rem; }
.card-title { font-family: var(--font-heading); font-size: var(--text-xl); color: var(--navy); }
.card-desc { font-size: var(--text-sm); color: var(--grey-500); line-height: 1.65; }
.card-tag {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--blue-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: auto;
}
.card-tag::after { content: ' →'; }

/* ---- Content split ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
@media (max-width: 768px) { .split { grid-template-columns: 1fr; gap: var(--space-10); } }

/* ---- Resource list ---- */
.resource-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.resource-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--r-lg);
  transition: all var(--transition);
  text-decoration: none;
}
.resource-item:hover {
  border-color: var(--blue-accent);
  box-shadow: var(--shadow-sm);
}
.resource-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.resource-label { font-weight: 600; font-size: var(--text-sm); color: var(--navy); }
.resource-meta  { font-size: var(--text-xs); color: var(--grey-400); }
.resource-arrow { margin-left: auto; color: var(--grey-400); font-size: var(--text-sm); }

/* ---- Section pills / tags ---- */
.pill {
  display: inline-flex;
  align-items: center;
  background: var(--blue-light);
  color: var(--blue-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---- Footer ---- */
.footer {
  background: var(--navy);
  padding: var(--space-10) 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
.footer-name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--white);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  justify-content: center;
}
.footer-links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.5);
  transition: color var(--transition);
}
.footer-links a:hover { color: rgba(255,255,255,.85); }
.footer-note {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.35);
  max-width: 600px;
  line-height: 1.7;
}
.footer-version { font-size: 10px; color: rgba(255,255,255,.2); }

/* ---- Reveal animations ---- */
.reveal, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal        { transform: translateY(20px); }
.reveal-left   { transform: translateX(-24px); }
.reveal-right  { transform: translateX(24px); }
.reveal.visible, .reveal-left.visible, .reveal-right.visible {
  opacity: 1; transform: none;
}
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }

/* ---- Screen / present mode ---- */
.screen-mode {
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-16);
  text-align: center;
}
.screen-mode h1 { color: var(--white); font-size: clamp(3rem, 8vw, 6rem); max-width: 900px; }
.screen-mode p  { color: rgba(255,255,255,.7); font-size: var(--text-xl); margin-top: var(--space-6); }
.screen-nav {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-4);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: rgba(255,255,255,.5);
  margin-bottom: var(--space-5);
}
.breadcrumb a { color: rgba(255,255,255,.6); transition: color var(--transition); }
.breadcrumb a:hover { color: rgba(255,255,255,.9); }
.breadcrumb-sep { opacity: 0.4; }

/* ---- Video embed ---- */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--grey-100);
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  border-radius: var(--r-xl);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile { display: flex; }
}
@media (max-width: 640px) {
  .section  { padding: var(--space-16) 0; }
  .section-sm { padding: var(--space-10) 0; }
  .container { padding: 0 var(--space-4); }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero-page { min-height: 44vh; }
}
