/* ==========================================================================
   Alderwood — Design System
   Custom cabinetry, Malaysia. Modern, warm, reliable, refined.
   ========================================================================== */

:root {
  /* Brand colors */
  --color-ink: #1b1f1c;              /* near-black text */
  --color-forest: #22332b;           /* deep green — primary brand */
  --color-forest-dark: #16211a;      /* header/footer background */
  --color-walnut: #4a3324;           /* deep wood accent */
  --color-brass: #a9812f;            /* low-saturation brass accent */
  --color-brass-light: #c79f4f;

  /* Neutrals */
  --color-cream: #faf7f1;            /* warm white background */
  --color-sand: #f2ece1;             /* section alt background */
  --color-line: #e4dccc;             /* hairline borders on cream */
  --color-grey-700: #4b4b47;
  --color-grey-500: #7a766d;
  --color-white: #ffffff;

  /* Feedback */
  --color-success: #3d7a4f;
  --color-error: #b3432b;

  /* Type */
  --font-serif: Georgia, 'Times New Roman', 'Noto Serif SC', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6.5rem;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --max-width: 1200px;
  --shadow-soft: 0 8px 30px rgba(27, 31, 28, 0.08);
  --shadow-lift: 0 16px 40px rgba(27, 31, 28, 0.14);

  --header-height: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  color: var(--color-ink);
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin: 0 0 var(--space-2); color: var(--color-grey-700); }
.lead { font-size: 1.15rem; color: var(--color-grey-700); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brass);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

section { padding: var(--space-6) 0; }
.section-alt { background: var(--color-sand); }
.section-dark { background: var(--color-forest-dark); color: var(--color-cream); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--color-white); }
.section-dark p { color: #cfd6cd; }

.section-head { max-width: 680px; margin-bottom: var(--space-5); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-brass); color: var(--color-white); }
.btn-primary:hover { background: var(--color-brass-light); box-shadow: var(--shadow-soft); }
.btn-outline { background: transparent; color: var(--color-forest); border-color: var(--color-forest); }
.btn-outline:hover { background: var(--color-forest); color: var(--color-white); }
.btn-on-dark { background: transparent; color: var(--color-cream); border-color: rgba(250,247,241,0.55); }
.btn-on-dark:hover { background: var(--color-cream); color: var(--color-forest-dark); }
.btn-whatsapp { background: #2e9e5b; color: var(--color-white); }
.btn-whatsapp:hover { background: #279153; }
.btn-block { width: 100%; justify-content: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-forest-dark);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand { display: flex; align-items: center; gap: 0.6em; }
.brand img { height: 42px; width: auto; border-radius: 6px; }
.brand-name {
  font-family: var(--font-serif);
  color: var(--color-white);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.main-nav { display: flex; align-items: center; gap: var(--space-4); }
.nav-links { display: flex; align-items: center; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: #e7e4da;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-white); border-color: var(--color-brass); }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.lang-switch { display: flex; gap: 0.4em; font-size: 0.85rem; }
.lang-switch a {
  color: #cfd6cd;
  padding: 0.3em 0.6em;
  border-radius: 999px;
  border: 1px solid rgba(250,247,241,0.25);
}
.lang-switch a[aria-current="true"] { background: var(--color-brass); color: var(--color-white); border-color: var(--color-brass); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-white);
}
.nav-toggle svg { width: 26px; height: 26px; }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: var(--color-forest-dark);
  z-index: 99;
  padding: var(--space-4) var(--space-3);
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid rgba(250,247,241,0.12); }
.mobile-nav a { display: block; padding: 1em 0.2em; color: var(--color-cream); font-size: 1.1rem; }
.mobile-nav .header-actions { margin-top: var(--space-4); flex-direction: column; align-items: stretch; }
.mobile-nav .btn-row { flex-direction: column; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: var(--space-2) 0; font-size: 0.85rem; color: var(--color-grey-500); background: var(--color-sand); }
.breadcrumbs a { color: var(--color-grey-500); }
.breadcrumbs a:hover { color: var(--color-forest); }
.breadcrumbs .sep { margin: 0 0.5em; }
.breadcrumbs .current { color: var(--color-ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--color-forest-dark) 0%, var(--color-forest) 100%);
  color: var(--color-white);
  padding: var(--space-7) 0 var(--space-6);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-5); align-items: center; }
/* Used by the intro macro when a section has no real photo and no
   placeholder is desired (e.g. About/Materials intros before Alderwood
   supplies a team or workshop photo) — text spans full width instead of
   leaving an empty or striped-placeholder image column. */
