/* ==========================================================================
   Rana Chehabeddine Architect — public site
   --------------------------------------------------------------------------
   An editorial, architecture-studio look: a high-contrast serif for display
   (Cormorant Garamond), a geometric sans for reading (Jost), the studio's
   beige as the single accent, generous space, photographs first.
   No framework, no jQuery.

   The page sections are an administrator's own HTML with their own <style>
   blocks, and some of those reset `*` or restyle `body`. So everything in the
   chrome below sets its own margins, padding and alignment rather than
   inheriting them, and every class is prefixed (site-, nav-, hero-, pf-,
   prj-, cta-, ftr-, pg-) so it cannot collide with a section's names.
   ========================================================================== */

:root {
  --accent:      #9c8267;
  --accent-dark: #7a6450;
  --accent-soft: #e9dfd3;
  --ink:         #1b1a18;
  --ink-2:       #4f4a44;
  --ink-3:       #8a837b;
  --line:        #e4ddd3;
  --cream:       #fef9f3;
  --paper:       #ffffff;
  --night:       #161514;
  --night-2:     #22201e;

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans:  "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1240px;
  --gutter:    clamp(18px, 4vw, 40px);
  --header-h:  84px;
  --radius:    4px;
  --ease:      cubic-bezier(.22, .61, .36, 1);
  --ease-out:  cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
::selection { background: var(--accent); color: #fff; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 1000;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  text-decoration: none; font: 500 14px/1 var(--sans);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Shared type ---------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 18px;
  font: 500 12px/1.4 var(--sans); letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent-dark);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.display {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(38px, 5.4vw, 72px); line-height: 1.04; letter-spacing: -.01em; color: var(--ink);
}
.display em { font-style: italic; color: var(--accent); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 50px; padding: 0 28px; margin: 0;
  border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: #fff;
  font: 500 13px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
  transition: color .4s var(--ease), border-color .4s var(--ease), background-color .4s var(--ease);
}
.btn i { transition: transform .4s var(--ease); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover i { transform: translateX(4px); }
.btn--light { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn--accent { background: var(--accent); border-color: var(--accent); }
.btn--accent:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); }

/* Scroll progress -------------------------------------------------------- */
.scroll-progress {
  position: fixed; left: 0; top: 0; z-index: 400; height: 2px; width: 100%;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

/* ==========================================================================
   Header
   Fixed. Over a full-screen hero it starts transparent with white type and
   turns solid once the page scrolls; everywhere else it is solid from the
   start and the page leaves room for it.
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--header-h);
  background: rgba(254, 249, 243, .92);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(27, 26, 24, .06);
  text-align: left;
  transition: background-color .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
}
body:not(.has-hero) main { padding-top: var(--header-h); }

.has-hero .site-header:not(.is-solid) {
  background: transparent; border-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 28px; }

.brand { display: inline-flex; align-items: center; line-height: 0; flex: none; }
.brand img { width: 168px; height: auto; transition: filter .45s var(--ease); }
.has-hero .site-header:not(.is-solid) .brand img { filter: brightness(0) invert(1); }
.brand-text { font: 500 24px/1.1 var(--serif); color: var(--ink); }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav li { margin: 0; padding: 0; }
.main-nav a {
  position: relative; display: block; padding: 10px 14px;
  font: 400 15px/1.2 var(--sans); letter-spacing: .02em;
  color: var(--ink); text-decoration: none; transition: color .3s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.main-nav a.is-active { color: var(--accent-dark); }
.has-hero .site-header:not(.is-solid) .main-nav a { color: #fff; }

.header-cta { min-height: 44px; padding: 0 20px; font-size: 12px; }
.has-hero .site-header:not(.is-solid) .header-cta { background: transparent; border-color: rgba(255,255,255,.75); }
.has-hero .site-header:not(.is-solid) .header-cta:hover { background: #fff; color: var(--ink); }

.nav-toggle {
  display: none; position: relative; z-index: 260; width: 48px; height: 48px;
  margin: 0 -10px 0 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink);
}
.has-hero .site-header:not(.is-solid) .nav-toggle { color: #fff; }
.nav-toggle-bar {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor;
  transition: transform .45s var(--ease), opacity .3s, top .45s var(--ease);
}
.nav-toggle-bar:nth-child(1) { top: 18px; }
.nav-toggle-bar:nth-child(2) { top: 24px; right: 20px; }
.nav-toggle-bar:nth-child(3) { top: 30px; }
.nav-open .nav-toggle { color: #fff; }
.nav-open .nav-toggle-bar:nth-child(1) { top: 24px; transform: rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { top: 24px; transform: rotate(-45deg); }

/* Full-screen menu (phones and tablets) */
.nav-overlay {
  position: fixed; inset: 0; z-index: 190;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 24px) var(--gutter) 36px;
  background: var(--night); color: #fff;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .7s var(--ease-out), visibility 0s linear .7s;
  overflow-y: auto;
}
.nav-open .nav-overlay { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .7s var(--ease-out); }
.nav-overlay ol { list-style: none; margin: 0; padding: 0; counter-reset: nav; }
.nav-overlay li { margin: 0; padding: 0; overflow: hidden; counter-increment: nav; }
.nav-overlay nav a {
  display: flex; align-items: baseline; gap: 16px; padding: 8px 0;
  font: 400 clamp(34px, 9vw, 54px)/1.1 var(--serif); color: #fff; text-decoration: none;
  transform: translateY(100%); transition: transform .7s var(--ease-out), color .3s;
}
.nav-overlay nav a::before { content: "0" counter(nav); font: 400 12px/1 var(--sans); letter-spacing: .2em; color: var(--accent); }
.nav-overlay nav a.is-active, .nav-overlay nav a:hover { color: var(--accent); }
.nav-open .nav-overlay nav a { transform: none; }
.nav-open .nav-overlay li:nth-child(2) a { transition-delay: .05s; }
.nav-open .nav-overlay li:nth-child(3) a { transition-delay: .1s; }
.nav-open .nav-overlay li:nth-child(4) a { transition-delay: .15s; }
.nav-open .nav-overlay li:nth-child(5) a { transition-delay: .2s; }
.nav-open .nav-overlay li:nth-child(6) a { transition-delay: .25s; }
.nav-open .nav-overlay li:nth-child(7) a { transition-delay: .3s; }
.nav-overlay-foot { display: grid; gap: 6px; margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: 15px; }
.nav-overlay-foot a { color: rgba(255,255,255,.75); text-decoration: none; }
.nav-overlay-foot a:hover { color: #fff; }
.nav-overlay-foot .ftr-social { margin-top: 10px; }

@media (max-width: 1080px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
  .nav-open .site-header { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; }
  .nav-open .brand img { filter: brightness(0) invert(1); }
}
@media (min-width: 1081px) { .nav-overlay { display: none; } }
@media (max-width: 600px) {
  :root { --header-h: 70px; }
  .brand img { width: 138px; }
}

.site-notice {
  position: fixed; left: 50%; bottom: 84px; z-index: 320; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 11px 20px; border-radius: 999px;
  background: #1f7a54; color: #fff; font: 500 14px/1.4 var(--sans);
  box-shadow: 0 10px 26px rgba(0,0,0,.22); animation: notice-out .4s ease 4s forwards;
}
@keyframes notice-out { to { opacity: 0; visibility: hidden; } }

/* ==========================================================================
   Page sections
   ========================================================================== */
.pg-section { position: relative; }
.pg-section--prose, .pg-section--heading, .pg-section--projects, .pg-section--clients { padding: clamp(64px, 9vw, 120px) 0; }
.pg-section--heading { padding-bottom: 0; }
.pg-section--heading + .pg-section--clients { padding-top: 32px; }

.section-head { max-width: 760px; margin: 0 auto clamp(36px, 5vw, 60px); text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-title { margin: 0; font: 500 clamp(34px, 4.4vw, 56px)/1.08 var(--serif); letter-spacing: -.01em; color: var(--ink); text-align: center; }
.section-intro { margin: 18px auto 0; max-width: 680px; color: var(--ink-2); font-size: 17px; }
.section-intro p { margin: 0 0 1em; }

.prose { font-size: 17px; color: var(--ink-2); text-align: left; max-width: 820px; margin: 0 auto; }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.2; margin: 1.4em 0 .5em; }
.prose h2 { font-size: 36px; } .prose h3 { font-size: 28px; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.4em; }

/* The migrated HTML sections: same type for their big headings as the rest
   of the site, and nothing allowed to push the page sideways on a phone. */
.pg-section--html { overflow-x: clip; }
.pg-section--html h1, .pg-section--html h2 { font-family: var(--serif) !important; font-weight: 500 !important; letter-spacing: -.01em; }
.pg-section--html img { max-width: 100%; }
.pg-section--html .aboutus-section { overflow: hidden; }
.pg-section--html .aboutus-text { min-width: 0; max-width: 100%; }
@media (max-width: 600px) {
  .pg-section--html h2 { font-size: clamp(30px, 8vw, 38px) !important; }
}

/* ==========================================================================
   Hero slider
   ========================================================================== */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--night); color: #fff; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.4s var(--ease), visibility 1.4s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-media {
  position: absolute; inset: -2%; background-size: cover; background-position: center; background-repeat: no-repeat;
  transform: scale(1.12); will-change: transform;
}
.hero-slide.is-active .hero-media { animation: kenburns 9s linear forwards; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,9,8,.55) 0%, rgba(10,9,8,0) 28%),
    linear-gradient(0deg, rgba(10,9,8,.78) 0%, rgba(10,9,8,.25) 45%, rgba(10,9,8,0) 70%);
}
.hero-content { position: absolute; left: 0; right: 0; bottom: clamp(110px, 16vh, 160px); z-index: 2; }
.hero-eyebrow { color: rgba(255,255,255,.82); }
.hero-title {
  margin: 0; max-width: 17ch; font: 400 clamp(40px, 6.2vw, 92px)/1.02 var(--serif); letter-spacing: -.015em; color: #fff;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: block; transform: translateY(105%); }
.hero-slide.is-active .hero-title .line > span { animation: rise 1.1s var(--ease-out) forwards; }
.hero-slide.is-active .hero-title .line:nth-child(2) > span { animation-delay: .12s; }
.hero-slide.is-active .hero-title .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { to { transform: none; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; opacity: 0; }
.hero-slide.is-active .hero-actions { animation: fade-up .9s var(--ease-out) .45s forwards; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero-ui { position: absolute; left: 0; right: 0; bottom: 34px; z-index: 3; }
.hero-ui .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-counter { display: flex; align-items: center; gap: 14px; font: 400 14px/1 var(--sans); letter-spacing: .14em; color: rgba(255,255,255,.75); }
.hero-counter b { font-weight: 500; color: #fff; }
.hero-progress { position: relative; width: clamp(80px, 14vw, 180px); height: 1px; background: rgba(255,255,255,.3); overflow: hidden; }
.hero-progress span { position: absolute; inset: 0; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.hero-progress.is-running span { animation-name: progress; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes progress { to { transform: scaleX(1); } }
.hero-arrows { display: flex; gap: 10px; }
.hero-arrow {
  width: 52px; height: 52px; margin: 0; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s;
}
.hero-arrow:hover { background: #fff; color: var(--ink); border-color: #fff; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 30px; z-index: 3; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 500 10px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.7); text-decoration: none;
}
.hero-scroll span { width: 1px; height: 46px; background: linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,0)); animation: scroll-cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes scroll-cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 760px) {
  .hero-scroll { display: none; }
  .hero-arrow { width: 44px; height: 44px; }
  .hero-actions .btn { min-height: 46px; padding: 0 20px; }
}

/* ==========================================================================
   Portfolio grid
   ========================================================================== */
.pf-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; margin: 0 0 clamp(32px, 4vw, 50px); }
.pf-filter button {
  position: relative; margin: 0; padding: 8px 0; border: 0; background: none; cursor: pointer;
  font: 400 15px/1.3 var(--sans); letter-spacing: .04em; color: var(--ink-3); transition: color .3s;
}
.pf-filter button sup { font-size: 10px; margin-left: 3px; color: var(--accent); }
.pf-filter button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--ink); transform: scaleX(0); transition: transform .45s var(--ease); }
.pf-filter button:hover, .pf-filter button.is-active { color: var(--ink); }
.pf-filter button.is-active::after { transform: scaleX(1); }

.pf-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(220px, 22vw, 330px); grid-auto-flow: dense; gap: clamp(12px, 1.6vw, 22px);
}
.pf-item:nth-child(6n+1) { grid-column: span 2; grid-row: span 2; }
.pf-item:nth-child(6n+5) { grid-column: span 2; }
@media (max-width: 900px) {
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(200px, 36vw, 300px); }
  .pf-item:nth-child(6n+5) { grid-column: span 1; }
}
@media (max-width: 560px) {
  .pf-grid { grid-template-columns: 1fr; grid-auto-rows: 72vw; }
  .pf-item:nth-child(n) { grid-column: auto; grid-row: auto; }
}
/* Filtered: a plain grid, so a handful of results do not leave holes. */
.pf-grid.is-filtered .pf-item:nth-child(n) { grid-column: auto; grid-row: auto; }

