/* ==========================================================================
   Baby Fence — site styles
   Brand colors are taken from the Baby Fence logo: warm wood tan, charcoal,
   foliage green and a soft cream paper tone.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #1d211c;
  --ink-soft: #5f655b;
  --muted: #7a8075;
  --paper: #f6f3ec;
  --paper-2: #efebe1;
  --line: #ddd8cb;
  --wood: #b87a3f;
  --wood-light: #d9a865;
  --wood-dark: #8d5a28;
  --leaf: #6f8a52;
  --dark: #191c18;
  --dark-2: #232821;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(29, 33, 28, .06);
  --shadow: 0 18px 44px rgba(29, 33, 28, .11);
  --shadow-lg: 0 34px 80px rgba(29, 33, 28, .17);
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.06;
  margin: 0 0 18px;
}
h1 { font-size: clamp(44px, 5.6vw, 82px); letter-spacing: -.055em; }
h2 { font-size: clamp(32px, 4vw, 56px); }
h3 { font-size: 20px; letter-spacing: -.02em; }
p { margin: 0 0 16px; }
em { font-style: normal; color: var(--wood); }

.wrap { width: min(1280px, 100% - 2 * clamp(20px, 5vw, 72px)); margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--wood-dark); margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--wood); border-radius: 2px; }

.lede { font-size: 17px; color: var(--ink-soft); line-height: 1.8; max-width: 56ch; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; letter-spacing: .01em; cursor: pointer;
  transition: transform .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--wood); color: #fff; box-shadow: 0 10px 26px rgba(184, 122, 63, .32); }
.btn-primary:hover { background: var(--wood-dark); }
.btn-dark { background: var(--dark); color: #f6f3ec; }
.btn-dark:hover { background: #30372c; }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #f6f3ec; color: var(--dark); }
.btn-light:hover { background: #fff; }
.link-arrow { font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--wood); padding-bottom: 3px; }
.link-arrow:hover { color: var(--wood-dark); border-color: var(--wood-dark); }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 243, 236, .9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(29, 33, 28, .09);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 84px; }

/* Brand lockup — the dog-and-fence mark from the Baby Fence logo + wordmark */
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { width: 74px; height: auto; flex: none; margin-bottom: -4px; filter: drop-shadow(0 3px 7px rgba(29, 33, 28, .18)); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: Manrope, sans-serif; font-weight: 800; font-size: 23px;
  letter-spacing: -.035em; color: var(--ink); white-space: nowrap;
}
.brand-name span { color: var(--wood); }
.brand-tag {
  font-size: 8.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin-top: 5px; white-space: nowrap;
}

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { font-size: 14px; color: var(--ink-soft); font-weight: 500; position: relative; padding: 6px 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--wood); transition: right .25s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.header-cta { padding: 12px 22px; font-size: 13px; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: 12px; background: transparent; font-size: 19px; cursor: pointer;
}

