/* ============================================================
   S&C Luminance — site styles
   palette: warm ivory / charcoal / brass accent
   ============================================================ */

:root {
  --bg:        #f6f3ee;
  --bg-2:      #efeae1;
  --ink:       #1c1b18;
  --ink-2:     #3a3833;
  --muted:     #6b6760;
  --line:      #d9d2c5;
  --accent:    #8a6b3a;        /* warm brass */
  --accent-2:  #b08a55;
  --white:     #ffffff;

  --serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --max:    1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 2px;

  --t-fast: 200ms ease;
  --t-med:  400ms cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- Type ---------- */
.display, .section-title {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 .5em;
}
.display { font-size: clamp(40px, 7vw, 84px); }
.section-title { font-size: clamp(28px, 4vw, 48px); line-height: 1.1; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: var(--t-fast);
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background var(--t-med), padding var(--t-med),
              box-shadow var(--t-med), color var(--t-med);
  color: #fff;
}
.nav.is-scrolled {
  background: rgba(246, 243, 238, .96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  color: var(--ink);
  padding: 14px var(--gutter);
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  font-size: 13px;
  text-transform: uppercase;
}
.brand-mark {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0;
  font-style: italic;
  font-weight: 600;
  color: var(--accent-2);
}
.nav.is-scrolled .brand-mark { color: var(--accent); }
.brand-name { opacity: .9; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: opacity var(--t-fast);
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-med);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* lang */
.lang { display: inline-flex; gap: 0; margin-left: 18px;
  border: 1px solid currentColor; border-radius: 999px; padding: 3px;
  opacity: .85;
}
.lang-btn {
  padding: 5px 11px;
  font-size: 11px;
  letter-spacing: .1em;
  border-radius: 999px;
  transition: var(--t-fast);
}
.lang-btn.is-active {
  background: currentColor;
}
.lang-btn.is-active { color: var(--bg); }
.nav.is-scrolled .lang-btn.is-active { color: var(--bg); }

/* hamburger */
.nav-toggle {
  display: none;
  width: 30px; height: 30px;
  position: relative;
  z-index: 60;
}
.nav-toggle span {
  position: absolute; left: 4px; right: 4px; height: 1px;
  background: currentColor; transition: var(--t-med);
}
.nav-toggle span:nth-child(1) { top: 9px; }
.nav-toggle span:nth-child(2) { top: 15px; }
.nav-toggle span:nth-child(3) { top: 21px; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  color: #fff;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 14s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.55) 80%);
}
.hero-inner {
  position: relative;
  max-width: 880px;
  padding: 120px 0 110px;
  z-index: 2;
}
.hero-inner .eyebrow { color: rgba(255,255,255,.85); }
.hero-inner .display { color: #fff; }
.hero-lede {
  font-size: clamp(16px, 1.4vw, 19px);
  max-width: 560px;
  color: rgba(255,255,255,.88);
  margin: 24px 0 36px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 56px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 60%;
  background: rgba(255,255,255,.85);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   SECTION SHELL
   ============================================================ */
section { padding: clamp(80px, 11vw, 160px) var(--gutter); }
.section-head {
  max-width: var(--max);
  margin: 0 auto clamp(40px, 6vw, 72px);
  text-align: left;
}
.section-head .section-title { max-width: 18ch; }

/* ---------- Intro strip ---------- */
.intro { background: var(--bg-2); }
.intro-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.intro-grid .eyebrow { grid-column: 1; padding-top: 8px; }
.intro-grid .section-title { grid-column: 2; max-width: 20ch; }
.intro-body {
  grid-column: 2;
  font-size: clamp(16px, 1.25vw, 19px);
  color: var(--ink-2);
  max-width: 60ch;
  margin: 12px 0 0;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services { background: var(--bg); }
.service-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.service-card {
  background: var(--bg);
  padding: clamp(36px, 4vw, 56px) clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background var(--t-med);
}
.service-card:hover { background: var(--bg-2); }
.service-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--accent);
  letter-spacing: .04em;
}
.service-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.4vw, 34px);
  margin: 0 0 6px;
}
.service-card p {
  color: var(--ink-2);
  margin: 0 0 8px;
  font-size: 15.5px;
}
.service-list { list-style: none; padding: 0; margin: 8px 0 0; }
.service-list li {
  font-size: 14px;
  color: var(--muted);
  padding: 10px 0;
  border-top: 1px solid var(--line);
  position: relative;
  padding-left: 22px;
}
.service-list li::before {
  content: "—";
  position: absolute; left: 0; top: 10px;
  color: var(--accent);
}

/* ============================================================
   PROCESS
   ============================================================ */
.process { background: var(--ink); color: var(--bg); }
.process .section-title { color: var(--bg); }
.process .eyebrow { color: var(--accent-2); }
.process-steps {
  max-width: var(--max); margin: 0 auto;
  list-style: none; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.process-steps li {
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 22px;
}
.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--accent-2);
  letter-spacing: .04em;
}
.process-steps h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  margin: 12px 0 10px;
  color: var(--bg);
}
.process-steps p {
  color: rgba(246,243,238,.72);
  font-size: 14.5px;
  margin: 0;
}

/* ============================================================
   GALLERY
   ============================================================ */
.work { background: var(--bg); }
.gallery {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 220px;
  gap: 12px;
}
.g-item {
  margin: 0;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-2);
  grid-column: span 2;
  grid-row: span 1;
}
.g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(.2,.8,.2,1);
}
.g-item:hover img { transform: scale(1.04); }
.g-item::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
  pointer-events: none;
}
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 4; }
.g-full { grid-column: span 6; grid-row: span 2; }
.g-half { grid-column: span 3; grid-row: span 2; }
.work-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: clamp(40px, 6vw, 80px) 20px;
}

