/* ============================================================
   Portfolio — shared shell styles
   The case-study content itself is fully inline-styled (exported
   from Claude Design), so this file only handles the wrapper:
   design tokens, the top nav, the landing page, and the footer.
   ============================================================ */

:root {
  --bg:            #FAFCFD;
  --bg-alt:        #EAF1F4;
  --ink:           #16232E;
  --ink-soft:      #29323C;
  --navy:          #091540;
  --accent:        #0B63E5;
  --accent-hover:  #0949AE;
  --muted:         rgba(22, 35, 46, 0.60);
  --hairline:      rgba(22, 35, 46, 0.14);
  --serif: 'Source Serif 4', Georgia, serif;
  --sans:  'Source Sans 3', system-ui, sans-serif;
  --maxw:  1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; }

/* ---------- Top navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  background: rgba(250, 252, 253, 0.82);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav a { text-decoration: none; }
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a { color: var(--muted); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-back:hover { color: var(--accent); }
.nav-back .arrow { font-size: 16px; line-height: 1; }

/* ============================================================
   LANDING PAGE
   ============================================================ */
@keyframes floatSlow { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(10px, -14px); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes unfold { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

.lp {
  width: 100%;
  margin: 0 auto;
  font-family: var(--sans);
  background: #FAFCFD;
  color: #1a2530;
  position: relative;
  overflow: hidden;
}
.lp a { color: #0B63E5; text-decoration: none; }
.lp a:hover { color: #091540; }

.lp-blob {
  position: absolute;
  top: 520px;
  left: -180px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 99, 229, .08), rgba(11, 99, 229, 0) 70%);
  animation: floatSlow 18s ease-in-out infinite reverse;
  pointer-events: none;
}
.hero-text { animation: fadeInUp .8s ease-out; }
.hero-text:nth-of-type(2) { animation-delay: .06s; animation-fill-mode: backwards; }
.hero-text:nth-of-type(3) { animation-delay: .14s; animation-fill-mode: backwards; }

/* Scroll reveal — content fades up as it enters the viewport.
   Scoped to .js so nothing is ever hidden if JavaScript doesn't run. */
.js .reveal-group > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1);
}
.js .reveal-group.is-visible > * { opacity: 1; transform: none; }
.js .reveal-group.is-visible > *:nth-child(1) { transition-delay: .04s; }
.js .reveal-group.is-visible > *:nth-child(2) { transition-delay: .12s; }
.js .reveal-group.is-visible > *:nth-child(3) { transition-delay: .20s; }
.js .reveal-group.is-visible > *:nth-child(4) { transition-delay: .28s; }
.js .reveal-group.is-visible > *:nth-child(5) { transition-delay: .36s; }