.hero-grid.intro-text-only { grid-template-columns: 1fr; max-width: 46rem; }
.hero h1 { color: var(--color-white); }
.hero p { color: #d9ddd3; font-size: 1.1rem; }
.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  aspect-ratio: 4/3;
}
.page-hero {
  background: linear-gradient(180deg, var(--color-forest-dark) 0%, var(--color-forest) 100%);
  color: var(--color-white);
  padding: var(--space-6) 0 var(--space-5);
}
.page-hero h1 { color: var(--color-white); max-width: 780px; }
.page-hero p { color: #d9ddd3; max-width: 620px; font-size: 1.08rem; }

/* ---------- Placeholder media ---------- */
.placeholder-img {
  background: repeating-linear-gradient(135deg, var(--color-sand), var(--color-sand) 12px, #e9e1d0 12px, #e9e1d0 24px);
  border: 1px dashed #c9bb9d;
  color: var(--color-grey-500);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  min-height: 200px;
}
.hero .placeholder-img { min-height: 100%; border-color: rgba(250,247,241,0.35); color: #d9ddd3; background: repeating-linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.06) 12px, rgba(255,255,255,0.11) 12px, rgba(255,255,255,0.11) 24px); }

/* ---------- Real project photos (replace placeholder-img when present) ---------- */
.real-img { display: block; width: 100%; object-fit: cover; }
.card-media .real-img, .hero-media .real-img { height: 100%; }
.gallery-grid .real-img, .before-after .real-img { aspect-ratio: 4/3; border-radius: var(--radius-md); }

.reserved-tag {
  display: inline-block;
  background: #fbe6d8;
  color: #8a4520;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25em 0.6em;
  border-radius: 999px;
  margin-bottom: 0.5em;
}

/* Badge for a real, published project card (e.g. "Featured Project") —
   deliberately NOT the orange .reserved-tag styling, since this marks confirmed
   content, not something pending confirmation. */
.badge-featured {
  display: inline-block;
  background: #dff0e2;
  color: #1f5c34;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25em 0.6em;
  border-radius: 999px;
  margin-bottom: 0.5em;
}

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--color-forest); padding: var(--space-4) 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); text-align: center; }
.trust-item .num { font-family: var(--font-serif); font-size: 1.9rem; color: var(--color-brass-light); display: block; }
.trust-item .label { color: #d9ddd3; font-size: 0.88rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: var(--space-3); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-body { padding: var(--space-3); flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: 0.4em; }
.card-body p { font-size: 0.95rem; flex: 1; }
.card-media { aspect-ratio: 4/3; }
.card-link { font-weight: 600; color: var(--color-forest); font-size: 0.9rem; margin-top: auto; }
/* A card with no real photo yet (see service_grid/materials_grid macros) —
   no image slot at all, just a clean brand-styled text card instead of an
   empty or striped placeholder box. */
.card-text-only { border-top: 3px solid var(--color-forest); }
.card-text-only .card-body { padding-top: var(--space-4); }
.card-link:hover { color: var(--color-brass); }

.service-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--color-sand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-2);
  color: var(--color-forest);
}

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.feature-list li { display: flex; gap: 0.7em; align-items: flex-start; color: var(--color-grey-700); }
.feature-list .check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-forest); color: var(--color-white);
  display: flex; align-items: center; justify-content: center; font-size: 0.7rem; margin-top: 2px;
}

/* ---------- Process steps ---------- */
.process-steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.process-step { position: relative; padding-top: var(--space-4); }
.process-step .step-num {
  counter-increment: step;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--color-brass);
  display: block;
  margin-bottom: 0.3em;
}
.process-step .step-num::before { content: counter(step, decimal-leading-zero); }

/* ---------- Testimonials ---------- */
.testimonial-card { background: var(--color-white); border-radius: var(--radius-md); padding: var(--space-3); box-shadow: var(--shadow-soft); }
.testimonial-card .quote { font-family: var(--font-serif); font-size: 1.1rem; color: var(--color-ink); }
.testimonial-card .attrib { font-size: 0.85rem; color: var(--color-grey-500); margin-top: var(--space-2); }
.testimonial-empty {
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  color: var(--color-grey-500);
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--color-line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-2) 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { font-size: 1.4rem; color: var(--color-brass); transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 0 var(--space-3); color: var(--color-grey-700); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--color-forest-dark); color: var(--color-white); text-align: center; padding: var(--space-6) 0; }
.cta-band h2 { color: var(--color-white); }
.cta-band p { color: #d9ddd3; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.form-field { display: flex; flex-direction: column; gap: 0.4em; margin-bottom: var(--space-3); }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.88rem; font-weight: 600; color: var(--color-ink); }
.form-field .hint { font-size: 0.78rem; color: var(--color-grey-500); }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  padding: 0.75em 0.9em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
  background: var(--color-white);
  color: var(--color-ink);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-brass);
  outline-offset: 1px;
  border-color: var(--color-brass);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field.checkbox { flex-direction: row; align-items: flex-start; gap: 0.6em; }
