/* ═══════════════════════════════════════════════
   Matthew Lett - Portfolio
   Editorial light theme · Fraunces + Inter
   ═══════════════════════════════════════════════ */

:root {
  --bg:        #fbfaf8;
  --bg-alt:    #f2f0ec;
  --surface:   #ffffff;
  --line:      rgba(20, 18, 12, 0.12);
  --text:      #17150f;
  --text-dim:  #5d594e;
  --accent:    #a2690e;   /* deep amber, readable on white */
  --accent-soft: rgba(162, 105, 14, 0.10);
  --serif: "Fraunces", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

::selection { background: var(--accent); color: #ffffff; }

/* film grain */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 999; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ─── Header ─── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.35s, padding 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(251, 250, 248, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.7rem 0;
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark {
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--serif); font-weight: 600; font-size: 0.85rem;
  color: var(--accent); letter-spacing: 0.02em;
}
.brand-name { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  font-size: 0.92rem; color: var(--text-dim);
  transition: color 0.25s;
  position: relative;
}
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.site-nav .nav-cta {
  color: #ffffff; background: var(--accent);
  padding: 0.55rem 1.2rem; border-radius: 100px; font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.site-nav .nav-cta:hover { background: #8a5a0e; color: #ffffff; transform: translateY(-2px); }
.site-nav .nav-cta.active::after { display: none; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--text); margin: 6px 0; transition: transform 0.3s, opacity 0.3s; }

/* ─── Hero ─── */
.hero { position: relative; padding: clamp(9rem, 18vh, 13rem) 0 clamp(3rem, 7vh, 5rem); overflow: hidden; }
.page-hero { position: relative; padding: clamp(8rem, 16vh, 11rem) 0 clamp(2rem, 5vh, 3.5rem); }

.hero-glow {
  position: absolute; top: -20%; right: -10%;
  width: 55vw; height: 55vw; max-width: 800px; max-height: 800px;
  background: radial-gradient(circle, rgba(162, 105, 14, 0.10) 0%, transparent 65%);
  pointer-events: none;
}

.hero-kicker {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 1.8rem;
}
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero-kicker .crumb { letter-spacing: 0.05em; text-transform: none; font-size: 0.95rem; color: var(--text-dim); transition: color 0.25s; }
.hero-kicker .crumb:hover { color: var(--accent); }

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 2.2rem;
}
.hero-grid .hero-title { font-size: clamp(2.4rem, 4.6vw, 4.5rem); }
.hero-title .line { display: block; }
.hero-title em { font-style: italic; color: var(--accent); }

.hero-sub { display: flex; align-items: flex-start; gap: 1.6rem; max-width: 44rem; margin-bottom: 2.4rem; }
.hero-sub p { color: var(--text-dim); font-size: 1.1rem; }
.hero-sub strong { color: var(--text); }

/* Hero portrait column */
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.75fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-visual { position: relative; justify-self: end; width: min(100%, 420px); }
.portrait-frame {
  position: relative;
  border-radius: 50%;   /* simple circle */
  overflow: hidden;
  border: 1px solid rgba(162, 105, 14, 0.40);
  box-shadow: 0 24px 60px rgba(20, 16, 8, 0.14), 0 0 0 10px rgba(162, 105, 14, 0.05);
  background: linear-gradient(180deg, rgba(162, 105, 14, 0.12), rgba(162, 105, 14, 0.02));
}
.portrait-frame img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; object-position: center 20%; display: block; }

.float-chip {
  position: absolute;
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.65rem 1.1rem; border-radius: 100px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(162, 105, 14, 0.35);
  font-size: 0.88rem; color: var(--text-dim); white-space: nowrap;
  box-shadow: 0 12px 32px rgba(20, 16, 8, 0.14);
  animation: chip-float 5.5s ease-in-out infinite;
}
.float-chip strong { font-family: var(--serif); color: var(--accent); font-size: 1.15rem; }
.chip-users  { top: 14%; left: -3.4rem; }
.chip-awards { bottom: 9%; right: -2.2rem; animation-delay: -2.7s; }
@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) { .float-chip { animation: none; } }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.7rem; border-radius: 100px;
  font-weight: 600; font-size: 0.98rem; font-family: var(--sans);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
}
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: #8a5a0e; transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ─── Stats ─── */
.stats-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 2.4rem 1rem; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-num {
  display: block; font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--accent); line-height: 1.1; font-weight: 500;
}
.stat-label { font-size: 0.88rem; color: var(--text-dim); letter-spacing: 0.04em; }

