/*
Theme Name: Sphire Interior & Blinds
Theme URI: https://sphireinteriorblinds.com
Author: Sphire
Author URI: https://sphireinteriorblinds.com
Description: A luxury custom theme for Sphire Interior & Blinds — portfolio showcase and lead generation.
Version: 1.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sphire
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ========== VARIABLES ========== */
:root {
  --cream: #F5F0EB;
  --warm-white: #FDFBF9;
  --charcoal: #2A2A2A;
  --stone: #8B8178;
  --gold: #C4A265;
  --gold-light: #D4B87A;
  --deep: #1A1714;
  --sage: #A8B5A0;
  --blush: #D4C4B0;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
}

/* ========== RESET & BASE ========== added comments */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--warm-white);
  color: var(--charcoal);
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ========== UTILITY ========== */

/* Visually hidden but accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Skip navigation link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  background: var(--deep);
  color: var(--gold);
  padding: 0.75rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 2px solid var(--gold);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* Global focus indicator */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4%;
}

.section {
  padding: 7rem 4%;
}

.section-tag {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  color: var(--charcoal);
}

.section-subtitle {
  font-size: 0.95rem;
  color: #5a5450;
  font-weight: 400;
  max-width: 500px;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  background: var(--gold);
  color: var(--deep);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(196,162,101,0.3);
  color: var(--deep);
}

.btn-secondary {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  background: transparent;
  color: var(--warm-white);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ========== NAV ========== */
.site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s ease;
  background: transparent;
}

.site-nav.scrolled {
  background: rgba(253, 251, 249, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--warm-white);
  transition: color 0.4s;
}

.site-nav.scrolled .site-logo { color: var(--charcoal); }
.site-logo span { color: var(--gold); font-style: italic; }

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color 0.3s;
  position: relative;
}

.site-nav.scrolled .nav-links a { color: var(--charcoal); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: 0.6rem 1.6rem !important;
  border: 1px solid var(--gold) !important;
  color: var(--gold) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  transition: all 0.3s !important;
}

.nav-cta:hover {
  background: var(--gold) !important;
  color: var(--deep) !important;
}

.nav-cta::after { display: none !important; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--warm-white);
  transition: all 0.3s;
}

.site-nav.scrolled .nav-toggle span { background: var(--charcoal); }

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== HERO ========== */
.hero {
  position: relative;
  height: 75vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,23,20,0.7) 0%, rgba(26,23,20,0.3) 50%, rgba(26,23,20,0.6) 100%);
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 900px;
  padding: 0 2rem;
  animation: fadeUp 1.2s ease-out 0.3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-tag {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  animation: fadeUp 1s ease-out 0.6s both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 400;
  color: var(--warm-white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeUp 1s ease-out 0.8s both;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  font-weight: 400;
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeUp 1s ease-out 1s both;
}

.hero-btns {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  animation: fadeUp 1s ease-out 1.2s both;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeUp 1s ease-out 1.6s both;
}

.scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ========== SERVICES ========== */
.services {
  background: var(--cream);
}

.services-header {
  text-align: center;
  margin-bottom: 4rem;
}

.services-header .section-subtitle { margin: 0 auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* 2-column grid for Services sub-section */
.services-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto;
}

/* Subsection label (PRODUCTS / SERVICES divider) */
.subsection-label {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--stone);
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #E8E2DB;
}
.subsection-label + .services-grid,
.subsection-label + .services-grid-2 { margin-top: 0; }
.services-section-gap { height: 3rem; }

.service-card {
  background: var(--warm-white);
  padding: 2.2rem 1.6rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before { transform: scaleX(1); }

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.8rem;
  stroke: var(--gold);
  stroke-width: 1.2;
  fill: none;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--charcoal);
  line-height: 1.7;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.service-link {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s;
}

/* Card is now an <a> tag — reset link defaults */
a.service-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.service-link:hover { gap: 0.8rem; }

