/* ==========================================================================
   ALOMEEMMANUEL.COM — DESIGN SYSTEM & ARCHITECTURAL STYLESHEET
   Editorial, Precise, Cinematic, Minimalist
   ========================================================================== */

:root {
  --bg-paper: #F9F8F6;
  --bg-paper-subtle: #F3F1EC;
  --bg-paper-muted: #EAE7DF;
  --color-ink: #111111;
  --color-ink-dark: #0A0A0A;
  --color-ink-secondary: #4A4843;
  --color-ink-muted: #7A7870;
  --color-border: #E2DFD7;
  --color-border-dark: #262626;
  --color-accent: #C84B31; /* Deep Oxblood / Terracotta */
  --color-accent-light: #FDE8E4;
  --color-accent-hover: #A83821;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-paper);
  color: var(--color-ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

/* Typography Classes */
.font-serif {
  font-family: 'Newsreader', Georgia, serif;
  font-feature-settings: "lnum" 1, "pnum" 1;
}

.font-sans {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Background & Text Colors */
.bg-paper { background-color: var(--bg-paper); }
.bg-paper-subtle { background-color: var(--bg-paper-subtle); }
.bg-ink { background-color: var(--color-ink); }
.bg-ink-dark { background-color: var(--color-ink-dark); }
.text-ink { color: var(--color-ink); }
.text-ink-secondary { color: var(--color-ink-secondary); }
.text-ink-muted { color: var(--color-ink-muted); }
.text-paper { color: #FAF9F6; }
.text-paper-muted { color: #A3A199; }
.text-accent { color: var(--color-accent); }
.border-border { border-color: var(--color-border); }

/* Handwritten Annotation Badge */
.handwritten-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-left: 0.5rem;
  vertical-align: middle;
  transform: rotate(-1.5deg);
  position: relative;
  top: -2px;
}

@media (max-width: 640px) {
  .handwritten-badge {
    display: block;
    margin-left: 0;
    margin-top: 0.5rem;
    font-size: 1.2rem;
  }
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-ink);
  color: #FAF9F6;
  border: 1px solid var(--color-ink);
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #262626;
  border-color: #262626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.bg-ink-dark .btn-secondary,
.bg-ink .btn-secondary {
  color: #FAF9F6;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background-color: var(--bg-paper-subtle);
  border-color: var(--color-ink);
  transform: translateY(-1px);
}

.bg-ink-dark .btn-secondary:hover,
.bg-ink .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Problem Cards */
.problem-card {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.problem-card:hover {
  border-color: var(--color-ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

/* Thought Cards */
.thought-card {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.thought-card:hover {
  border-color: var(--color-ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

/* Currency switcher buttons */
.curr-btn {
  background: transparent;
  color: var(--color-ink-muted);
  border: none;
  cursor: pointer;
}

.curr-btn.active {
  background: var(--color-ink);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Forms */
.form-input, .form-textarea, select.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--color-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-textarea:focus, select.form-input:focus {
  outline: none;
  border-color: var(--color-ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.slot-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  background-color: #FFFFFF;
  transition: all 0.15s ease;
}

.slot-pill:hover {
  border-color: var(--color-ink);
}

.slot-pill:has(input:checked) {
  background-color: var(--color-ink);
  color: #FFFFFF;
  border-color: var(--color-ink);
}

.type-option:has(input:checked) {
  border-color: var(--color-ink);
  background-color: var(--bg-paper-subtle);
}

.type-option:has(input:checked) .type-check {
  display: block !important;
}

/* Image & Media helpers */
.object-cover { object-fit: cover; }
.object-top { object-position: top; }
.object-center { object-position: center; }
.aspect-\[4\/5\] { aspect-ratio: 4 / 5; }

/* Modal Animations */
@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-modal {
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Utility layout helpers */
.max-w-7xl { max-width: 80rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.max-w-md { max-width: 28rem; }
.max-w-sm { max-width: 24rem; }
.max-w-xs { max-width: 20rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }

.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-28 { padding-top: 7rem; padding-bottom: 7rem; }
.py-32 { padding-top: 8rem; padding-bottom: 8rem; }
.py-36 { padding-top: 9rem; padding-bottom: 9rem; }
.py-40 { padding-top: 10rem; padding-bottom: 10rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-7 { padding-left: 1.75rem; padding-right: 1.75rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-9 { padding-left: 2.25rem; padding-right: 2.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.pt-12 { padding-top: 3rem; }
.pt-16 { padding-top: 4rem; }
.pt-20 { padding-top: 5rem; }
.pt-24 { padding-top: 6rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-24 { padding-bottom: 6rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-14 { margin-bottom: 3.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.ml-0\.5 { margin-left: 0.125rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-1 { margin-right: 0.25rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-7 { width: 1.75rem; }
.h-7 { height: 1.75rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-9 { width: 2.25rem; }
.h-9 { height: 2.25rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }

.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }
.border-dashed { border-style: dashed; }

.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.1; }
.text-6xl { font-size: 3.75rem; line-height: 1.05; }
.text-7xl { font-size: 4.5rem; line-height: 1; }
.text-8xl { font-size: 6rem; line-height: 1; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-tight { letter-spacing: -0.025em; }
.leading-tight { line-height: 1.2; }
.leading-relaxed { line-height: 1.625; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.top-5 { top: 1.25rem; }
.right-4 { right: 1rem; }
.right-5 { right: 1.25rem; }
.right-8 { right: 2rem; }
.bottom-4 { bottom: 1rem; }
.-bottom-6 { bottom: -1.5rem; }
.-right-4 { right: -1rem; }
.left-4 { left: 1rem; }
.-translate-y-1\/2 { transform: translateY(-50%); }

.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.shadow-xs { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.cursor-pointer { cursor: pointer; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-duration: 150ms; }
.transition-all { transition-property: all; transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-duration: 150ms; }

.bg-gradient-to-t {
  background-image: linear-gradient(to top, var(--tw-gradient-stops, rgba(0, 0, 0, 0.6), transparent));
}

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:items-end { align-items: flex-end; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1.1; }
  .sm\:text-6xl { font-size: 3.75rem; line-height: 1.05; }
  .sm\:text-7xl { font-size: 4.5rem; line-height: 1; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:pt-28 { padding-top: 7rem; }
  .sm\:pt-32 { padding-top: 8rem; }
  .sm\:pb-32 { padding-bottom: 8rem; }
  .sm\:pb-36 { padding-bottom: 9rem; }
  .sm\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
  .sm\:py-36 { padding-top: 9rem; padding-bottom: 9rem; }
  .sm\:py-40 { padding-top: 10rem; padding-bottom: 10rem; }
  .sm\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .sm\:p-10 { padding-left: 2.5rem; padding-right: 2.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .sm\:p-12 { padding-left: 3rem; padding-right: 3rem; padding-top: 3rem; padding-bottom: 3rem; }
  .sm\:right-6 { right: 1.5rem; }
  .sm\:block { display: block; }
  .sm\:inline { display: inline; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .md\:inline-block { display: inline-block; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1.05; }
  .lg\:text-7xl { font-size: 4.5rem; line-height: 1; }
  .lg\:text-8xl { font-size: 6rem; line-height: 1; }
  .lg\:justify-end { justify-content: flex-end; }
  .lg\:pl-6 { padding-left: 1.5rem; }
}


/* ==========================================================================
   UI/UX FIX PASS — utilities referenced in the markup but never defined,
   plus navigation, accessibility and motion refinements
   ========================================================================== */

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--color-accent-light); color: var(--color-ink); }
.antialiased { -webkit-font-smoothing: antialiased; }
.scroll-smooth { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 6rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Colours / opacity variants */
.bg-accent { background-color: var(--color-accent); }
.bg-paper\/90 { background-color: rgba(249, 248, 246, 0.9); }
.bg-ink\/70 { background-color: rgba(17, 17, 17, 0.7); }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-rose-100 { background-color: #ffe4e6; }
.text-emerald-700 { color: #047857; }
.text-emerald-800 { color: #065f46; }
.text-rose-700 { color: #be123c; }
.text-rose-800 { color: #9f1239; }
.border-ink { border-color: var(--color-ink); }
.border-accent\/30 { border-color: rgba(200, 75, 49, 0.3); }
.border-accent\/40 { border-color: rgba(200, 75, 49, 0.4); }
.border-border\/70 { border-color: rgba(226, 223, 215, 0.7); }
.border-border\/80 { border-color: rgba(226, 223, 215, 0.8); }
.border-border\/90 { border-color: rgba(226, 223, 215, 0.9); }
.border-paper\/15 { border-color: rgba(250, 249, 246, 0.15); }
.decoration-accent\/40 { text-decoration-color: rgba(200, 75, 49, 0.4); }
.opacity-80 { opacity: 0.8; }
.hover\:opacity-100:hover { opacity: 1; }
.hover\:bg-paper-subtle:hover { background-color: var(--bg-paper-subtle); }
.hover\:border-accent:hover { border-color: var(--color-accent); }
.hover\:border-accent\/50:hover { border-color: rgba(200, 75, 49, 0.5); }
.hover\:border-ink:hover { border-color: var(--color-ink); }
.hover\:border-ink\/40:hover { border-color: rgba(17, 17, 17, 0.4); }
.hover\:text-ink:hover { color: var(--color-ink); }

/* Gradient overlay on portrait */
.bg-gradient-to-t {
  background-image: linear-gradient(to top, rgba(17,17,17,0.6), rgba(17,17,17,0) 55%);
}

/* Image treatment */
.filter { filter: grayscale(25%) contrast(105%); }
.group:hover .group-hover\:grayscale-0 { filter: grayscale(0) contrast(105%); }
.group:hover .group-hover\:scale-102 { transform: scale(1.02); }
.group:hover .group-hover\:text-accent { color: var(--color-accent); }
.group:hover .group-hover\:underline { text-decoration: underline; text-underline-offset: 4px; }
.hover\:scale-102:hover { transform: scale(1.02); }
.-rotate-12 { transform: rotate(-12deg); }
.transition-opacity { transition-property: opacity; transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.duration-700 { transition-duration: 700ms; }

/* Layout */
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.whitespace-nowrap { white-space: nowrap; }
.max-w-none { max-width: none; }
.max-w-\[200px\] { max-width: 200px; }
.max-h-\[50vh\] { max-height: 50vh; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.h-2 { height: 0.5rem; }
.w-2 { width: 0.5rem; }
.p-3\.5 { padding: 0.875rem; }
.pl-6 { padding-left: 1.5rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-4 { padding-right: 1rem; }
.pt-4 { padding-top: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3\.5 > * + * { margin-top: 0.875rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-16 > * + * { margin-top: 4rem; }

/* Typography */
.leading-snug { line-height: 1.375; }
.leading-\[1\.05\] { line-height: 1.05; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.3em\] { letter-spacing: 0.3em; }
.underline { text-decoration: underline; }
.underline-offset-4 { text-underline-offset: 4px; }
.text-decoration-none { text-decoration: none; }
.prose p + p { margin-top: 1rem; }
.movie-line { transition: opacity 0.2s ease; }

/* Pulse dot */
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.animate-pulse { animation: pulseDot 2.2s ease-in-out infinite; }

@media (min-width: 640px) {
  .sm\:gap-6 { gap: 1.5rem; }
  .sm\:gap-8 { gap: 2rem; }
  .sm\:mb-8 { margin-bottom: 2rem; }
  .sm\:mb-10 { margin-bottom: 2.5rem; }
  .sm\:mb-12 { margin-bottom: 3rem; }
  .sm\:p-6 { padding: 1.5rem; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:pl-8 { padding-left: 2rem; }
  .sm\:space-y-24 > * + * { margin-top: 6rem; }
  .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:w-auto { width: auto; }
}
@media (min-width: 1024px) {
  .lg\:gap-16 { gap: 4rem; }
  .lg\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
}

/* ---------- Header / navigation ---------- */
#navbar { z-index: 50; transition: box-shadow .3s ease, background-color .3s ease; }
#navbar.is-scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.06); background-color: rgba(249,248,246,.96); }
#navbar .brand-name { white-space: nowrap; font-size: 1.35rem; line-height: 1; }
@media (min-width: 640px) { #navbar .brand-name { font-size: 1.6rem; } }
#navbar nav a { position: relative; white-space: nowrap; padding: .25rem 0; }
#navbar nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--color-accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
#navbar nav a:hover::after, #navbar nav a.is-active::after { transform: scaleX(1); }
#navbar nav a.is-active { color: var(--color-ink); }
#navbar .btn-primary { white-space: nowrap; }

/* Full nav only from 1024px; below that use the menu button */
@media (min-width: 768px) and (max-width: 1023px) {
  #navbar nav { display: none; }
  #navbar .md\:hidden { display: flex; }
  #navbar .md\:inline-block { display: none; }
}
@media (min-width: 1024px) { #navbar nav { gap: 1.5rem; } }
@media (min-width: 1200px) { #navbar nav { gap: 2rem; } }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--color-border); border-radius: 6px; background: transparent; color: var(--color-ink); cursor: pointer; }
.menu-btn:hover { border-color: var(--color-ink); }
.mobile-menu { position: fixed; inset: 0; z-index: 45; background: var(--bg-paper); padding: 7.5rem 1.5rem 2rem; display: none; flex-direction: column; gap: .25rem; overflow-y: auto; }
.mobile-menu.open { display: flex; }
.mobile-menu a.m-link { font-family: 'Newsreader', Georgia, serif; font-size: 2rem; line-height: 1.2; padding: .75rem 0; border-bottom: 1px solid var(--color-border); }
.mobile-menu a.m-link:active { color: var(--color-accent); }
.mobile-menu .btn-primary { margin-top: 1.5rem; padding: 1rem 1.5rem; font-size: 1rem; }

/* ---------- Accessibility ---------- */
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--color-ink); color: #fff; padding: .75rem 1rem; border-radius: 6px; transition: top .2s; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }
button, a, .problem-card, .thought-card { -webkit-tap-highlight-color: transparent; }
.text-ink-muted { color: #6b6962; }

/* ---------- Mobile polish ---------- */
@media (max-width: 640px) {
  .problem-card, .thought-card { padding: 1.5rem; }
  .form-input, .form-textarea, select.form-input { font-size: 16px; }
  .py-24 { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .py-28 { padding-top: 5rem; padding-bottom: 5rem; }
  .py-36, .py-40 { padding-top: 5.5rem; padding-bottom: 5.5rem; }
  .btn-primary, .btn-secondary { min-height: 3rem; }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 479px) {
  #navbar > div { padding-left: 1rem; padding-right: 1rem; }
  #navbar .brand-name { font-size: 1.05rem; letter-spacing: 0; }
  #navbar a.group { gap: .5rem; min-width: 0; }
  #navbar a.group img { width: 2rem; height: 2rem; }
  #navbar .md\:hidden { gap: .5rem; }
  #navbar .md\:hidden .btn-primary { padding-left: .85rem; padding-right: .85rem; min-height: 2.5rem; }
}

/* Header pill only when there is room; nav stays inside the container */
@media (max-width: 1439px) { #navbar .md\:inline-block { display: none; } }
@media (min-width: 1200px) and (max-width: 1439px) { #navbar nav { gap: 1.5rem; } }
#navbar > div > nav { flex-shrink: 0; }

.social-link { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--color-border); border-radius: 9999px; color: var(--color-ink); transition: all .2s ease; }
.social-link:hover { background: var(--color-ink); color: #fff; border-color: var(--color-ink); transform: translateY(-1px); }

.wa-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; background: var(--bg-paper); color: var(--color-ink); border: 1px solid var(--color-border); box-shadow: 0 4px 14px rgba(0,0,0,.08); transition: all .2s ease; }
.wa-fab:hover { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }
@media (min-width: 640px) { .wa-fab { right: 1.5rem; bottom: 1.5rem; } }

.bg-paper-muted { background-color: var(--bg-paper-muted); }
.border-accent { border-color: var(--color-accent); }
.gap-5 { gap: 1.25rem; } .gap-10 { gap: 2.5rem; } .gap-x-10 { column-gap: 2.5rem; } .gap-y-2 { row-gap: .5rem; }
.hover\:text-accent:hover { color: var(--color-accent); }
.p-1 { padding: .25rem; } .pl-1 { padding-left: .25rem; } .pt-1\.5 { padding-top: .375rem; }
.space-y-3 > * + * { margin-top: .75rem; } .space-y-5 > * + * { margin-top: 1.25rem; }
@media (min-width: 640px) { .sm\:col-span-2 { grid-column: span 2 / span 2; } .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 768px) { .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* Lists use their own markers in the markup; suppress the browser default so bullets are not doubled */
ul, ol { list-style: none; }