/* ─── Sections ─── */
.section { padding: clamp(4rem, 10vh, 7rem) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.section-kicker {
  font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.9rem;
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.12; letter-spacing: -0.015em;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-foot { margin-top: 3rem; }

/* ─── Featured work cards ─── */
.work-list { display: flex; flex-direction: column; gap: clamp(2rem, 5vh, 3.5rem); }
.work-card {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--bg-alt);
  transition: border-color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s;
}
.work-card:hover { border-color: rgba(162, 105, 14, 0.45); transform: translateY(-4px); box-shadow: 0 24px 60px rgba(20, 16, 8, 0.10); }
.work-card:nth-child(even) { grid-template-columns: 1fr 1.15fr; }
.work-card:nth-child(even) .work-media { order: 2; }

.work-media { overflow: hidden; border-radius: 12px; aspect-ratio: 16/10; }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.work-card:hover .work-media img { transform: scale(1.05); }

.work-index { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1rem; }
.work-meta { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin: 0.5rem 0 0.7rem; }
.work-body h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; margin-bottom: 0.8rem; }
.work-teaser { color: var(--text-dim); font-size: 1rem; margin-bottom: 1.2rem; }
.work-metric {
  display: inline-block; font-size: 0.92rem; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 100px; padding: 0.4rem 1rem;
  background: var(--accent-soft);
}
.work-metric strong { color: var(--accent); font-family: var(--serif); font-size: 1.05rem; margin-right: 0.3rem; }

/* ─── Quote band ─── */
.quote-band { padding: clamp(4rem, 10vh, 7rem) 0; background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quote-band blockquote { max-width: 56rem; margin: 0 auto; text-align: center; }
.quote-band p {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.35; letter-spacing: -0.01em;
}
.quote-band em { font-style: italic; color: var(--accent); }
.quote-band cite { display: block; margin-top: 1.6rem; font-style: normal; font-size: 0.95rem; color: var(--text-dim); letter-spacing: 0.08em; }

/* ─── Expertise ─── */
.expertise-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.exp-card {
  padding: 2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-alt);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.exp-card:hover { border-color: rgba(162, 105, 14, 0.4); transform: translateY(-3px); }
.exp-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; margin-bottom: 0.6rem; }
.exp-card p { color: var(--text-dim); font-size: 0.98rem; }

/* ─── Logo band ─── */
.logo-band { padding: 3.5rem 0 5.5rem; text-align: center; }
.logo-band-label { font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 1.6rem; }
.logo-row { display: flex; justify-content: center; gap: clamp(1.5rem, 5vw, 4rem); flex-wrap: wrap; }
.logo-row span {
  font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: var(--text-dim); opacity: 0.75; letter-spacing: 0.01em;
  transition: color 0.3s, opacity 0.3s;
}
.logo-row span:hover { color: var(--text); opacity: 1; }

/* Award credibility spot (Sage-style, centered under the logos) */
.award-spot {
  margin-top: 3.5rem; padding-top: 3rem;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
}
.award-spot img { width: clamp(150px, 18vw, 200px); height: auto; }
.award-line { font-size: 1.05rem; color: var(--text); }
.award-line strong { font-family: var(--serif); font-style: italic; color: var(--accent); }
.award-line span { display: block; font-size: 0.9rem; color: var(--text-dim); margin-top: 0.3rem; }

