/* Haven Remodeling - Premium Remodeling Template Stylesheet */

:root {
  --bg-color: #faf9f6;
  --bg-dark: #2f3e35;
  --bg-card: #ffffff;
  --border-color: rgba(47, 62, 53, 0.1);
  --text-primary: #1e1e1c;
  --text-secondary: #5c635e;
  --accent: #2f3e35;
  --accent-light: #d1c7bd;
  --accent-hover: #43584c;
  --font-family-sans: 'Inter', sans-serif;
  --font-family-heading: 'Playfair Display', serif;
  --header-height: 80px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Scroll Fade In */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-family-sans);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(47, 62, 53, 0.15);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(47, 62, 53, 0.3);
}

.btn-ghost:hover {
  background-color: rgba(47, 62, 53, 0.05);
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.pre-inner {
  text-align: center;
}

.pre-logo {
  font-family: var(--font-family-heading);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.pre-line {
  width: 150px;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.05);
  margin: 0 auto 15px auto;
  position: relative;
  overflow: hidden;
}

.pre-line span {
  display: block;
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  animation: load 1.5s infinite;
}

.pre-text {
  font-family: var(--font-family-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes load {
  0% { left: -100%; }
  50% { left: 0; }
  100% { left: 100%; }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 999;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background-color: rgba(250, 249, 246, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom-color: var(--border-color);
}

.header-inner {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  background-color: var(--accent);
  color: #fff;
  font-family: var(--font-family-heading);
  font-weight: 600;
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.brand-name {
  font-family: var(--font-family-heading);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.brand-name em {
  font-weight: 400;
  color: var(--text-secondary);
  font-style: italic;
}

.header-nav {
  display: flex;
  gap: 40px;
}

.header-nav a {
  font-family: var(--font-family-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.header-nav a:hover {
  color: var(--text-primary);
}

.header-cta {
  font-family: var(--font-family-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--accent);
  padding: 10px 20px;
  border-radius: 2px;
}

.header-cta:hover {
  background-color: var(--accent-hover);
}

.header-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.header-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  margin-bottom: 6px;
  transition: all 0.3s ease;
}

.header-burger span:last-child {
  margin-bottom: 0;
}

/* Mobile Nav */
@media (max-width: 900px) {
  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-color);
    flex-direction: column;
    padding: 60px 40px;
    gap: 30px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 998;
  }

  .header-nav.active {
    transform: translateY(0);
    opacity: 1;
  }

  .header-nav a {
    font-size: 1.5rem;
  }

  .header-cta {
    display: none;
  }

  .header-burger {
    display: block;
  }

  .header-burger.active span:first-child {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .header-burger.active span:last-child {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}

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

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/hero_background.png');
  background-size: cover;
  background-position: center;
  filter: brightness(0.8);
  z-index: 1;
}

.hero-grid {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  z-index: 2;
}

.hero-left {
  max-width: 650px;
  background: rgba(250, 249, 246, 0.85);
  padding: 50px;
  border-radius: 4px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-family-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-title .word {
  display: inline-block;
}

.hero-title .italic {
  font-style: italic;
  font-family: var(--font-family-heading);
  font-weight: 400;
  color: var(--text-secondary);
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 2;
  font-family: var(--font-family-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.scroll-line {
  width: 50px;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.scroll-line span {
  display: block;
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  animation: scrollLine 2s infinite;
}

/* Sections Global */
section {
  padding: 120px 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-head {
  margin-bottom: 60px;
}

.section-label {
  font-family: var(--font-family-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label span {
  color: var(--text-secondary);
}

.section-title {
  font-family: var(--font-family-heading);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Metrics Section */
.metrics {
  background-color: var(--bg-dark);
  color: #fff;
}

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

.metric-card {
  padding: 20px 0;
}

.metric-num {
  display: block;
  font-family: var(--font-family-heading);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.metric-label {
  display: block;
  font-family: var(--font-family-sans);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.metric-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #a3aeab;
  font-weight: 300;
}

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

/* Services Section */
.services-list {
  display: flex;
  flex-direction: column;
}

.s-row {
  display: flex;
  align-items: flex-start;
  padding: 40px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.s-row:hover {
  transform: translateX(10px);
}

.s-num {
  font-family: var(--font-family-heading);
  font-size: 1.25rem;
  color: var(--text-secondary);
  width: 80px;
}

.s-body {
  flex-grow: 1;
}

.s-body h3 {
  font-family: var(--font-family-heading);
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.s-body p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 800px;
}

.s-arrow {
  font-size: 1.5rem;
  color: var(--accent);
}

/* Portfolio Slider Section */
.portfolio {
  background-color: #f3ede6;
}

.center-label {
  justify-content: center;
}

.section-sub {
  max-width: 600px;
  margin: 20px auto 0 auto;
  color: var(--text-secondary);
  line-height: 1.6;
}

.slider-wrapper {
  max-width: 1000px;
  margin: 60px auto 0 auto;
}

.image-comparison-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.before-img-filter {
  filter: grayscale(0.85) sepia(0.2) brightness(0.75) contrast(0.9);
}

.image-before,
.image-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.image-after {
  width: 50%;
  overflow: hidden;
  z-index: 2;
  transition: clip-path 0.1s ease;
}

.image-after img {
  width: 1000px; /* Force sync width */
  max-width: none;
}

.image-label {
  position: absolute;
  bottom: 20px;
  padding: 8px 16px;
  background-color: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-family: var(--font-family-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
  z-index: 3;
}

.before-label {
  right: 20px;
}

.after-label {
  left: 20px;
}

/* Transparent Range Slider Overlay */
.comparison-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 5;
  cursor: ew-resize;
}

/* Slider Divider Line */
.slider-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #fff;
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* Contact Section */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-title {
  font-family: var(--font-family-heading);
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 30px;
}

.contact-left p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
  font-weight: 300;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.big-link {
  font-family: var(--font-family-heading);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-primary);
}

.big-link:hover {
  color: var(--text-secondary);
  transform: translateX(5px);
}

/* Form Styling */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  position: relative;
  width: 100%;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(47, 62, 53, 0.2);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.form-group textarea {
  resize: none;
}

.form-group label {
  position: absolute;
  top: 16px;
  left: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  pointer-events: none;
  transition: all 0.3s ease;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  font-size: 0.8rem;
  color: var(--accent);
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: var(--accent);
}

@media (max-width: 900px) {
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

/* Footer */
.site-footer {
  background-color: var(--bg-dark);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 80px 0 40px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo {
  font-family: var(--font-family-heading);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #fff;
  margin-bottom: 20px;
  display: block;
}

.footer-brand p {
  color: #a3aeab;
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 300;
}

.footer-grid h4 {
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  color: var(--accent-light);
}

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

.footer-grid ul li {
  margin-bottom: 12px;
  color: #a3aeab;
  font-size: 0.95rem;
  font-weight: 300;
}

.footer-grid ul li a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: #a3aeab;
}

.footer-bottom div {
  display: flex;
  gap: 24px;
}

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

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}
