/* ============================================================
   STOIC BUILDING — Design System
   ============================================================ */

:root {
  /* Palette — warm charcoal + bone + timber */
  --ink:        #161311;
  --ink-soft:   #22201d;
  --bone:       #f4f0e9;
  --bone-dim:   #e6dfd3;
  --stone:      #a9a196;
  --stone-dark: #6f675d;
  --timber:     #b6763f;   /* warm tan / timber accent */
  --timber-lt:  #cf9564;
  --line:       rgba(244, 240, 233, 0.14);
  --line-dark:  rgba(22, 19, 17, 0.12);

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, sans-serif;

  --maxw: 1240px;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 4px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--bone);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.section { padding-block: clamp(4.5rem, 11vw, 9rem); }

/* ---------- Typography ---------- */
.eyebrow, .section-label {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--timber-lt);
  font-weight: 500;
}
.section-label { margin-bottom: 1.2rem; }
.section-label.center { text-align: center; }

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.section-title em { font-style: italic; color: var(--timber-lt); }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--bone-dim);
  line-height: 1.6;
}

.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all 0.4s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.72rem; }
.btn-block { width: 100%; }

.btn-solid { background: var(--timber); color: #fff; }
.btn-solid:hover { background: var(--timber-lt); transform: translateY(-2px); }

.btn-outline { border: 1px solid var(--line); color: var(--bone); }
.btn-outline:hover { border-color: var(--timber-lt); color: var(--timber-lt); }

.btn-ghost { color: var(--bone); }
.btn-ghost:hover { color: var(--timber-lt); gap: 0.9rem; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--timber-lt); z-index: 1000; transition: width 0.1s linear;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding-block: 1.4rem;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  background: rgba(22, 19, 17, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-block: 0.85rem;
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-logo {
  width: 42px; height: 42px; object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.brand-mark[hidden] { display: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--timber-lt);
  color: var(--timber-lt);
  font-family: var(--font-serif); font-size: 1.25rem; font-style: italic;
  border-radius: 3px;
}
.brand-text {
  font-family: var(--font-serif);
  font-size: 1.15rem; letter-spacing: 0.02em; font-weight: 500;
}

.nav-desktop { display: flex; gap: 2.4rem; }
.nav-desktop a {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-dim); position: relative; padding-block: 0.3rem;
  transition: color 0.3s var(--ease);
}
.nav-desktop a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--timber-lt); transition: width 0.35s var(--ease);
}
.nav-desktop a:hover { color: var(--bone); }
.nav-desktop a:hover::after { width: 100%; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 950; }
.menu-toggle span { width: 26px; height: 2px; background: var(--bone); transition: all 0.35s var(--ease); }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 890;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem 2rem 2rem;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 1.6rem; }
.mobile-menu nav a {
  font-family: var(--font-serif); font-size: 2rem; color: var(--bone);
}
.mobile-menu nav a.btn { font-family: var(--font-sans); font-size: 0.85rem; margin-top: 1rem; }
.mobile-menu-foot {
  margin-top: auto; display: flex; flex-direction: column; gap: 0.4rem;
  color: var(--stone); font-size: 0.9rem; padding-top: 2rem; border-top: 1px solid var(--line);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-bottom: clamp(4rem, 10vh, 8rem);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  animation: heroZoom 14s var(--ease) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(22,19,17,0.55) 0%, rgba(22,19,17,0.15) 35%, rgba(22,19,17,0.85) 100%),
    linear-gradient(90deg, rgba(22,19,17,0.6) 0%, transparent 60%);
}

