/* =========================================
   PS Cabinetry NZ — theme
   Reuses the proven Smart Sort / Wiggle & Grow layout,
   re-skinned in near-black + warm timber accent.
   ========================================= */

/* -----------------------------------------
   Globals & Theme Tokens
   ----------------------------------------- */
:root {
  --max: 1240px;
  --gap: 28px;

  /* Brand palette: near-black ink + warm oak accent */
  --ink: #141414;          /* headings, buttons, logo */
  --ink-2: #2b2b2b;
  --accent: #b07a3d;       /* warm timber / oak */
  --accent-rgb: 176, 122, 61;
  --accent-dark: #8f6230;

  --muted: #555;
  --line: #e7e4df;         /* warm-grey hairline */
  --paper: #faf8f5;        /* warm off-white section bg */

  --header-offset: 96px;

  /* Hero background: swap the url() in for a real photo when you have one.
     e.g.  --hero-img: linear-gradient(...), url("../images/hero.jpg"); */
  --hero-img: linear-gradient(180deg, rgba(20,20,20,.55), rgba(20,20,20,.75)),
              linear-gradient(120deg, #1c1c1c 0%, #2c2622 55%, #3a2f24 100%);
}
@media (max-width: 980px) {
  :root { --header-offset: 190px; }
}

/* -----------------------------------------
   Base Elements & Layout
   ----------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #222;
  line-height: 1.55;
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gap); }
main section { padding: 60px 0; }
section[id] { scroll-margin-top: var(--header-offset); }

h1, h2, h3, h4, h5, h6 { line-height: 1.2; margin: 0 0 12px; color: var(--ink); }
.lead { color: var(--muted); font-size: 1.05rem; }
.small { font-size: 14px; color: #666; }

.grid { display: grid; gap: var(--gap); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
ul.clean { padding-left: 1.1rem; margin: 0; }
@media (max-width: 900px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
}

/* Eyebrow (h6) with underline */
h6 {
  position: relative;
  display: inline-block;
  margin: 0 0 14px;
  padding-bottom: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
  font-size: 13px;
}
h6::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 22px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  transition: background .2s, transform .12s, box-shadow .2s;
}
.btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), .28);
}
.btn.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn.btn-outline:hover {
  background: var(--ink);
  color: #fff;
}

/* -----------------------------------------
   Header (sticky)
   ----------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gap);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 24px;
}

/* Logo lockup: SVG emblem + wordmark */
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { height: 50px; width: auto; display: block; }
.brand-badge { height: 54px; width: 54px; flex-shrink: 0; display: block; }
@media (max-width: 520px) { .brand-badge { height: 46px; width: 46px; } .brand-word .b-main { font-size: 18px; } }
.brand-word {
  display: flex; flex-direction: column; line-height: 1;
}
.brand-word .b-main {
  font-weight: 800; letter-spacing: .14em;
  font-size: 20px; color: var(--ink);
}
.brand-word .b-sub {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-top: 4px;
}

/* nav */
.main-nav {
  justify-self: center;
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
}
.main-nav a {
  position: relative;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 600;
  border-radius: 10px;
  transition: color .2s, background .2s;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 6px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .18s;
}
.main-nav a:hover { color: var(--accent); background: rgba(var(--accent-rgb), .07); }
.main-nav a:hover::after { transform: scaleX(1); }

/* phone CTA pill */
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  color: var(--ink); font-weight: 700;
  border: 1px solid rgba(var(--accent-rgb), .35);
  border-radius: 999px; background: #fff;
  white-space: nowrap; flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s, transform .12s, background .2s;
}
.cta:hover {
  background: rgba(var(--accent-rgb), .06);
  border-color: rgba(var(--accent-rgb), .55);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), .18);
  transform: translateY(-1px);
}
.phone-icon { width: 18px; height: 18px; display: block; color: var(--accent); }

/* mobile menu toggle (hidden on desktop) */
.menu-toggle { display: none; }

@media (max-width: 980px) {
  .site-header .bar { grid-template-columns: auto 1fr; row-gap: 10px; }
  .main-nav { grid-column: 1 / -1; justify-content: center; gap: 12px; }
  .main-nav a { padding: 8px 10px; }
  .cta { justify-self: end; }
}

/* -----------------------------------------
   Hero
   ----------------------------------------- */