.pf-item {
  position: relative; display: block; overflow: hidden; background: var(--accent-soft);
  color: #fff; text-decoration: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.pf-item.is-out { opacity: 0; transform: scale(.96); }
.pf-item[hidden] { display: none; }
.pf-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.pf-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(14,13,12,.82) 0%, rgba(14,13,12,.15) 48%, rgba(14,13,12,0) 70%);
  opacity: .55; transition: opacity .5s var(--ease);
}
.pf-meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(18px, 2vw, 28px); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pf-index { display: block; font: 400 12px/1 var(--sans); letter-spacing: .24em; color: rgba(255,255,255,.75); margin-bottom: 10px; }
.pf-title { display: block; font: 500 clamp(22px, 2.2vw, 32px)/1.1 var(--serif); }
.pf-tags { display: block; margin-top: 6px; font-size: 13px; letter-spacing: .06em; color: rgba(255,255,255,.75); }
.pf-go {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--ink); transform: scale(.4) rotate(-45deg); opacity: 0;
  transition: transform .5s var(--ease-out), opacity .4s;
}
.pf-item:hover img, .pf-item:focus-visible img { transform: scale(1.06); }
.pf-item:hover::after, .pf-item:focus-visible::after { opacity: 1; }
.pf-item:hover .pf-go, .pf-item:focus-visible .pf-go { transform: none; opacity: 1; }
@media (hover: none) { .pf-go { transform: none; opacity: 1; width: 40px; height: 40px; } }
.pf-more { margin-top: clamp(32px, 4vw, 50px); text-align: center; }

