@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600&display=swap");

:root {
  --ink: #17171B;
  --green: #1F9D74;
  --ivory: #F3EFE6;
  --ivory-2: #E8E2D5;
  --muted: #5d5d63;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ivory); color: var(--ink);
  font: 300 17px/1.6 "Sora", system-ui, sans-serif;
}
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 80px; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  background: var(--ink); color: var(--ivory);
}
.brand { display: block; line-height: 0; margin-left: -6px; }
.brand img { height: 40px; width: auto; }
@media (max-width: 720px) { .brand img { height: 34px; } }
#site-nav { display: flex; align-items: center; gap: 28px; }
#site-nav > a, .nav-toggle { line-height: 1.6; }
#site-nav a { text-decoration: none; font-size: 15px; opacity: .75; transition: opacity .15s; }
#site-nav a:hover, #site-nav a[aria-current="page"] { opacity: 1; }
#site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--green); }
.nav-group { position: relative; }
.nav-toggle { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-size: 15px;
  opacity: .75; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: opacity .15s; }
.nav-toggle span { font-size: 10px; line-height: 1; transition: transform .2s; }
.nav-toggle:hover, .nav-group.open .nav-toggle { opacity: 1; }
.nav-group.open .nav-toggle span { transform: rotate(180deg); }
.nav-sub { display: none; position: absolute; right: 0; top: calc(100% + 14px); min-width: 210px; z-index: 20;
  background: var(--ink); border: 1px solid rgba(243,239,230,.14); border-radius: 8px; padding: 6px;
  box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.nav-group.open .nav-sub { display: grid; }
@media (hover: hover) and (min-width: 721px) {
  .nav-group:hover .nav-sub { display: grid; }
  .nav-group::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; }
}
#site-nav .nav-sub a { opacity: .85; padding: 9px 12px; border-radius: 5px; white-space: nowrap; }
#site-nav .nav-sub a:hover { opacity: 1; background: rgba(243,239,230,.08); color: var(--green); }
.nav-sub small { opacity: .5; font-size: 12px; }
.menu-btn { display: none; background: none; border: 1px solid rgba(243,239,230,.4);
  color: var(--ivory); font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; cursor: pointer; }

@media (max-width: 720px) {
  .menu-btn { display: block; }
  #site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--ink); padding: 8px var(--gutter) 20px; }
  .site-header.open #site-nav { display: flex; align-items: stretch; }
  #site-nav a { padding: 12px 0; font-size: 18px; border-top: 1px solid rgba(243,239,230,.12); }
  #site-nav a[aria-current="page"] { box-shadow: none; color: var(--green); }
  .nav-toggle { font-size: 18px; padding: 12px 0; width: 100%; justify-content: space-between;
    border-top: 1px solid rgba(243,239,230,.12); opacity: .75; }
  .nav-sub { position: static; border: 0; box-shadow: none; padding: 0 0 6px 14px; min-width: 0; }
  #site-nav .nav-sub a { font-size: 16px; padding: 10px 0; border-top: 0; }
}

/* ---- Footer ---- */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 28px var(--gutter); background: var(--ink); color: var(--ivory); font-size: 14px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.site-footer a { text-decoration: none; opacity: .8; }
.site-footer a:hover { opacity: 1; color: var(--green); }

/* ---- Type ---- */
h1, h2 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.page-title { font-size: clamp(32px, 5vw, 52px); margin: 64px 0 8px; }
.page-sub { color: var(--muted); margin: 0 0 40px; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--green); font-weight: 600; }

/* ---- Home ---- */
.hero { padding: clamp(56px, 10vw, 120px) 0 48px; }
.hero h1 { font-size: clamp(38px, 7vw, 84px); max-width: 14ch; }
.hero h1 span { color: var(--green); }
.hero p { font-size: clamp(18px, 2vw, 21px); max-width: 40ch; margin: 28px 0 0; color: var(--muted); }
.hero-img { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: 6px; background: var(--ivory-2); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 72px 0 24px; }
.section-head h2 { font-size: 28px; }
.more { font-size: 15px; text-decoration: none; border-bottom: 1px solid var(--green); padding-bottom: 2px; }