.hero { padding: 0; position: relative; color: #fff; }
.hero .bg {
  position: relative; overflow: hidden;
  display: grid; place-items: center; text-align: center;
  background: #211a14; /* fallback ground under the SVG art */
  min-height: clamp(500px, 70vh, 760px);
}
/* Vector "cabinetmaker's elevation" artwork — swap for a photo later if wanted */
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.hero .bg::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(22,17,12,.62) 0%, rgba(22,17,12,.5) 45%, rgba(22,17,12,.42) 100%);
}
.hero .content { position: relative; z-index: 2; padding: 64px var(--gap); max-width: 900px; }
.hero h1 { font-size: clamp(32px, 6vw, 60px); margin: 0 0 16px; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.45); }
.hero p { margin: 0 auto 26px; font-size: clamp(16px, 2.4vw, 20px); max-width: 620px; color: #f4efe6; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.hero .btn { background: var(--accent); }
.hero .btn:hover { background: #fff; color: var(--ink); }
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center;
  margin-top: 26px; color: #fff; font-weight: 600; font-size: 14px;
}
.hero-badges span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px; background: #2a2015;
}
.hero-badges span::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

/* -----------------------------------------
   Hero — one-time load-in: left-to-right reveal + light sweep + content fade-up.
   No ongoing motion. Gated so visitors who ask their OS for reduced motion get
   the calm static version.
   ----------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-art {
    animation: heroReveal 1.6s cubic-bezier(.22,.61,.36,1) both;
  }
  @keyframes heroReveal {
    from { clip-path: inset(0 100% 0 0); opacity: 0; }
    to   { clip-path: inset(0 0 0 0);   opacity: 1; }
  }
  /* light glint sweeps left-to-right, once (overlaps the reveal) */
  .hero .bg::before {
    content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    background: linear-gradient(105deg, transparent 42%, rgba(255,240,214,.12) 50%, transparent 58%);
    transform: translateX(-120%);
    animation: heroSweep 1.8s ease-out .5s 1 both;
  }
  @keyframes heroSweep { to { transform: translateX(120%); } }
  /* content fades up with a gentle stagger, once */
  .hero h1     { animation: heroUp .8s ease-out .28s both; }
  .hero p      { animation: heroUp .8s ease-out .44s both; }
  .hero .btn   { animation: heroUp .8s ease-out .60s both; }
  .hero-badges { animation: heroUp .8s ease-out .76s both; }
  @keyframes heroUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
  /* plants: leaves grow up out of the pot, once —
     delayed so they start after the 1.6s heroReveal finishes */
  .hero .leaf {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: leafGrow 2.8s cubic-bezier(.22,.61,.36,1) both;
  }
  .hero .leaf-l { animation-delay: 1.85s; }
  .hero .leaf-r { animation-delay: 2.15s; }
  @keyframes leafGrow {
    from { transform: scale(.2); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
  }
}

/* -----------------------------------------
   About
   ----------------------------------------- */
#about { background: var(--paper); }
#about .lead { max-width: 70ch; }

/* Client's primary "PS CABINETS" mark, featured in About */
.brand-feature { margin: 32px auto 0; max-width: 300px; }
.brand-feature img { width: 100%; height: auto; }

