/* ============================================================
   Benax Custom Cabinets — modern, simple, inspired by A+ Cabinetry
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-alt:    #f4f6fa;       /* soft cool gray for striping sections */
  --bg-dark:   #0f1a2e;       /* navy for footer */
  --ink:       #0e1a2c;       /* near-black navy for headings */
  --ink-2:     #2c3548;
  --muted:     #5b6377;
  --line:      #e3e6ed;
  --accent:    #7a3a3a;       /* mulberry / burgundy brown */
  --accent-2:  #8e4747;
  --accent-soft: #f3eaea;

  --radius:    14px;
  --radius-pill: 999px;
  --container: 1200px;
  --gutter:    24px;

  --shadow-sm: 0 2px 8px rgba(14, 26, 44, .06);
  --shadow:    0 12px 32px rgba(14, 26, 44, .10);
  --shadow-lg: 0 30px 60px rgba(14, 26, 44, .14);

  --t:         220ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; border: 0; background: none; }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; font-weight: 600; }
p { color: var(--ink-2); }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section { padding: clamp(64px, 8vw, 100px) 0; }
.section-tight { padding: clamp(40px, 5vw, 64px) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 5vw, 56px); }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 1rem;
  background: var(--accent);
  color: #fff;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  border: 1.5px solid transparent;
}
.btn:hover { background: var(--accent-2); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand img { height: 72px; width: auto; }
.nav-desktop {
  justify-self: center;
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-mobile { display: none; }
.nav a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.nav a:hover::after { transform: scaleX(1); }

.header-cta { padding: 12px 24px; }

.menu-toggle { display: none; width: 40px; height: 40px; }
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); margin: 5px auto;
  transition: transform var(--t), opacity var(--t);
}

/* ---------- Hero ---------- */
.hero { padding: clamp(60px, 8vw, 100px) 0 clamp(40px, 6vw, 80px); }
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy h1 .accent { color: var(--accent); }
.hero-copy p.lead { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; max-width: 50ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-actions .btn { padding: 16px 32px; font-size: 1.05rem; }

.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 8px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  font-size: .95rem;
}
.review-badge .stars { color: #f5b400; letter-spacing: 1px; font-size: 1rem; }
.review-badge strong { color: var(--ink); font-weight: 600; }

.hero-image {
  position: relative;
  aspect-ratio: 4 / 3.2;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: var(--shadow);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Stats strip ---------- */
.stats { padding: 0 0 clamp(32px, 4vw, 56px); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.stat-card {
  background: var(--accent);
  color: #fff;
  padding: 32px 24px;
  border-radius: var(--radius);
  text-align: center;
}
.stat-num {
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-num small { font-size: .65em; font-weight: 500; opacity: .9; }
.stat-card hr {
  width: 60px; height: 1px;
  background: rgba(255, 255, 255, .35);
  border: 0;
  margin: 14px auto;
}
.stat-label {
  font-size: 1rem;
  opacity: .9;
  font-weight: 400;
}

/* ---------- Services ---------- */
.services { background: var(--bg); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.service-card .image {
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  overflow: hidden;
}
.service-card .image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms ease;
}
.service-card:hover .image img { transform: scale(1.04); }
.service-card .body { padding: 26px; }
.service-card h3 { margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: .98rem; margin: 0; }

/* ---------- Why choose us ---------- */
.why { background: var(--bg-alt); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--t), box-shadow var(--t);
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.why-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  margin: 0 auto 18px;
}
.why-icon svg { width: 30px; height: 30px; }
.why-card h3 { margin-bottom: 12px; font-size: 1.15rem; }
.why-card p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------- About strip ---------- */
.about { background: var(--bg-alt); }
.about .container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.about-copy h2 { margin-bottom: 20px; }
.about-copy p { color: var(--ink-2); margin-bottom: 16px; }
.about-copy strong { color: var(--ink); font-weight: 600; }
.about-image {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-alt);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Projects ---------- */
.projects { background: var(--bg); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.project-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-alt);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms ease;
}
.project-card:hover img { transform: scale(1.05); }
.project-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(14, 26, 44, .65));
  opacity: 0;
  transition: opacity var(--t);
}
.project-card:hover::after { opacity: 1; }
.project-card .label {
  position: absolute;
  bottom: 16px; left: 16px;
  color: #fff;
  font-weight: 500;
  font-size: .95rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t), transform var(--t);
  z-index: 1;
}
.project-card:hover .label { opacity: 1; transform: none; }