.service-link svg {
  width: 16px; height: 16px;
  stroke: var(--gold);
  stroke-width: 2;
  fill: none;
}

/* ========== PORTFOLIO ========== */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  max-width: 1200px;
  margin: 0 auto 3.5rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 320px 320px;
  gap: 1.2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.portfolio-item.featured {
  grid-column: span 2;
  grid-row: span 2;
}

.portfolio-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-item:hover img { transform: scale(1.06); }

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,23,20,0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.8rem;
  opacity: 0;
  transition: opacity 0.4s;
}

.portfolio-item:hover .portfolio-overlay { opacity: 1; }

.portfolio-overlay h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--warm-white);
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.portfolio-overlay span {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ========== ABOUT / WHY US ========== */
.about-section {
  background: var(--deep);
  color: var(--warm-white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 600px;
}

.about-image {
  min-height: 500px;
  background-size: cover;
  background-position: center;
}

.about-content {
  padding: 5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-section .section-title { color: var(--warm-white); }
.about-section .section-subtitle {
  color: rgba(255,255,255,0.6);
  margin-bottom: 2.5rem;
}

.stats-row {
  display: flex;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.stat h4 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
}

.stat p {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  margin-top: 0.4rem;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  font-weight: 400;
}

.feature-check {
  width: 20px; height: 20px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-check svg {
  width: 10px; height: 10px;
  stroke: var(--gold);
  stroke-width: 2.5;
  fill: none;
}

/* ========== TESTIMONIALS ========== */
.testimonials {
  background: var(--cream);
  text-align: center;
}

.testimonials-header {
  margin-bottom: 3.5rem;
}

.testimonials-header .section-subtitle { margin: 0 auto; }

.testimonial-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--warm-white);
  padding: 2.5rem 2rem;
  text-align: left;
}

.testimonial-card .quote-mark {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.4;
}

.testimonial-card .stars {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.testimonial-card p {
  font-size: 0.9rem;
  color: var(--stone);
  line-height: 1.7;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--charcoal);
}

.testimonial-role {
  font-size: 0.72rem;
  color: var(--stone);
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

/* ========== CTA SECTION ========== */
.cta-section {
  text-align: center;
  padding: 6rem 4%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,23,20,0.85), rgba(26,23,20,0.75));
}

.cta-section > * { position: relative; z-index: 1; }
.cta-section .section-title {
  color: var(--warm-white);
  max-width: 600px;
  margin: 0 auto 1rem;
}
.cta-section p {
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}
.cta-section .btn-primary {
  font-size: 0.82rem;
  padding: 1rem 3rem;
}

/* ========== CONTACT ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.contact-info p,
.contact-info a {
  font-size: 0.88rem;
  color: var(--stone);
  font-weight: 400;
  line-height: 1.7;
}

.contact-info a:hover { color: var(--gold); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.contact-form input:not([type="checkbox"]),
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid #E0DAD3;
  background: var(--warm-white);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--charcoal);
  font-weight: 400;
  outline: none;
  transition: border-color 0.3s;
  -webkit-appearance: none;
  border-radius: 0;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #B8B0A6; }

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form .btn-primary { align-self: flex-start; }

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--stone);
  line-height: 1.5;
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  accent-color: var(--gold);
  cursor: pointer;
}
.consent-label a { color: var(--gold); text-decoration: underline; }

/* Form messages */
.wpcf7-response-output {
  font-size: 0.88rem;
  padding: 1rem;
  margin-top: 1rem;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--deep);
  color: rgba(255,255,255,0.5);
  padding: 3.5rem 4% 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.footer-brand .site-logo {
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  font-weight: 400;
  max-width: 280px;
}

.footer-col h5 {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.2rem;
  font-weight: 500;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.7rem;
  font-weight: 400;
  transition: color 0.3s;
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  max-width: 1200px;
  margin: 0 auto;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.social-links a:hover {
  border-color: var(--gold);
  background: rgba(196,162,101,0.1);
}

.social-links svg {
  width: 14px; height: 14px;
  fill: rgba(255,255,255,0.5);
  stroke: rgba(255,255,255,0.5);
  stroke-width: 1.5;
}

.social-links a:hover svg {
  fill: var(--gold);
  stroke: var(--gold);
}

/* ========== INNER PAGES ========== */
.page-hero {
  background: var(--deep);
  padding: 8rem 4% 4rem;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--warm-white);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  font-size: 0.95rem;
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 4%;
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}

.page-content p {
  font-size: 0.95rem;
  color: var(--stone);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-weight: 400;
}

/* Blog / Single */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-card {
  overflow: hidden;
  transition: transform 0.3s;
}

.blog-card:hover { transform: translateY(-4px); }

.blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.5rem 0;
}