/* Horizontal logo lockup strip above the footer */
.brand-strip { background: #fff; border-top: 1px solid var(--line); padding: 44px 0; }
.brand-strip .container { text-align: center; }
.brand-strip img { display: inline-block; width: 100%; max-width: 640px; height: auto; }

/* -----------------------------------------
   Services
   ----------------------------------------- */
#services .container { text-align: center; }
#services h6 { display: inline-block; text-align: initial; }
#services h2 { max-width: 42ch; margin: 8px auto 8px; }
#services .lead { max-width: 60ch; margin: 0 auto 8px; }

.services-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--gap) + 6px);
}
.service {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: transform .18s ease, box-shadow .2s ease, border-color .18s ease;
}
.service:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(var(--accent-rgb), .4);
}
.icon-wrap {
  display: inline-grid; place-items: center;
  width: 82px; height: 82px; margin: 0 auto 14px;
  border-radius: 999px;
  border: 2px solid rgba(var(--accent-rgb), .55);
  background: rgba(var(--accent-rgb), .05);
}
.service svg {
  width: 38px; height: 38px;
  stroke: var(--accent); fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.service h3 { margin: 6px 0 8px; font-size: 19px; }
.service p { margin: 0; color: #4b5563; font-size: 15px; }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* -----------------------------------------
   Gallery (our work)
   ----------------------------------------- */
#gallery { background: var(--paper); }
#gallery .container { text-align: center; }
#gallery h6 { display: inline-block; text-align: initial; }
#gallery h2 { max-width: 40ch; margin: 8px auto 8px; }
#gallery .lead { max-width: 60ch; margin: 0 auto 8px; }

.gallery-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.shot {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  /* Placeholder shown until a real photo is dropped in */
  background:
    linear-gradient(180deg, rgba(20,20,20,.15), rgba(20,20,20,.35)),
    linear-gradient(120deg, #2c2622 0%, #3a2f24 55%, #4a3a29 100%);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .2s ease;
}
.shot:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.shot img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* faint "add a photo" hint sits under the image; hidden once a photo loads */
.shot .hint {
  position: absolute; inset: 0; z-index: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,.55); font-size: 13px; letter-spacing: .04em;
}
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 26px 16px 14px;
  color: #fff; font-weight: 700; text-align: left;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.65));
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }

/* -----------------------------------------
   Callout band (insurance / cash settlements)
   ----------------------------------------- */
.callout {
  background:
    linear-gradient(180deg, rgba(20,20,20,.92), rgba(20,20,20,.92)),
    linear-gradient(120deg, #1c1c1c 0%, #2c2622 55%, #3a2f24 100%);
  color: #f2efe9;
  text-align: center;
}
.callout h2 { color: #fff; max-width: 22ch; margin: 8px auto 14px; }
.callout p { max-width: 68ch; margin: 0 auto 24px; color: #ddd7cd; font-size: 1.05rem; }
.callout h6.on-dark { color: var(--accent); }
.btn.btn-light { background: #fff; color: var(--ink); }
.btn.btn-light:hover { background: var(--accent); color: #fff; }

/* -----------------------------------------
   Why choose us
   ----------------------------------------- */
.why { background: var(--paper); }
.why .clean { list-style: none; padding: 0; margin-top: 18px; }
.why .clean li {
  position: relative;
  padding: 12px 12px 12px 40px;
  border-radius: 10px;
  transition: background .18s ease;
}
.why .clean li + li { margin-top: 6px; }
.why .clean li::before {
  content: "";
  position: absolute; left: 12px; top: 17px;
  width: 16px; height: 16px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") no-repeat center / contain;
}
.why .clean li:hover { background: rgba(var(--accent-rgb), .07); }

/* credential badge */
.badge-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}
.badge-mark {
  flex-shrink: 0;
  width: 84px; height: 84px; border-radius: 14px;
  display: grid; place-items: center; text-align: center;
  background: var(--ink); color: #fff;
  font-weight: 800; letter-spacing: .05em; line-height: 1.1;
  border: 2px solid var(--accent);
}
.badge-mark small { display: block; font-size: 10px; color: var(--accent); letter-spacing: .12em; }
.badge-card h3 { margin: 0 0 4px; }

/* -----------------------------------------
   Process
   ----------------------------------------- */
.process .steps {
  display: grid; gap: 16px; margin-top: 12px; padding-left: 0; list-style: none;
}
.step-card {
  --pad: 20px; --badge: 40px;
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: var(--pad);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  transition: box-shadow .18s ease, transform .12s ease, border-color .18s ease;
}
.step-card:hover {
  border-color: rgba(var(--accent-rgb), .3);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.step-badge {
  width: var(--badge); height: var(--badge);
  border-radius: 999px; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: var(--accent);
}
.step-card:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--pad) + var(--badge) / 2);
  top: calc(var(--pad) + var(--badge) + 6px);
  bottom: -16px; width: 2px;
  background: rgba(var(--accent-rgb), .25);
}
.step-body h3 { margin: 6px 0 6px 0; }
.step-body p { margin: 0; color: #4b5563; }
@media (max-width: 900px) {
  .step-card::after { display: none; }
}

/* -----------------------------------------
   Footer & Contact
   ----------------------------------------- */
#contact { scroll-margin-top: var(--header-offset); background: var(--ink); color: #eee; }
#contact h2, #contact h6 { color: #fff; }
#contact h6 { color: var(--accent); }
#contact .lead { color: #cfc9c1; }
#contact a { color: #fff; }

.footer-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  align-items: start; gap: var(--gap);
  padding: 8px 0;
}
.contact-stack { display: grid; gap: 14px; justify-items: start; margin-top: 6px; }
.contact-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; width: min(520px, 100%);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.04);
  border-radius: 14px; text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
}
.contact-chip:hover {
  border-color: rgba(var(--accent-rgb), .6);
  background: rgba(255,255,255,.07);
  transform: translateY(-1px);
}
.chip-icon {
  width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 999px; border: 2px solid rgba(var(--accent-rgb), .7);
  color: var(--accent);
}
.chip-content { line-height: 1.25; }
.chip-eyebrow {
  display: block; font-size: 12px; text-transform: uppercase;
  letter-spacing: .08em; color: #b9b2a8;
}
.chip-main { display: block; font-weight: 700; color: #fff; }

.footer-area { margin-top: 16px; }
.footer-area .small { color: #b9b2a8; }
.social-links { display: flex; gap: 16px; margin-top: 14px; }
.social-links a { font-weight: 600; text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 34px; padding-top: 18px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  color: #9a938a; font-size: 13px;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-chip { width: 100%; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
