:root {
  --bg: #f3f5f1;
  --bg-2: #e7ece6;
  --ink: #101612;
  --soft: #3d4740;
  --mute: #6d776f;
  --line: rgba(16, 22, 18, 0.12);
  --accent: #0c6b5c;
  --panel: rgba(255, 255, 255, 0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Bricolage Grotesque", sans-serif;
  --sans: "Instrument Sans", sans-serif;
  --header: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 0.75rem);
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 8% -5%, rgba(12, 107, 92, 0.14), transparent 60%),
    radial-gradient(700px 480px at 100% 0%, rgba(16, 22, 18, 0.06), transparent 55%),
    linear-gradient(180deg, #f7f8f5 0%, var(--bg) 45%, var(--bg-2) 100%);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.mesh {
  position: fixed;
  inset: auto -12% -18% auto;
  width: min(42vw, 520px);
  height: min(42vw, 520px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 107, 92, 0.18), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
  animation: floaty 16s var(--ease) infinite alternate;
}

@keyframes floaty {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-12%, -8%, 0) scale(1.12); }
}

::selection { background: rgba(12, 107, 92, 0.2); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap { width: min(1200px, calc(100% - 2.5rem)); margin-inline: auto; }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.8rem 1rem; background: var(--ink); color: #fff;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--header);
  padding: 0.85rem max(1.25rem, calc((100vw - 1200px) / 2));
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(243, 245, 241, 0.78);
  backdrop-filter: blur(18px) saturate(1.15);
  border-bottom-color: var(--line);
}

.logo {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.logo span {
  margin-left: 0.15rem;
  font-size: 0.7rem;
  vertical-align: super;
  color: var(--accent);
}

.site-header nav {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  font-size: 0.92rem;
  font-weight: 500;
}

.site-header nav a {
  opacity: 0.72;
  transition: opacity 0.25s ease;
}
.site-header nav a:hover { opacity: 1; }

.header-cta {
  justify-self: end;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}

.header-cta:hover {
  background: var(--ink);
  color: #f3f5f1;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  justify-self: end;
  font-weight: 600;
}

.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  padding-top: var(--header);
}

.hero-stage {
  position: relative;
  min-height: calc(100svh - var(--header));
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  filter: saturate(0.88) contrast(1.04);
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s ease;
  will-change: opacity, transform;
}

.hero-media img.is-active {
  opacity: 1;
  z-index: 1;
}

.hero.is-ready .hero-media img.is-active {
  animation: ken 18s linear infinite alternate;
}

@keyframes ken {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.16) translate3d(0, -1.8%, 0); }
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(105deg, rgba(247, 248, 245, 0.96) 0%, rgba(247, 248, 245, 0.88) 28%, rgba(247, 248, 245, 0.55) 48%, rgba(247, 248, 245, 0.18) 68%, rgba(247, 248, 245, 0.08) 100%),
    linear-gradient(180deg, rgba(247, 248, 245, 0.55) 0%, transparent 42%, rgba(231, 236, 230, 0.72) 100%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(1200px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.4rem 0 2.8rem;
  color: var(--ink);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0.4rem -1.1rem 0.4rem -1.1rem;
  max-width: 42rem;
  background: linear-gradient(90deg, rgba(247, 248, 245, 0.82), rgba(247, 248, 245, 0.55) 70%, transparent);
  pointer-events: none;
  z-index: -1;
}

.hero-brand {
  margin-bottom: 0.75rem;
  font-family: var(--display);
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  max-width: 13ch;
  font-family: var(--display);
  font-size: clamp(2.8rem, 6.8vw, 5.6rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 32rem;
  margin-top: 1.1rem;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  font-weight: 500;
  line-height: 1.65;
  color: #2a322c;
}

.hero h1,
.hero-brand,
.hero-lead,
.hero-cta {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 0 rgba(247, 248, 245, 0.65);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.35rem;
  margin-top: 1.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.85rem 1.35rem;
  background: var(--ink);
  color: #f5f7f3;
  font-size: 0.95rem;
  font-weight: 650;
  transition: transform 0.3s var(--ease), background 0.25s ease;
}

.btn:hover { background: var(--accent); }

.text-cta {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink);
  border-bottom: 1.5px solid rgba(16, 22, 18, 0.45);
  padding-bottom: 0.2rem;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.text-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.visual-marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 1.1rem 0 0.35rem;
  background: linear-gradient(180deg, rgba(16, 22, 18, 0.04), transparent);
}

.visual-track {
  display: flex;
  gap: 0.9rem;
  width: max-content;
  animation: visualSlide 42s linear infinite;
}

.visual-marquee:hover .visual-track {
  animation-play-state: paused;
}

.visual-track figure {
  position: relative;
  width: min(280px, 68vw);
  height: 170px;
  overflow: hidden;
  background: #1a211d;
  flex: 0 0 auto;
}

.visual-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
  transition: transform 0.8s var(--ease);
}

