/* ============================================
   BRONSTEIN ASSETS – Design System
   ============================================ */

:root {
  /* Colors */
  --cream: #F3EEE4;
  --paper: #FAF7F1;
  --ink: #1B1A17;
  --graphite: #4A4744;
  --muted: #8A857C;
  --clay: #A85D3E;
  --clay-dark: #8A4A30;
  --sage: #6B7763;
  --line: #D9D2C3;
  --line-soft: #E8E2D4;

  /* Type */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max: 1280px;
  --gutter-x: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 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-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Background grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.10 0 0 0 0 0.09 0 0 0 0.4 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: multiply;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
}
.eyebrow .num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0;
  margin-right: 0.75em;
  color: var(--graphite);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "SOFT" 30, "opsz" 144;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(2rem, 5.5vw, 4rem);
  letter-spacing: -0.03em;
}
h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.875rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.italic { font-style: italic; font-weight: 300; }

p { color: var(--graphite); }
p.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--ink);
  line-height: 1.55;
  max-width: 62ch;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter-x);
  padding-right: var(--gutter-x);
  position: relative;
  z-index: 2;
}
section { position: relative; z-index: 2; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(243, 238, 228, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), padding 0.3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--line-soft);
  padding: 0.9rem 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.brand .mark {
  font-style: italic;
  font-weight: 300;
  color: var(--clay);
}
.brand .sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 0.88rem;
  color: var(--graphite);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { transform: translateY(-5px); }
.nav-toggle span:nth-child(2) { transform: translateY(5px); }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    width: min(340px, 85vw);
    height: 100vh;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 2.5rem;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    border-left: 1px solid var(--line);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--ink);
  }
  .nav-links a::after { display: none; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 11rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  top: 15%;
  width: 55%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(168, 93, 62, 0.10), transparent 65%);
  pointer-events: none;
  z-index: 1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: end;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.4fr 1fr; gap: 4rem; }
}

.hero-title {
  position: relative;
}
.hero-title .meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-title .meta .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clay);
}

.hero h1 .line { display: block; }
.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--clay);
}

.hero-sidebar {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  max-width: 420px;
}
.hero-sidebar p {
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.hero-sidebar .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--clay);
  letter-spacing: 0.02em;
}

/* CTA */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.btn:hover { background: var(--clay); transform: translateY(-2px); }
.btn .arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ============================================
   SERVICES (home)
   ============================================ */
.services {
  padding: 6rem 0 4rem;
  border-top: 1px solid var(--line);
}
.services-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}
@media (min-width: 800px) {
  .services-head { grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: end; }
}
.services-head h2 { max-width: 16ch; }

.service-list {
  display: flex;
  flex-direction: column;
}
.service-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  transition: background 0.4s var(--ease);
  position: relative;
}
.service-row:last-child { border-bottom: 1px solid var(--line); }

@media (min-width: 800px) {
  .service-row {
    grid-template-columns: 80px 1fr 1.4fr auto;
    gap: 2.5rem;
    align-items: center;
  }
}

.service-row .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--muted);
  font-weight: 300;
}
.service-row h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  transition: color 0.3s var(--ease);
}
.service-row p {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--graphite);
}
.service-row .link {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
}
.service-row .link .arrow {
  transition: transform 0.35s var(--ease);
  display: inline-block;
}
.service-row:hover { background: rgba(168, 93, 62, 0.04); }
.service-row:hover h3 { color: var(--clay); }
.service-row:hover .link .arrow { transform: translateX(6px); }

/* ============================================
   GALLERY
   ============================================ */
.gallery-section {
  padding: 6rem 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.gallery-head {
  margin-bottom: 3.5rem;
  max-width: 640px;
}
.gallery-head h2 { margin-top: 1rem; }

.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 680px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
@media (min-width: 1000px) {
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
}

.gallery figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--line-soft);
  border-radius: var(--radius);
}
.gallery figure.wide { aspect-ratio: 4/3; }
.gallery figure.tall { aspect-ratio: 3/4; }

@media (min-width: 680px) {
  .gallery figure:nth-child(1) { grid-column: span 2; aspect-ratio: 16/10; }
  .gallery figure:nth-child(6) { grid-column: span 2; aspect-ratio: 16/10; }
}
@media (min-width: 1000px) {
  .gallery figure:nth-child(1) { grid-column: span 2; aspect-ratio: 5/3; }
  .gallery figure:nth-child(6) { grid-column: span 2; aspect-ratio: 5/3; }
}

