/* =========================================================
   DOORS PAGE — v3 "Clean Showroom"  (robust, no overlaps)
   Save as: style/doors.css   (all classes start with dw-)
   Layout rules: plain grid/flex, nothing positioned over text,
   so it cannot break on any screen from 320px to 4K.
   ========================================================= */
.dw {
  --bg: #f7f5f1;
  --bg2: #ece8e0;
  --card: #ffffff;
  --ink: #15110d;
  --muted: #5b5249;
  --line: rgba(21, 17, 13, 0.12);
  --wood: #8a5a2b;
  --wood-soft: #e3cfb0;
  --accent: var(--red, #d6191f);
  --shadow: 0 30px 60px -34px rgba(40, 24, 6, 0.4);
  --head: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  overflow-x: clip;
}
html[data-theme="dark"] .dw {
  --bg: #0b0a09;
  --bg2: #121010;
  --card: #181513;
  --ink: #f4efe7;
  --muted: #aea597;
  --line: rgba(255, 255, 255, 0.13);
  --wood: #e0b27a;
  --wood-soft: #4a3320;
  --shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.95);
}
.dw *,
.dw *::before,
.dw *::after {
  box-sizing: border-box;
}
.dw img {
  max-width: 100%;
}
.dw-wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

/* ---------- type ---------- */
.dw-h1,
.dw-h2,
.dw-h3 {
  font-family: var(--head);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.dw-h1 {
  font-size: clamp(1.75rem, 4.4vw, 3.3rem);
  line-height: 1.1;
}
.dw-h1 em {
  font-style: italic;
  font-weight: 600;
}
.dw-h2 {
  font-size: clamp(1.45rem, 3.2vw, 2.4rem);
  line-height: 1.16;
}
.dw-h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.24;
}
.dw-lead,
.dw-text {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.15vw, 1.04rem);
  line-height: 1.8;
  margin: 0 0 14px;
  overflow-wrap: break-word;
}
.dw-lead {
  max-width: 58ch;
}

/* ---------- breadcrumb ---------- */
.dw-crumbs {
  margin: 0 0 clamp(20px, 3vw, 34px);
}
.dw-crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
}
.dw-crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.dw-crumbs li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--muted);
  border-right: 1.5px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.7;
}
.dw-crumbs a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 2px;
  transition: color 0.25s;
}
.dw-crumbs a:hover {
  color: var(--accent);
}
.dw-crumbs a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.dw-crumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- buttons ---------- */
.dw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.dw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 600 14px/1 var(--body);
  text-align: center;
  text-decoration: none;
  border: 1.5px solid var(--accent);
  box-shadow: 0 14px 28px -14px
    color-mix(in srgb, var(--accent) 75%, transparent);
  transition:
    transform 0.3s,
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}
.dw-btn svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s;
}
.dw-btn:hover {
  transform: translateY(-2px);
}
.dw-btn:hover svg {
  transform: translateX(4px);
}
.dw-btn:focus-visible,
.dw-link:focus-visible {
  outline: 3px solid var(--wood);
  outline-offset: 3px;
}
.dw-btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
.dw-btn--ghost:hover {
  border-color: var(--ink);
}
.dw-btn--light {
  background: #fff;
  color: #15110d;
  border-color: #fff;
  box-shadow: none;
}
.dw-btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

/* =========================================================
   SECTION 1 : HERO   (two columns -> one column)
   ========================================================= */
.dw-hero {
  padding: clamp(22px, 4vw, 56px) 0 clamp(44px, 7vw, 96px);
  background:
    radial-gradient(
      760px 380px at 95% 0%,
      color-mix(in srgb, var(--wood-soft) 55%, transparent),
      transparent 70%
    ),
    var(--bg);
}
.dw-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(30px, 5vw, 76px);
  align-items: center;
}
.dw-hero-copy {
  min-width: 0;
  animation: dw-rise 0.8s ease both;
}
.dw-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
}
.dw-facts li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}
.dw-facts b {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}
.dw-facts small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}
.dw-facts-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent);
}
.dw-hero-media {
  min-width: 0;
  padding: 0 12px 12px 0;
  animation: dw-rise 0.9s 0.1s ease both;
}
.dw-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 4.6;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg2);
  box-shadow:
    12px 12px 0 -1px var(--wood-soft),
    var(--shadow);
}
.dw-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   SECTION 2 : CUSTOM MANUFACTURING
   ========================================================= */