.visual-track figure:hover img {
  transform: scale(1.06);
}

.visual-track figcaption {
  position: absolute;
  left: 0.8rem;
  bottom: 0.7rem;
  padding: 0.3rem 0.55rem;
  background: rgba(16, 22, 18, 0.72);
  color: #f5f7f3;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes visualSlide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
}

.marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  padding: 1rem 0;
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--soft);
  animation: marquee 28s linear infinite;
}

.marquee-track span { white-space: nowrap; }
.marquee-track span::after {
  content: "·";
  margin-left: 2.5rem;
  color: var(--accent);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.kicker {
  margin-bottom: 0.9rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.intro {
  position: relative;
  z-index: 2;
  padding: 6.5rem 0 5rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
}

.intro-grid h2 {
  max-width: 14ch;
}

.lede {
  max-width: 38rem;
  margin-top: 1.35rem;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--soft);
}

.expertise {
  position: relative;
  z-index: 2;
  padding: 0 0 6rem;
}

.section-top { margin-bottom: 2.5rem; }
.section-top h2 { max-width: 12ch; }

.skill-list {
  border-top: 1px solid var(--line);
}

.skill-list article {
  display: grid;
  grid-template-columns: 4rem 1.15fr 1fr;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.35s var(--ease), background 0.35s ease;
}

.skill-list article:hover {
  background: rgba(255, 255, 255, 0.4);
  padding-inline: 0.9rem;
}

.skill-list span {
  font-family: var(--display);
  font-weight: 650;
  color: var(--mute);
  padding-top: 0.25rem;
}

.skill-list h3 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.skill-list p {
  max-width: 30rem;
  color: var(--mute);
  line-height: 1.7;
}

.work {
  position: relative;
  z-index: 2;
  padding: 5.5rem 0 4.5rem;
  background: linear-gradient(180deg, rgba(16, 22, 18, 0.04), transparent 20%), #dfe6df;
}

.work-top {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
}

.work-note {
  color: var(--mute);
  font-size: 0.92rem;
  padding-bottom: 0.35rem;
}

.work-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 18vw);
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 max(1.25rem, calc((100vw - 1200px) / 2)) 0.5rem;
  scrollbar-width: thin;
  cursor: grab;
}

.work-rail.is-dragging { cursor: grabbing; }

.work-item {
  scroll-snap-align: start;
  min-height: 19.5rem;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border: 1px solid rgba(16, 22, 18, 0.14);
  background: rgba(255, 255, 255, 0.5);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s var(--ease), background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.work-rail.is-dragging .work-item {
  cursor: grabbing;
  pointer-events: none;
}

.work-logo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #eef1ec;
  border: 1px solid rgba(16, 22, 18, 0.1);
  overflow: hidden;
}

.work-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #eef1ec;
}

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.15rem 0.35rem 0.45rem;
  min-height: 5.4rem;
}

.work-meta > span:first-child {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--mute);
}

.work-item strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.work-item em {
  display: block;
  font-style: normal;
  color: #3f4842;
  font-size: 0.95rem;
  font-weight: 500;
}