.hero-content { max-width: 820px; }
.hero-title {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 1.02; letter-spacing: -0.02em;
  margin: 1.4rem 0 1.6rem;
}
.hero-title em { font-style: italic; color: var(--timber-lt); font-weight: 400; }
.hero-sub { max-width: 560px; font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--bone-dim); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-size: 0.65rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--stone);
}
.hero-scroll-line { width: 1px; height: 46px; background: linear-gradient(var(--timber-lt), transparent); animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse { 0%,100% { opacity: 0.3; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-block: 1px solid var(--line);
  padding-block: 1.4rem; overflow: hidden; background: var(--ink-soft);
}
.marquee-track {
  display: flex; align-items: center; gap: 2.5rem; width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-track span {
  font-family: var(--font-serif); font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  font-style: italic; color: var(--bone-dim); white-space: nowrap;
}
.marquee-track .dot { color: var(--timber); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   PHILOSOPHY
   ============================================================ */
.philosophy-text p { color: var(--bone-dim); margin-bottom: 1.2rem; }
.philosophy-text .section-title { margin-bottom: 1.6rem; }
.philosophy-signature { margin-top: 2.2rem; display: flex; flex-direction: column; }
.sig-name { font-family: var(--font-serif); font-style: italic; font-size: 1.7rem; color: var(--bone); }
.sig-role { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--stone); text-transform: uppercase; }

.philosophy-media { position: relative; }
.philosophy-media img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius);
}
.floating-stat {
  position: absolute; bottom: -1.5rem; left: -1.5rem;
  background: var(--timber); color: #fff;
  padding: 1.4rem 1.6rem; border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem;
  max-width: 200px; box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.floating-stat .stat-num { font-family: var(--font-serif); font-size: 2.6rem; line-height: 1; }
.floating-stat .stat-suffix { font-family: var(--font-serif); font-size: 1.6rem; }
.floating-stat .stat-label { flex-basis: 100%; font-size: 0.72rem; letter-spacing: 0.06em; margin-top: 0.4rem; opacity: 0.9; }

/* ============================================================
   SERVICES
   ============================================================ */
.services { background: var(--ink-soft); }
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.service-card {
  padding: clamp(2rem, 4vw, 3.2rem);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative; transition: background 0.4s var(--ease);
}
.service-card:hover { background: rgba(182,118,63,0.07); }
.service-index {
  font-family: var(--font-serif); font-size: 0.9rem; color: var(--timber-lt);
  display: block; margin-bottom: 1.6rem; letter-spacing: 0.1em;
}
.service-card h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 0.8rem; }
.service-card p { color: var(--bone-dim); font-size: 0.98rem; }

/* ============================================================
   PROCESS
   ============================================================ */
.process-list { display: grid; gap: 0; }
.process-step {
  display: grid; grid-template-columns: 120px 1fr; gap: 2rem;
  padding-block: clamp(1.6rem, 3.5vw, 2.6rem);
  border-top: 1px solid var(--line); align-items: baseline;
  transition: padding-left 0.4s var(--ease);
}
.process-step:last-child { border-bottom: 1px solid var(--line); }
.process-step:hover { padding-left: 1rem; }
.step-num { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3rem); color: var(--timber); font-style: italic; }
.process-step h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin-bottom: 0.5rem; }
.process-step p { color: var(--bone-dim); max-width: 620px; }

/* ============================================================
   WORK / GALLERY
   ============================================================ */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px; gap: 1rem;
}
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--radius);
  grid-row: span 1;
}
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1.2rem 1rem;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bone);
  background: linear-gradient(transparent, rgba(22,19,17,0.85));
  transform: translateY(10px); opacity: 0; transition: all 0.4s var(--ease);
}
.gallery-item:hover figcaption { transform: translateY(0); opacity: 1; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials { text-align: center; }
.quote { max-width: 900px; margin: 2rem auto 0; }
.quote p {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2.6rem); line-height: 1.35;
  letter-spacing: -0.01em;
}
.quote em { font-style: italic; color: var(--timber-lt); }
.quote cite {
  display: block; margin-top: 1.8rem; font-style: normal;
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--ink-soft); }
.contact-intro .section-title { margin-block: 1.4rem 1.6rem; }
.contact-details { margin-top: 2.4rem; display: grid; gap: 1.2rem; }
.contact-details li { display: flex; flex-direction: column; gap: 0.15rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.cd-label { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); }
.contact-details a, .contact-details li > span:last-child { font-size: 1.15rem; color: var(--bone); }
.contact-details a:hover { color: var(--timber-lt); }

/* Form */
.contact-form { display: grid; gap: 1.6rem; }
.field { position: relative; }
.field input, .field textarea, .field select {
  width: 100%; padding: 1.1rem 0 0.6rem; background: transparent;
  border: none; border-bottom: 1px solid var(--line); color: var(--bone);
  font-family: var(--font-sans); font-size: 1rem; transition: border-color 0.3s var(--ease);
}
.field textarea { resize: vertical; }
.field select { padding-top: 1.4rem; }
.field select option { background: var(--ink); color: var(--bone); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--timber-lt);
}
.field label {
  position: absolute; left: 0; top: 1.1rem; color: var(--stone);
  font-size: 1rem; pointer-events: none; transition: all 0.25s var(--ease);
}
.field label.label-static,
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select:focus + label, .field select:valid + label {
  top: -0.2rem; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--timber-lt);
}
.form-note { font-size: 0.9rem; color: var(--timber-lt); }
.form-note.error { color: #e08a6b; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); padding-top: clamp(3rem, 7vw, 5rem); }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem;
  padding-bottom: 3rem; border-bottom: 1px solid var(--line);
}
.footer-logo-link { display: inline-block; }
.footer-logo { width: auto; height: 64px; max-width: 100%; }
.footer-logo-fallback[hidden] { display: none; }
.footer-brand p { color: var(--stone); max-width: 340px; margin-top: 1.2rem; font-size: 0.95rem; }
.footer-col h4 { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); margin-bottom: 1.2rem; }
.footer-col a { display: block; color: var(--bone-dim); margin-bottom: 0.7rem; font-size: 0.95rem; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--timber-lt); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  padding-block: 1.8rem; font-size: 0.8rem; color: var(--stone); letter-spacing: 0.04em;
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.06s; }
.reveal:nth-child(3) { transition-delay: 0.12s; }
.reveal:nth-child(4) { transition-delay: 0.18s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav-desktop, .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .grid-2 { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-item.wide { grid-column: span 2; }
  .floating-stat { left: auto; right: 1rem; bottom: 1rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .process-step { grid-template-columns: 60px 1fr; gap: 1rem; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-item.wide, .gallery-item.tall { grid-column: span 1; grid-row: span 1; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
