/* ============================================================
   FILMMAKER & PHOTOGRAPHER CURRICULUM — Shared Stylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

:root {
  --bg:      #0e0e0e;
  --bg2:     #161616;
  --bg3:     #1e1e1e;
  --bg4:     #252525;
  --border:  rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.15);
  --text:    #f0ede8;
  --text2:   #9a9690;
  --text3:   #5a5754;
  --accent:  #e8b86d;
  --accent2: #c49a4e;
  --green:   #5ea87a;
  --blue:    #5b8fc9;
  --coral:   #c97a5b;
  --amber:   #c9a05b;
  --p1:      #5b8fc9;
  --p2:      #5ea87a;
  --p3:      #c9a05b;
  --p4:      #c97a5b;
  --sidebar: 260px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, [role="button"] { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ── Layout shell ── */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--bg4) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }

.sidebar-logo {
  padding: 1.75rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.sidebar-logo a { display: block; }
.sidebar-logo h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  color: var(--accent);
  line-height: 1.35;
  font-weight: 400;
}
.sidebar-logo .tagline { font-size: 11px; color: var(--text3); letter-spacing: .04em; }

.sidebar-nav { flex: 1; padding: .75rem 0 2rem; }
.phase-label {
  padding: .55rem 1.5rem .3rem;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text3);
  margin-top: .25rem;
}
.phase-label.p1 { color: var(--p1); }
.phase-label.p2 { color: var(--p2); }
.phase-label.p3 { color: var(--p3); }
.phase-label.p4 { color: var(--p4); }

.nav-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .38rem 1.5rem;
  font-size: 12.5px;
  color: var(--text2);
  border-left: 2px solid transparent;
  transition: all .14s;
  cursor: pointer;
  user-select: none;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav-link.active { color: var(--accent); border-left-color: var(--accent); background: rgba(232,184,109,.05); }
.nav-link .num { font-size: 11px; color: var(--text3); min-width: 18px; }

/* ── Mobile top bar ── */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: .65rem 1rem;
  align-items: center;
  gap: .75rem;
}
.topbar-title {
  font-size: 13px;
  color: var(--text2);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-logo {
  font-family: 'DM Serif Display', serif;
  font-size: .95rem;
  color: var(--accent);
}
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text2);
  border-radius: 1px;
  transition: all .2s;
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}
.nav-drawer.open { display: block; }
.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
}
.drawer-panel {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: min(85vw, 300px);
  background: var(--bg2);
  overflow-y: auto;
  padding-bottom: var(--safe-bottom);
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }

/* ── Main content ── */
.main { min-width: 0; }

/* ── Bottom nav bar (mobile) ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: .5rem .75rem calc(.5rem + var(--safe-bottom));
  z-index: 50;
  gap: 0;
  align-items: stretch;
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: .3rem .25rem;
  font-size: 10px;
  color: var(--text3);
  border-radius: 6px;
  transition: all .14s;
  cursor: pointer;
}
.bnav-item:hover, .bnav-item.active { color: var(--accent); background: rgba(232,184,109,.07); }
.bnav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* ── Hero ── */
.hero {
  padding: 3.25rem 2.75rem 2.5rem;
  border-bottom: 1px solid var(--border);
  max-width: 820px;
}
.eyebrow {
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: .75rem;
}
.hero h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 14.5px;
  color: var(--text2);
  line-height: 1.85;
  max-width: 560px;
}
.hero-meta {
  display: flex;
  gap: 2rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}
.meta-item { font-size: 12px; color: var(--text3); }
.meta-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  font-family: 'DM Serif Display', serif;
  line-height: 1.1;
  margin-bottom: 2px;
}

/* ── Cards grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.card {
  background: var(--bg);
  padding: 1.75rem;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  display: block;
}
.card:hover { background: var(--bg2); }
.card-phase {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: .5rem;
}
.card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: .5rem;
  color: var(--text);
}
.card p { font-size: 13px; color: var(--text2); line-height: 1.75; margin-bottom: .75rem; }
.card-count { font-size: 12px; color: var(--text3); margin-bottom: .5rem; }

/* ── Module list ── */
.module-list { padding: 1.5rem 2.75rem 3rem; max-width: 820px; }
.module-list h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text);
}
.mod-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s;
  text-decoration: none;
  border-radius: 3px;
}
.mod-row:last-child { border-bottom: none; }
.mod-row:hover .mod-row-title { color: var(--accent); }
.mod-num {
  font-size: 11px;
  color: var(--text3);
  min-width: 26px;
  padding-top: 2px;
}
.mod-row-content { flex: 1; }
.mod-row-title { font-size: 14px; color: var(--text); margin-bottom: 2px; }
.mod-row-sub { font-size: 12px; color: var(--text2); line-height: 1.6; }
.mod-row-arrow { font-size: 16px; color: var(--text3); padding-top: 1px; align-self: center; }

