/* Atelier A — site styles */
:root {
  --green: #0F2B1F;
  --green-2: #163A2A;
  --cream: #EDE8DC;
  --cream-dim: rgba(237, 232, 220, .58);
  --line: rgba(237, 232, 220, .18);
  --ink: #0A0F0C;
  --gutter: clamp(16px, 3.4vw, 48px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --display: 'Italiana', serif;
  --serif: 'Cormorant Garamond', serif;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--green);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Subtle film grain over everything */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 33%{transform:translate(-3%,2%)} 66%{transform:translate(2%,-3%)} 100%{transform:translate(0,0)} }

/* ---------- Type helpers ---------- */
.wm { font-family: var(--display); font-weight: 400; letter-spacing: -.02em; line-height: .92; }
.serif { font-family: var(--serif); font-weight: 300; }
.label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }
.dim { color: var(--cream-dim); }
.paren { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--cream-dim); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--green);
  display: flex; align-items: center; justify-content: center;
  transition: clip-path 1.1s var(--ease);
  clip-path: inset(0 0 0 0);
}
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader__mark { font-family: var(--display); font-size: clamp(80px, 10vw, 140px); opacity: .15; transition: opacity .3s; }
.loader__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 34px; height: 1px; background: var(--line); }
.loader__fill { height: 100%; width: 0; background: var(--cream); }
.loader__count { position: absolute; left: 0; right: 0; bottom: 46px; text-align: center; font-size: 13px; letter-spacing: .2em; font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px var(--gutter);
  mix-blend-mode: normal;
  transition: transform .6s var(--ease), background .4s;
}
.header.is-hidden { transform: translateY(-110%); }
.header.is-solid { background: rgba(15, 43, 31, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.header__mark { font-family: var(--display); font-size: 34px; line-height: 1; }
.header__nav { display: flex; gap: 36px; align-items: center; }
.header__nav a, .header__nav button { position: relative; padding: 4px 0; }
.header__nav a::after, .header__nav button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.header__nav a:hover::after, .header__nav button:hover::after, .header__nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.header__link { display: inline; }

/* ---------- Let's Chat bubble ---------- */
.chat-btn {
  position: fixed; right: var(--gutter); bottom: 32px; z-index: 60;
  width: 112px; height: 112px; border-radius: 50%;
  background: var(--cream); color: var(--green);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 11px; letter-spacing: .16em; font-weight: 600; line-height: 1.4;
  transition: transform .5s var(--ease);
}
.chat-btn:hover { transform: scale(1.08); }
.chat-btn__ring { position: absolute; inset: -10px; animation: spin 14s linear infinite; }
.chat-btn__ring text { font-size: 9.2px; letter-spacing: 3.2px; fill: var(--cream); font-family: var(--sans); text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero { height: 100svh; min-height: 560px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 var(--gutter); text-align: center; }
.hero__wm { font-size: clamp(84px, 17.4vw, 260px); white-space: nowrap; }
.hero__sub { margin-top: clamp(18px, 3vw, 40px); font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(22px, 2.4vw, 34px); }
.hero__scroll { position: absolute; left: var(--gutter); bottom: 44px; }
.hero__scroll::after { content: ""; display: block; width: 1px; height: 46px; background: var(--cream); margin-top: 12px; transform-origin: top; animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0%{transform:scaleY(0)} 50%{transform:scaleY(1);transform-origin:top} 51%{transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }

/* Letter / word reveal — masked slide up */
.split { display: inline-block; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.split.is-in .w > span { transform: translateY(0); }
.hero__wm .w > span { transition-duration: 1.4s; transition-delay: calc(var(--i) * 45ms); }

/* Generic fade-up reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* Image wipe-in with slow zoom-out */
/* The clip lives on the image, not the box, so IntersectionObserver still sees the box */
.media { overflow: hidden; position: relative; }
.media img { clip-path: inset(100% 0 0 0); transform: scale(1.18); transition: clip-path 1.4s var(--ease), transform 2.2s var(--ease); }
.media.is-in img { clip-path: inset(0 0 0 0); transform: scale(1.02); }
a:hover .media img, .card:hover .media img { transform: scale(1.07); transition-duration: 1.2s; }

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 11vw, 160px) var(--gutter); border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 300px 1fr; gap: 48px; }
.statement { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 4.4vw, 64px); line-height: 1.08; max-width: 1040px; }
.statement em { color: var(--cream-dim); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; flex-wrap: wrap; }

.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card .media { aspect-ratio: 4 / 3.4; margin: 18px 0 22px; }
.card h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 2.4vw, 34px); line-height: 1.05; margin-bottom: 12px; }
.card p { color: var(--cream-dim); max-width: 360px; }

.featured { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: end; }
.project .media { aspect-ratio: 16 / 10; }
.featured .project:last-child .media { aspect-ratio: 4 / 4.4; }
.project__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 18px; }
.project__title { font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.2vw, 32px); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 64px; }
.steps > div { border-top: 1px solid var(--line); padding-top: 20px; }
.steps p { margin-top: 12px; color: var(--cream-dim); }

.cta { text-align: center; padding-top: clamp(120px, 14vw, 200px); padding-bottom: clamp(120px, 14vw, 200px); }
.cta__title { font-size: clamp(64px, 10.5vw, 160px); margin: 24px 0 56px; }
.btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--cream); border-radius: 100px;
  padding: 18px 30px; font-size: 11px; letter-spacing: .16em; font-weight: 600; text-transform: uppercase;
  transition: background .4s var(--ease), color .4s var(--ease);
}
.btn:hover, .btn--solid { background: var(--cream); color: var(--green); }
.btn--solid:hover { background: transparent; color: var(--cream); }