/* Clients */
.clients-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.clients-list li { margin: 0; padding: 28px; background: var(--cream); display: grid; place-items: center; }
.clients-list img { display: block; width: 100%; max-width: 160px; height: 80px; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .4s, opacity .4s; }
.clients-list li:hover img { filter: none; opacity: 1; }

/* ==========================================================================
   Project page
   ========================================================================== */
.prj-hero { position: relative; height: 88vh; height: 88svh; min-height: 480px; overflow: hidden; background: var(--night); color: #fff; }
.prj-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 9s var(--ease) forwards; }
.prj-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,9,8,.8) 0%, rgba(10,9,8,.1) 55%, rgba(10,9,8,.4) 100%); }
.prj-hero-content { position: absolute; left: 0; right: 0; bottom: clamp(40px, 8vh, 80px); z-index: 2; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; font: 400 13px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.crumbs li { margin: 0; padding: 0; color: rgba(255,255,255,.7); }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: .5; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { color: var(--accent-soft); }
.prj-title { margin: 0; font: 400 clamp(44px, 7vw, 104px)/1 var(--serif); letter-spacing: -.015em; color: #fff; }

.prj-facts { border-bottom: 1px solid var(--line); background: var(--paper); }
.prj-facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0; }
.prj-facts dl > div { padding: 22px 24px 22px 0; }
.prj-facts dt { margin: 0 0 6px; font: 500 11px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); }
.prj-facts dd { margin: 0; font: 500 22px/1.3 var(--serif); color: var(--ink); }
.prj-facts dd a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--accent); }