.work-item:hover {
  transform: translateY(-0.45rem);
  background: var(--ink);
  border-color: var(--ink);
  color: #f5f7f3;
}

.work-item:hover .work-meta > span:first-child,
.work-item:hover em { color: rgba(245, 247, 243, 0.62); }

.work-item:hover .work-logo,
.work-item:hover .work-logo img {
  background: #e7ece6;
  border-color: rgba(245, 247, 243, 0.2);
}

.studio {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 38rem;
}

.studio-visual {
  overflow: hidden;
  background: #1b221d;
  min-height: 24rem;
}

.studio-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.04);
  transform: scale(1.04);
  transition: transform 1.1s var(--ease);
}

.studio-visual:hover img { transform: scale(1.08); }

.studio-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem clamp(1.4rem, 5vw, 4rem);
  background: #f7f8f5;
}

.studio-panel ol {
  list-style: none;
  margin-top: 2rem;
}

.studio-panel li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.9rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
}

.studio-panel b {
  font-family: var(--display);
  font-weight: 650;
  color: var(--mute);
}

.studio-panel h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.studio-panel p {
  margin-top: 0.3rem;
  color: var(--mute);
  line-height: 1.65;
}

.contact {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, 5rem);
  padding: 6.5rem 0;
}

.contact-copy p:not(.kicker) {
  max-width: 28rem;
  margin-top: 1.1rem;
  color: var(--soft);
  line-height: 1.7;
}

.mail {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(16, 22, 18, 0.25);
  padding-bottom: 0.25rem;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.mail:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-form label {
  display: block;
  margin-bottom: 1.2rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.contact-form label > span {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid rgba(16, 22, 18, 0.16);
  background: transparent;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form button {
  width: 100%;
  min-height: 3.3rem;
  margin-top: 0.4rem;
  background: var(--ink);
  color: #f5f7f3;
  font-weight: 650;
  transition: background 0.25s ease, transform 0.3s var(--ease);
}

.contact-form button:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.honeypot { display: none !important; }

footer {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 1.5rem;
  background: var(--ink);
  color: #f5f7f3;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.1fr auto;
  gap: 1.25rem;
  align-items: start;
}

.footer-grid p,
.footer-grid > div,
.top {
  color: rgba(245, 247, 243, 0.68);
  line-height: 1.8;
}

.footer-grid > div a { display: block; }
.top:hover { color: #fff; }

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(245, 247, 243, 0.12);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 247, 243, 0.42);
}

/* Motion helpers */
[data-reveal],
[data-split] {
  opacity: 1;
  transform: none;
}

.js-motion [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 1.6rem, 0);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--delay, 0) * 80ms);
}

.js-motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.js-motion [data-delay="1"] { --delay: 1; }
.js-motion [data-delay="2"] { --delay: 2; }
.js-motion [data-delay="3"] { --delay: 3; }

.js-motion [data-split] .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.js-motion [data-split] .word > span {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  transition: transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms);
}

.js-motion [data-split].is-in .word > span {
  transform: none;
}

@media (max-width: 980px) {
  .intro-grid,
  .skill-list article,
  .studio,
  .contact,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .skill-list article p { grid-column: 2; }
  .work-top { flex-direction: column; align-items: start; }
  .work-rail { grid-auto-columns: minmax(220px, 70vw); }
}

@media (max-width: 760px) {
  .wrap, .hero-copy { width: calc(100% - 1.75rem); }

  .site-header {
    grid-template-columns: 1fr auto;
    padding-inline: 1rem;
  }

  .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    background: rgba(243, 245, 241, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .site-header nav.is-open { display: flex; }
  .header-cta { display: none; }
  .menu-button { display: inline-flex; }

  .hero-copy { padding: 3rem 0 3.5rem; }
  .intro, .expertise, .work, .contact { padding-block: 4rem; }
  .footer-meta { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mesh,
  .hero-media img,
  .visual-track { animation: none !important; }
  .js-motion [data-reveal],
  .js-motion [data-split] .word > span {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
