/*
Theme Name: Westgate Woodworks
Theme URI: https://www.westgatewoodworks.com
Author: Westgate Woodworks
Description: A minimal, elegant custom theme for Westgate Woodworks custom cabinetry.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: westgate-woodworks
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
  --color-bg:           #F7F4F0;
  --color-surface:      #FFFFFF;
  --color-text:         #2C2825;
  --color-text-muted:   #7A6E65;
  --color-accent:       #8B6F47;
  --color-accent-hover: #74593A;
  --color-accent-light: #C4A882;
  --color-border:       #DDD8D0;
  --color-light:        #EDE8E1;
  --color-dark:         #1A1512;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  --max-width:        1200px;
  --max-width-narrow: 760px;
  --header-height:    56px;

  --radius:     2px;
  --transition: 0.25s ease;
  --shadow:     0 4px 24px rgba(44,40,37,0.08);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }
ul, ol { list-style: none; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); margin-bottom: 0.6rem; }
p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

/* =============================================
   LAYOUT
   ============================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.container--narrow { max-width: var(--max-width-narrow); }
.section { padding: var(--space-lg) 0; }
.section--lg { padding: var(--space-xl) 0; }

.section-divider {
  width: 40px;
  height: 1px;
  background: var(--color-accent);
  margin: 1.5rem 0 2rem;
}
.section-divider--center { margin-left: auto; margin-right: auto; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  border-radius: var(--radius);
  line-height: 1;
}
.btn--primary { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn--primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: #fff; }
.btn--outline { background: transparent; color: var(--color-text); border-color: var(--color-text); }
.btn--outline:hover { background: var(--color-text); color: var(--color-bg); }
.btn--light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.65); }
.btn--light:hover { background: #fff; color: var(--color-text); border-color: #fff; }

/* =============================================
   BRANDING BAR (logo — not sticky)
   ============================================= */
.site-branding {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  text-align: center;
}

.site-branding .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Logo image — targets WordPress custom logo output specifically */
.site-logo img,
.site-logo .custom-logo,
.site-logo a img,
.custom-logo-link img {
  height: 250px !important;
  width: auto !important;
  max-width: none;
  display: block;
}

/* Text fallback when no logo image is uploaded */
.site-logo-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-text);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.site-logo-text:hover { color: var(--color-accent); }

/* =============================================
   STICKY NAV BAR (navigation only)
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(247,244,240,0.096);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.scrolled { box-shadow: var(--shadow); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: center;   /* nav centered since no logo */
  height: 100%;
}

/* NAV — horizontal row on desktop */
.site-nav { display: flex; align-items: center; }

.site-nav .nav__list {
  display: flex;
  flex-direction: row;        /* explicitly horizontal */
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav .nav__list li a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  white-space: nowrap;
}

.site-nav .nav__list li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.site-nav .nav__list li a:hover,
.site-nav .nav__list li.current-menu-item > a { color: var(--color-accent); }

.site-nav .nav__list li a:hover::after,
.site-nav .nav__list li.current-menu-item > a::after { width: 100%; }

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--color-text);
  transition: all var(--transition);
  transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #1A1512;
  background-image: linear-gradient(135deg, #1A1512 0%, #2E2118 50%, #3D2E1F 100%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15,10,7,0.5);
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem 1.5rem;
}
.hero__eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 1.5rem;
}
.hero__divider {
  width: 36px; height: 1px;
  background: var(--color-accent-light);
  margin: 0 auto 1.75rem;
  opacity: 0.7;
}
.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.08;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.hero__subtitle {
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  color: rgba(255,255,255,0.72);
  margin: 0 auto 2.75rem;
  line-height: 1.8;
  font-weight: 300;
  max-width: 560px;
}

/* =============================================
   PAGE HEADER (inner pages)
   ============================================= */
.page-header {
  padding: 5rem 0 3.5rem;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}
.page-header h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 0.5rem; }
.page-header p {
  max-width: 580px;
  margin: 0.75rem auto 0;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* =============================================
   INTRO / SPLIT LAYOUT
   ============================================= */
.intro__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.intro__text p { color: var(--color-text-muted); }
.placeholder-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--color-light);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-image::after {
  content: 'Photo coming soon';
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* =============================================
   PRODUCT CARDS (homepage)
   ============================================= */
.products { background: var(--color-light); }
.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--color-border);
  border: 1.5px solid var(--color-border);
  margin-top: 2.5rem;
}
.product-card {
  background: var(--color-bg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: background var(--transition);
}
.product-card:hover { background: var(--color-surface); }
.product-card__icon { font-size: 1.6rem; display: block; margin-bottom: 0.75rem; }
.product-card__name {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0;
}

/* =============================================
   CTA BAND
   ============================================= */
.cta-band { background: var(--color-dark); }
.cta-band .eyebrow { color: var(--color-accent-light); }
.cta-band h2 { color: #fff; margin-bottom: 0.75rem; }
.cta-band p { color: rgba(255,255,255,0.65); margin-bottom: 2.25rem; font-size: 1.05rem; }

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.stat-row {
  display: flex;
  gap: 3rem;
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.stat__number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-accent);
  line-height: 1;
}
.stat__label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  display: block;
}
.about-values { background: var(--color-light); }
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.value-item {
  padding: 2rem 2rem 2rem 1.75rem;
  background: var(--color-bg);
  border-left: 3px solid var(--color-accent);
}
.value-item h3 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.value-item p { font-size: 0.95rem; color: var(--color-text-muted); margin: 0; line-height: 1.65; }

/* =============================================
   SERVICES PAGE
   ============================================= */