.blog-card .meta {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.8rem;
}

.blog-card p {
  font-size: 0.85rem;
  color: var(--stone);
  font-weight: 400;
  line-height: 1.6;
}

/* ========== 404 ========== */
.error-page {
  text-align: center;
  padding: 10rem 4%;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
}

.error-page h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--stone);
  font-weight: 400;
  margin-bottom: 2rem;
}

/* ========== ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== WORDPRESS OVERRIDES ========== */
.wp-block-image { margin-bottom: 1.5rem; }
.wp-block-image img { border-radius: 0; }
.alignfull { width: 100vw; margin-left: calc(-50vw + 50%); }
.alignwide { max-width: 1200px; margin: 0 auto; }

/* WP Admin Bar fix */
body.admin-bar .site-nav { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-nav { top: 46px; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .nav-links { 
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(253,251,249,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem 4%;
    gap: 1.5rem;
  }
  .nav-links.active { display: flex; }
  .nav-links a { color: var(--charcoal) !important; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; max-width: 480px; }
  .services-grid-2 { grid-template-columns: 1fr; max-width: 480px; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 250px 250px 250px; }
  .portfolio-item.featured { grid-column: span 2; grid-row: span 1; }
  .about-section { grid-template-columns: 1fr; }
  .about-image { min-height: 350px; }
  .about-content { padding: 3rem 2rem; }
  .testimonial-cards { grid-template-columns: 1fr; max-width: 500px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .portfolio-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .blog-grid { grid-template-columns: 1fr; max-width: 500px; }
  /* Service detail & about intro pages */
  .service-detail, .about-intro { grid-template-columns: 1fr !important; }
  .service-detail > div:nth-child(2) { order: 2 !important; }
  .service-detail > div:nth-child(1) { order: 1 !important; }
  .service-detail img, .about-intro img { height: 350px !important; }
  /* Process steps */
  div[style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 600px) {
  .hero-btns { flex-direction: column; align-items: center; }
  .portfolio-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .portfolio-item.featured { grid-column: span 1; }
  .portfolio-item { height: 280px; }
  .services-grid, .services-grid-2 { grid-template-columns: 1fr; max-width: 420px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .section { padding: 4rem 5%; }
  .stats-row { gap: 1.5rem; flex-wrap: wrap; }
}


/* ========== PRODUCTS CATALOG ========== */

/* Sub-type label on service cards */
.service-subtitle {
    font-size: 0.73rem;
    color: var(--stone);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0.4rem 0 0.8rem;
    font-family: var(--font-body);
    font-weight: 400;
}

/* Catalog anchor nav on services page */
.catalog-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #E8E2DB;
    margin: 0 5% 4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.catalog-nav::-webkit-scrollbar { display: none; }
.catalog-nav a {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--stone);
    padding: 1rem 1.6rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.3s, border-color 0.3s;
    flex-shrink: 0;
}
.catalog-nav a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* Feature section (Motorized) with cream background */
.service-detail--feature {
    background: var(--cream);
    border-radius: 4px;
}

/* 6-card grid on homepage (3 per row) */
@media (max-width: 900px) {
    .catalog-nav { margin: 0 4% 3rem; }
    .catalog-nav a { padding: 0.8rem 1.1rem; font-size: 0.65rem; }
    .service-detail--feature { padding: 2rem !important; }
}
@media (max-width: 600px) {
    .catalog-nav { margin: 0 5% 2rem; }
}

/* ========== PRODUCT CARDS GRID (Services Page) ========== */

.product-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.product-card {
    background: #fff;
    border: 1px solid #E8E2DB;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.07);
}

.product-card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.product-card-body {
    padding: 1.4rem 1.5rem 1.5rem;
}

.product-card-body h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--deep);
    margin-bottom: 0.45rem;
}

.product-card-body p {
    font-size: 0.84rem;
    color: var(--stone);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.product-card-link {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
    transition: color 0.2s;
}

.product-card-link:hover { color: var(--charcoal); }

@media (max-width: 900px) {
    .product-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* ========== CONTROL OPTIONS SECTION ========== */

.control-options-section {
    background: var(--cream);
    padding: 4rem 4%;
}

.control-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    text-align: left;
}

.control-card {
    background: #fff;
    border: 1px solid #E8E2DB;
    border-radius: 4px;
    padding: 1.25rem;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.control-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.control-icon {
    color: var(--stone);
    margin-bottom: 0.9rem;
    transition: color 0.3s ease;
}

.control-card:hover .control-icon { color: var(--gold); }

.control-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--deep);
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}

.control-card p {
    font-size: 0.82rem;
    color: var(--stone);
    line-height: 1.6;
    font-weight: 400;
}

@media (max-width: 900px) {
    .control-options-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

@media (max-width: 480px) {
    .control-options-grid { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
}

/* ========== OUR WORK — PORTFOLIO ARCHIVE ========== */

/* Filter bar wrapper */
.portfolio-filter-bar {
    background: var(--warm-white);
    border-bottom: 1px solid #E8E2DB;
    position: sticky;
    top: 70px;
    z-index: 100;
    padding: 0 4%;
}

/* Filter tabs row */
.portfolio-filter-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 1200px;
    margin: 0 auto;
}
.portfolio-filter-tabs::-webkit-scrollbar { display: none; }

/* Individual filter tab button */
.pf-tab {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--stone);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 1.1rem 1.6rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.25s, border-color 0.25s;
}
.pf-tab:hover { color: var(--gold); }
.pf-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* Our Work section spacing */
.our-work-section { padding-top: 4rem; }

/* Archive grid — 4 cols, uniform tiles */
.portfolio-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Category heading spans full row */
.portfolio-cat-heading {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
    padding-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E8E2DB;
    margin-bottom: 0.25rem;
    transition: opacity 0.3s, height 0.3s;
}
.portfolio-cat-heading:first-child { padding-top: 0; }

/* Portfolio item tile — responsive aspect ratio */
.portfolio-archive-grid .portfolio-item {
    aspect-ratio: 4 / 3;
    height: auto;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Lightbox trigger fills the tile */
.portfolio-lightbox-trigger {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.portfolio-lightbox-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
    display: block;
}
.portfolio-archive-grid .portfolio-item:hover img { transform: scale(1.07); }

/* Hidden state for filtering */
.portfolio-archive-grid .portfolio-item.pf-hidden { display: none; }
.portfolio-archive-grid .portfolio-cat-heading.pf-hidden { display: none; }

/* ========== LIGHTBOX ========== */
#sphireLightbox {
    position: fixed;
    inset: 0;
    background: rgba(26, 23, 20, 0.96);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
#sphireLightbox[hidden] { display: none; }

.lightbox-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(100vw - 140px);
    max-height: 90vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    display: block;
    border: 1px solid rgba(196, 162, 101, 0.2);
}

.lightbox-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1.2rem;
    text-align: center;
}
#lightboxTitle {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--warm-white);
    letter-spacing: 0.02em;
}
#lightboxCat {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}