.dw-custom {
  padding: clamp(48px, 7vw, 100px) 0;
  background: var(--bg2);
  border-block: 1px solid var(--line);
}
.dw-custom-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(26px, 5vw, 80px);
  align-items: start;
}
.dw-custom-head {
  min-width: 0;
}
.dw-custom-head .dw-h2 {
  margin: 0;
  position: relative;
  padding-top: 22px;
}
.dw-custom-head .dw-h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 4px;
  border-radius: 4px;
  background: var(--accent);
}
.dw-custom-body {
  min-width: 0;
  padding-left: clamp(18px, 3vw, 36px);
  border-left: 1px solid var(--line);
}
.dw-custom-body .dw-text:last-child {
  margin-bottom: 0;
}

/* =========================================================
   SECTION 3 : DOOR TYPES   (2 cards per row -> 1)
   ========================================================= */
.dw-types {
  padding: clamp(52px, 8vw, 112px) 0;
  background: var(--bg);
  scroll-margin-top: 90px;
}
.dw .dw-head {
  position: static !important;
  max-width: 740px;
  margin: 0 auto clamp(32px, 5vw, 64px);
  padding: 0;
  background: none;
  text-align: center;
}
.dw .dw-head .dw-h2 {
  margin-inline: auto;
}
.dw .dw-head .dw-text {
  max-width: 62ch;
  margin-inline: auto;
}
.dw-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
  align-items: stretch;
}
.dw-row {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}
.dw-pic {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg2), var(--wood-soft));
}
.dw-pic img {
  display: block;
  width: 100%;
  height: auto; /* overrides the HTML height attribute so the ratio below works */
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transition: transform 0.9s ease;
}
.dw-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  max-width: calc(100% - 28px);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(14, 10, 7, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}
.dw-tag::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.dw-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  padding: clamp(20px, 3vw, 34px);
  overflow-wrap: break-word;
}
.dw-kicker {
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--wood-soft) 55%, transparent);
  color: var(--wood);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.dw-info p {
  margin: 0 0 12px;
  font-size: clamp(0.9rem, 1.05vw, 0.96rem);
  line-height: 1.75;
  color: var(--muted);
}
.dw-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  font: 600 14px/1.3 var(--body);
  color: var(--ink);
  text-decoration: none;
  transition:
    gap 0.3s,
    color 0.3s;
}
.dw-link svg {
  flex: 0 0 auto;
  display: block;
  width: 18px;
  height: 18px;
  box-sizing: content-box;
  padding: 5px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dw-link:hover {
  gap: 16px;
  color: var(--accent);
}

/* hover effects only on devices that really hover (no sticky hover on phones) */
@media (hover: hover) {
  .dw-row:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
  }
  .dw-row:hover .dw-pic img {
    transform: scale(1.05);
  }
}

/* ---------- CTA (kept in case you un-comment it) ---------- */
.dw-cta {
  margin-top: clamp(40px, 6vw, 88px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: clamp(24px, 4.5vw, 52px);
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(
    120deg,
    var(--accent),
    color-mix(in srgb, var(--accent) 55%, #000)
  );
}
.dw-cta h3 {
  font: 700 clamp(1.25rem, 2.4vw, 1.8rem)/1.2 var(--head);
  margin: 0 0 8px;
  color: #fff;
}
.dw-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

@keyframes dw-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dw *,
  .dw *::before,
  .dw *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* tablet landscape / small laptop */
@media (max-width: 1024px) {
  .dw-rows {
    gap: 22px;
  }
}

/* tablet portrait and below: everything becomes one column */
@media (max-width: 860px) {
  .dw-hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .dw-hero-media {
    max-width: 560px;
    width: 100%;
    margin-inline: auto;
  }
  .dw-frame {
    aspect-ratio: 4 / 3.4;
  }

  .dw-custom-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .dw-custom-body {
    padding-left: 0;
    border-left: 0;
    padding-top: 22px;
    border-top: 1px solid var(--line);
  }

  .dw-rows {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin-inline: auto;
    gap: 22px;
  }
}

/* phones */
@media (max-width: 560px) {
  .dw-crumbs ol {
    font-size: 12.5px;
  }
  .dw-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .dw-btn {
    width: 100%;
    padding: 15px 20px;
  }
  .dw-facts {
    flex-direction: column;
  }
  .dw-facts li {
    width: 100%;
  }
  .dw-hero-media {
    padding: 0 8px 8px 0;
  }
  .dw-frame {
    border-radius: 22px;
    box-shadow:
      8px 8px 0 -1px var(--wood-soft),
      var(--shadow);
  }
  .dw-row {
    border-radius: 22px;
  }
  .dw-pic img {
    aspect-ratio: 4 / 3;
  }
  .dw-cta {
    border-radius: 22px;
  }
}

/* very small phones (320px) */
@media (max-width: 360px) {
  .dw-info {
    padding: 18px 16px;
  }
  .dw-tag {
    font-size: 11px;
    padding: 6px 11px;
  }
}
