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

:root {
  --bg:         #FFF1B5;   /* Buttermilk */
  --text:       #43302E;   /* Old Burgundy */
  --accent:     #C1DBE8;   /* Pastel Blue */
  --accent-dim: rgba(193, 219, 232, 0.38);
  --muted:      #7A5C5A;   /* Warm muted burgundy */
  --border:     #D4C4BC;   /* Warm taupe border */
  --card-bg:    #FFFDF5;   /* Warm near-white */
  --nav-height: 68px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Heading font */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
}

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

ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ─────────────────────────────────────────
   Layout
───────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ─────────────────────────────────────────
   Navigation
───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.nav.scrolled {
  background: rgba(255, 241, 181, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.2s;
}

.nav-brand:hover { color: var(--muted); }

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* ─────────────────────────────────────────
   Hero
───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

/* Dot-grid overlay — pastel blue dots on buttermilk */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(193, 219, 232, 0.7) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 28px;
}

.hero-body {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 48px;
}

/* ─────────────────────────────────────────
   Gradient Mesh — buttermilk & pastel blue
───────────────────────────────────────── */
.gradient-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
}

.orb-1 {
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, #C1DBE8 0%, transparent 65%);
  top: -260px;
  left: -200px;
  opacity: 0.5;
  animation: drift1 26s ease-in-out infinite;
}

.orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #FFD580 0%, transparent 65%);
  top: 80px;
  right: -80px;
  opacity: 0.35;
  animation: drift2 32s ease-in-out infinite;
}

.orb-3 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #C1DBE8 0%, transparent 65%);
  bottom: -60px;
  left: 28%;
  opacity: 0.38;
  animation: drift3 22s ease-in-out infinite;
}

.orb-4 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, #FFE898 0%, transparent 65%);
  top: 45%;
  left: 55%;
  opacity: 0.3;
  animation: drift4 38s ease-in-out infinite;
}

.orb-5 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, #A8CCE0 0%, transparent 65%);
  bottom: -120px;
  right: 10%;
  opacity: 0.4;
  animation: drift5 29s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(110px, 70px); }
  66%       { transform: translate(-55px, 130px); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(-90px, 110px); }
  66%       { transform: translate(70px, -90px); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(-110px, -70px); }
}
@keyframes drift4 {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(70px, -50px); }
  66%       { transform: translate(-80px, 90px); }
}
@keyframes drift5 {
  0%, 100% { transform: translate(0, 0); }
  40%       { transform: translate(-130px, -90px); }
  70%       { transform: translate(90px, -50px); }
}

/* ─────────────────────────────────────────
   Scroll hint
───────────────────────────────────────── */
.hero-scroll-hint {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll-hint span {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, rgba(67, 48, 46, 0.4));
  margin: 0 auto;
  animation: scrollLine 2.4s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ─────────────────────────────────────────
   Buttons
───────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  letter-spacing: 0.01em;
  transition: background 0.22s, color 0.22s, transform 0.22s;
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────
   Sections
───────────────────────────────────────── */
.section { padding: 128px 0; }

.section-header { margin-bottom: 64px; }

.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.75;
}

/* ─────────────────────────────────────────
   Projects Grid
───────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* ─────────────────────────────────────────
   Project Card
───────────────────────────────────────── */
.project-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(67, 48, 46, 0.1);
  border-color: transparent;
}

.card-link { display: block; }

/* Card visual area */
.card-visual {
  position: relative;
  height: 220px;
  overflow: hidden;
}

/* Keep dark card visuals for contrast against buttermilk */
.jpmc-visual {
  background: linear-gradient(148deg, #1a0f0e 0%, #2d1a18 55%, #3d2420 100%);
}

.haleon-visual {
  background: linear-gradient(148deg, #0f1a18 0%, #1a2e2a 55%, #1e3530 100%);
}

.nhs-visual {
  background: linear-gradient(148deg, #0e1520 0%, #1a2438 55%, #1f2d48 100%);
}

/* Decorative circles */
.cv-shape {
  position: absolute;
  border-radius: 50%;
}

.jpmc-visual .cv-shape-1 {
  width: 240px; height: 240px;
  top: -80px; right: -80px;
  border: 1px solid rgba(255, 241, 181, 0.08);
}
.jpmc-visual .cv-shape-2 {
  width: 130px; height: 130px;
  bottom: -30px; left: 24px;
  background: rgba(193, 219, 232, 0.15);
}

.haleon-visual .cv-shape-1 {
  width: 200px; height: 200px;
  top: -50px; left: -50px;
  background: rgba(193, 219, 232, 0.1);
}
.haleon-visual .cv-shape-2 {
  width: 110px; height: 110px;
  bottom: 16px; right: 36px;
  border: 1px solid rgba(255, 241, 181, 0.09);
}

.nhs-visual .cv-shape-1 {
  width: 260px; height: 260px;
  top: -90px; right: -90px;
  background: rgba(193, 219, 232, 0.12);
}
.nhs-visual .cv-shape-2 {
  width: 90px; height: 90px;
  bottom: 28px; left: 44px;
  border: 1px solid rgba(255, 241, 181, 0.1);
}

.cv-label {
  position: absolute;
  bottom: 18px;
  right: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 253, 245, 0.35);
}

/* Card body */
.card-body { padding: 28px; }

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-company {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}

.card-year {
  font-size: 0.72rem;
  color: var(--muted);
}

.card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 12px;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.72;
  margin-bottom: 20px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--accent);
  color: var(--text);
  letter-spacing: 0.02em;
}

