:root {
  --bg: #f6f4ee;
  --fg: #26302a;
  --muted: #7a8279;
  --line: rgba(38, 48, 42, 0.12);
  --card: #ebe8df;
  --a: #7f9a80;   /* sage */
  --b: #5f7d64;   /* moss */
  --c: #d9a89b;   /* blush */
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--sans); font-size: 0.72rem; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; }
.grad { font-style: italic; color: var(--b); }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
main, footer, .nav { position: relative; z-index: 1; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px clamp(16px, 4vw, 56px);
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(246,244,238,0.85), rgba(246,244,238,0));
}
.logo { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; letter-spacing: 0.02em; }
.logo span { color: var(--a); }
.nav nav { display: flex; gap: clamp(16px, 3vw, 40px); align-items: center; font-size: 0.9rem; letter-spacing: 0.04em; }
.nav nav a { color: var(--muted); transition: color .3s; }
.nav nav a:hover { color: var(--fg); }
.pill { border: 1px solid var(--line); padding: 8px 20px; border-radius: 999px; color: var(--fg) !important; transition: background .3s, border-color .3s; }
.pill:hover { background: #fff; border-color: transparent; }

/* Hero */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 140px clamp(16px, 6vw, 112px) 96px;
  max-width: 1400px;
}
.eyebrow { color: var(--b); margin-bottom: 28px; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(3rem, 9vw, 7.5rem); line-height: 0.98; letter-spacing: -0.015em; }
h1 .line { display: block; opacity: 0; transform: translateY(24px); animation: rise 1.4s var(--ease) forwards; }
h1 .line:nth-child(2) { animation-delay: .15s; }
h1 .line:nth-child(3) { animation-delay: .3s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.lede { max-width: 480px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.15rem); margin-top: 32px; }
.cta { display: flex; gap: 14px; margin-top: 44px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 30px; border-radius: 999px; font-weight: 400; letter-spacing: 0.03em;
  transition: transform .4s var(--ease), box-shadow .4s, background .3s, color .3s;
}
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.primary:hover { transform: translateY(-2px); background: var(--b); box-shadow: 0 16px 40px -18px rgba(63,90,68,.6); }
.btn.ghost { border: 1px solid var(--line); background: rgba(255,255,255,0.4); backdrop-filter: blur(6px); }
.btn.ghost:hover { background: #fff; }
.btn.large { font-family: var(--serif); font-size: clamp(1.1rem, 3vw, 1.9rem); padding: 18px clamp(20px, 6vw, 44px); max-width: 100%; margin-top: 48px; }
.scroll-hint { position: absolute; bottom: 36px; left: clamp(16px, 6vw, 112px); color: var(--muted); display: flex; align-items: center; gap: 12px; }
.scroll-hint span { width: 48px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.scroll-hint span::after { content: ""; position: absolute; inset: 0; background: var(--a); animation: slide 2.6s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Marquee */

/* Sections */
.section { padding: clamp(96px, 13vw, 180px) clamp(16px, 6vw, 112px); max-width: 1400px; margin: 0 auto; }
.section-head { margin-bottom: 64px; }
h2 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); letter-spacing: -0.01em; line-height: 1.05; }
h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; letter-spacing: 0; }