/* ── Module page layout ── */
.mod-wrap {
  display: grid;
  grid-template-columns: 1fr 260px;
}
.mod-main {
  padding: 2.5rem 2.75rem 3rem;
  min-width: 0;
  border-right: 1px solid var(--border);
}
.mod-aside {
  padding: 1.75rem 1.25rem;
  background: var(--bg2);
}

.mod-eyebrow {
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: .6rem;
}
.mod-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: .35rem;
}
.mod-sub { font-size: 14px; color: var(--text2); margin-bottom: 1.75rem; line-height: 1.6; }

/* ── Week tabs ── */
.week-tabs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 1.25rem; }
.wtab {
  padding: 4px 13px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 12px;
  color: var(--text3);
  cursor: pointer;
  background: transparent;
  transition: all .14s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.wtab:hover { border-color: var(--border2); color: var(--text2); }
.wtab.active { border-color: var(--accent); color: var(--accent); background: rgba(232,184,109,.06); }

/* ── Section tabs ── */
.stabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 1.25rem;
}
.stab {
  padding: 5px 15px;
  font-size: 12px;
  color: var(--text3);
  cursor: pointer;
  background: transparent;
  border-right: 1px solid var(--border);
  transition: all .14s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.stab:last-child { border-right: none; }
.stab:hover { color: var(--text2); background: rgba(255,255,255,.03); }
.stab.active { background: var(--bg3); color: var(--text); }

/* ── Week intro ── */
.week-intro {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.85;
  margin-bottom: 1.25rem;
  padding: .9rem 1.1rem;
  border-left: 2px solid var(--accent);
  background: rgba(232,184,109,.04);
  border-radius: 0 3px 3px 0;
}

/* ── Topic list ── */
.topic-list { list-style: none; }
.topic-item {
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.8;
}
.topic-item:last-child { border-bottom: none; }
.topic-item strong {
  color: var(--text);
  font-weight: 400;
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

/* ── Drills ── */
.drill-list { list-style: none; }
.drill-item {
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: .5rem;
  background: var(--bg2);
}
.drill-num { font-size: 10px; letter-spacing: .08em; color: var(--text3); text-transform: uppercase; margin-bottom: 3px; }
.drill-title { font-size: 14px; color: var(--text); font-weight: 400; margin-bottom: 4px; }
.drill-body { font-size: 13px; color: var(--text2); line-height: 1.75; }

/* ── Assignment ── */
.assign-block {
  border: 1px solid rgba(232,184,109,.22);
  border-radius: 5px;
  padding: 1.35rem;
  background: rgba(232,184,109,.04);
}
.assign-block h4 {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: .6rem;
}
.assign-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: .65rem;
}
.assign-body { font-size: 13.5px; color: var(--text2); line-height: 1.8; margin-bottom: .85rem; }
.criteria { list-style: none; margin-bottom: .85rem; }
.criteria li {
  font-size: 13px;
  color: var(--text2);
  padding: .28rem 0 .28rem 1.1rem;
  position: relative;
}
.criteria li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 11px;
  top: .36rem;
}
.gear-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: .65rem; }
.tag { font-size: 11px; padding: 2px 9px; border-radius: 3px; }
.tag-g { border: 1px solid rgba(91,143,201,.4); color: #7aabd8; }
.tag-s { border: 1px solid rgba(94,168,122,.4); color: #7ac297; }

/* ── Mistake / Tip cards ── */
.mistake-card, .tip-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  margin-bottom: .6rem;
  background: var(--bg2);
}
.m-title, .t-title { font-size: 13.5px; font-weight: 400; margin-bottom: .35rem; }
.m-title { color: var(--text); }
.t-title { color: var(--accent); }
.m-body, .t-body { font-size: 13px; color: var(--text2); line-height: 1.75; margin-bottom: .55rem; }
.m-fix {
  font-size: 12.5px;
  color: #7ac297;
  padding: .45rem .75rem;
  background: rgba(94,168,122,.06);
  border-radius: 3px;
  border-left: 2px solid var(--green);
  line-height: 1.65;
}
.m-fix strong { font-weight: 500; display: block; margin-bottom: 1px; }
.t-gear { font-size: 11px; color: var(--text3); }

/* ── Aside / sidebar components ── */
.aside-section {
  margin-bottom: 1.35rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--border);
}
.aside-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.aside-section h4 {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: 500;
  margin-bottom: .6rem;
}
.aside-section p { font-size: 12.5px; color: var(--text2); line-height: 1.7; }
.gear-item { display: flex; align-items: flex-start; gap: .45rem; padding: .32rem 0; font-size: 12.5px; color: var(--text2); }
.gdot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); margin-top: 7px; flex-shrink: 0; }
.qref {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .9rem;
  margin-bottom: .6rem;
}
.qref h5 {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: .45rem;
}
.qref p { font-size: 12px; color: var(--text2); line-height: 1.7; }
.qref code {
  background: rgba(255,255,255,.06);
  padding: 1px 5px;
  border-radius: 2px;
  font-family: monospace;
  font-size: 11px;
  color: var(--accent);
}

