/* ============================================================
   Taylor Rasnic — Portfolio design system
   Edit tokens below to retheme the entire site.
   ============================================================ */

:root {
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --ink: #1C1B1A;
  --ink-soft: #52504C;
  --ink-faint: #8A8783;
  --line: #E7E4DE;
  --accent: #0E6A5F;
  --accent-soft: #E3F0EC;
  --accent-ink: #0A4A43;
  --amber: #B98A2F;
  --amber-soft: #F6EEDC;
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1080px;
  --maxw-text: 720px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 132px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-text { max-width: var(--maxw-text); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.15rem;
  color: var(--ink); text-decoration: none;
  letter-spacing: -0.01em;
}
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent-ink); }
.nav-cta {
  background: var(--ink); color: #fff !important;
  padding: 8px 16px; border-radius: 999px; font-size: 0.9rem !important;
}
.nav-cta:hover { background: var(--accent-ink); }

/* ---------- Hero (home) ---------- */
.hero { padding: 96px 0 72px; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 999px; padding: 6px 14px;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 500; line-height: 1.12; letter-spacing: -0.02em;
  max-width: 17ch;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede {
  margin-top: 24px; max-width: 56ch;
  font-size: 1.15rem; color: var(--ink-soft);
}
.hero-meta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero.hero-centered .wrap { text-align: center; max-width: 920px; }
.hero.hero-centered .kicker { display: inline-flex; }
.hero.hero-centered .hero-meta { justify-content: center; }
.hero.hero-centered h1 { max-width: none; margin-left: auto; margin-right: auto; }
.hero.hero-centered h1 em { white-space: nowrap; }
.hero.hero-centered .lede { max-width: 68ch; margin-left: auto; margin-right: auto; }
.chip {
  font-size: 0.85rem; font-weight: 500; color: var(--ink-soft);
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 6px 14px;
}

/* ---------- Section scaffolding ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 36px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.9rem; letter-spacing: -0.01em;
}
.section-head .count { color: var(--ink-faint); font-size: 0.95rem; }

/* ---------- Case study cards ---------- */
.card-grid { display: grid; gap: 28px; }
.cs-card {
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.cs-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(14, 106, 95, 0.10);
  transform: translateY(-2px);
}
.cs-card .cs-media { min-height: 280px; background: var(--accent-soft); position: relative; }
.cs-card .cs-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-card .cs-body { padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.cs-card .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: #fff; background: var(--accent);
  padding: 4px 10px; border-radius: 999px;
}
.tag.neutral { color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); }
.tag.status { color: #7A5A14; background: var(--amber-soft); }
.cs-card h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em;
}
.cs-card p { color: var(--ink-soft); font-size: 0.98rem; }
.cs-card .cs-link { margin-top: auto; font-weight: 600; font-size: 0.95rem; color: var(--accent-ink); }
.cs-card .cs-link::after { content: " →"; }

/* ---------- About strip (home) ---------- */
.about-strip { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-grid h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; margin-bottom: 18px; }
.about-grid p { color: var(--ink-soft); margin-bottom: 16px; }
.fact-list { list-style: none; display: grid; gap: 14px; }
.fact-list li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 18px; font-size: 0.95rem; color: var(--ink-soft);
}
.fact-list li strong { color: var(--ink); font-weight: 600; }

/* ---------- Case study pages ---------- */
.cs-hero { padding: 80px 0 48px; }
.cs-hero.with-visual {
  padding-bottom: 200px;
  background: linear-gradient(180deg, #E7F1ED 0%, #F1F5F2 62%, var(--bg) 100%);
}
.cs-hero.with-visual + .figure { margin-top: -152px; }
.cs-hero.with-visual + .figure img {
  box-shadow: 0 28px 64px rgba(10, 74, 67, 0.18);
  border-color: rgba(14, 106, 95, 0.22);
}
.cs-hero .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cs-hero h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.15; letter-spacing: -0.02em;
  max-width: 22ch;
}
.cs-hero .lede { margin-top: 20px; font-size: 1.15rem; color: var(--ink-soft); max-width: 58ch; }

.cs-facts {
  margin: 40px auto 0; max-width: var(--maxw);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.cs-facts div { background: var(--surface); padding: 18px 20px; }
.cs-facts dt {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px;
}
.cs-facts dd { font-size: 0.95rem; color: var(--ink); }

.cs-section { padding: 40px 0; }
.cs-section h2 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.7rem;
  letter-spacing: -0.01em; margin-bottom: 18px;
}
.cs-section h3 { font-size: 1.1rem; font-weight: 600; margin: 28px 0 10px; }
.cs-section p { color: var(--ink-soft); margin-bottom: 16px; max-width: 66ch; }
.cs-section ul { margin: 0 0 16px 20px; color: var(--ink-soft); }
.cs-section li { margin-bottom: 8px; max-width: 62ch; }

