/* JP Holdsworth Portfolio — shared design tokens
 * Replicates the editorial system from the production site
 * (cream paper, dark ink, Bricolage display, Inter body, Instrument Serif italic for quotes,
 *  JetBrains Mono for small caps).
 */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wdth,wght@12..96,75..100,200..800&family=Inter:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;600&display=swap');

html { scroll-behavior: smooth; }

body {
  background: #F1ECE0;
  color: #14110D;
  font-family: 'Inter', system-ui, sans-serif;
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

/* Variable display headline */
.display {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-variation-settings: "opsz" 96, "wdth" 88, "wght" 540;
  letter-spacing: -0.035em;
  line-height: 0.86;
}

.display-italic {
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  letter-spacing: inherit;
  font-variation-settings: inherit;
}

.serif {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: -0.005em;
}

blockquote p {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.small-caps {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7C6F5A;
}

/* Subtle paper texture */
.paper-grain {
  background-image:
    radial-gradient(rgba(20,17,13,0.025) 1px, transparent 1px),
    radial-gradient(rgba(20,17,13,0.018) 1px, transparent 1px);
  background-size: 24px 24px, 12px 12px;
  background-position: 0 0, 6px 6px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Underline link */
.ulink {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size .25s ease;
  text-decoration: none;
  color: inherit;
}
.ulink:hover { background-size: 100% 2px; }

/* Nav scroll state */
.nav-bar {
  transition: background-color .25s, border-color .25s, backdrop-filter .25s;
}
.nav-bar.scrolled {
  background-color: rgba(241,236,224,0.78);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: rgba(20,17,13,0.08);
}

/* Frame for project imagery */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(20,17,13,0.06), 0 30px 60px -30px rgba(20,17,13,0.18);
  background: linear-gradient(135deg, rgba(20,17,13,0.04), rgba(20,17,13,0.10));
  transition: transform .8s cubic-bezier(.2,.6,.2,1);
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(20,17,13,0.14) 100%);
  pointer-events: none;
}

/* Company badge */
.co-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(20,17,13,0.06);
  color: #14110D;
}
.co-badge .co-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #C84A1F;
}
.co-badge.is-live .co-dot {
  background: #14a35e;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Tag chips */
.tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border: 1px solid rgba(20,17,13,0.18);
  border-radius: 4px;
  color: #14110D;
}

/* Generic palette helpers (mimic Tailwind utility classes used on the site) */
.bg-paper { background-color: #F1ECE0; }
.bg-paper2 { background-color: #E9E1CF; }
.text-ink { color: #14110D; }
.text-ink2 { color: #4B4438; }
.text-ink3 { color: #7C6F5A; }
.border-line { border-color: rgba(20,17,13,0.12); }
.text-accent { color: #C84A1F; }

/* Marquee strip */
.marquee {
  display: flex; gap: 2.5rem;
  animation: scroll 40s linear infinite;
  white-space: nowrap;
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* Project hero placeholder gradient */
.hero-gradient-1 { background: linear-gradient(135deg, #C84A1F, #F1ECE0 70%); }
.hero-gradient-2 { background: linear-gradient(135deg, #2B4D8A, #5C7FBA 70%); }
.hero-gradient-3 { background: linear-gradient(135deg, #D9B98F, #C8946B 70%); }
.hero-gradient-4 { background: linear-gradient(135deg, #4F6F4A, #8FAD7B 70%); }
.hero-gradient-5 { background: linear-gradient(135deg, #B36A8F, #D8A8C0 70%); }
.hero-gradient-6 { background: linear-gradient(135deg, #2B5DB8, #87B0E9 70%); }

/* Numeric large markers in case study cards */
.case-num {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-variation-settings: "opsz" 96, "wdth" 95, "wght" 200;
  font-size: 200px;
  line-height: 0.8;
  color: rgba(20,17,13,0.16);
  user-select: none;
}

/* Case study layout helpers */
.case-section {
  border-top: 1px solid rgba(20,17,13,0.12);
}

.section-rule {
  display: flex; align-items: center; gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #7C6F5A;
}
.section-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(20,17,13,0.16);
}

/* Subtle prose */
.prose-lg {
  font-size: 18px;
  line-height: 1.6;
  color: #2A241E;
}
.prose-lg p { margin: 0 0 1.1em; }
.prose-lg strong { color: #14110D; font-weight: 600; }

/* Case nav button (back to projects, next case study) */
.btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #14110D; text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap .25s ease;
}
.btn-link:hover { gap: 14px; }

/* Goals/solutions list */
.numbered-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid rgba(20,17,13,0.10);
}
.numbered-item:last-child { border-bottom: 1px solid rgba(20,17,13,0.10); }
.numbered-item .num {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-variation-settings: "opsz" 48, "wdth" 90, "wght" 540;
  font-size: 36px;
  letter-spacing: -0.02em;
  color: #14110D;
}

@media (max-width: 768px) {
  .case-num { font-size: 120px; }
}