/* ─── About page ─── */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about-photo img { border-radius: 18px; }
.about-photo figcaption { margin-top: 0.8rem; font-size: 0.85rem; color: var(--text-dim); }
.about-copy p { font-size: 1.15rem; color: var(--text-dim); margin-bottom: 1.4rem; }
.about-copy strong { color: var(--text); }

.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: grid; grid-template-columns: 90px 1fr; gap: clamp(1rem, 4vw, 3rem);
  padding: 2.2rem 0; border-bottom: 1px solid var(--line);
}
.tl-item:last-child { border-bottom: 0; }
.tl-when { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.05rem; padding-top: 0.3rem; }
.tl-body h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; margin-bottom: 0.5rem; }
.tl-body h3 span { font-family: var(--sans); font-weight: 400; font-size: 1rem; color: var(--text-dim); }
.tl-body p { color: var(--text-dim); max-width: 46rem; }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.8rem; list-style: none; }
.chip-list li {
  padding: 0.6rem 1.3rem; border: 1px solid var(--line); border-radius: 100px;
  font-size: 0.95rem; color: var(--text-dim); background: var(--bg-alt);
  transition: border-color 0.25s, color 0.25s;
}
.chip-list li:hover { border-color: var(--accent); color: var(--text); }

.award-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.award-copy p:last-child { color: var(--text-dim); margin-top: 1.2rem; max-width: 34rem; }
.award-photo img { border-radius: 18px; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery figure { overflow: hidden; border-radius: 14px; position: relative; }
.gallery img { aspect-ratio: 3/4; object-fit: cover; width: 100%; transition: transform 0.6s var(--ease); }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem 1rem 0.8rem; font-size: 0.85rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

/* ─── Work grid page ─── */
.filter-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2.8rem; }
.filter-btn {
  padding: 0.55rem 1.3rem; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text-dim);
  font-family: var(--sans); font-size: 0.92rem;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #ffffff; font-weight: 600; }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-card {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-alt);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s, opacity 0.3s;
}
.grid-card:hover { border-color: rgba(162, 105, 14, 0.45); transform: translateY(-4px); box-shadow: 0 18px 44px rgba(20, 16, 8, 0.10); }
.grid-card.hidden { display: none; }
.grid-media { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.grid-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.grid-card:hover .grid-media img { transform: scale(1.05); }
.grid-tag {
  position: absolute; top: 0.9rem; left: 0.9rem;
  padding: 0.3rem 0.85rem; font-size: 0.78rem; letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 100px; color: var(--text);
}
.grid-body { padding: 1.4rem 1.4rem 1.6rem; }
.grid-body h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.25; margin-bottom: 0.9rem; }
.grid-body .work-meta { margin-top: 0; }

/* ─── Case study detail ─── */
.cs-hero { padding-bottom: clamp(1.5rem, 4vh, 2.5rem); }
.cs-cover .container { max-width: var(--container); }
.cs-cover img { width: 100%; max-height: 620px; object-fit: cover; border-radius: 20px; border: 1px solid var(--line); }

/* Meta band: project facts up top, full-width content below */
.cs-meta-band { padding: clamp(1.5rem, 4vh, 2.5rem) 0 0; }
.cs-meta-bar {
  display: grid;
  grid-template-columns: 220px repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem 2.2rem; align-items: start;
  padding: 1.8rem clamp(1.2rem, 2.5vw, 2rem);
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--bg-alt);
}
.cs-meta-bar .cs-meta-metric { grid-row: span 2; }
.cs-content-wide { max-width: 100%; }
.cs-content-wide .cs-section p,
.cs-content-wide .cs-points li,
.cs-content-wide .cs-section h2 { max-width: 62rem; }
.cs-meta-block h4 {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.35rem; font-weight: 600;
}
.cs-meta-block p { color: var(--text-dim); font-size: 0.98rem; }
.cs-meta-block a { color: var(--text); border-bottom: 1px solid var(--line); transition: border-color 0.25s, color 0.25s; }
.cs-meta-block a:hover { color: var(--accent); border-color: var(--accent); }
.cs-meta-metric { padding: 1.4rem; border: 1px solid var(--line); border-radius: 14px; background: var(--accent-soft); }
.cs-meta-metric .stat-num { font-size: 2.4rem; }