.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}

/* Figures: full-width visual slots */
.figure { margin: 32px auto; max-width: var(--maxw); padding: 0 24px; }
.figure img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line); display: block;
  background: var(--surface);
}
.figure figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--ink-faint); }

/* Paired figures: two screenshots side by side */
.figure-pair {
  margin: 32px auto; max-width: var(--maxw); padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start;
}
.figure-pair figure { margin: 0; }
.figure-pair img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line); display: block;
  background: var(--surface);
}
.figure-pair figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--ink-faint); }
@media (max-width: 760px) {
  .figure-pair { grid-template-columns: 1fr; }
}

/* Callout */
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px; margin: 24px 0; max-width: 66ch;
}
.callout p { margin: 0; color: var(--accent-ink); }

/* Outcome band */
.outcome-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 40px; margin: 24px 0; }
.outcome-band h2 { color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; margin-bottom: 20px; }
.outcome-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.outcome-grid .num { font-family: var(--font-display); font-size: 2.1rem; color: #8FD6C9; line-height: 1.1; }
.outcome-grid .label { font-size: 0.92rem; color: rgba(255,255,255,0.75); margin-top: 6px; }

/* Next case study footer */
.cs-next { border-top: 1px solid var(--line); padding: 48px 0; }
.cs-next a { text-decoration: none; }
.cs-next .eyebrow { color: var(--ink-faint); }
.cs-next h2 {
  font-family: var(--font-display); font-weight: 500; font-size: 1.8rem; color: var(--ink);
}
.cs-next a:hover h2 { color: var(--accent-ink); }

/* ---------- Contact / footer ---------- */
.contact { border-top: 1px solid var(--line); padding: 80px 0; text-align: center; }
.contact h2 { font-family: var(--font-display); font-weight: 500; font-size: 2.2rem; margin-bottom: 14px; }
.contact p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 28px; }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.98rem;
  padding: 13px 26px; border-radius: 999px;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.site-footer p { font-size: 0.88rem; color: var(--ink-faint); }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: 0.88rem; }
.site-footer a:hover { color: var(--accent-ink); }