.form-field.checkbox input { margin-top: 0.3em; }
.form-field .error-msg { color: var(--color-error); font-size: 0.8rem; display: none; }
.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea { border-color: var(--color-error); }
.form-field.invalid .error-msg { display: block; }
.file-drop {
  border: 1.5px dashed var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
  color: var(--color-grey-500);
  cursor: pointer;
  background: var(--color-white);
}
.file-drop.dragover { border-color: var(--color-brass); background: var(--color-sand); }
.file-drop-list { font-size: 0.82rem; margin-top: 0.5em; text-align: left; }
.form-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }
.form-status { margin-top: var(--space-2); font-size: 0.9rem; }
.form-status.success { color: var(--color-success); }
.form-status.error { color: var(--color-error); }

/* ---------- Contact info blocks ---------- */
.contact-panel { background: var(--color-white); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); padding: var(--space-4); }
.contact-line { display: flex; gap: 0.8em; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-line); }
.contact-line:last-child { border-bottom: none; }
.contact-line .icon { color: var(--color-brass); flex-shrink: 0; }
.contact-line .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-grey-500); margin-bottom: 0.15em; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/9; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-forest-dark); color: #cfd6cd; padding: var(--space-6) 0 var(--space-3); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-5); }
.footer-brand img { height: 40px; margin-bottom: var(--space-2); border-radius: 6px; }
.footer-brand p { color: #a9b0a4; font-size: 0.9rem; }
.footer-col h4 { color: var(--color-white); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-sans); margin-bottom: var(--space-2); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6em; }
.footer-col a { color: #cfd6cd; font-size: 0.92rem; }
.footer-col a:hover { color: var(--color-brass-light); }
.footer-social { display: flex; gap: 0.6em; margin-top: var(--space-2); }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(207,214,205,0.35);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--color-brass); border-color: var(--color-brass); }
.footer-bottom {
  border-top: 1px solid rgba(207,214,205,0.15);
  padding-top: var(--space-3);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-2);
  font-size: 0.82rem; color: #9aa197;
}
.footer-bottom a { color: #9aa197; }
.footer-bottom a:hover { color: var(--color-white); }

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  background: #25D366;
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float svg { width: 30px; height: 30px; }

/* ---------- Misc content pages ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: var(--space-4); }
.prose ul, .prose ol { color: var(--color-grey-700); }
.checklist-box { background: var(--color-white); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); padding: var(--space-4); }
.checklist-box li { margin-bottom: 0.6em; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.gallery-grid .placeholder-img { aspect-ratio: 4/3; min-height: 0; }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }

.related-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }

.error-page { text-align: center; padding: var(--space-7) 0; }
.error-page .code { font-family: var(--font-serif); font-size: 5rem; color: var(--color-brass); }

.social-block { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.social-card { background: var(--color-white); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); padding: var(--space-3); flex: 1; min-width: 220px; display: flex; align-items: center; gap: var(--space-2); }
.social-card .qr { width: 64px; height: 64px; flex-shrink: 0; }

.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  background: var(--color-forest-dark); color: #e7e4da;
  padding: var(--space-2) var(--space-3);
  display: none;
}
.cookie-banner.show { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.cookie-banner p { color: #cfd6cd; margin: 0; font-size: 0.85rem; max-width: 640px; }

.notice-box {
  border: 1px solid var(--color-brass);
  background: rgba(169, 129, 47, 0.09);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin: 0 0 var(--space-3);
}
.notice-box p { margin: 0; color: var(--color-ink); }
.notice-box strong { color: var(--color-walnut); text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.8rem; display: block; margin-bottom: 0.35em; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: 1fr; }
  .related-services { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links, .header-actions .btn-row, .header-actions .lang-switch { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions { gap: var(--space-1); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  section { padding: var(--space-5) 0; }
  .hero { padding: var(--space-5) 0 var(--space-4); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .before-after { grid-template-columns: 1fr; }
  .whatsapp-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}
