:root {
  --bg: #0a0a0a;
  --bg-glow: radial-gradient(circle at 20% 10%, rgba(255,255,255,0.03), transparent 50%),
             radial-gradient(circle at 80% 0%, rgba(138,90,52,0.08), transparent 40%);
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --surface-strong: rgba(255,255,255,0.08);
  --surface-alt: rgba(138,90,52,0.06);
  --ink: #f5f0eb;
  --muted: #8a817a;
  --muted-light: #a0968c;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --accent: #c49a6c;
  --accent-dark: #a07b53;
  --accent-light: #e8c9a8;
  --shadow: 0 18px 55px rgba(0,0,0,0.40);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.25);
  --glow-accent: 0 0 30px rgba(196,154,108,0.15);
  --radius: 28px;
  --radius-sm: 16px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background:
    var(--bg-glow),
    linear-gradient(180deg, #0e0e0e 0%, #0a0a0a 40%, #080808 100%);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-typewriter] {
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.reveal.visible[data-typewriter] .typewriter-done {
  display: inline;
}
.reveal.visible[data-typewriter] .cursor {
  animation: cursor-blink 0.6s infinite;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.4em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── Lazy image fade-in ─── */
.lazy-img img {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}
.lazy-img.visible img {
  opacity: 1;
  transform: scale(1);
}

/* ─── Layout ─── */
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.narrow { width: min(680px, calc(100% - 2rem)); margin: 0 auto !important; }

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  background: rgba(10,10,10,0.82);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.scrolled .site-header {
  box-shadow: var(--shadow-soft);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0;
}
.brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--ink);
  transition: color 0.3s;
}
.brand:hover { color: var(--accent); }
nav { display: flex; gap: 1.25rem; align-items: center; }
nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: color 0.25s;
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease-out);
}
nav a:hover { color: var(--ink); }
nav a:hover::after { width: 100%; }

/* ─── Typography ─── */
.eyebrow {
  margin: 0 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}
h1, h2, h3 { line-height: 1.1; margin-top: 0; }
h1 {
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

/* ─── Hero ─── */
.section.hero {
  padding: 6rem 0 4rem;
  min-height: 70vh;
}
.section.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.lead {
  color: var(--muted-light);
  font-size: 1.15rem;
  max-width: 56ch;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
.hero-image-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.hero-image-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.hero-image-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ─── Buttons ─── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease, border-color 180ms ease, background 180ms ease;
}
.button:hover {
  transform: translateY(-2px);
}
.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #0a0a0a;
  box-shadow: var(--glow-accent);
}
.button.primary:hover {
  box-shadow: 0 0 40px rgba(196,154,108,0.35);
}
.button.secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.button.secondary:hover {
  background: var(--surface-hover);
  box-shadow: var(--shadow-soft);
}

/* ─── Sections ─── */
.section { padding: 5rem 0; }
.section:not(:last-child) {
  border-bottom: 1px solid var(--line);
}
.section-heading { margin-bottom: 2rem; }
.section-note { color: var(--muted); max-width: 60ch; }

/* ─── Cards ─── */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s;
}
.card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  box-shadow: var(--shadow-soft);
}
.card p {
  color: var(--muted);
  margin: 0.3rem 0 0;
  line-height: 1.6;
  font-size: 0.95rem;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  pointer-events: none;
}

/* ─── Projects ─── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.project {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.project:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.project img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.project:hover img {
  transform: scale(1.03);
}
.project-copy {
  padding: 1.1rem 1.2rem 1.3rem;
}
.project-copy p {
  color: var(--muted);
  margin: 0.3rem 0 0;
  font-size: 0.93rem;
  line-height: 1.55;
}
.project-large {
  grid-column: 1 / -1;
}
.project-large img {
  aspect-ratio: 16/7;
}

/* ─── About ─── */
.section.about .container.narrow {
  max-width: 720px;
}
.about-copy p {
  color: var(--muted-light);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

/* ─── Ken Burns ─── */
.hero-image-card, .project {
  overflow: hidden;
  border-radius: var(--radius);
}
.hero-image-card::after, .project::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.08);
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.5;
}
.project::after { z-index: 1; }
.hero-image-card img,
.project img {
  transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1);
}
.hero-image-card.visible img,
.project.visible img {
  transform: scale(1.05);
}
.hero-image:hover img,
.project:hover img {
  transform: scale(1.08);
}

/* ─── Contact CTA ─── */
.contact-cta {
  text-align: center;
  padding: 2rem 0;
}
.contact-cta .eyebrow {
  margin-bottom: 0.3rem;
}
.contact-cta .button {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

/* ─── Contact ─── */
.contact-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 1rem 0;
  position: relative;
}


/* ─── Footer ─── */
.site-footer {
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.8fr;
  gap: 2rem;
}
.footer-grid h3 {
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.footer-grid p {
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-grid a {
  color: var(--muted);
  transition: color 0.2s;
}
.footer-grid a:hover {
  color: var(--accent);
}
.footer-grid nav {
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.25rem;
}
.footer-grid nav a {
  font-size: 0.88rem;
}
.footer-note {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

/* ─── Rates ─── */
.rates-tables .rate-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.rates-tables .rate-section:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}
.rates-tables h2 {
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.rate-table thead th {
  text-align: left;
  padding: 0.7rem 1rem;
  color: var(--muted-light);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line-strong);
}
.rate-table tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.rate-table tbody tr:hover {
  background: var(--surface-hover);
}
.rate-table tbody td:last-child {
  color: var(--accent-light);
  font-weight: 500;
  white-space: nowrap;
}
.rate-policies {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-top: 2rem;
}
.rate-policies h2 {
  color: var(--ink);
  margin-bottom: 1rem;
}
.rate-policies ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted-light);
}
.rate-policies li {
  margin-bottom: 0.7rem;
  line-height: 1.6;
}
.rate-policies li strong {
  color: var(--ink);
}
.rates-hero .lead {
  max-width: 68ch;
}

/* ─── Mobile ─── */
@media (max-width: 960px) {
  .section.hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-image-card,
  .hero-image-card img {
    min-height: 260px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-box {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}
@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.8rem 0;
  }
  nav {
    gap: 0.4rem 0.8rem;
    flex-wrap: wrap;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  input, select, textarea {
    font-size: 1rem;
    padding: 0.75rem;
  }
}

/* ─── Contact status feedback ─── */
#contact-status {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--accent);
  opacity: 0.9;
}