/* ── Kit grid on overview ── */
.kit-section { padding: 2rem 2.75rem; border-top: 1px solid var(--border); }
.kit-section h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 1.1rem;
  color: var(--text);
}
.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.kit-col-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text3); margin-bottom: .5rem; }
.kit-col-items { font-size: 13px; color: var(--text2); line-height: 2.1; }

/* ── Buttons ── */
.btn { display: inline-block; padding: 7px 18px; border-radius: 4px; font-size: 13px; cursor: pointer; transition: all .15s; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn-ghost { border: 1px solid var(--border2); color: var(--text2); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-accent { background: var(--accent); color: var(--bg); font-weight: 500; }
.btn-accent:hover { background: var(--accent2); }

/* ── Nav between modules ── */
.mod-nav-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0 0;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}
.mod-nav-strip a { font-size: 13px; color: var(--text2); transition: color .14s; }
.mod-nav-strip a:hover { color: var(--accent); }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 1.75rem 0; }

/* ── Phase badge ── */
.phase-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge-p1 { background: rgba(91,143,201,.15); color: var(--p1); }
.badge-p2 { background: rgba(94,168,122,.15); color: var(--p2); }
.badge-p3 { background: rgba(201,160,91,.15); color: var(--p3); }
.badge-p4 { background: rgba(201,122,91,.15); color: var(--p4); }

/* ── Install banner ── */
.install-banner {
  display: none;
  position: fixed;
  bottom: calc(60px + var(--safe-bottom));
  left: 1rem; right: 1rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: .9rem 1rem;
  z-index: 150;
  align-items: center;
  gap: .75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.install-banner.show { display: flex; }
.install-banner p { font-size: 13px; color: var(--text2); flex: 1; }
.install-banner p strong { color: var(--text); font-weight: 400; }
.install-close { font-size: 18px; color: var(--text3); padding: 2px 6px; }

/* ====================================================
   RESPONSIVE — Tablet
   ==================================================== */
@media (max-width: 1100px) {
  .mod-wrap { grid-template-columns: 1fr; }
  .mod-aside { border-top: 1px solid var(--border); }
  .mod-main { border-right: none; }
}

/* ====================================================
   RESPONSIVE — Mobile
   ==================================================== */
@media (max-width: 768px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { display: flex; }
  .bottom-nav { display: flex; }

  .hero { padding: 1.75rem 1.25rem 1.5rem; }
  .hero h2 { font-size: 1.65rem; }

  .card-grid { grid-template-columns: 1fr; }
  .card { padding: 1.35rem 1.25rem; }

  .module-list { padding: 1.25rem 1.25rem 5rem; }

  .mod-main { padding: 1.5rem 1.25rem 2rem; }
  .mod-aside { padding: 1.25rem; }

  .kit-section { padding: 1.5rem 1.25rem; }
  .kit-grid { grid-template-columns: 1fr 1fr; }

  .week-tabs { gap: 4px; }
  .wtab { padding: 5px 10px; font-size: 11.5px; }

  .stabs { flex-wrap: wrap; width: 100%; }
  .stab { flex: 1; text-align: center; padding: 7px 10px; }

  .hero-meta { gap: 1.25rem; }

  /* Extra bottom padding for bottom nav */
  .main { padding-bottom: 60px; }
  .mod-main { padding-bottom: calc(2rem + 60px); }

  .mod-nav-strip { flex-direction: column; align-items: flex-start; }

  /* Larger touch targets */
  .wtab, .stab, .nav-link, .mod-row { min-height: 44px; display: flex; align-items: center; }
  .mod-row { min-height: 56px; }
  .stab { min-height: 42px; justify-content: center; }
}

/* ====================================================
   UTILITIES
   ==================================================== */
.p1c { color: var(--p1); }
.p2c { color: var(--p2); }
.p3c { color: var(--p3); }
.p4c { color: var(--p4); }
.hidden { display: none !important; }
.serif { font-family: 'DM Serif Display', serif; font-weight: 400; }
