/* Doug & Co. — shared styles */
:root {
  --cream: #F6EFE3;
  --ivory: #FBF7EF;
  --paper: #EFE6D4;
  --walnut: #3A2A1F;
  --walnut-2: #6B4A33;
  --gold: #C49A5B;
  --gold-soft: #D9B884;
  --taupe: #8A7561;
  --line: #E2D6BE;
  --shadow: 0 1px 2px rgba(58, 42, 31, 0.06), 0 8px 28px rgba(58, 42, 31, 0.06);
  --serif: "Cormorant Garamond", "Hoefler Text", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100%; }
img, svg, video { max-width: 100%; height: auto; }
body {
  background: var(--cream);
  color: var(--walnut);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Typography */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--walnut); margin: 0; letter-spacing: -0.01em; line-height: 1.1; }
h1 { font-size: clamp(48px, 7vw, 92px); font-weight: 400; letter-spacing: -0.02em; }
h2 { font-size: clamp(34px, 4.5vw, 56px); font-weight: 400; }
h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; }
p { margin: 0 0 1em; color: var(--walnut); }
.lead { font-size: 19px; line-height: 1.65; color: var(--walnut-2); }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.muted { color: var(--taupe); }

/* Layout */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }

/* Top bar */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  max-width: 1280px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 22px; font-weight: 500;
}
.brand img { width: 38px; height: 38px; object-fit: contain; }
.nav { display: flex; gap: 36px; align-items: center; }
.nav a {
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--walnut-2); position: relative; padding: 8px 0;
  transition: color .2s ease;
}
.nav a:hover { color: var(--walnut); }
.nav a.active { color: var(--walnut); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--gold);
}
.cart-btn {
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--walnut); padding: 10px 18px; border: 1px solid var(--walnut);
  border-radius: 999px; transition: all .2s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.cart-btn:hover { background: var(--walnut); color: var(--ivory); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 16px 28px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--walnut); background: var(--walnut); color: var(--ivory);
  transition: all .2s ease;
}
.btn:hover { background: var(--walnut-2); border-color: var(--walnut-2); }
.btn-ghost { background: transparent; color: var(--walnut); }
.btn-ghost:hover { background: var(--walnut); color: var(--ivory); }
.btn-arrow::after { content: "→"; font-size: 14px; }

/* Sections */
section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