/* Gallery — justified rows: each item grows by its aspect ratio, so every row shares one height */
.section-note { color: var(--muted); max-width: 540px; margin-top: 20px; }
.gallery { display: flex; flex-direction: column; gap: 20px; }
/* Let the picture areas run ~10% wider than the text column, without ever touching the screen edge */
.gallery, .carousel { --grow: max(0px, min(5%, (100vw - 100%) / 2 - 16px)); width: calc(100% + 2 * var(--grow)); margin-inline: calc(-1 * var(--grow)); }
.row { display: flex; gap: 20px; }
.item {
  flex: var(--ar) 1 0; aspect-ratio: var(--ar); max-width: 100%; min-width: 0;
  position: relative; overflow: hidden; border-radius: 6px;
  background: var(--card); cursor: zoom-in;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transition: transform .8s var(--ease), box-shadow .8s;
  box-shadow: 0 1px 2px rgba(38,48,42,.04);
  will-change: transform;
}
.item:hover { --s: 1.008; box-shadow: 0 30px 60px -30px rgba(38,48,42,.35); }
.item img, .item video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.6s var(--ease); }
.item:not(.compare):hover img, .item:hover video { transform: scale(1.03); }
.item::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(600px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.12), transparent 50%);
}
.item:hover::after { opacity: 1; }
.item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; pointer-events: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 56px 22px 18px; color: #fff;
  background: linear-gradient(to top, rgba(28,36,30,.55), transparent);
  opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease);
}
.item:hover figcaption, .item:focus-within figcaption { opacity: 1; transform: none; }
.item figcaption h3 { font-size: 1.35rem; }
.item figcaption p { color: rgba(255,255,255,.85); }
.item:focus-visible { outline: 1px solid var(--b); outline-offset: 4px; }

/* Before/after compare */
.item.compare { cursor: ew-resize; --pos: 50%; }
.compare .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 4; margin: 0; }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; margin-left: -0.5px; background: rgba(255,255,255,.9); z-index: 2; pointer-events: none; }
.compare .handle::before {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.75); backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px -6px rgba(38,48,42,.35);
  font-size: 1.1rem; letter-spacing: 2px; color: var(--fg);
}
.compare input:focus-visible ~ .handle::before { box-shadow: 0 0 0 3px var(--a); }
.tag { position: absolute; top: 16px; z-index: 2; pointer-events: none; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.7); color: var(--fg); backdrop-filter: blur(8px); }
.tag-l { left: 16px; } .tag-r { right: 16px; }
/* Shrink the slider labels on small pictures so they don't run into each other; full size from ~440px wide up */
.compare { container-type: inline-size; }
.compare .tag { font-size: clamp(8px, 3cqi, .72rem); padding: clamp(3px, 1.1cqi, 5px) clamp(6px, 2.7cqi, 12px); top: clamp(6px, 3.6cqi, 16px); }
.compare .tag-l { left: clamp(6px, 3.6cqi, 16px); } .compare .tag-r { right: clamp(6px, 3.6cqi, 16px); }

/* Lightbox */
.lightbox { margin: auto; width: 100vw; height: 100vh; max-width: none; max-height: none; border: 0; padding: 0; background: rgba(246,244,238,.97); color: var(--fg); }
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; align-items: center; animation: fade .4s ease; }
.lightbox::backdrop { background: rgba(246,244,238,.6); backdrop-filter: blur(10px); }
@keyframes fade { from { opacity: 0; } }
.lb-stage { grid-column: 2; height: 100%; min-width: 0; display: grid; place-items: center; padding: 56px 0 8px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 4px; box-shadow: 0 40px 80px -40px rgba(38,48,42,.45); animation: zoomin .5s var(--ease); }
/* Full-size before/after slider */
.lb-compare { position: relative; width: min(100%, calc((100vh - 120px) * var(--ar))); aspect-ratio: var(--ar); border-radius: 4px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(38,48,42,.45); animation: zoomin .5s var(--ease); }
.lb-stage .lb-compare img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border-radius: 0; box-shadow: none; animation: none; }
@keyframes zoomin { from { transform: scale(.97); opacity: 0; } }
.lb-caption { grid-column: 1 / -1; text-align: center; padding: 12px 16px 24px; color: var(--muted); }
.lightbox button { background: none; border: 0; color: var(--fg); cursor: pointer; font: inherit; }
.lb-nav { font-family: var(--serif); font-size: 2.8rem; width: 64px; height: 100%; opacity: .45; transition: opacity .3s; }
.lb-nav:hover, .lb-nav:focus-visible { opacity: 1; }
.lb-prev { grid-column: 1; } .lb-next { grid-column: 3; }
.lb-close { position: absolute; top: 12px; right: 16px; font-size: 2rem; font-weight: 300; width: 44px; height: 44px; z-index: 1; }