.services-section + .services-section { border-top: 1px solid var(--color-border); }
.services-intro { max-width: 640px; margin-bottom: 2.5rem; }
.services-intro p { color: var(--color-text-muted); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.service-item {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border);
  font-size: 0.88rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition), background var(--transition);
}
.service-item:hover { border-color: var(--color-accent); background: var(--color-light); }
.design-styles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.design-style-card {
  padding: 2.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition);
}
.design-style-card:hover { border-color: var(--color-accent-light); }
.design-style-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.design-style-card p { font-size: 0.95rem; color: var(--color-text-muted); margin: 0; }
.materials-list {
  margin-top: 2rem;
  border: 1px solid var(--color-border);
  max-width: 480px;
}
.material-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
  color: var(--color-text);
  transition: background var(--transition);
}
.material-entry:last-child { border-bottom: none; }
.material-entry:hover { background: var(--color-light); }
.material-entry a { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); }

/* =============================================
   GALLERY PAGE
   ============================================= */
.gallery-page-content .wp-block-gallery { gap: 0.75rem; }
.gallery-placeholder {
  padding: 6rem 2rem;
  text-align: center;
  background: var(--color-light);
  border: 2px dashed var(--color-border);
}
.gallery-placeholder p { color: var(--color-text-muted); font-size: 0.95rem; margin: 0; }

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}
.contact-info h2 { font-size: 1.75rem; margin-bottom: 2rem; }
.contact-detail { display: flex; flex-direction: column; margin-bottom: 1.75rem; }
.contact-detail__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
}
.contact-detail__value { font-size: 1rem; color: var(--color-text); line-height: 1.65; }
.contact-detail__value a { color: var(--color-text); }
.contact-detail__value a:hover { color: var(--color-accent); }
.contact-form {
  background: var(--color-surface);
  padding: 2.5rem;
  border: 1px solid var(--color-border);
}
.contact-form h2 { font-size: 1.75rem; margin-bottom: 0.4rem; }
.contact-form .form-note { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--color-accent); background: var(--color-surface); }
.form-group textarea { height: 140px; resize: vertical; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-message { padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.9rem; border-radius: var(--radius); }
.form-message--success { background: #EBF5F0; color: #2D6A4F; border-left: 3px solid #2D6A4F; }
.form-message--error { background: #FDF0F0; color: #8B2333; border-left: 3px solid #8B2333; }

/* =============================================
   JOBS PAGE
   ============================================= */
.jobs-intro { max-width: var(--max-width-narrow); margin: 0 auto; text-align: center; }
.jobs-intro p { color: var(--color-text-muted); }
.jobs-list { margin-top: 3rem; }
.job-card {
  padding: 2rem 2.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color var(--transition);
}
.job-card:hover { border-color: var(--color-accent); }
.job-card h3 { font-size: 1.1rem; margin: 0; }
.job-card p { font-size: 0.85rem; color: var(--color-text-muted); margin: 0.25rem 0 0; }
.jobs-cta { text-align: center; padding: var(--space-lg) 0; border-top: 1px solid var(--color-border); margin-top: 3rem; }
.jobs-cta h2 { margin-bottom: 0.75rem; }
.jobs-cta p { color: var(--color-text-muted); margin-bottom: 2rem; }
.no-positions { padding: 4rem 2rem; text-align: center; background: var(--color-light); border: 1px dashed var(--color-border); }
.no-positions p { color: var(--color-text-muted); margin: 0; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--color-dark);
  padding: 4rem 0 2rem;
  text-align: center;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 2rem;
  text-align: left;
}

.footer__brand .footer-logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  display: block;
  margin-bottom: 1rem;
  text-decoration: none;
}

.footer__brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.8;
  margin: 0;
}

.footer__col h4 {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 1.25rem;
}

.footer__col ul li { margin-bottom: 0.75rem; }

.footer__col ul li a,
.footer__col address a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.78);
  transition: color var(--transition);
}

.footer__col ul li a:hover,
.footer__col address a:hover { color: #fff; }

.footer__col address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.78);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
}

/* =============================================
   WYSIWYG / WP EDITOR CONTENT
   Styles for content entered via the WordPress
   page editor (the hybrid editable sections).
   ============================================= */
.wysiwyg p             { margin-bottom: 1.25rem; }
.wysiwyg p:last-child  { margin-bottom: 0; }
.wysiwyg h2,
.wysiwyg h3,
.wysiwyg h4            { margin: 1.5rem 0 0.75rem; }
.wysiwyg ul,
.wysiwyg ol            { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.wysiwyg ul            { list-style: disc; }
.wysiwyg ol            { list-style: decimal; }
.wysiwyg li            { margin-bottom: 0.4rem; line-height: 1.7; }
.wysiwyg a             { color: var(--color-accent); text-decoration: underline; }
.wysiwyg strong        { font-weight: 600; }
.wysiwyg em            { font-style: italic; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .intro__grid,
  .about-intro { grid-template-columns: 1fr; gap: 3rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  :root { --space-lg: 3rem; --space-xl: 5rem; }

  /* Branding bar — keep logo a bit smaller on mobile */
  .site-logo img,
  .site-logo .custom-logo { height: 72px; }
  .site-logo-text { font-size: 1.5rem; }

  /* Nav collapses to hamburger on mobile */
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1.75rem 1.5rem;
    z-index: 99;
  }
  .site-nav.is-open { display: block; }
  .site-nav .nav__list { flex-direction: column; align-items: flex-start; gap: 1.35rem; }
  .nav-toggle { display: flex; }

  /* Header inner aligns toggle to the right on mobile */
  .header__inner { justify-content: flex-end; }

  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
  .design-styles { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .stat-row { gap: 1.5rem; flex-wrap: wrap; }
  .job-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .contact-form { padding: 1.75rem; }
}
@media (max-width: 480px) {
  .products__grid { grid-template-columns: 1fr; }
  .hero { background-attachment: scroll; }
}
