/*
Theme Name: Course Kitchen
Theme URI: http://www.coursekitchen.com
Description: Editorial & confident online learning design system
Version: 1.0
Author: Course Kitchen
Author URI: http://www.coursekitchen.com
License: All Rights Reserved
License URI:
Text Domain: course-kitchen
Domain Path: /languages
*/

/* Course Kitchen — Design System
   Aesthetic: Editorial & confident
   Type: Fraunces (display serif) + Inter (UI sans) + JetBrains Mono (utility)
   Palette: Crisp white, near-black, accent orange-red, light gray
*/

:root {
  /* Accent — tweakable */
  --accent: #ff4a1c;
  --accent-ink: #ffffff;

  /* Neutrals */
  --ink: #0c0c0c;
  --ink-2: #1a1a1a;
  --ink-3: #4a4a4a;
  --ink-4: #8a8a8a;
  --rule: #e6e6e3;
  --paper: #fbfaf7;
  --paper-2: #f3f1ec;
  --paper-3: #eceae3;

  /* Type */
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale */
  --step--1: clamp(0.78rem, 0.75rem + 0.15vw, 0.875rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1:  clamp(1.15rem, 1.05rem + 0.5vw, 1.375rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4:  clamp(2.75rem, 2rem + 3.5vw, 4.5rem);
  --step-5:  clamp(3.5rem, 2.5rem + 5vw, 6.5rem);
  --step-6:  clamp(4.5rem, 3rem + 7vw, 9rem);

  /* Spacing */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4.5rem;
  --s-7: 6.5rem;
  --s-8: 9rem;

  /* Layout */
  --max: 1360px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 430;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin: 0;
  font-variation-settings: "SOFT" 30, "opsz" 120;
  text-wrap: balance;
}
h1 { font-size: var(--step-6); letter-spacing: -0.035em; line-height: 0.92; }
h2 { font-size: var(--step-5); letter-spacing: -0.03em; }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); letter-spacing: -0.015em; }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.mono { font-family: var(--mono); letter-spacing: 0; }

.serif-italic { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* Layout primitives */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.rule { border-top: 1px solid var(--rule); }
.rule-b { border-bottom: 1px solid var(--rule); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.nav-logo .mark {
  width: 28px; height: 28px;
  display: inline-grid;
  place-items: center;
}
.nav-links {
  display: flex;
  gap: var(--s-4);
  align-items: center;
  font-size: 14px;
}
.nav-links a {
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  text-decoration: none;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: all 180ms ease;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn .arr { display: inline-block; transition: transform 180ms ease; }
.btn:hover .arr { transform: translateX(3px); }

/* Sections */
section { padding: var(--s-7) 0; }
.section-tight { padding: var(--s-5) 0; }

/* Grid utilities */
.grid { display: grid; gap: var(--s-4); }

/* Marquee */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s-3) 0;
  background: var(--paper);
}
.marquee-track {
  display: flex;
  gap: var(--s-6);
  width: max-content;
  animation: marquee 50s linear infinite;
  align-items: center;
}
.marquee-item {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--ink-3);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--s-6);
  letter-spacing: -0.02em;
}
.marquee-item .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Footer */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-7) 0 var(--s-4);
}
footer a { color: var(--paper-2); text-decoration: none; }
footer a:hover { color: var(--accent); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s-5);
  padding-bottom: var(--s-6);
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: var(--s-2);
  font-weight: 500;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding-top: var(--s-3);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-4);
  font-family: var(--mono);
}

/* Hero shared */
.hero-headline {
  font-size: var(--step-6);
  line-height: 0.9;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.hero-headline .accent-word {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}

/* Cards & content blocks */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: var(--s-4);
  border-radius: 2px;
  transition: all 200ms ease;
}
.card:hover { border-color: var(--ink); }

/* Project tile */
.tile {
  display: block;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4/3;
  transition: transform 300ms ease;
}
.tile:hover { transform: translateY(-4px); }
.tile-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.95;
  transition: transform 400ms ease, opacity 300ms;
}
.tile:hover .tile-img { transform: scale(1.03); opacity: 1; }
.tile-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--s-3);
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

/* Placeholder "image" — striped */
.placeholder {
  background:
    repeating-linear-gradient(135deg,
      var(--paper-3) 0 14px,
      var(--paper-2) 14px 28px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.placeholder-dark {
  background:
    repeating-linear-gradient(135deg,
      #1a1a1a 0 14px,
      #0c0c0c 14px 28px);
  color: #666;
}

/* Utility */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }
.muted { color: var(--ink-3); }
.quiet { color: var(--ink-4); }
.ink { color: var(--ink); }
.accent { color: var(--accent); }
.center-text { text-align: center; }

/* Big stat */
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-num {
  font-family: var(--serif);
  font-size: var(--step-5);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 430;
}
.stat-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: all 180ms ease;
  text-decoration: none;
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }
.link-arrow .arr { transition: transform 180ms ease; display: inline-block; }
.link-arrow:hover .arr { transform: translate(3px, -3px); }

/* Responsive */
@media (max-width: 860px) {
  .nav-links { gap: var(--s-2); }
  .nav-links a:not(.btn) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Tweaks panel */
.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 18px 20px;
  width: 280px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  font-family: var(--sans);
  display: none;
  border: 1px solid #2a2a2a;
}
.tweaks.active { display: block; }
.tweaks h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 14px;
  font-weight: 500;
}
.tweaks-row { margin-bottom: 16px; }
.tweaks-row:last-child { margin-bottom: 0; }
.tweaks-label {
  font-size: 11px;
  color: var(--ink-4);
  margin-bottom: 6px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.tweaks-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.tweaks-swatch {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 150ms;
}
.tweaks-swatch:hover { transform: scale(1.1); }
.tweaks-swatch.active { border-color: white; }
.tweaks-seg { display: flex; gap: 4px; }
.tweaks-seg button {
  flex: 1;
  padding: 7px 10px;
  background: transparent;
  color: var(--paper-2);
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 150ms;
}
.tweaks-seg button:hover { border-color: var(--paper-2); }
.tweaks-seg button.active { background: var(--paper); color: var(--ink); border-color: var(--paper); }