/* Lightbox controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--warm-white);
    opacity: 0.75;
    transition: opacity 0.2s, color 0.2s;
    line-height: 0;
    padding: 0.5rem;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; color: var(--gold); }

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev  { left: 1.2rem;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ========== OUR WORK RESPONSIVE ========== */
@media (max-width: 1024px) {
    .portfolio-archive-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .portfolio-filter-bar { top: 60px; }
    .portfolio-archive-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .lightbox-stage { max-width: calc(100vw - 80px); }
}
@media (max-width: 480px) {
    .portfolio-archive-grid { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
    .pf-tab { padding: 0.9rem 1rem; font-size: 0.62rem; }
    .lightbox-stage { max-width: 95vw; }
    .lightbox-prev { left: 0.4rem; }
    .lightbox-next { right: 0.4rem; }
}

/* ========== REVIEW SUBMISSION PAGE ========== */
.review-page-section { background: var(--cream); }
.review-page-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.review-loading { text-align: center; color: var(--stone); padding: 3rem 0; font-size: 0.9rem; }

.review-token-error {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff;
    border: 1px solid #E0DAD3;
}
.review-token-error__icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #FEF2F2;
    color: #C62828;
    font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
}
.review-token-error h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}
.review-token-error p { color: var(--stone); font-size: 0.9rem; line-height: 1.7; }