@media (hover: none) { .item figcaption { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .row { flex-direction: column; }
  .item { flex: none; width: 100%; }
  .lb-nav { width: 40px; font-size: 2rem; }
}

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about .section-head { margin-bottom: 0; }
.about-body > p { font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.5; color: var(--fg); }
.about-body > p + p { margin-top: 1em; }
/* One column on the left, clear of the flower on the right (About me page, Company section) */
.about-left { grid-template-columns: minmax(0, min(600px, 52vw)); gap: 40px; }
@media (max-width: 800px) { .about-left { grid-template-columns: minmax(0, 1fr); } }
.about-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 48px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.stats div { border-top: 1px solid var(--line); padding-top: 20px; }
.stats strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 4.5vw, 3.6rem); line-height: 1.1; }
.stats strong::after { content: "+"; color: var(--a); }
.stats span { color: var(--muted); }

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; perspective: 1200px; }
.service {
  padding: 36px 32px; border-radius: 6px; border: 1px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -35px rgba(38,48,42,.35);
  transform-style: preserve-3d; transition: transform .3s ease-out, background .4s;
  position: relative; overflow: hidden;
}
.service:hover { background: rgba(255,255,255,.8); }
.service::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(127,154,128,0.12), transparent 50%);
}
.service .num { color: var(--a); }
.service h3 { margin: 56px 0 10px; transform: translateZ(20px); }
.service p { color: var(--muted); transform: translateZ(12px); }

/* Contact */
.contact { text-align: center; min-height: 90vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.big { font-size: clamp(2.8rem, 9vw, 7rem); line-height: 1; }
.socials { display: flex; gap: 32px; margin-top: 44px; flex-wrap: wrap; justify-content: center; }
.socials a { color: var(--muted); border-bottom: 1px solid transparent; padding-bottom: 2px; transition: all .3s; }
.socials a:hover { color: var(--fg); border-color: var(--a); }

footer { text-align: center; padding: 36px 16px; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.2s ease, transform 1.2s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .nav nav a:not(.pill):not(.keep) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  h1 .line { opacity: 1; transform: none; }
}

/* Portfolio page */
.page-top { padding-top: clamp(140px, 16vw, 200px); }
.page-title { font-size: clamp(2.4rem, 5.5vw, 4.4rem); letter-spacing: -0.01em; line-height: 1.05; }
.more { margin-top: 48px; text-align: center; }
.nav nav a[aria-current="page"] { color: var(--fg); }

/* Featured carousel — one slide visible, arrows either side */
.carousel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.car-window { overflow: hidden; border-radius: 6px; min-width: 0; }
.car-track { display: flex; transform: translateX(calc(var(--i, 0) * -100%)); transition: transform .5s ease; }
.car-track .item { flex: 0 0 100%; }
.car-nav {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  background: rgba(255,255,255,.55); backdrop-filter: blur(8px); color: var(--fg);
  font-family: var(--serif); font-size: 2.5rem; line-height: 1; padding-bottom: 4px; display: grid; place-items: center;
  transition: background .3s, transform .4s var(--ease);
}
.car-nav:hover { background: #fff; transform: scale(1.06); }
.car-nav:focus-visible { outline: 1px solid var(--b); outline-offset: 3px; }
.car-count { grid-column: 1 / -1; text-align: center; color: var(--muted); }
@media (max-width: 700px) {
  .carousel { grid-template-columns: 1fr 1fr; }
  .car-window { grid-column: 1 / -1; grid-row: 1; }
  .car-prev { grid-row: 2; justify-self: start; }
  .car-next { grid-row: 2; justify-self: end; }
  .car-count { grid-row: 2; }
}