/* ---------- About page ---------- */
.about-page { padding: 80px 0; }
.about-page .about-layout { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.headshot { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.about-page h1 { font-family: var(--font-display); font-weight: 500; font-size: 2.4rem; margin-bottom: 20px; letter-spacing: -0.01em; }
.about-page p { color: var(--ink-soft); margin-bottom: 16px; max-width: 62ch; }

/* ---------- Case study: floating section nav ---------- */
.cs-subnav {
  position: sticky; top: 64px; z-index: 40;
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.cs-subnav .wrap {
  display: flex; gap: 4px; align-items: center;
  overflow-x: auto; scrollbar-width: none;
  padding-top: 10px; padding-bottom: 10px;
}
.cs-subnav .wrap::-webkit-scrollbar { display: none; }
.cs-subnav .toc-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); margin-right: 8px; white-space: nowrap; flex-shrink: 0;
}
.cs-subnav a {
  white-space: nowrap; text-decoration: none; flex-shrink: 0;
  font-size: 0.84rem; font-weight: 500; color: var(--ink-soft);
  padding: 5px 12px; border-radius: 999px;
  transition: background 140ms ease, color 140ms ease;
}
.cs-subnav a:hover { color: var(--accent-ink); background: var(--accent-soft); }
.cs-subnav a.active { background: var(--ink); color: #fff; }

/* ---------- Case study: alternating section bands ---------- */
.cs-section.alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Visual placeholder cards (swap for real images) ---------- */
.viz {
  margin: 30px 0 8px;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background: linear-gradient(0deg, rgba(14,106,95,0.045), rgba(14,106,95,0.045)), var(--surface);
  padding: 22px 26px;
  max-width: 100%;
}
.viz-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.viz-badge {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 3px 9px; border-radius: 5px;
}
.viz-file {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem; color: var(--accent-ink);
  background: var(--accent-soft); padding: 2px 8px; border-radius: 5px;
}
.viz h4 { margin: 12px 0 6px; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.viz p { font-size: 0.93rem; color: var(--ink-soft); margin: 0 0 8px; max-width: none; line-height: 1.55; }
.viz p strong { color: var(--ink); }
.viz .viz-meta { font-size: 0.8rem; color: var(--ink-faint); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cs-card { grid-template-columns: 1fr; }
  .cs-card .cs-media { min-height: 220px; }
  .about-grid, .about-page .about-layout { grid-template-columns: 1fr; }
  .cs-facts { grid-template-columns: repeat(2, 1fr); }
  .outcome-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding: 64px 0 48px; }
}

/* Case study hero: collage backdrop */
.cs-hero.hero-collage {
  position: relative; padding: 72px 0 64px; overflow: hidden;
  background: linear-gradient(180deg, #E7F1ED 0%, #EEF3F0 100%);
}
.hero-backdrop { position: absolute; right: -340px; top: -140px; width: 900px; transform: rotate(-8deg); }
.hero-backdrop .bcol { display: flex; flex-direction: column; gap: 20px; width: 400px; float: left; margin-right: 20px; }
.hero-backdrop .bcol:first-child { margin-top: 120px; }
.hero-backdrop img { width: 100%; border-radius: 8px; box-shadow: 0 10px 28px rgba(10, 74, 67, 0.14); display: block; }
.hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #E9F2EF 0%, #E9F2EF 46%, rgba(233,242,239,0.72) 58%, rgba(233,242,239,0) 78%);
}
.cs-hero.hero-collage .wrap, .cs-hero.hero-collage .cs-facts { position: relative; }
.cs-hero.hero-collage h1 { max-width: 20ch; }
.cs-hero.hero-collage .lede { max-width: 52ch; }
.cs-hero.hero-collage .cs-facts { margin-top: 44px; }
.cs-hero.hero-collage .cs-facts div { background: rgba(255, 255, 255, 0.94); }
@media (max-width: 900px) {
  .hero-backdrop, .hero-fade { display: none; }
  .cs-hero.hero-collage h1 { max-width: 22ch; }
  .cs-hero.hero-collage .lede { max-width: 58ch; }
}

/* Lightbox */
.lightbox-target { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(28, 27, 26, 0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 44px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1680px, 95vw); max-height: 92vh;
  width: auto; height: auto; display: block;
  border-radius: 8px; background: #fff;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}
.lightbox-close {
  position: fixed; top: 16px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.14); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }
body.lightbox-open { overflow: hidden; }

/* AI-purple variant of the collage hero (Record Insights) */
.cs-hero.hero-collage.ai { background: linear-gradient(180deg, #EFEAF7 0%, #F2F0F6 100%); }
.cs-hero.hero-collage.ai .hero-fade {
  background: linear-gradient(90deg, #EFEAF7 0%, #EFEAF7 46%, rgba(239,234,247,0.72) 58%, rgba(239,234,247,0) 78%);
}
.cs-hero.hero-collage.ai .hero-backdrop img { box-shadow: 0 10px 28px rgba(92, 45, 145, 0.14); }

/* Case study password gate */
.cs-gate {
  position: fixed; inset: 0; z-index: 500;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.cs-gate.hidden { display: none; }
.cs-gate-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  max-width: 420px; width: 100%; padding: 40px 32px; text-align: center;
  box-shadow: 0 20px 50px rgba(28,27,26,0.12);
}
.cs-gate-card .lock { font-size: 2rem; margin-bottom: 16px; }
.cs-gate-card h2 {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; margin-bottom: 10px;
}
.cs-gate-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 24px; }
.cs-gate-form { display: flex; flex-direction: column; gap: 12px; }
.cs-gate-form input[type="password"] {
  font-family: var(--font-body); font-size: 1rem; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; text-align: center;
}
.cs-gate-form input[type="password"]:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-gate-form button {
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; padding: 12px 14px;
  border-radius: 10px; border: none; background: var(--accent); color: #fff; cursor: pointer;
}
.cs-gate-form button:hover { opacity: 0.92; }
.cs-gate-error { color: #B3261E; font-size: 0.85rem; min-height: 18px; }
.cs-gate-contact { margin-top: 18px; font-size: 0.85rem; color: var(--ink-faint); }
.cs-gate-contact a { color: var(--accent-ink); }
body.cs-locked { overflow: hidden; }

/* Home page: locked case study cards — generalized copy, no real screenshot,
   no identifying title/description, until the NDA password is entered */
.cs-media.locked-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--accent);
}
.cs-media.locked-panel.purple { background: #EFEAF7; color: #5C2D91; }
.locked-panel svg { opacity: 0.55; }
.locked-panel .locked-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint);
}