.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter 0.6s var(--ease);
  filter: saturate(0.92);
}
.gallery figure:hover img {
  transform: scale(1.04);
  filter: saturate(1.05);
}
.gallery figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.25rem;
  color: var(--paper);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: linear-gradient(to top, rgba(27, 26, 23, 0.75), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.gallery figure:hover figcaption { opacity: 1; }

/* ============================================
   CONTENT BLOCK (subpages)
   ============================================ */
.page-head {
  padding: 11rem 0 4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-head .crumbs {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.page-head .crumbs a { color: var(--muted); transition: color 0.3s var(--ease); }
.page-head .crumbs a:hover { color: var(--clay); }
.page-head .crumbs span { color: var(--line); }
.page-head h1 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  max-width: 18ch;
}
.page-head .page-lead {
  margin-top: 2rem;
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--graphite);
}

.content-block {
  padding: 5rem 0;
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 900px) {
  .content-grid { grid-template-columns: 1fr 1.6fr; gap: 5rem; }
}

.content-aside .aside-sticky {
  position: sticky;
  top: 7rem;
}
.content-aside .eyebrow { margin-bottom: 1rem; }
.content-aside p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.content-main h2 { margin-bottom: 1.5rem; }
.content-main h3 { margin: 2.5rem 0 1rem; }
.content-main p { margin-bottom: 1.25rem; line-height: 1.7; font-size: 1.02rem; }
.content-main strong { color: var(--ink); font-weight: 600; }
.content-main a {
  color: var(--clay);
  border-bottom: 1px solid currentColor;
  transition: color 0.3s var(--ease);
}
.content-main a:hover { color: var(--ink); }

.feature-list {
  list-style: none;
  margin: 2rem 0;
  display: grid;
  gap: 1rem;
  counter-reset: feature-counter;
}
.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1rem;
  line-height: 1.5;
  counter-increment: feature-counter;
}
.feature-list li::before {
  content: counter(feature-counter) ".";
  font-family: var(--font-display);
  font-style: italic;
  color: var(--clay);
  font-size: 1.05rem;
  padding-top: 0.05rem;
  min-width: 1.5rem;
}

.feature-list strong { display: block; margin-bottom: 0.25rem; }

.content-image {
  margin: 3rem 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.content-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.callout {
  padding: 2rem;
  background: var(--paper);
  border-left: 3px solid var(--clay);
  margin: 2.5rem 0;
}
.callout p { margin-bottom: 0.75rem; }
.callout .highlight {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.4;
}

/* ============================================
   CONTACT (page)
   ============================================ */
.contact-page {
  padding: 4rem 0 6rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 800px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
}
@media (min-width: 1100px) {
  .contact-grid { grid-template-columns: repeat(4, 1fr); }
}
.contact-card {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.contact-card .label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.contact-card .value {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--ink);
}
.contact-card .value a { color: var(--ink); transition: color 0.3s var(--ease); border-bottom: 1px solid var(--line); }
.contact-card .value a:hover { color: var(--clay); border-color: var(--clay); }

.contact-statement {
  padding: 5rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact-statement h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  max-width: 22ch;
  margin: 0 auto 2rem;
}
.contact-statement em { font-style: italic; color: var(--clay); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 5rem 0 2rem;
  position: relative;
  z-index: 2;
}
.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clay), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 4rem; }
}

.footer h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.footer .brand-large {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.footer .brand-large em { font-style: italic; color: var(--clay); }
.footer p { color: rgba(243, 238, 228, 0.72); line-height: 1.7; font-size: 0.95rem; }
.footer ul { list-style: none; display: grid; gap: 0.75rem; }
.footer ul a {
  color: rgba(243, 238, 228, 0.75);
  font-size: 0.95rem;
  transition: color 0.3s var(--ease);
}
.footer ul a:hover { color: var(--clay); }
.footer .contact-line { display: block; margin-bottom: 0.4rem; font-size: 0.95rem; color: rgba(243, 238, 228, 0.75); }
.footer .contact-line strong { color: var(--cream); font-weight: 500; }

.footer-bottom {
  border-top: 1px solid rgba(243, 238, 228, 0.12);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
  color: rgba(243, 238, 228, 0.5);
  letter-spacing: 0.1em;
}

/* ============================================
   ANIMATIONS (reveal on scroll)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }

/* Hero specific load animation */
.hero .load {
  opacity: 0;
  transform: translateY(30px);
  animation: rise 1.1s var(--ease) forwards;
}
.hero .load.d1 { animation-delay: 0.1s; }
.hero .load.d2 { animation-delay: 0.25s; }
.hero .load.d3 { animation-delay: 0.4s; }
.hero .load.d4 { animation-delay: 0.55s; }
.hero .load.d5 { animation-delay: 0.7s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Selection */
::selection { background: var(--clay); color: var(--paper); }