.footer { padding: 36px var(--gutter); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Our Work page ---------- */
.page-head { padding: clamp(150px, 18vw, 240px) var(--gutter) 64px; }
.page-head__title { font-size: clamp(64px, 12.5vw, 180px); margin-top: 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 48px; }
.chip { border: 1px solid var(--line); border-radius: 100px; padding: 11px 20px; font-size: 13px; transition: all .35s var(--ease); }
.chip:hover { border-color: var(--cream); }
.chip.is-on { background: var(--cream); color: var(--green); border-color: var(--cream); }
.work-grid { padding: 0 var(--gutter) clamp(100px, 12vw, 160px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px 24px; }
.work-grid .project:nth-child(even) { margin-top: 120px; }
.work-grid .project.is-hidden { display: none; }

/* ---------- Contact page ---------- */
.contact { min-height: 100svh; padding: clamp(150px, 18vw, 220px) var(--gutter) 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 80px; }
.contact__title { font-size: clamp(64px, 11vw, 168px); margin-top: 16px; }
.contact__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact__cols > div { border-top: 1px solid var(--line); padding-top: 20px; }
.contact__big { font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.2vw, 30px); margin-top: 10px; display: inline-block; }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 70; background: var(--cream); color: var(--green);
  clip-path: inset(100% 0 0 0); transition: clip-path 1s var(--ease); visibility: hidden;
  display: flex; flex-direction: column; padding: 28px var(--gutter) 36px;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.menu__top { display: flex; justify-content: space-between; align-items: center; }
.menu__body { flex: 1; display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center; }
.menu__links a { display: block; font-family: var(--display); font-size: clamp(56px, 9.6vw, 140px); line-height: 1.04; overflow: hidden; }
.menu__links a span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(.25s + var(--i) * 80ms); }
.menu.is-open .menu__links a span { transform: none; }
.menu__links a:hover span { font-style: italic; }
.menu__img { aspect-ratio: 3 / 2; overflow: hidden; opacity: 0; transition: opacity 1s .5s; }
.menu.is-open .menu__img { opacity: 1; }
.menu__foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.menu .paren { color: rgba(15, 43, 31, .5); }

/* ---------- Let's Chat drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(5, 15, 10, .6); opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(760px, 100%);
  background: var(--cream); color: var(--green); padding: 40px 56px; overflow-y: auto;
  transform: translateX(100%); transition: transform .9s var(--ease);
}
.drawer.is-open { transform: none; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; }
.drawer__title { font-size: clamp(48px, 6vw, 76px); margin: 32px 0 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.field { display: block; border-bottom: 1px solid rgba(15, 43, 31, .2); padding: 20px 0 10px; transition: border-color .3s; }
.field:focus-within { border-color: var(--green); }
.field__k { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(15, 43, 31, .6); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 0; outline: 0; background: transparent; color: var(--green);
  font-family: var(--serif); font-size: 26px; font-weight: 400; padding: 2px 0;
}
.phone { display: flex; align-items: baseline; gap: 12px; }
.phone__cc { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; padding-right: 12px; border-right: 1px solid rgba(15, 43, 31, .2); cursor: pointer; }
.phone__cc-view { font-family: var(--serif); font-size: 26px; color: var(--green); white-space: nowrap; }
.phone__cc::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); opacity: .6; }
.phone__cc select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.phone__cc:focus-within { outline: 2px solid var(--green); outline-offset: 4px; }
.phone input { flex: 1; min-width: 0; }
.field textarea { resize: vertical; min-height: 96px; font-size: 22px; }
.field ::placeholder { color: rgba(15, 43, 31, .32); }
.types { margin-top: 28px; }
.types__list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.types input { position: absolute; opacity: 0; pointer-events: none; }
.types label span { display: inline-block; border: 1px solid rgba(15, 43, 31, .25); border-radius: 100px; padding: 11px 18px; font-size: 13px; cursor: pointer; transition: all .3s var(--ease); }
.types input:checked + span { background: var(--green); color: var(--cream); border-color: var(--green); }
.types input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.drawer__foot { margin-top: 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn--green { background: var(--green); color: var(--cream); border-color: var(--green); }
.btn--green:hover { background: transparent; color: var(--green); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.form-note { font-size: 13px; color: rgba(15, 43, 31, .6); }
.form-status { margin-top: 18px; font-family: var(--serif); font-size: 22px; min-height: 1.4em; }
.hp { position: absolute; left: -9999px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(2, 1fr); gap: 56px 24px; }
  .menu__body { grid-template-columns: 1fr; }
  .menu__img { display: none; }
}
@media (max-width: 760px) {
  .header { padding: 20px var(--gutter); }
  .header__link { display: none; }
  .row { grid-template-columns: 1fr; gap: 20px; }
  .services, .featured, .steps, .work-grid, .contact__cols, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .project__meta { flex-direction: column; gap: 6px; }
  .work-grid .project:nth-child(even) { margin-top: 0; }
  .work-grid { gap: 56px; }
  .chat-btn { width: 84px; height: 84px; bottom: 20px; font-size: 10px; }
  .chat-btn__ring { display: none; }
  .drawer { padding: 28px 20px; }
  .hero__scroll { bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; transition-delay: 0ms !important; }
  /* Keep the homepage intro (loader + hero reveal) even with reduced motion */
  .loader { transition-duration: 1.1s !important; }
  .hero .split .w > span { transition-duration: 1.2s !important; transition-delay: calc(var(--i) * 45ms) !important; }
}