/* ---- nav ---- */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 48px;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  background: rgba(250, 252, 253, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(43, 36, 28, .1);
}
.lp-brand { font-family: var(--serif); font-size: 14px; font-weight: 600; color: #1a2530; }
.lp .lp-brand:hover { color: #1a2530; }
.lp-nav-right { display: flex; gap: 26px; font-size: 13px; color: #5c6570; align-items: center; }

.lp-work { position: relative; }
.lp-work-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;          /* comfortable touch target */
  padding: 0 6px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  color: #5c6570;
  transition: color .2s ease;
}
.lp-work-btn:hover,
.lp-work.is-open .lp-work-btn { color: #186FF2; }
.lp-work-arrow { display: inline-block; font-size: 9px; transition: transform .25s ease; }
.lp-work.is-open .lp-work-arrow { transform: rotate(180deg); }
.lp-work-dd { position: absolute; top: 100%; right: 0; padding-top: 4px; display: none; }
.lp-work.is-open .lp-work-dd { display: block; }
/* Hover-open only where hovering actually exists, so touch never gets stuck */
@media (hover: hover) and (pointer: fine) {
  .lp-work:hover .lp-work-dd { display: block; }
  .lp-work:hover .lp-work-arrow { transform: rotate(180deg); }
  .lp-work:hover .lp-work-btn { color: #186FF2; }
}
.lp-work-dd-inner {
  background: #fff;
  border: 1px solid rgba(43, 36, 28, .14);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(9, 21, 64, .14);
  overflow: hidden;
  min-width: 160px;
  text-align: left;
}
.lp-dd-link { display: block; padding: 10px 16px; font-size: 13px; color: #33404b; transition: background .15s ease, color .15s ease; }
.lp .lp-dd-link:hover { background: #EAF1F4; color: #F06543; }

.lp-nav-resume { font-size: 14px; font-weight: 600; color: #0B63E5; display: inline-flex; align-items: center; height: 34px; box-sizing: border-box; padding: 0 4px; }

/* ---- hero ---- */
.lp-hero {
  padding: 68px 64px;
  text-align: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: #fff;
}
/* Hero backdrop at 35% opacity. The first layer is the real image; the
   gradient underneath is a stand-in that shows until hero-bg.png exists,
   so dropping the file in assets/home/ swaps it in automatically. */
.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .20;
  pointer-events: none;
  background-image:
    url("../assets/home/hero-bg.png"),
    linear-gradient(180deg,
      #FFFFFF 0%,
      #FEFCF8 28%,
      #FCF7EC 45%,
      #FAF2E2 60%,
      #F8E9D6 74%,
      #F5DEC8 86%,
      #EFD5BE 93%,
      #DBD4CE 100%);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.lp-hero > * { position: relative; z-index: 1; }
.lp-hero-eyebrow { color: #062A60; margin-bottom: 16px; font: 600 13px/1 var(--sans); text-transform: uppercase; letter-spacing: .12em; }
.lp-hero h1 { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.35; max-width: 640px; margin: 0 auto 18px; color: #45050C; text-wrap: balance; }
.lp-hero p { font-size: 18px; line-height: 1.65; color: #45050C; max-width: 640px; margin: 0 auto; text-wrap: pretty; }

/* ---- case sections ---- */
.lp-case { padding: 72px 64px; text-align: center; position: relative; z-index: 1; }
.lp-case--alt { background: #EAF1F4; }
.lp-case--bt { border-top: 1px solid rgba(43, 36, 28, .12); }
.lp-case--bb { border-bottom: 1px solid rgba(43, 36, 28, .12); }
.lp-case-inner { max-width: 640px; margin: 0 auto; }
.lp-tag { font-size: 14px; font-weight: 600; color: #F06543; background: rgba(240, 101, 67, .1); padding: 6px 16px; border-radius: 20px; display: inline-block; margin-bottom: 16px; }
.lp-case h2 { font-family: var(--serif); font-size: 30px; font-weight: 600; color: #091540; margin: 0 0 18px; text-wrap: balance; }
.lp-case p { font-size: 18px; line-height: 1.65; color: #2a343d; margin: 0 0 24px; text-wrap: pretty; }

.lp-shot-wrap { position: relative; max-width: 91%; margin: 0 auto 8px; }
.lp-shot {
  display: block;
  border: 1px solid rgba(22, 35, 46, .14);
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(9, 21, 64, .06);
  transition: box-shadow .35s ease;
}

/* expand-to-full-screen button */
.lp-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(22, 35, 46, .14);
  border-radius: 8px;
  background: rgba(250, 252, 253, .92);
  backdrop-filter: blur(6px);
  color: #1a2530;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.lp-zoom:hover { background: #fff; transform: scale(1.06); }
.lp-zoom svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lp-shot:hover { box-shadow: 0 20px 40px rgba(9, 21, 64, .18); }
.lp-shot img { width: 100%; display: block; object-fit: cover; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.lp-shot:hover img { transform: scale(1.035); }

.lp-read { font-size: 14px; font-weight: 600; color: #0B63E5; display: inline-flex; align-items: center; gap: 6px; height: 34px; box-sizing: border-box; padding: 0 4px; }
.lp-read span { display: inline-block; transition: transform .25s ease; }
.lp-read:hover span { transform: translateX(4px); }

/* ---- closing CTA ---- */
.lp-cta {
  padding: 80px 64px 56px;
  text-align: left;
  border-top: 1px solid rgba(22, 35, 46, .14);
  position: relative;
  z-index: 1;
  background: #FFFFFF;
}
.lp-cta-inner { max-width: 880px; margin: 0 auto; display: flex; align-items: center; gap: 48px; }
.lp-cta-text { flex: 1 1 auto; min-width: 0; }
.lp-cta h2 { font-family: var(--serif); font-size: 28px; font-weight: 600; color: #45050C; margin: 0 0 8px; text-wrap: balance; }
.lp-cta-sub { font-size: 16px; line-height: 1.65; color: #5c6570; margin: 0 0 26px; text-wrap: pretty; }
.lp-cta-row { display: flex; justify-content: flex-start; gap: 24px; flex-wrap: wrap; align-items: center; }
.lp-cta-art { flex: 0 0 auto; width: 200px; height: auto; display: block; }
.lp .lp-btn { background: #1770F1; color: #fff; font-weight: 600; padding: 10px 20px; border-radius: 6px; font-size: 14px; transition: background .2s ease; }
.lp .lp-btn:hover { background: #1360d9; color: #fff; }
.lp-inline, .lp-copy {
  font-size: 14px;
  font-weight: 600;
  color: #0B63E5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  transition: color .2s ease;
}
.lp-copy:hover { color: #091540; }
.lp-inline span, .lp-copy span { display: inline-block; transition: transform .25s ease; }
.lp-inline:hover span { transform: translate(2px, -2px); }

/* ---- full-screen image viewer ---- */
body.lb-open { overflow: hidden; }
.lp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(9, 21, 64, .94);
  animation: fadeInUp .22s ease-out;
}
.lp-lightbox[hidden] { display: none; }
.lp-lightbox-body {
  position: absolute;
  inset: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 20px 24px;
}
.lp-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.lp-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(250, 252, 253, .35);
  border-radius: 8px;
  background: rgba(250, 252, 253, .1);
  color: #FAFCFD;
  cursor: pointer;
  transition: background .18s ease;
}
.lp-lightbox-close:hover { background: rgba(250, 252, 253, .22); }
.lp-lightbox-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- footer ---- */
.lp-foot {
  height: 48px;
  box-sizing: border-box;
  padding: 0 64px;
  background: #FFFFFF;
  font-size: 12px;
  color: #5c6570;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(22, 35, 46, .14);
  position: relative;
  z-index: 1;
}

/* ---- responsive ---- */
@media (max-width: 700px) {
  .lp-nav { padding: 0 20px; gap: 16px; }
  .lp-nav-right { gap: 18px; }
  .lp-hero { padding: 64px 20px 32px; }
  .lp-hero h1 { font-size: 27px; }
  .lp-hero p { font-size: 16px; }
  .lp-case { padding: 48px 20px; }
  .lp-case h2 { font-size: 24px; }
  .lp-case p { font-size: 16px; }
  .lp-shot { max-width: 100%; }
  .lp-cta { padding: 56px 20px 40px; }
  .lp-cta h2 { font-size: 23px; }
  .lp-cta-row { gap: 16px; }
  .lp-cta-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
  .lp-cta-art { width: 150px; align-self: center; }

  /* Comfortable touch targets */
  .lp-read, .lp-inline, .lp-copy, .lp-nav-resume { height: auto; min-height: 44px; }

  /* Full screen on a phone: show the dashboard at a readable size and let
     the viewer pan around it, rather than shrinking it to 350px. */
  .lp-lightbox-body { align-items: flex-start; justify-content: flex-start; padding: 64px 12px 20px; }
  .lp-lightbox img { max-width: none; max-height: none; width: 1100px; }
  .lp-foot { padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-text, .lp-blob { animation: none; }
  .lp-shot img, .lp-read span, .lp-inline span { transition: none; }
  .js .reveal-group > *,
  .js .reveal-group.is-visible > * { opacity: 1; transform: none; transition: none; }
}


/* ============================================================
   CASE-STUDY PAGE WRAPPER
   ============================================================ */
.cs-content a { color: var(--accent); text-decoration: underline; }
.cs-content a:hover { color: var(--accent-hover); }
.cs-content ::selection { background: var(--bg-alt); }
.cs-content video { display: block; }

/* prev / next between case studies */
.cs-nextprev {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--hairline);
}
.cs-nextprev a {
  padding: 40px 48px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
.cs-nextprev a:hover { background: var(--bg-alt); }
.cs-nextprev .np-k {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.cs-nextprev .np-t {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--navy);
}
.cs-nextprev .next { text-align: right; border-left: 1px solid var(--hairline); }
.cs-nextprev .np-empty { pointer-events: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: #FAFCFD;
  padding: 72px 32px 56px;
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-end;
}
.site-footer h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  margin: 0 0 12px;
  max-width: 16ch;
}
.site-footer .foot-sub { color: #B9C4D6; font-size: 16px; margin: 0; }
.site-footer .foot-contact { display: flex; flex-direction: column; gap: 10px; }
.site-footer .foot-contact a {
  color: #FAFCFD;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-footer .foot-contact a:hover { color: #5B8DEF; }
.site-footer .foot-legal {
  max-width: var(--maxw);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(185, 196, 214, 0.22);
  font-size: 13px;
  color: rgba(185, 196, 214, 0.7);
}

/* ============================================================
   RESPONSIVE — case-study pages
   ============================================================ */
@media (max-width: 860px) {
  .cs-nextprev { grid-template-columns: 1fr; }
  .cs-nextprev .next { text-align: left; border-left: 0; border-top: 1px solid var(--hairline); }
  .nav { padding: 14px 20px; }
}