/* ---- Show cards ---- */
.empty { color: var(--muted); }
.cards { display: grid; gap: 20px; }
.cards--home { grid-template-columns: repeat(2, 1fr); }
.cards--home .card { aspect-ratio: 16/10; }
@media (max-width: 640px) { .cards--home { grid-template-columns: 1fr; } }
.cards--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.cards--feature { grid-template-columns: repeat(6, 1fr); gap: 24px; }
.cards--feature .card { grid-column: span 3; }
.cards--feature .card--feature { grid-column: 1 / -1; }
.cards--feature .card--third { grid-column: span 2; aspect-ratio: 4/3; }
.cards--feature .card--wide { grid-column: 1 / -1; aspect-ratio: 21/9; }
@media (max-width: 760px) { .cards--feature { grid-template-columns: 1fr; }
  .cards--feature .card, .cards--feature .card--third, .cards--feature .card--wide { grid-column: auto; aspect-ratio: 4/3; } }

.card { position: relative; border-radius: 8px; overflow: hidden; background: #0d0d10;
  aspect-ratio: 4/3; isolation: isolate;
  opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.card.in { opacity: 1; transform: none; }
.card[hidden] { display: none; }
.cards--feature .card { aspect-ratio: 16/10; }
.card--third h3 { font-size: clamp(18px, 1.8vw, 22px); }
.cards--feature .card--feature { aspect-ratio: 21/9; }
@media (max-width: 760px) { .cards--feature .card--feature { aspect-ratio: 4/3; } }

.card-media { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s ease; }
.card-bg { position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(28px) brightness(.55) saturate(1.2); display: none; }
.card.is-fit .card-bg { display: block; }
.card.is-fit .card-media img { object-fit: contain; padding: 18px 18px 96px; }
.card--feature.is-fit .card-media img { padding-bottom: 140px; }
.card:hover .card-media img { transform: scale(1.045); }
.card.is-fit:hover .card-media img { transform: scale(1.02); }

.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(to top, rgba(13,13,16,.92) 0%, rgba(13,13,16,.55) 28%, rgba(13,13,16,0) 58%); }
.card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px 24px;
  color: var(--ivory); pointer-events: none; display: grid; gap: 8px; justify-items: start; }
.card-body a { pointer-events: auto; text-decoration: none; }
.card-body a:hover { color: var(--green); }
.card h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; line-height: 1.1;
  font-size: clamp(20px, 2.2vw, 26px); text-wrap: balance; }
.card--feature h3 { font-size: clamp(30px, 5vw, 60px); }
.card-num { display: none; }
.cards--feature .card-num { display: block; font-size: 13px; letter-spacing: .14em; opacity: .6; font-weight: 400; order: -2; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(243,239,230,.28); background: rgba(23,23,27,.35); backdrop-filter: blur(6px); }
.role { margin: 0; font-size: 13px; color: var(--green); }
.live { order: -1; display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; color: #7fe0bd; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(31,157,116,.7);
  animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(31,157,116,0); } 100% { box-shadow: 0 0 0 0 rgba(31,157,116,0); } }
@media (prefers-reduced-motion: reduce) {
  .card { opacity: 1; transform: none; transition: none; } .live i { animation: none; }
  .card:hover .card-media img { transform: none; } }

/* ---- Stage pages (Projects / Past) ---- */
body.stage { background: var(--ink); color: var(--ivory); }
body.stage main { overflow-x: clip; }
body.stage .site-footer { border-top: 1px solid rgba(243,239,230,.1); }
.stage-head { position: relative; padding: clamp(56px, 9vw, 112px) 0 clamp(32px, 5vw, 56px); }
.stage-head::before { content: ""; position: absolute; z-index: -1; top: -80px; left: 50%; width: min(900px, 120vw); height: 520px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(31,157,116,.22), rgba(31,157,116,0) 65%); }
.stage-head h1 { font-size: clamp(44px, 9vw, 112px); letter-spacing: -0.035em; line-height: .95; margin: 14px 0 0; }
.stage-head h1 span { color: var(--green); }
.stage-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 24px;
  color: rgba(243,239,230,.65); font-size: 16px; }