/* Footer */
.footer {
  background: var(--walnut);
  color: var(--ivory);
  padding: 80px 0 32px;
  margin-top: 96px;
}
.footer h4 {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 18px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 64px;
}
.footer p, .footer a { color: rgba(251, 247, 239, 0.78); font-size: 14px; }
.footer a:hover { color: var(--gold-soft); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand img { width: 44px; height: 44px; object-fit: contain; filter: brightness(1.1); }
.footer-brand span { font-family: var(--serif); font-size: 26px; color: var(--ivory); }
.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-icon {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(251, 247, 239, 0.28); border-radius: 999px;
  color: var(--ivory); transition: all .2s ease;
}
.social-icon:hover { background: var(--gold); border-color: var(--gold); color: var(--walnut); }
.social-icon svg { display: block; }
.footer-bottom {
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid rgba(251, 247, 239, 0.14);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 12px; color: rgba(251, 247, 239, 0.55);
  letter-spacing: 0.05em;
}

/* Image placeholders — striped, monospace label */
.ph {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background:
    repeating-linear-gradient(135deg,
      rgba(196, 154, 91, 0.10) 0 2px,
      transparent 2px 16px),
    var(--paper);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ph::before {
  content: attr(data-label);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; color: var(--walnut-2);
  letter-spacing: 0.04em; text-align: center; padding: 0 16px;
  opacity: 0.75;
}
.ph-tall { aspect-ratio: 4 / 5; }
.ph-wide { aspect-ratio: 16 / 10; }
.ph-portrait { aspect-ratio: 3 / 4; }
.ph-hero { aspect-ratio: 5 / 6; }

/* Pill / tag */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--walnut-2);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--ivory);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* Card hover */
.product-card {
  display: block; cursor: pointer; transition: transform .3s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-card:hover .ph { border-color: var(--gold); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Hamburger (hidden on desktop) */
section [data-screen-label="05 Social"] [style*="grid-template-columns:repeat(4, 1fr)"] {
  /* default desktop 4 across */
}
@media (max-width: 860px) {
  section [data-screen-label="05 Social"] [style*="grid-template-columns:repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Card padding bumps for touch */
@media (max-width: 640px) {
  .feat-body { padding: 24px 22px 26px !important; }
  .oil-body { padding: 28px 22px !important; }
  .care-card { padding: 28px 22px !important; }
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 80px; align-items: center; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-grid .ph-hero { aspect-ratio: 4 / 5; }
}

/* Featured & shop product grid responsive */
.featured-grid, .product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
@media (max-width: 980px) {
  .featured-grid, .product-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 640px) {
  .featured-grid, .product-grid { grid-template-columns: 1fr; gap: 24px; max-width: 100%; margin-left: 0; margin-right: 0; }
}

/* Story / two-col content blocks */
@media (max-width: 860px) {
  section [style*="grid-template-columns: 1fr 1.2fr"],
  section [style*="grid-template-columns: 1.2fr 1fr"],
  section [style*="grid-template-columns: 1fr 1fr"],
  section [style*="grid-template-columns:1fr 1.2fr"],
  section [style*="grid-template-columns:1.2fr 1fr"],
  section [style*="grid-template-columns:1fr 1fr"],
  section [style*="grid-template-columns: 1.4fr 1fr"],
  section [style*="grid-template-columns:1.4fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
}

/* Process grid responsive (homepage 8-step) */
@media (max-width: 980px) {
  section [style*="grid-template-columns:repeat(4, 1fr)"],
  section [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px !important;
  }
}
@media (max-width: 540px) {
  section [style*="grid-template-columns:repeat(4, 1fr)"],
  section [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* Hero floating logo card — keep inside on mobile */
@media (max-width: 860px) {
  section [style*="position:absolute"][style*="left:-28px"] {
    position: static !important;
    margin-top: 16px;
  }
}
.hamburger {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.hamburger span {
  display: block; width: 18px; height: 1.5px; background: var(--walnut);
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--cream);
  border-top: 1px solid var(--line);
  padding: 16px 20px 24px;
}
.mobile-menu a {
  font-size: 18px; font-weight: 500;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
  color: var(--walnut); min-height: 44px;
  display: flex; align-items: center;
}
.mobile-menu a.active { color: var(--gold); }
.mobile-menu a.mobile-cart {
  margin-top: 16px;
  border: 1px solid var(--walnut);
  border-radius: 999px;
  justify-content: center;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--walnut); color: var(--ivory);
  padding: 14px 20px;
}
.mobile-menu.open { display: flex; }

/* Tablet */
@media (max-width: 980px) {
  section { padding: 72px 0; }
  h1 { font-size: clamp(40px, 6vw, 64px); }
  h2 { font-size: clamp(30px, 4vw, 44px); }
  .lead { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* Mobile */
@media (max-width: 860px) {
  .nav { display: none; }
  .cart-btn-desktop { display: none; }
  .hamburger { display: inline-flex; }
  .topbar-inner { padding: 12px 16px; }
  .container, .container-narrow { padding: 0 20px; max-width: 100%; }
  section { padding: 56px 0; }
  .footer { padding: 48px 0 24px; margin-top: 64px; }
  .footer-grid { gap: 32px; }
  .btn { padding: 14px 22px; min-height: 44px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.65; padding-bottom: 76px; }
  h1 { font-size: clamp(38px, 9vw, 52px); }
  h2 { font-size: clamp(28px, 7vw, 38px); }
  h3 { font-size: 22px; }
  .lead { font-size: 17px; line-height: 1.6; }
  p { line-height: 1.65; }
  section { padding: 48px 0; }
  .container, .container-narrow { padding: 0 18px; max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .footer { margin-bottom: 76px; }

  /* Buttons full-width inside hero/CTA rows; 48px min height */
  .btn-block-mobile, .hero-ctas .btn { width: 100%; justify-content: center; }
  .btn { min-height: 48px; padding: 14px 24px; }

  /* One-CTA-per-section helper */
  .mobile-hide { display: none !important; }

  .ph-hero { aspect-ratio: 4 / 5; }
  .ph-portrait { aspect-ratio: 4 / 5; }

  /* Compact mobile hero on home */
  .home-hero { padding: 56px 0 64px !important; }
  .home-hero h1 { font-size: 44px !important; margin-bottom: 22px !important; }
  .home-hero .lead { margin-bottom: 28px !important; }
  .home-hero .eyebrow { margin-bottom: 18px !important; }

  /* Single-column, full-width product grids on mobile */
  .featured-grid, .product-grid, .opt-grid, .opt-grid.three {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 28px !important;
  }
  /* Featured card body — bigger text + comfortable padding on mobile */
  .feat-card { width: 100%; }
  .feat-body { padding: 24px 22px 26px !important; }
  .feat-desc { font-size: 15px !important; }
  .feat-head h3 { font-size: 24px !important; }
  .feat-cta { width: 100%; justify-content: center; min-height: 48px; }
  .feat-foot { padding-top: 20px !important; }

  /* Shop option cards — keep image full width, comfortable text spacing */
  .opt-card .opt-img-real, .opt-card .opt-img { width: 100%; }
  .opt-body { padding: 18px 4px 8px !important; }
  .opt-foot { padding-top: 16px !important; }
  .opt-cta { min-height: 44px; padding: 12px 0; }
}

/* Sticky mobile shop bar */
.mobile-shop-bar { display: none; }
@media (max-width: 860px) {
  .mobile-shop-bar {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--cream);
    border-top: 1px solid var(--line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    z-index: 60;
    box-shadow: 0 -4px 16px rgba(58, 42, 31, 0.10);
  }
  .mobile-shop-cta {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 52px;
    background: var(--walnut); color: var(--ivory);
    font-family: var(--sans);
    font-size: 13px; font-weight: 500;
    letter-spacing: 0.16em; text-transform: uppercase;
    border-radius: 999px;
    padding: 0 24px;
    gap: 10px;
  }
  .mobile-shop-cta::after { content: "→"; font-size: 14px; }
  body { padding-bottom: 76px; }
  .footer { margin-bottom: 0; }
}