/* -------------------------------------------------------------- home hero */
.home-hero { padding: clamp(42px, 6vw, 86px) 0 clamp(46px, 6vw, 80px); }
.home-hero-inner {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(34px, 5.5vw, 86px); align-items: center;
}
.home-hero h1 { margin-bottom: 20px; }
.home-hero .lede { font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 26px; margin-top: 42px;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.hero-meta div { min-width: 120px; }
.hero-meta strong { display: block; font-family: Manrope, sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -.04em; }
.hero-meta span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* The supplied Baby Fence logo artwork, shown as the homepage centerpiece */
.hero-logo-card { position: relative; }
.hero-logo-card::after {
  content: ""; position: absolute; inset: 26px -20px -22px 26px;
  border: 1px solid var(--wood-light); border-radius: var(--radius); z-index: 0;
}
.hero-logo-frame {
  position: relative; z-index: 1; background: #fff; border-radius: var(--radius);
  padding: clamp(14px, 2vw, 26px); box-shadow: var(--shadow-lg);
}
.hero-logo-frame img { width: 100%; height: auto; border-radius: 6px; }
.hero-logo-caption {
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.hero-logo-caption b { color: var(--ink); font-weight: 800; }

/* ------------------------------------------------------------ value strip */
.value-strip { background: var(--dark); color: #f1eee5; }
.value-strip .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding: 30px 0; }
.value-strip article { display: flex; gap: 14px; align-items: flex-start; }
.value-strip .num { font-family: Manrope, sans-serif; font-weight: 700; font-size: 16px; color: var(--wood-light); }
.value-strip h3 { font-size: 14px; margin: 0 0 4px; letter-spacing: 0; }
.value-strip p { margin: 0; font-size: 13px; color: #a8aca0; line-height: 1.55; }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(60px, 8vw, 118px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 36px; align-items: end; margin-bottom: 46px; }
.section-head h2 { margin-bottom: 0; }
.section-head p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.8; }

/* ------------------------------------------------------- catalog teaser */
.teaser-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.teaser {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--paper-2); box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.teaser:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.teaser img { width: 100%; height: 290px; object-fit: cover; }
.teaser-body { padding: 22px 24px 26px; }
.teaser-body h3 { margin-bottom: 8px; }
.teaser-body p { margin: 0 0 16px; font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.teaser-tag {
  position: absolute; top: 16px; left: 16px; background: rgba(25, 28, 24, .86); color: #fff;
  padding: 7px 13px; border-radius: 999px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
}

/* -------------------------------------------------------------- catalog */
.catalog-hero { padding: clamp(46px, 6vw, 84px) 0 clamp(30px, 4vw, 54px); }
.catalog-hero .lede { margin-top: 6px; }
.page-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: end; }

.spec-bar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.spec-bar div { background: var(--paper); padding: 20px 22px; }
.spec-bar dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.spec-bar dd { margin: 0; font-family: Manrope, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }

.catalog-list { display: grid; gap: 28px; }
.catalog-item {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.catalog-item:nth-child(even) .catalog-media { order: 2; }
.catalog-media { position: relative; min-height: 340px; background: var(--paper-2); }
.catalog-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.catalog-code {
  position: absolute; left: 18px; top: 18px; background: rgba(25, 28, 24, .88); color: #fff;
  padding: 8px 14px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .14em;
}
.catalog-body { padding: clamp(26px, 3.4vw, 46px); display: flex; flex-direction: column; justify-content: center; }
.catalog-body h3 { font-size: clamp(24px, 2.3vw, 32px); margin-bottom: 12px; }
.catalog-body > p { font-size: 15px; color: var(--ink-soft); line-height: 1.8; }
.spec-list { list-style: none; margin: 4px 0 24px; padding: 0; display: grid; gap: 0; }
.spec-list li {
  display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 16px;
  padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.spec-list li span:first-child { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.catalog-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ------------------------------------------------------------- finishes */
.finish-section { background: var(--paper-2); }
.finish-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.finish {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.swatch { width: 100%; height: 86px; border-radius: 10px; border: 1px solid rgba(29, 33, 28, .12); }
.sw-cedar { background: linear-gradient(135deg, #d9a865, #a9693a); }
.sw-walnut { background: linear-gradient(135deg, #8d5c33, #4d3119); }
.sw-gray { background: linear-gradient(135deg, #c3c3bb, #76786f); }
.sw-black { background: linear-gradient(135deg, #3a3f38, #15180f); }
.finish h3 { font-size: 16px; margin: 0; }
.finish p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.7; }

/* --------------------------------------------------------------- add-ons */
.addon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.addon { background: var(--paper); padding: 28px 26px; }
.addon span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--wood-dark); font-weight: 700; }
.addon h3 { font-size: 18px; margin: 12px 0 8px; }
.addon p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.75; }

/* --------------------------------------------------------------- gallery */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 10px 18px; font-size: 13px; color: var(--ink-soft); cursor: pointer; transition: .2s;
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter span { font-size: 11px; color: var(--muted); margin-left: 7px; }
.filter.active { background: var(--dark); border-color: var(--dark); color: #fff; }
.filter.active span { color: var(--wood-light); }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 22px; }
.project-card { min-width: 0; }
.project-image {
  position: relative; display: block; width: 100%; height: 320px; padding: 0; border: 0;
  background: var(--paper-2); border-radius: 12px; overflow: hidden; cursor: zoom-in;
}
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.project-image:hover img { transform: scale(1.04); }
.view-icon {
  position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--paper); display: grid; place-items: center; font-size: 16px;
  opacity: 0; transform: translateY(6px); transition: .22s;
}
.project-image:hover .view-icon { opacity: 1; transform: none; }
.project-count {
  position: absolute; left: 14px; bottom: 14px; background: rgba(25, 28, 24, .85); color: #fff;
  padding: 6px 11px; border-radius: 999px; font-size: 10px; letter-spacing: .12em;
}
.project-caption { padding: 14px 2px 0; }
.project-caption h3 { font-size: 16px; margin: 0 0 4px; }
.project-caption p { margin: 0; font-size: 12.5px; color: var(--muted); }
.gallery-note { margin: 34px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 74px); align-items: center; }
.about-figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-figure img { width: 100%; height: clamp(320px, 42vw, 520px); object-fit: cover; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.step { border-top: 2px solid var(--wood); padding-top: 20px; }
.step span { font-family: Manrope, sans-serif; font-weight: 700; font-size: 13px; color: var(--wood-dark); letter-spacing: .1em; }
.step h3 { font-size: 19px; margin: 12px 0 10px; }
.step p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.75; }

.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary {
  cursor: pointer; list-style: none; font-family: Manrope, sans-serif; font-weight: 600;
  font-size: 18px; letter-spacing: -.02em; display: flex; justify-content: space-between; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--wood); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 14px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.8; max-width: 72ch; }

/* ----------------------------------------------------------------- CTA */
.cta { background: var(--dark); color: #f3f0e7; }
.cta .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center; padding: clamp(50px, 7vw, 96px) 0; }
.cta h2 { color: #f6f3ec; margin-bottom: 14px; }
.cta h2 em { color: var(--wood-light); }
.cta p { color: #a8aca0; font-size: 16px; margin: 0; max-width: 52ch; }
.cta-actions { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta-actions .btn { width: auto; }
.cta-note { font-size: 13px; color: #8d9285; }

/* -------------------------------------------------------------- footer */
.site-footer { background: #13150f; color: #d8d5c9; padding: clamp(44px, 5vw, 70px) 0 28px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, .6fr)); gap: 40px; }
.footer-logo { width: min(290px, 78%); height: auto; margin-bottom: 20px; }
.footer-top p { color: #9b9d90; font-size: 14px; max-width: 42ch; margin: 0; }
.footer-col h4 { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #807f73; margin: 0 0 16px; font-weight: 700; }
.footer-col a, .footer-col p { display: block; font-size: 14.5px; color: #d8d5c9; margin: 0 0 11px; }
.footer-col a:hover { color: var(--wood-light); }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 12.5px; color: #83857a;
}

/* ------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(13, 15, 12, .96);
  display: grid; grid-template-columns: 60px minmax(0, 1fr) 60px; align-items: center;
  padding: 54px 4vw; color: #fff;
}
.lightbox[hidden] { display: none; }
.lightbox figure { grid-column: 2; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: 76vh; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { font-size: 14px; color: #ded9cc; }
.lightbox button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 19px; cursor: pointer; justify-self: center;
}
.lightbox button:hover { background: rgba(255, 255, 255, .18); }
.lightbox-close { position: absolute; top: 22px; right: 26px; }
.lightbox-prev { grid-column: 1; grid-row: 1; }
.lightbox-next { grid-column: 3; grid-row: 1; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .teaser-grid, .finish-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value-strip .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .addon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .header-inner { height: 74px; gap: 16px; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px clamp(20px, 5vw, 72px) 22px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .site-nav a::after { display: none; }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  .home-hero-inner, .about-grid, .page-head, .section-head, .cta .wrap, .catalog-item { grid-template-columns: minmax(0, 1fr); }
  .catalog-item:nth-child(even) .catalog-media { order: 0; }
  .catalog-media { min-height: 260px; height: 260px; }
  .section-head, .page-head { gap: 20px; align-items: start; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > div:first-child { grid-column: 1 / -1; }
  .hero-logo-card::after { inset: 18px -14px -16px 18px; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .brand-mark { width: 58px; }
  .brand-name { font-size: 20px; }
  .brand-tag { font-size: 8px; letter-spacing: .18em; }
  .teaser-grid, .finish-grid, .steps, .gallery, .addon-grid, .spec-bar, .value-strip .wrap { grid-template-columns: minmax(0, 1fr); }
  .teaser img { height: 230px; }
  .project-image { height: 260px; }
  .spec-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hero-meta { gap: 18px; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions, .catalog-actions, .cta-actions { width: 100%; }
  .link-arrow { text-align: center; width: 100%; }
  .lightbox { grid-template-columns: 40px minmax(0, 1fr) 40px; padding: 60px 3vw; }
  .lightbox button { width: 36px; height: 36px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
