/* ============================================================
   imy — design system
   Monochrome, editorial. No color beyond ink/paper/grey.
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #FAFAF9;
  --surface: #FFFFFF;

  /* Ink */
  --ink: #181817;
  --ink-2: #5E5D59;
  --ink-3: #9B9A95;

  /* Lines */
  --border: #E7E5E1;
  --border-strong: #D4D2CC;

  /* Type */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(24, 24, 23, 0.04);
  --shadow-md: 0 8px 24px rgba(24, 24, 23, 0.06);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

::selection { background: var(--ink); color: var(--bg); }

/* ---------- layout ---------- */

.container {
  display: flex;
  flex: 1;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.page {
  width: 100%;
  padding: 0 var(--sp-5);
}

@media (max-width: 640px) {
  .page { padding: 0 var(--sp-4); }
}

.main-content {
  flex: 1;
  background: var(--bg);
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: var(--sp-7) var(--sp-5);
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .main-content { padding: var(--sp-5) var(--sp-4); }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(250, 249, 247, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color .15s var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 1px;
  background: var(--ink);
  transition: right .2s var(--ease);
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 6px;
  margin-right: 10px;
}

@media (max-width: 850px) {
  .site-header { padding: 14px 20px; }
  .nav-links { gap: 20px; }
}

/* ---------- ticker ---------- */

.ticker {
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 26s linear infinite;
}

.ticker__item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px 0;
  padding-right: 56px;
  font-family: 'Doto', var(--font-mono);
  font-variation-settings: 'ROND' 100;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #F4F3EF;
  white-space: nowrap;
  text-shadow: 0 0 1px rgba(244, 243, 239, 0.5);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
}

@media (max-width: 850px) {
  .ticker__item { font-size: 16px; padding-right: 36px; }
}

/* ---------- home hero banner ---------- */

.hero-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 0 0 0;
  background: transparent;
  overflow: hidden;
}

.hero-banner__photo {
  flex-shrink: 0;
  align-self: flex-end;
  height: 68px;
  width: auto;
  display: block;
}

.hero-banner__ticker {
  flex: 1;
  min-width: 0;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 68px;
  overflow: hidden;
}

.hero-stat-marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.hero-stat-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: hero-stat-scroll-once 11s linear 1 forwards;
}
@keyframes hero-stat-scroll-once {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stat-track { animation: none; }
}

.hero-typer {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(15px, 1.9vw, 19px);
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--ink);
  transition: opacity .6s ease, filter .6s ease, transform .6s ease;
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}
.hero-typer.dissolving {
  opacity: 0;
  filter: blur(6px);
  transform: scale(1.04);
}

.hero-typer .typer-logo {
  display: inline;
  height: 1em;
  width: auto;
  vertical-align: -0.15em;
  margin: 0 14px;
}

.hero-typer .typer-highlight {
  font-family: var(--font-serif);
  font-weight: 600;
}

.hero-typer .typer-cursor {
  display: inline-block;
  font-weight: 400;
  color: var(--ink-3);
  animation: typer-blink 1s step-end infinite;
}

@keyframes typer-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Stat slides reuse the exact same visual pattern as the course
   highlight strip (.stat-tile__number / .stat-tile__label) for
   consistency across the site. */
.typer-stat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.typer-stat svg { flex-shrink: 0; }
.typer-stat .stat-tile__number { font-size: clamp(19px, 2.4vw, 24px); }
.typer-stat .stat-tile__label { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .hero-typer { transition: none; }
  .hero-typer .typer-cursor { animation: none; }
}

@media (max-width: 640px) {
  .hero-typer { font-size: 13px; white-space: normal; line-height: 1.5; }
  .typer-stat .stat-tile__number { font-size: 17px; }
}

@media (max-width: 640px) {
  .hero-banner { padding: 8px 0 0 0; gap: 12px; }
  .hero-banner__photo { height: 48px; }
  .hero-banner__ticker { padding-bottom: 8px; min-height: 48px; }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  margin-top: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-links a { color: var(--ink-2); transition: color .15s var(--ease); }
.footer-links a:hover { color: var(--ink); }

.footer-copy {
  text-align: center;
  margin-top: 14px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

/* ---------- eyebrow / labels ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--ink);
  display: inline-block;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  cursor: pointer;
  border: 1.5px solid var(--ink);
  transition: background .18s var(--ease), color .18s var(--ease), transform .12s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: #33322F; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--bg); }

.btn-block { width: 100%; }

/* ---------- chips (filter toggles) ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--r-pill);
  padding: 9px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1.5px solid var(--border-strong);
  color: var(--ink-2);
  background: var(--surface);
  transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--r-pill);
}
.badge-solid { background: var(--ink); color: var(--bg); }
.badge-outline { background: var(--surface); color: var(--ink-2); border: 1px solid var(--border-strong); }

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.card-link:hover .card,
a.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-ghost {
  border-style: dashed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 100%;
}

/* ---------- course grid ---------- */

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.course-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.course-card__media {
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(24,24,23,0.025) 10px, rgba(24,24,23,0.025) 11px),
    var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  position: relative;
}

.course-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card__media > .badge {
  position: relative;
  z-index: 1;
  margin: 14px;
}

/* Force any pasted embed code (YouTube's own iframe, whatever width/height
   it ships with) to fill the responsive 16:9 box exactly. */
.video-embed-wrap iframe,
.video-embed-wrap embed,
.video-embed-wrap object {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- course highlight strip ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 20px;
  row-gap: 22px;
}
@media (min-width: 480px) {
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 850px) {
  .stat-strip { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); column-gap: 28px; }
}

