/* ============================================
   House2Home Renovation Projects LTD
   Global Stylesheet — shared across all pages
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  --dark: #0e1410;
  --dark-2: #151d17;
  --dark-3: #1e2a21;
  --teal: #3d8c6e;
  --teal-light: #4fa882;
  --teal-pale: rgba(61, 140, 110, 0.12);
  --teal-glow: rgba(61, 140, 110, 0.25);
  --gold: #c9a96e;
  --white: #f5f2ee;
  --white-dim: rgba(245, 242, 238, 0.7);
  --white-faint: rgba(245, 242, 238, 0.15);
  --border: rgba(61, 140, 110, 0.2);
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 20px 60px rgba(0,0,0,0.4);
  --shadow-sm: 0 4px 20px rgba(0,0,0,0.25);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--dark);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }

p {
  font-size: 1rem;
  color: var(--white-dim);
  max-width: 65ch;
}

.label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-light);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(61,140,110,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37,211,102,0.3);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(14, 20, 16, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--teal);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo-text span:first-child {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.01em;
}

.nav-logo-text span:last-child {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--teal-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-dim);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal-light);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--teal);
  color: white;
  border-radius: 3px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: var(--transition);
}
.nav-wa:hover {
  background: var(--teal-light);
  transform: translateY(-1px);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* --- Mobile Nav --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: var(--dark-2);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  z-index: 999;
  flex-direction: column;
  gap: 20px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1rem;
  font-weight: 400;
  color: var(--white-dim);
  letter-spacing: 0.05em;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* --- Divider --- */
.divider {
  width: 60px;
  height: 2px;
  background: var(--teal);
  margin: 20px 0;
}

.divider-center {
  margin: 20px auto;
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: 60px;
}

.section-header p {
  margin-top: 16px;
}

/* --- Cards --- */
.card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 36px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--teal);
  background: var(--dark-3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

/* --- Grid --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* --- Fade-in Animation --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Footer --- */
.footer {
  background: var(--dark-2);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  max-width: 28ch;
}

.footer-col h4 {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 20px;
  font-family: var(--font-body);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--white-dim);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--teal-light);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--white-faint);
  max-width: none;
}

/* --- Floating WhatsApp Button --- */
.float-wa {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 998;
  transition: var(--transition);
}

.float-wa:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37,211,102,0.5);
}

.float-wa svg {
  width: 28px;
  height: 28px;
  fill: white;
}

/* --- Grain overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

/* ============================================
   HOMEPAGE SPECIFIC
   ============================================ */

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  animation: heroZoom 12s ease-out forwards;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(14,20,16,0.92) 0%,
    rgba(14,20,16,0.75) 50%,
    rgba(14,20,16,0.4) 100%
  );
}

/* Fallback if no hero image uploaded yet */
.hero-bg-img:not([style*="url"]),
.hero-bg-img[style*="url('')"] {
  background: linear-gradient(135deg, var(--dark-3) 0%, var(--dark) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 120px;
  padding-bottom: 80px;
}

.hero-text {
  max-width: 680px;
}

.hero-text .label {
  display: inline-block;
  margin-bottom: 20px;
}

.hero-text h1 {
  color: var(--white);
  margin-bottom: 24px;
}

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

.hero-text > p {
  font-size: 1.15rem;
  color: var(--white-dim);
  margin-bottom: 36px;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-trust {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--white-dim);
  letter-spacing: 0.03em;
}

.trust-item svg {
  color: var(--teal-light);
  flex-shrink: 0;
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.hero-scroll span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-faint);
}

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

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

/* Services Preview */
.services-preview {
  background: var(--dark);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  display: block;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 36px 32px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--white);
}

.service-card:hover {
  border-color: var(--teal);
  background: var(--dark-3);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--teal-pale);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-light);
  margin-bottom: 24px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--white);
}

.service-card p {
  font-size: 0.9rem;
  color: var(--white-dim);
  max-width: none;
  margin-bottom: 20px;
}

.service-arrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--teal-light);
  transition: var(--transition);
}

.service-card:hover .service-arrow {
  letter-spacing: 0.1em;
}

.service-cta-card {
  background: var(--teal-pale);
  border-color: var(--teal);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-cta-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.service-cta-card p {
  margin-bottom: 24px;
}

/* Why Us */
.why-us {
  background: var(--dark-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.why-text h2 {
  margin-bottom: 20px;
}

.why-pillars {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pillar {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.pillar:first-child {
  border-top: 1px solid var(--border);
}

.pillar-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--teal);
  opacity: 0.3;
  line-height: 1;
  flex-shrink: 0;
  width: 50px;
}

.pillar-body h4 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  color: var(--white);
}

.pillar-body p {
  font-size: 0.88rem;
  max-width: none;
}

/* Credentials */
.credentials {
  background: var(--teal);
  padding: 60px 0;
}

.cred-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  text-align: center;
}

.cred-item {
  padding: 20px;
}

.cred-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 8px;
}

.cred-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

/* Portfolio Teaser */
.portfolio-teaser {
  background: var(--dark);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  margin-bottom: 48px;
}

.portfolio-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: var(--dark-2);
  border: 1px solid var(--border);
}

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

.portfolio-img-placeholder {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.portfolio-item-wide .portfolio-img-placeholder {
  aspect-ratio: 16/7;
}

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

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

/* Placeholder state when image missing */
.portfolio-img-placeholder.placeholder-active {
  background: var(--dark-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-img-placeholder.placeholder-active img {
  display: none;
}

.placeholder-text {
  display: none;
  font-size: 0.78rem;
  color: var(--white-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-img-placeholder.placeholder-active .placeholder-text {
  display: block;
}

.portfolio-caption {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--white-dim);
  letter-spacing: 0.04em;
}

.portfolio-cta {
  text-align: center;
}

/* Reviews */
.reviews {
  background: var(--dark-2);
  border-top: 1px solid var(--border);
}

.reviews-widget {
  max-width: 900px;
  margin: 0 auto;
}

.review-cards-fallback {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.review-card {
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
}

.review-stars {
  color: #f4c542;
  font-size: 1rem;
  margin-bottom: 14px;
  letter-spacing: 2px;
}

.review-text {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--white-dim);
  max-width: none;
  margin-bottom: 16px;
  line-height: 1.65;
}

.review-author {
  font-size: 0.78rem;
  color: var(--teal-light);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.reviews-cta {
  text-align: center;
  margin-top: 8px;
}

/* CTA Banner */
.cta-banner {
  background: var(--dark-3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.cta-text h2 {
  margin-bottom: 12px;
}

.cta-text p {
  max-width: 50ch;
}

.cta-actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 70px 0; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  h1 { font-size: 2.5rem; }
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .why-inner { grid-template-columns: 1fr; gap: 48px; }
  .cred-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-item-wide { grid-column: span 2; }
  .review-cards-fallback { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-text p { margin: 0 auto; }
  .cta-actions { justify-content: center; }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-trust { gap: 12px; }
  .cred-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-item-wide { grid-column: span 1; }
}
