/* Shared site styles: motion, hover, layout helpers, mobile */
html { scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { font-family: 'Barlow', sans-serif; }
img { max-width: 100%; }
a:hover { opacity: 1; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #1A1A1A; color: #FFFFFF; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { left: 8px; }

/* Sticky header */
header { position: sticky; top: 0; z-index: 40; transition: box-shadow .3s ease; }
header.scrolled { box-shadow: 0 6px 24px rgba(26, 26, 26, .08); }

/* Reading progress (case studies) */
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: #2EF2C9; transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }

/* Nav links: underline slides in */
nav a { position: relative; text-decoration: none !important; }
nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: #2EF2C9; transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s ease; }
nav a:hover::after, nav a:focus-visible::after { transform: scaleX(1); }
nav a::after { transform: scaleX(.999); background: currentColor; height: 1px; }
nav a:hover::after { background: #2EF2C9; height: 2px; }

/* Buttons */
a.btn { transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
a.btn:hover { transform: translateY(-2px); }
a.btn-dark:hover { background: #2EF2C9 !important; color: #1A1A1A !important; box-shadow: 0 8px 20px rgba(46, 242, 201, .35); }
a.btn-light:hover { background: #FFFFFF !important; color: #1A1A1A !important; }
a.btn-outline:hover { background: #0E9F84 !important; color: #FFFFFF !important; }

/* Text links in prev/next row */
a.arrow { transition: color .2s ease, transform .2s ease; display: inline-block; }
a.arrow:hover { color: #0E9F84 !important; }
a.arrow.next:hover { transform: translateX(4px); }
a.arrow.prev:hover { transform: translateX(-4px); }

/* Cards lift */
.lift { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
.lift:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(26, 26, 26, .10); }

/* Photo zoom */
.zoom { overflow: visible; }
.zoom img { transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s cubic-bezier(.2, .7, .2, 1); }
.zoom:hover img { transform: scale(1.04); box-shadow: 0 12px 28px rgba(0,0,0,.16), 0 24px 50px rgba(0,0,0,.08); position: relative; z-index: 2; }
.zoomable { cursor: zoom-in; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(17, 17, 17, .88); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; transform: scale(.96); transition: transform .35s cubic-bezier(.2, .7, .2, 1); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.lightbox.open img { transform: scale(1); }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid #2EF2C9; background: #1A1A1A; color: #FFFFFF; font-size: 24px; cursor: pointer; }
.lightbox .cap { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; color: #FFFFFF; font-size: 15px; padding: 0 24px; }

/* Scroll reveal */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.js .rv.from-right { transform: translateX(48px); }
.js .rv.scale { transform: scale(.97) translateY(20px); }
.js .rv.in { opacity: 1; transform: none; }

/* Hero entrance */
.js .hero-in { opacity: 0; transform: translateY(16px); animation: heroIn .9s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: var(--d, 0ms); }
@keyframes heroIn { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js .hero-in { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .lift, .lift:hover, a.btn:hover, .zoom:hover img, a.arrow:hover { transform: none !important; }
  .progress { display: none; }
}

/* Tablet */
@media (max-width: 1000px) {
  [style*="repeat(6, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="repeat(6, 1fr)"] > [style*="grid-column"] { grid-column: auto !important; }
  [style*="repeat(3, 1fr)"], [style*="repeat(4, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Phone */
@media (max-width: 680px) {
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  [style*="grid-column"] { grid-column: auto !important; }
  section[style*="padding"] { padding-left: 20px !important; padding-right: 20px !important; padding-top: 48px !important; padding-bottom: 48px !important; }
  h1 { font-size: 34px !important; line-height: 1.15 !important; }
  h2 { font-size: 26px !important; }
  [style*="min-width"] { min-width: 0 !important; }
  [style*="minmax("] { grid-template-columns: 1fr !important; }
  header > div { gap: 10px 18px !important; }
  nav { gap: 6px 18px !important; }
  .stat-num { font-size: 40px !important; }
}

/* Blueprint: shown larger inside a scrolling frame */
.bp-scroll img { max-width: none; }
.bp-scroll { -webkit-overflow-scrolling: touch; overscroll-behavior: contain auto; }

/* Case study video header */
.hero-video .hv-shade, .hero-video .hv-text { transition: opacity .4s ease; }
.hero-video.playing .hv-shade, .hero-video.playing .hv-text { opacity: 0; pointer-events: none; }
.hero-video .hv-play { transition: transform .25s ease, box-shadow .25s ease; }
.hero-video .hv-play:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
@media (max-width: 720px) { .hero-video h1 { font-size: 40px !important; } .hero-video p { font-size: 18px !important; line-height: 28px !important; } }

/* Skill tags */
.skill { transition: background .2s ease, color .2s ease, transform .2s ease; cursor: default; }
.skill:hover { background: #1F4D33 !important; color: #FFFFFF !important; transform: translateY(-1px); }

/* Global type */
body { font-family: 'Jost', sans-serif; }
button, input, select, textarea { font-family: inherit; }

/* Contact form */
.contact-wrap { padding: 72px 24px 96px; }
.contact-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.contact-title { margin: 0; font-family: 'Barlow', sans-serif; font-size: 40px; line-height: 1.2; font-weight: 600; color: #1A1A1A; }
.contact-lede { margin: 0; font-size: 17px; line-height: 28px; color: #1A1A1A; }
.contact-form { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.contact-form .hp { position: absolute; left: -9999px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-field span { font-family: 'Barlow', sans-serif; font-size: 15px; font-weight: 600; color: #1F4D33; }
.cf-field input, .cf-field select, .cf-field textarea { font: inherit; font-size: 16px; color: #1A1A1A; background: #FFFFFF; border: 1.5px solid #D6D6D6; border-radius: 10px; padding: 12px 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.cf-field textarea { resize: vertical; min-height: 140px; }
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus { outline: none; border-color: #0E9F84; box-shadow: 0 0 0 3px rgba(46, 242, 201, .25); }
.cf-submit { align-self: flex-start; font: inherit; font-size: 16px; font-weight: 700; color: #FFFFFF; background: #1A1A1A; border: 1.5px solid #2EF2C9; border-radius: 70px; min-height: 48px; padding: 0 32px; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.cf-submit:hover { background: #2EF2C9; color: #1A1A1A; transform: translateY(-2px); }
.contact-alt { margin: 8px 0 0; font-size: 15px; color: #5C5C5C; }
.contact-alt a, .cf-back { color: #1F4D33; text-underline-offset: 4px; }
@media (max-width: 640px) { .cf-row { grid-template-columns: 1fr; } .contact-title { font-size: 32px; } }