.cs-section { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.cs-section h2 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1rem; letter-spacing: -0.01em;
}
.cs-num { font-style: italic; color: var(--accent); font-weight: 400; margin-right: 0.5rem; font-size: 0.8em; }
.cs-section p { color: var(--text-dim); font-size: 1.08rem; max-width: 46rem; }

.cs-title .line { font-size: 0.82em; }
.cs-intro .cs-lead { color: var(--text); font-size: 1.16rem; line-height: 1.75; }
.cs-section .section-kicker { margin-bottom: 0.6rem; }
.cs-section p + p { margin-top: 1rem; }
.cs-points { list-style: none; margin: 1.4rem 0 0.4rem; display: flex; flex-direction: column; gap: 1rem; }
.cs-points li {
  position: relative; padding-left: 1.6rem;
  color: var(--text-dim); font-size: 1.04rem; max-width: 46rem;
}
.cs-points li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); opacity: 0.85;
}
.cs-points strong { color: var(--text); font-weight: 600; }
.cs-points .pt-d { color: var(--text-dim); }
.cs-imgs { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 1.2rem; }
.cs-imgs-grid { display: grid; grid-template-columns: repeat(2, 1fr); align-items: start; }
.cs-img { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-alt); }
.cs-img img { width: 100%; display: block; }
.cs-credits { border-top: 1px solid var(--line); padding-top: 2.5rem; }
.credit-list { display: flex; flex-direction: column; margin-top: 0.5rem; }
.credit-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.credit-row:last-child { border-bottom: 0; }
.credit-row dt { color: var(--accent); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em; }
.credit-row dd { color: var(--text-dim); font-size: 0.98rem; margin: 0; }

.outcome-list { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.outcome-list li {
  position: relative; padding: 1.1rem 1.3rem 1.1rem 3rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-alt);
  color: var(--text); font-size: 1.02rem;
}
.outcome-list li::before {
  content: "✓"; position: absolute; left: 1.2rem; top: 1.05rem;
  color: var(--accent); font-weight: 700;
}

.cs-pager { border-top: 1px solid var(--line); }
.cs-pager-inner { display: grid; grid-template-columns: 1fr 1fr; }
.pager-link {
  padding: 2.4rem clamp(1rem, 3vw, 2.5rem);
  display: flex; flex-direction: column; gap: 0.4rem;
  transition: background 0.3s;
}
.pager-link:hover { background: var(--bg-alt); }
.pager-link span { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.pager-link strong { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.pager-next { text-align: right; border-left: 1px solid var(--line); }

/* ─── Insights ─── */
.insight-list { display: flex; flex-direction: column; }
.insight-card {
  display: grid; grid-template-columns: 70px 1fr 50px; gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center; padding: 2.2rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, padding 0.3s var(--ease);
}
.insight-card:first-child { border-top: 1px solid var(--line); }
.insight-card:hover { background: var(--bg-alt); padding-left: 1.2rem; }
.insight-num { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--accent); }
.insight-body .grid-tag { position: static; display: inline-block; margin-bottom: 0.7rem; }
.insight-body h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 0.5rem; }
.insight-body p { color: var(--text-dim); max-width: 46rem; font-size: 1rem; }
.insight-arrow { font-size: 1.5rem; color: var(--text-dim); transition: transform 0.3s var(--ease), color 0.3s; }
.insight-card:hover .insight-arrow { transform: translateX(6px); color: var(--accent); }