.stat-tile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.stat-tile svg { flex-shrink: 0; color: var(--ink-3); margin-top: 1px; }
.stat-tile__number {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(17px, 4vw, 20px);
  line-height: 1.1;
}
.stat-tile__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 4px;
  white-space: nowrap;
}
.stat-tile__text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

/* ---------- testimonials ---------- */

.testimonial-card { padding: 20px; }
.testimonial-card p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
}
.testimonial-card .who { margin-top: 12px; font-size: 13px; font-weight: 600; }
.testimonial-card .who span { font-weight: 400; color: var(--ink-2); }

.course-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.course-card__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.course-card__title {
  flex: 1;
  min-width: 0;
  font-size: 19px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.course-card__cohort {
  flex-shrink: 0;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

@media (max-width: 420px) {
  .course-card__cohort { font-size: 9.5px; }
}

.course-card__desc {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.course-card__meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

.course-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.course-card__price {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
}

/* ---------- offer pricing ---------- */

.price-offer-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.price-original {
  font-family: var(--font-sans);
  font-size: 0.6em;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--border-strong);
}

.price-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.price-urgency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 11px 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: rgba(24, 24, 23, 0.035);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--ink-2);
}

.price-urgency__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
  animation: price-urgency-pulse 1.8s ease-in-out infinite;
}

@keyframes price-urgency-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.course-card__cta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap .15s var(--ease), color .15s var(--ease);
}
a.card:hover .course-card__cta { gap: 9px; color: var(--ink); }

/* ---------- simple content/blog cards ---------- */

.tile {
  display: block;
  padding: 18px 20px;
}

.tile__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.tile__icon img { width: 100%; height: 100%; object-fit: cover; }
.tile__icon .default-icon { width: 55%; height: 55%; color: var(--ink-3); }

.tile__content { min-width: 0; }

.tile__title {
  font-weight: 600;
  font-size: 14.5px;
  font-family: var(--font-sans);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.tile__desc {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

/* Mobile: icon on the left, title + description stacked on the right */
@media (max-width: 640px) {
  .tile {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
  }
  .tile__icon { margin-bottom: 0; }
  .tile__content { flex: 1; }
}

/* ---------- inline SVG icon ---------- */

.icon {
  display: inline-block;
  vertical-align: -3px;
  transition: transform .15s var(--ease);
}

/* ---------- content box (generic prose container: about/contact/privacy/terms) ---------- */

.content-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.content-box h1 { font-size: 1.75rem; margin-bottom: var(--sp-4); }
.content-box h2 { font-size: 1.25rem; margin: var(--sp-5) 0 var(--sp-3); }
.content-box p { color: var(--ink-2); line-height: 1.7; margin-bottom: var(--sp-3); }
.content-box a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.content-box ul, .content-box ol { color: var(--ink-2); line-height: 1.7; padding-left: 22px; }

@media (max-width: 640px) {
  .content-box { padding: var(--sp-4); border-radius: var(--r-md); }
}

/* ---------- legacy sidebar shell (kept for pages that hide it) ---------- */

.sidebar {
  width: 280px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  flex-shrink: 0;
  padding: var(--sp-4);
}

.right-sidebar {
  width: 300px;
  padding: var(--sp-4);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

@media (max-width: 1200px) {
  .right-sidebar { display: none; }
}

@media (max-width: 850px) {
  .menu-toggle { display: block; }
  .container { flex-direction: column; }
  .right-sidebar { display: none; }

  .sidebar {
    position: fixed;
    top: 62px;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - 62px);
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
    z-index: 999;
    box-shadow: var(--shadow-md);
  }

  .sidebar.mobile-visible { transform: translateX(0); }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(24, 24, 23, 0.35);
    z-index: 998;
  }

  .sidebar-overlay.active { display: block; }
}

/* ---------- ad slots (collapse to nothing when unfilled) ---------- */

.ad-slot {
  overflow: hidden;
  text-align: center;
}
.ad-slot:empty,
.ad-slot > ins:empty {
  display: none;
}

/* ---------- forms ---------- */

.field {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: 13.5px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .15s var(--ease);
}
.field:focus { outline: none; border-color: var(--ink); }
.field::placeholder { color: var(--ink-3); }

/* ---------- responsive helpers ---------- */

@media (max-width: 850px) {
  .course-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
}