/* "View project" hover button on gallery items */
.g-link {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 10px 16px;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-fast), transform var(--t-fast), background var(--t-fast);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.g-link:hover { background: var(--ink); color: var(--bg); }
.g-item:hover .g-link,
.g-item:focus-within .g-link {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none) {
  /* on touch devices, always show the button */
  .g-link { opacity: 1; transform: none; }
}

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */
.project-page > section { padding: clamp(60px, 8vw, 120px) var(--gutter); }

.project-hero {
  position: relative;
  min-height: 72vh;
  padding: 0;
  display: flex;
  align-items: flex-end;
  color: var(--bg);
  overflow: hidden;
}
.ph-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}
.ph-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.0) 30%, rgba(0,0,0,.55) 100%);
}
.ph-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--gutter);
}
.ph-back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bg);
  opacity: .75;
  transition: opacity var(--t-fast);
}
.ph-back:hover { opacity: 1; }
.project-hero .display { color: var(--bg); margin: 0; }
.project-hero .eyebrow { color: var(--accent-2); }
.ph-lede {
  margin-top: 18px;
  max-width: 56ch;
  font-size: clamp(16px, 1.4vw, 18px);
  color: rgba(255,255,255,.85);
  line-height: 1.55;
}

.project-meta { background: var(--bg-2); }
.pm-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(20px, 2.4vw, 36px);
  padding: 0;
}
.pm-grid dt {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.pm-grid dd {
  margin: 0 0 4px 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}

.project-story { background: var(--bg); }
.ps-inner {
  max-width: 720px;
  margin: 0 auto;
}
.ps-inner p {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.75;
  color: var(--ink-2);
  margin: 0 0 1.2em 0;
}
.ps-inner p:first-child::first-letter {
  font-family: var(--serif);
  font-size: 3em;
  float: left;
  line-height: .9;
  margin: 4px 10px 0 0;
  color: var(--accent);
}

.project-gallery { background: var(--bg-2); }
.project-gallery .gallery { grid-auto-rows: 280px; }
.pg-caption {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-cta {
  background: var(--ink);
  color: var(--bg);
  text-align: center;
}
.project-cta .section-title { color: var(--bg); margin: 0 auto; max-width: 22ch; }
.pc-lede {
  color: rgba(255,255,255,.7);
  margin: 14px auto 32px;
  max-width: 48ch;
}

.project-missing {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pm-inner { max-width: 520px; }
.pm-inner .section-title { margin-bottom: 16px; }
.pm-inner p { color: var(--muted); margin-bottom: 28px; }

@media (max-width: 720px) {
  .project-hero { min-height: 60vh; }
  .project-gallery .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .project-gallery .g-wide { grid-column: span 2; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--bg-2); }
.about-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.about-copy p {
  color: var(--ink-2);
  font-size: 16px;
  margin: 0 0 18px;
  max-width: 56ch;
}
.about-img {
  height: 560px;
  background-size: cover;
  background-position: center;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 28px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
}
.stats span {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--bg); }
.contact .contact-lede {
  max-width: 56ch;
  color: var(--ink-2);
  font-size: 16px;
  margin-top: 12px;
}
.contact-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.contact-card {
  background: var(--bg);
  padding: clamp(34px, 4vw, 52px);
  display: flex; flex-direction: column; gap: 14px;
  transition: background var(--t-fast), color var(--t-fast);
}
.contact-card:hover { background: var(--ink); color: var(--bg); }
.contact-card .c-label {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.contact-card:hover .c-label { color: var(--accent-2); }
.contact-card .c-value {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.3;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  color: rgba(246,243,238,.7);
  padding: 56px var(--gutter) 36px;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 28px;
  flex-wrap: wrap;
}
.foot-brand { display: flex; flex-direction: column; gap: 12px; max-width: 380px; }
.foot-brand .brand-mark { color: var(--accent-2); font-size: 28px; }
.foot-brand .brand-name { letter-spacing: .25em; font-size: 13px; }
.foot-brand p { margin: 4px 0 0; font-size: 13px; }
.foot-meta { font-size: 12px; line-height: 1.8; text-align: right; }
.foot-meta p { margin: 0; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15,14,12,.94);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  color: #fff;
  font-size: 38px;
  line-height: 1;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.1); }
.lb-close { top: 18px; right: 18px; font-size: 32px; }
.lb-prev  { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 18px; top: 50%; transform: translateY(-50%); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms ease, transform 800ms cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-img { animation: none; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(82vw, 360px);
    background: var(--bg);
    color: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    padding: 96px 36px 36px;
    transform: translateX(100%);
    transition: transform var(--t-med);
    box-shadow: -20px 0 60px rgba(0,0,0,.18);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { font-size: 16px; letter-spacing: .12em; }
  .lang { margin: 12px 0 0;
    border-color: var(--ink);
  }
  .nav.is-scrolled .lang-btn.is-active,
  .lang-btn.is-active { color: var(--bg); background: var(--ink); }

  .intro-grid { grid-template-columns: 1fr; }
  .intro-grid .eyebrow,
  .intro-grid .section-title,
  .intro-body { grid-column: 1; }

  .service-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }

  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 180px; }
  .g-tall { grid-row: span 2; }
  .g-wide { grid-column: span 4; }
  .g-item { grid-column: span 2; }

  .about-grid { grid-template-columns: 1fr; }
  .about-img { height: 360px; order: -1; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; }
  .foot-meta { text-align: left; }
}

@media (max-width: 560px) {
  .hero-inner { padding: 120px 0 100px; }
  .process-steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .g-item, .g-wide, .g-tall { grid-column: span 2; grid-row: span 1; }
  .stats { grid-template-columns: 1fr 1fr; }
}
