:root {
  --cream: #FBF5EC;
  --cream-2: #F1E9D8;
  --ink: #16140F;
  --ink-soft: #6B6558;
  --red: #FF3131;
  --red-deep: #E01E1E;
  --line: #E4DAC6;
  --white: #FFFFFF;
  --card-sage: #DCE5C9;
  --card-teal: #C3E4DD;
  --card-blue: #CDD9EC;
  --card-tan: #F0DAB8;
  --card-ink: #1B1812;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  background-attachment: fixed;
}

h1, h2, h3, .logo, .stat-num, .card-title { font-family: 'Space Grotesk', 'Inter', sans-serif; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--red); color: var(--white); }
img { max-width: 100%; display: block; }

/* nav */
#nav {
  position: fixed;
  top: 18px; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 14px 10px 22px;
  margin: 0 5vw;
  background: rgba(251,245,236,0.75);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: box-shadow 0.3s var(--ease);
}
#nav.scrolled { box-shadow: 0 8px 30px rgba(22,20,15,0.08); }
.logo { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.logo .dot { color: var(--red); }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.nav-links a sup { font-size: 9px; margin-left: 2px; opacity: 0.6; }
.nav-links a:hover, .nav-links a.active { color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); background: var(--red); }
.btn-ghost { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { transform: translateY(-2px); background: var(--ink); color: var(--white); }

/* hero */
.hero {
  position: relative;
  padding: 160px 5vw 60px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.1s forwards;
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.22s forwards;
}
.hero h1 em { color: var(--red); font-style: italic; }
.hero-sub {
  margin-top: 24px;
  max-width: 520px;
  font-size: 17px;
  color: var(--ink-soft);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.36s forwards;
}
.hero-cta { margin-top: 32px; display: flex; gap: 14px; opacity: 0; animation: rise 0.9s var(--ease) 0.5s forwards; }
.hero-trust {
  margin-top: 40px;
  font-size: 12.5px;
  color: var(--ink-soft);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.64s forwards;
}
.hero-trust strong { color: var(--ink); font-weight: 600; }

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

.hero-photo-wrap {
  position: relative;
  opacity: 0;
  animation: rise 1s var(--ease) 0.3s forwards;
}
.hero-photo {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 6px solid var(--white);
  box-shadow: 0 30px 60px -20px rgba(22,20,15,0.25);
  aspect-ratio: 4/5;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* stats */
.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 40px 5vw 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
}
.stat { padding: 30px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat-num { display: block; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; color: var(--red); }
.stat-label { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }

/* sections */
section { position: relative; padding: 120px 5vw; }
.section-label { color: var(--red); font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.7rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; max-width: 760px; }
.section-sub { margin-top: 16px; color: var(--ink-soft); font-size: 16px; max-width: 560px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* category tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.tab:hover { border-color: var(--ink); color: var(--ink); }
.tab.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* project cards */
.card-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  position: relative;
  border-radius: 24px;
  padding: 30px 26px 0;
  cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -20px rgba(22,20,15,0.3); }
.card.hidden { display: none; }
.card-pin { width: 8px; height: 8px; border-radius: 50%; background: rgba(22,20,15,0.35); margin: 0 auto; position: relative; }
.card-pin::after { content: ''; position: absolute; top: 8px; left: 50%; width: 1px; height: 20px; background: rgba(22,20,15,0.25); }
.card-tag { margin-top: 18px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.65; }
.card-title { margin-top: 10px; font-size: 1.35rem; font-weight: 600; line-height: 1.15; }
.card-line { margin-top: 10px; font-size: 14px; opacity: 0.8; line-height: 1.5; }
.card-media {
  margin-top: 20px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: var(--white);
  aspect-ratio: 4/3;
  align-self: stretch;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease);
}
.card.open .card-detail { }
.card-detail-inner { padding: 22px 0 26px; border-top: 1px solid rgba(22,20,15,0.12); margin-top: 20px; }
.card-detail-inner h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; opacity: 0.6; margin-bottom: 6px; }
.card-detail-inner p { font-size: 13.5px; line-height: 1.55; opacity: 0.85; margin-bottom: 14px; }
.card-detail-inner p:last-child { margin-bottom: 0; }
.card-quote { font-size: 13.5px; font-style: italic; line-height: 1.6; opacity: 0.9; border-left: 2px solid currentColor; padding-left: 12px; }
.card-quote cite { display: block; margin-top: 8px; font-style: normal; font-size: 12px; font-weight: 600; opacity: 0.7; }
.card-expand-hint { margin-top: 14px; font-size: 12px; font-weight: 600; opacity: 0.55; display: flex; align-items: center; gap: 6px; }
.card.open .card-expand-hint .arrow { transform: rotate(180deg); }
.card-expand-hint .arrow { display: inline-block; transition: transform 0.3s var(--ease); }

.card-sage { background: var(--card-sage); color: var(--ink); }
.card-teal { background: var(--card-teal); color: var(--ink); }
.card-blue { background: var(--card-blue); color: var(--ink); }
.card-tan { background: var(--card-tan); color: var(--ink); }
.card-red { background: var(--red); color: var(--white); }
.card-red .card-media { background: rgba(255,255,255,0.15); }
.card-ink { background: var(--card-ink); color: var(--white); }
.card-ink .card-media { background: rgba(255,255,255,0.08); }

/* about */
.about-grid { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about-lede { font-size: 21px; line-height: 1.55; font-weight: 500; }
.about-lede .inline-photo {
  display: inline-block;
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  vertical-align: middle;
  margin: 0 4px;
  border: 2px solid var(--white);
  box-shadow: 0 4px 10px rgba(22,20,15,0.15);
}
.about-lede .inline-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-lede .pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  margin: 0 2px;
}
.about-text { margin-top: 22px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.7; }
.about-text p { margin-bottom: 14px; }
.about-photo {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -20px rgba(22,20,15,0.2);
}
.about-photo img { width: 100%; display: block; }
.about-photo-cap { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }

/* contact */
.contact-sub { margin-top: 16px; color: var(--ink-soft); font-size: 17px; }
.contact-grid { margin-top: 50px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.contact-link {
  padding: 26px 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--white);
  transition: all 0.25s var(--ease);
}
.contact-link:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(22,20,15,0.25); }
.contact-link span { display: block; font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.contact-link strong { font-size: 16px; font-weight: 600; }

.footer {
  padding: 34px 5vw 50px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 130px; }
  .hero-photo-wrap { max-width: 280px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); border-radius: 16px; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .card-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  section { padding: 80px 6vw; }
  .footer { flex-direction: column; gap: 6px; }
}