.prj-body { padding: clamp(56px, 8vw, 100px) 0 0; }
.prj-body .prose { max-width: 760px; margin: 0; }

.prj-gallery { padding: clamp(48px, 7vw, 90px) 0 clamp(60px, 8vw, 110px); }
.prj-gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.prj-gallery-head h2 { margin: 0; font: 500 clamp(30px, 3.6vw, 44px)/1.1 var(--serif); }
.prj-gallery-head span { color: var(--ink-3); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.gallery { columns: 3 280px; column-gap: 16px; }
.gallery-item {
  display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; background: var(--accent-soft);
  break-inside: avoid; cursor: zoom-in; overflow: hidden; position: relative;
}
.gallery-item img { display: block; width: 100%; height: auto; transition: transform 1s var(--ease-out); }
.gallery-item .gallery-zoom {
  position: absolute; right: 14px; bottom: 14px; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink);
  opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s var(--ease-out);
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.04); }
.gallery-item:hover .gallery-zoom, .gallery-item:focus-visible .gallery-zoom { opacity: 1; transform: none; }

/* Next / previous project */
.prj-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--night); }
.prj-pager a { position: relative; display: block; min-height: clamp(220px, 30vw, 380px); overflow: hidden; color: #fff; text-decoration: none; background: var(--night-2); }
.prj-pager img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; transition: opacity .6s var(--ease), transform 1.2s var(--ease-out); }
.prj-pager a:hover img { opacity: .7; transform: scale(1.05); }
.prj-pager-text { position: absolute; left: clamp(22px, 4vw, 56px); right: clamp(22px, 4vw, 56px); bottom: clamp(22px, 4vw, 48px); }
.prj-pager .is-next .prj-pager-text { text-align: right; }
.prj-pager small { display: block; margin-bottom: 8px; font: 500 12px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.prj-pager strong { font: 400 clamp(28px, 3.6vw, 52px)/1.05 var(--serif); }
@media (max-width: 640px) { .prj-pager { grid-template-columns: 1fr; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 500; display: none;
  background: rgba(12,11,10,.96); color: #fff;
  align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; animation: lb-in .35s var(--ease) both; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox figure { margin: 0; max-width: calc(100vw - 160px); display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox img.is-entering { animation: lb-img .5s var(--ease-out); }
@keyframes lb-img { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.lightbox figcaption { margin-top: 14px; font-size: 14px; letter-spacing: .12em; color: rgba(255,255,255,.7); }
.lightbox button {
  position: absolute; margin: 0; padding: 0; width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; font-size: 18px; cursor: pointer;
  transition: background-color .3s, color .3s;
}
.lightbox button:hover { background: #fff; color: var(--ink); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lightbox figure { max-width: 100vw; }
  .lightbox img { max-height: calc(100vh - 200px); }
  .lb-prev, .lb-next { top: auto; bottom: 22px; transform: none; }
  .lb-prev { left: calc(50% - 64px); } .lb-next { right: calc(50% - 64px); }
}

/* ==========================================================================
   Call to action band, above the footer on every page but contact
   ========================================================================== */
.cta-band { position: relative; overflow: hidden; background: var(--night); color: #fff; padding: clamp(80px, 11vw, 150px) 0; }
.cta-band::before, .cta-band::after {
  content: ""; position: absolute; top: 50%; aspect-ratio: 1; transform: translateY(-50%);
  border: 1px solid rgba(156,130,103,.3); border-radius: 50%; pointer-events: none;
}
.cta-band::before { right: -10vw; width: 46vw; }
.cta-band::after { right: -2vw; width: 30vw; border-color: rgba(156,130,103,.18); }
.cta-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.cta-band .eyebrow { color: var(--accent); }
.cta-band .display { color: #fff; }
.cta-side p { margin: 0 0 26px; color: rgba(255,255,255,.72); font-size: 17px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 820px) { .cta-inner { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--night); color: rgba(255,255,255,.66); font-size: 15px; line-height: 1.8; text-align: left; border-top: 1px solid rgba(255,255,255,.07); }
.ftr-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: clamp(32px, 5vw, 70px); padding: clamp(60px, 8vw, 96px) 0 clamp(40px, 6vw, 70px); }
.ftr-brand img { width: 170px; filter: brightness(0) invert(1); opacity: .92; }
.ftr-brand p { margin: 22px 0 0; max-width: 30ch; font: italic 400 22px/1.4 var(--serif); color: rgba(255,255,255,.82); }
.ftr-col h2 { margin: 0 0 18px; font: 500 11px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.ftr-col ul { list-style: none; margin: 0; padding: 0; }
.ftr-col li { margin: 0 0 8px; padding: 0; }
.ftr-col a { color: rgba(255,255,255,.78); text-decoration: none; transition: color .3s; }
.ftr-col a:hover { color: #fff; }
.ftr-contact li { display: flex; gap: 12px; align-items: baseline; }
.ftr-contact i { width: 16px; color: var(--accent); }
.ftr-social { display: flex; gap: 10px; }
.ftr-social a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); color: #fff; text-decoration: none; transition: background-color .3s, border-color .3s;
}
.ftr-social a:hover { background: var(--accent); border-color: var(--accent); }
.ftr-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px 0 30px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; letter-spacing: .04em; }
.ftr-bottom p { margin: 0; }
.ftr-bottom a { color: rgba(255,255,255,.8); text-decoration: none; }
.ftr-bottom a:hover { color: #fff; }
@media (max-width: 900px) { .ftr-top { grid-template-columns: 1fr 1fr; } .ftr-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ftr-top { grid-template-columns: 1fr; } }

/* Floating actions: WhatsApp and back to top */
.float-actions { position: fixed; right: 18px; bottom: 18px; z-index: 150; display: flex; flex-direction: column; gap: 10px; }
.float-btn {
  position: relative; width: 52px; height: 52px; display: grid; place-items: center; margin: 0; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; text-decoration: none; font-size: 18px;
  box-shadow: 0 10px 26px rgba(0,0,0,.18); transition: transform .3s var(--ease), opacity .3s, visibility .3s;
}
.float-btn:hover { transform: translateY(-3px); }
.float-wa { background: #25d366; color: #fff; font-size: 26px; }
.float-top { background: var(--paper); color: var(--ink); }
.float-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.float-top circle { fill: none; stroke: var(--accent); stroke-width: 2; }
.float-top.is-hidden { opacity: 0; visibility: hidden; transform: translateY(10px); }

/* 404 */
.not-found { padding: clamp(110px, 16vw, 180px) 0; text-align: center; }
.not-found-code { margin: 0; font: 400 clamp(110px, 20vw, 220px)/.9 var(--serif); color: var(--accent); }
.not-found h1 { margin: 10px 0 10px; font: 500 clamp(30px, 4vw, 44px)/1.1 var(--serif); }
.not-found p { margin: 0 0 30px; color: var(--ink-2); }

/* Reveal on scroll — only where JavaScript has said it will reveal them. */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-title .line > span { transform: none; }
  .hero-actions { opacity: 1; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
@media print { .site-header, .float-actions, .cta-band, .scroll-progress { display: none !important; } body:not(.has-hero) main { padding-top: 0; } }

/* The home page's projects follow their own HTML introduction. */
.pg-section--html + .pg-section--projects { padding-top: 16px; }

/* Some migrated sections set `body { text-align: center }`; the chrome
   decides its own alignment. */
.hero, .prj-hero, .cta-band, .site-footer, .pf-grid, .prj-facts, .prj-gallery, .prj-pager, .nav-overlay { text-align: left; }
.hero-title { max-width: none; font-size: clamp(38px, 5.2vw, 80px); }
.hero-ui .container { justify-content: flex-start; gap: clamp(24px, 4vw, 48px); }
.main-nav a.header-cta { padding: 0 20px; color: #fff; font: 500 12px/1 var(--sans); letter-spacing: .16em; }
.main-nav a.header-cta::after { display: none; }
.has-hero .site-header:not(.is-solid) .main-nav a.header-cta:hover { color: var(--ink); }
.prj-pager.is-single { grid-template-columns: 1fr; }