/* ─── Contact ─── */
.contact-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 1.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0.03em; }
.field input, .field textarea {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.95rem 1.1rem; color: var(--text);
  font-family: var(--sans); font-size: 1rem; resize: vertical;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.contact-form .btn { align-self: flex-start; }

.form-success {
  padding: 3rem; border: 1px solid rgba(162, 105, 14, 0.4); border-radius: 18px;
  background: var(--accent-soft); text-align: center;
}
.form-success h2 { font-family: var(--serif); font-weight: 500; font-size: 1.9rem; margin-bottom: 0.6rem; color: var(--accent); }
.form-success p { color: var(--text-dim); }
.form-error {
  padding: 1rem 1.3rem; margin-bottom: 1.4rem;
  border: 1px solid rgba(180, 50, 50, 0.4); border-radius: 12px;
  background: rgba(180, 50, 50, 0.07); color: #a83232; font-size: 0.95rem;
}
.contact-info { display: flex; flex-direction: column; gap: 1.8rem; padding-top: 0.4rem; }

/* ─── Footer ─── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: clamp(4rem, 9vh, 6rem) 0 2rem; }
.footer-cta { text-align: center; margin-bottom: clamp(3.5rem, 8vh, 5.5rem); }
.footer-kicker { font-size: 0.9rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 1rem; }
.footer-big-link {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(2.4rem, 7vw, 5rem); color: var(--text); letter-spacing: -0.02em;
  transition: color 0.3s;
}
.footer-big-link:hover { color: var(--accent); }
.footer-big-link .arrow { display: inline-block; transition: transform 0.35s var(--ease); font-style: normal; }
.footer-big-link:hover .arrow { transform: translateX(12px); }

.footer-grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr 1fr; gap: 2.5rem;
  padding: 2.5rem 0; border-top: 1px solid var(--line);
}
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.footer-col a { color: var(--text-dim); font-size: 0.95rem; transition: color 0.25s; }
.footer-col a:hover { color: var(--accent); }
.footer-id p { color: var(--text-dim); font-size: 0.95rem; margin-top: 0.8rem; }
.footer-address { color: var(--text-dim); font-size: 0.85rem; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.8rem; border-top: 1px solid var(--line);
  font-size: 0.83rem; color: var(--text-dim);
}

/* ─── Reveal animations ─── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .grain { animation: none; }
  html { scroll-behavior: auto; }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .hero { padding-top: 7.5rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-content { order: 1; }
  .hero-visual { order: 2; justify-self: center; width: min(62vw, 280px); margin-top: 2rem; }
  .portrait-frame { border-radius: 50%; }
  .portrait-frame img { max-height: 330px; }
  .float-chip { font-size: 0.8rem; padding: 0.5rem 0.9rem; }
  .float-chip strong { font-size: 1rem; }
  .chip-users  { left: -1.6rem; top: 10%; }
  .chip-awards { right: -1.6rem; }
  .work-card, .work-card:nth-child(even) { grid-template-columns: 1fr; }
  .work-card:nth-child(even) .work-media { order: 0; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .about-grid, .award-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cs-meta-bar { grid-template-columns: 1fr 1fr; }
  .cs-meta-bar .cs-meta-metric { grid-row: auto; grid-column: 1 / -1; }
  .credit-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .cs-imgs-grid { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .site-nav {
    position: fixed; inset: 0; z-index: -1;
    background: rgba(251, 250, 248, 0.97); backdrop-filter: blur(16px);
    flex-direction: column; justify-content: center; gap: 2.2rem;
    opacity: 0; pointer-events: none; transition: opacity 0.35s;
  }
  .site-nav a { font-size: 1.4rem; }
  body.nav-open .site-nav { opacity: 1; pointer-events: auto; z-index: 99; }
  body.nav-open { overflow: hidden; }
  /* backdrop-filter on the scrolled header would trap the fixed nav overlay
     inside the header's box; disable it while the menu is open */
  body.nav-open .site-header,
  body.nav-open .site-header.scrolled {
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background: transparent; border-bottom-color: transparent;
  }
  .nav-toggle { display: block; position: relative; z-index: 100; }
  body.nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  body.nav-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .hero-sub { flex-direction: column; }
  .work-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .cs-pager-inner { grid-template-columns: 1fr; }
  .pager-next { border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .insight-card { grid-template-columns: 1fr; gap: 0.6rem; }
  .insight-arrow { display: none; }
  .gallery { grid-template-columns: 1fr; }
}