.stage-meta strong { color: var(--ivory); font-weight: 600; }
.stage-meta .sep { width: 32px; height: 1px; background: rgba(243,239,230,.3); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 28px; margin: 0 calc(-1 * var(--gutter));
  padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; color: var(--ivory); background: transparent;
  border: 1px solid rgba(243,239,230,.22); transition: background .2s, border-color .2s, color .2s; }
.chip span { font-size: 12px; opacity: .55; }
.chip:hover { border-color: rgba(243,239,230,.5); }
.chip[aria-pressed="true"] { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.stage-cta { margin: 80px 0 0; padding-top: 40px; border-top: 1px solid rgba(243,239,230,.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.stage-cta p { margin: 0; font-size: clamp(20px, 2.6vw, 28px); font-weight: 400; max-width: 28ch; }
.stage-cta a { color: var(--ivory); text-decoration: none; border-bottom: 2px solid var(--green); padding-bottom: 3px; font-size: 16px; }
.stage-cta a:hover { color: var(--green); }

/* ---- About / Contact ---- */
.split { display: grid; gap: 48px; grid-template-columns: 1fr 1fr; align-items: start; margin-top: 64px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.split img { width: 100%; border-radius: 6px; }
.prose p { margin: 0 0 1.1em; max-width: 52ch; }
.prose .lead { font-size: 21px; font-weight: 400; }
.btn { display: inline-block; margin-top: 12px; padding: 12px 26px; border-radius: 999px;
  background: var(--ink); color: var(--ivory); text-decoration: none; font-weight: 400; font-size: 15px; }
.btn:hover { background: var(--green); }
.contact-big { font-size: clamp(22px, 4vw, 40px); font-weight: 600; word-break: break-word;
  text-decoration: none; border-bottom: 3px solid var(--green); }

/* ---- Lightbox ---- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  background: rgba(23,23,27,.94); padding: 24px; }
.lightbox.on { display: flex; }
.lightbox figure { margin: 0; text-align: center; color: var(--ivory); }
.lightbox img { max-height: 82vh; max-width: min(90vw, 700px); margin: 0 auto; border-radius: 4px; }
.lightbox figcaption { margin-top: 14px; font-size: 15px; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--ivory);
  font-size: 44px; line-height: 1; cursor: pointer; padding: 12px; opacity: .8; }
.lightbox button:hover { opacity: 1; color: var(--green); }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---- Home option 2: cross-fading hero ---- */
.hero-fade { position: relative; height: min(88vh, 860px); min-height: 520px; overflow: hidden;
  background: var(--ink); color: var(--ivory); display: flex; align-items: flex-end; }
.hero-fade-media, .hf { position: absolute; inset: 0; }
.hf { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06);
  transition: opacity 1.2s ease-in-out, transform 6.5s linear; }
.hf.on { opacity: 1; transform: scale(1); }
.hero-fade::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(23,23,27,.92) 0%, rgba(23,23,27,.55) 35%, rgba(23,23,27,.1) 70%),
              linear-gradient(to right, rgba(23,23,27,.55), rgba(23,23,27,0) 60%); }
.hero-fade-copy { position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter) clamp(40px, 8vh, 88px); }
.hero-fade-copy h1 { font-size: clamp(38px, 7vw, 92px); max-width: 13ch; letter-spacing: -0.03em; line-height: 1; }
.hero-fade-copy h1 span { color: var(--green); }
.hero-fade-copy p { font-size: clamp(17px, 2vw, 21px); max-width: 40ch; margin: 22px 0 0; color: rgba(243,239,230,.8); }
.home-v2 main .section-head { margin-top: 64px; }
@media (prefers-reduced-motion: reduce) {
  .hf { transition: none; transform: none; }
}