.review-form-header { margin-bottom: 2rem; }
.review-greeting { font-size: 1rem; color: var(--charcoal); line-height: 1.6; }
.review-greeting strong { color: var(--charcoal); font-weight: 500; }

/* Form groups */
#reviewForm .form-group { margin-bottom: 1.5rem; }
#reviewForm label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 0.45rem;
}
#reviewForm input[type="text"],
#reviewForm textarea {
    width: 100%;
    background: #fff;
    border: 1px solid #E0DAD3;
    color: var(--charcoal);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    border-radius: 0;
    resize: vertical;
}
#reviewForm input[type="text"]:focus,
#reviewForm textarea:focus { border-color: var(--gold); }

.field-locked {
    background: #F9F6F2 !important;
    color: var(--stone) !important;
    cursor: not-allowed;
}

.form-optional { color: var(--stone); font-size: 0.65rem; text-transform: none; letter-spacing: 0; }
.req { color: var(--gold); }

/* Star rating — CSS-only interactive stars (RTL trick) */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.15rem;
}
.star-rating-input input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.star-rating-input label {
    font-size: 2rem;
    color: #D6CFC6;
    cursor: pointer;
    transition: color 0.15s;
    text-transform: none;
    letter-spacing: 0;
    font-size: 2rem;
    margin-bottom: 0;
    line-height: 1;
    padding: 0.1rem 0.05rem;
}
.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label { color: var(--gold); }

/* Error + success messages */
.review-form-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid rgba(198,40,40,0.2);
    padding: 0.7rem 1rem;
    font-size: 0.82rem;
    margin-bottom: 1.25rem;
}

.review-success {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff;
    border: 1px solid #E0DAD3;
}
.review-success__icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #E8F5E9;
    color: #2E7D32;
    font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
}
.review-success h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}
.review-success p {
    color: var(--stone);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* CTA buttons */
.btn-primary-gold {
    display: inline-block;
    background: var(--gold);
    color: #fff;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.9rem 2.5rem;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    width: 100%;
}
.btn-primary-gold:hover:not(:disabled) { background: #b8924f; }
.btn-primary-gold:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline-gold {
    display: inline-block;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.75rem 2rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.btn-outline-gold:hover { background: var(--gold); color: #fff; }

@media (max-width: 600px) {
    .review-page-wrap { padding: 2rem 1.25rem 3rem; }
}