.projects-cta { text-align: center; margin-top: 40px; }

.empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

/* ---------- Contact ---------- */
.contact { background: var(--bg-alt); }
.contact .container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.contact-info h2 { margin-bottom: 20px; }
.contact-info p { color: var(--muted); margin-bottom: 24px; }
.contact-list { list-style: none; display: grid; gap: 16px; }
.contact-list li { display: flex; align-items: flex-start; gap: 14px; font-size: .98rem; }
.contact-list .ico {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.contact-list .ico svg { width: 18px; height: 18px; }
.contact-list strong { color: var(--ink); font-weight: 600; display: block; }
.contact-list span { color: var(--muted); }

.contact-form {
  background: var(--bg);
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-control {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
}
.form-control::placeholder { color: var(--muted); }
.form-control:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 58, 58, .12);
}
textarea.form-control { resize: vertical; min-height: 120px; }
.contact-form .btn { width: 100%; justify-content: center; padding: 16px; }
.form-status {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: .94rem;
}
.form-status.is-ok  { background: #e9f7ef; color: #1d6b3a; border: 1px solid #b6e1c2; }
.form-status.is-err { background: #fbeceb; color: #8a2922; border: 1px solid #f0c1bd; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, .72);
  padding: 60px 0 28px;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.footer-brand img { height: 64px; margin-bottom: 16px; filter: brightness(1.15) contrast(.95); }
.footer-brand p { color: rgba(255, 255, 255, .6); font-size: .94rem; max-width: 280px; }
.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: grid; gap: 10px; font-size: .94rem; }
.footer-col a { color: rgba(255, 255, 255, .72); }
.footer-col a:hover { color: #fff; }
.footer-col li { display: flex; gap: 10px; align-items: center; }
.footer-col li svg { width: 16px; height: 16px; opacity: .6; flex-shrink: 0; }

.social {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  display: grid; place-items: center;
  color: rgba(255, 255, 255, .8);
  transition: background var(--t), transform var(--t);
}
.social a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; }

.colophon {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-top: 40px;
  padding-top: 24px;
  text-align: center;
  font-size: .88rem;
  color: rgba(255, 255, 255, .5);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 44, .94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.lightbox button {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 1.4rem;
  transition: background var(--t);
}
.lightbox button:hover { background: var(--accent); }
.lightbox .lb-close { top: 24px; right: 24px; }
.lightbox .lb-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next  { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Reveal — JS opt-in ---------- */
/* Default: visible. JS adds .js-reveal class to the <html> root, which then hides
   .reveal until they intersect the viewport. That way no-JS / failed-JS users
   still see the content. */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive ---------- */
/* Tablet portrait — single-column hero/about/contact, but keep the grids
   that read fine in 2 columns (services, why-choose, projects, footer). */
@media (max-width: 900px) {
  .hero .container,
  .about .container,
  .contact .container { grid-template-columns: 1fr; }
  .services-grid,
  .why-grid,
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}

/* Phone — top nav becomes a full-width drop-down panel. */
@media (max-width: 640px) {
  /* Hide the desktop inline nav; the body-level mobile nav takes over. */
  .nav-desktop { display: none; }

  /* Mobile nav drops below the header. It's a sibling of <header>, not
     a descendant, so the header's backdrop-filter doesn't constrain it. */
  .nav-mobile {
    position: fixed;
    top: var(--header-height, 88px);
    left: 0;
    right: 0;
    z-index: 49;
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-mobile.is-open { display: flex; }
  .nav-mobile a { padding: 14px 24px; width: 100%; }
  .nav-mobile a::after { display: none; }

  .menu-toggle { display: block; }
  .menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .header-cta { display: none; }

  /* On phone: a 5-link top nav crowds the logo. Hide nav links and rely on
     the hamburger; otherwise the title bar is too busy. */
  .stats-grid,
  .services-grid,
  .why-grid,
  .projects-grid,
  .site-footer .container { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Hero CTA buttons should fill the column instead of wrapping awkwardly. */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Review badge text reflows cleanly on a single short line. */
  .review-badge { flex-wrap: wrap; }

  /* Slightly tighter container padding so the logo doesn't clip the edge. */
  .site-header .container { gap: 12px; }
  .brand img { height: 60px; }
}