.card-arrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.22s, transform 0.22s;
}

.project-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ─────────────────────────────────────────
   About Section
───────────────────────────────────────── */
.about-section {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 80px;
  align-items: start;
}

.about-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  padding-top: 6px;
}

.about-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.015em;
  line-height: 1.22;
  margin-bottom: 28px;
}

.about-body {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.82;
  max-width: 600px;
  margin-bottom: 18px;
}

.about-body strong {
  color: var(--text);
  font-weight: 500;
}

.about-expertise {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  margin-top: 40px;
  max-width: 440px;
}

.expertise-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text);
}

.expertise-icon {
  font-size: 0.4rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   Contact Section
───────────────────────────────────────── */
.contact-section { background: var(--bg); }

.contact-inner { max-width: 640px; }

.contact-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.contact-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.contact-body {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.78;
  max-width: 460px;
  margin-bottom: 40px;
}

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-linkedin {
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.footer-linkedin:hover { color: var(--text); }

/* ─────────────────────────────────────────
   Fade-in animation
───────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────
   Case Study — Shared
───────────────────────────────────────── */
.cs-hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  border-bottom: 1px solid var(--border);
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 40px;
  transition: color 0.2s;
}

.cs-back:hover { color: var(--text); }

.cs-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.cs-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 760px;
  margin-bottom: 40px;
}

.cs-meta-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cs-meta-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}

.cs-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

/* Case study content body */
.cs-content { padding: 80px 0; }

.cs-section { margin-bottom: 88px; }

.cs-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-bottom: 16px;
}

.cs-section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 20px;
}

.cs-body {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.87;
  max-width: 680px;
}

.cs-body + .cs-body { margin-top: 16px; }

/* Image placeholder blocks — keep dark for contrast */
.cs-image-block {
  width: 100%;
  height: 420px;
  border-radius: 14px;
  margin: 56px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: rgba(255, 253, 245, 0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.img-1  { background: linear-gradient(148deg, #1a0f0e, #2d1a18, #3d2420); }
.img-2  { background: linear-gradient(148deg, #1a1210, #2a1c1a); }
.img-1b { background: linear-gradient(148deg, #0f1a18, #1a2e2a, #1e3530); }
.img-2b { background: linear-gradient(148deg, #111a18, #1c2e2a); }
.img-1c { background: linear-gradient(148deg, #0e1520, #1a2438, #1f2d48); }
.img-2c { background: linear-gradient(148deg, #101820, #1a2638); }

/* Outcome stats */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 56px 0;
}

.stat-item {
  padding: 32px 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.stat-value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 2.8rem;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Next project */
.cs-next {
  border-top: 1px solid var(--border);
  padding: 80px 0;
}

.cs-next-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.cs-next-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color 0.2s;
}

.cs-next-link:hover { color: var(--muted); }

/* ─────────────────────────────────────────
   Light Caustic Canvas
───────────────────────────────────────── */
#lightCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Ensure all page sections stack above the canvas */
.hero,
.section,
.cs-hero,
.cs-content,
.cs-next,
.footer {
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────────
   Password Gate Overlay
───────────────────────────────────────── */
.pw-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  transition: opacity 0.65s ease;
}

.pw-overlay.pw-hidden {
  display: none;
}

.pw-overlay.pw-fade-out {
  opacity: 0;
  pointer-events: none;
}

.pw-content {
  text-align: center;
  max-width: 380px;
  width: 100%;
}

.pw-icon {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 44px;
  display: inline-block;
  animation: pwPulse 5s ease-in-out infinite;
  will-change: transform;
}

@keyframes pwPulse {
  0%, 100% { transform: rotate(0deg) scale(1);    opacity: 0.65; }
  25%       { transform: rotate(90deg) scale(1.1); opacity: 1;    }
  50%       { transform: rotate(180deg) scale(1);  opacity: 0.65; }
  75%       { transform: rotate(270deg) scale(1.1); opacity: 1;   }
}

.pw-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 14px;
}

.pw-sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 8px;
}

.pw-hint {
  font-size: 0.78rem;
  color: rgba(122, 92, 90, 0.5);
  letter-spacing: 0.01em;
  margin-bottom: 52px;
}

.pw-field { position: relative; }

.pw-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text);
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text);
  padding: 10px 0;
  text-align: center;
  letter-spacing: 0.14em;
  caret-color: var(--text);
  transition: border-color 0.2s;
}

.pw-input::placeholder {
  color: rgba(122, 92, 90, 0.4);
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

.pw-error {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 16px;
  opacity: 0;
  transition: opacity 0.2s;
  letter-spacing: 0.02em;
}

.pw-input.pw-shake {
  animation: pwShake 0.45s ease;
}

@keyframes pwShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-10px); }
  40%       { transform: translateX(10px); }
  60%       { transform: translateX(-6px); }
  80%       { transform: translateX(6px); }
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .section { padding: 88px 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .about-label { display: none; }
  .cs-stats { grid-template-columns: 1fr; }
  .cs-meta-row { gap: 24px; }
  .nav-links { gap: 22px; }
}

@media (max-width: 480px) {
  .about-expertise { grid-template-columns: 1fr; }
  .card-body { padding: 20px; }
  .cs-next-link { font-size: 1.4rem; }
  .hero-title { letter-spacing: -0.015em; }
}
