/* ============================================
   The Dresser Inc — Main Stylesheet
   Fonts: Playfair Display (headings) + Lato (body)
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #1a1a1a;
  --color-secondary: #b8860b;
  --color-accent: #c9a84c;
  --color-bg: #ffffff;
  --color-bg-alt: #faf8f5;
  --color-bg-dark: #111111;
  --color-text: #333333;
  --color-text-light: #777777;
  --color-text-inverse: #ffffff;
  --color-border: #e8e4de;
  --color-error: #c0392b;
  --color-success: #27ae60;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;

  --nav-height: 80px;
  --container-width: 1200px;
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-secondary);
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section__label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 20px;
  color: inherit;
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section__desc {
  font-size: 17px;
  color: var(--color-text-light);
  line-height: 1.8;
}

.required {
  color: var(--color-error);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 16px 40px;
  border-radius: 0;
  transition: all var(--transition);
  text-align: center;
}

.btn--primary {
  background-color: var(--color-secondary);
  color: var(--color-text-inverse);
  border: 2px solid var(--color-secondary);
}

.btn--primary:hover {
  background-color: transparent;
  color: var(--color-secondary);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--outline:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn--full {
  width: 100%;
}

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

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

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background-color var(--transition), box-shadow var(--transition);
}

.navbar--scrolled {
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar__logo {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--color-text-inverse);
  transition: color var(--transition);
  letter-spacing: 1px;
}

.navbar--scrolled .navbar__logo {
  color: var(--color-primary);
}

.navbar__list {
  display: flex;
  align-items: center;
  gap: 36px;
}

.navbar__link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-inverse);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.navbar--scrolled .navbar__link {
  color: var(--color-primary);
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: width var(--transition);
}

.navbar__link:hover::after {
  width: 100%;
}

.navbar__link:hover {
  color: var(--color-secondary);
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 30px;
  height: 30px;
  z-index: 1001;
}

.navbar__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-inverse);
  transition: all var(--transition);
}

.navbar--scrolled .navbar__hamburger span {
  background-color: var(--color-primary);
}

.navbar__hamburger--active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.navbar__hamburger--active span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger--active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.55) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: -1;
}

.hero__content {
  text-align: center;
  color: var(--color-text-inverse);
  max-width: 750px;
  padding: 0 24px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero__subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 40px;
  opacity: 0.9;
}

.hero__cta {
  display: inline-block;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  background-color: var(--color-bg);
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__image {
  position: relative;
  overflow: hidden;
}

.about__image img {
  width: 100%;
  height: 550px;
  object-fit: cover;
}

.about__image::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 200px;
  height: 200px;
  border: 3px solid var(--color-secondary);
  z-index: -1;
}

.about__text .section__title {
  color: var(--color-primary);
}

.about__text p {
  margin-bottom: 20px;
  color: var(--color-text-light);
  font-size: 16px;
  line-height: 1.8;
}

.about__text .btn {
  margin-top: 12px;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  background-color: var(--color-bg-alt);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--color-bg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-card__image {
  height: 280px;
  overflow: hidden;
}

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

.service-card:hover .service-card__image img {
  transform: scale(1.08);
}

.service-card__body {
  padding: 28px 24px;
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.service-card__desc {
  font-size: 15px;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery {
  background-color: var(--color-bg);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 16px;
}

.gallery__item {
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

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

.gallery__item:hover img {
  transform: scale(1.06);
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__item--wide {
  grid-column: span 2;
}

/* ============================================
   CONTACT / LEAD FORM
   ============================================ */
.contact {
  background-color: var(--color-bg-alt);
}

.contact__wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact__form {
  background: var(--color-bg);
  padding: 48px 40px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
  position: relative;
}

.form-group {
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group--error input,
.form-group--error select,
.form-group--error textarea {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
  color: var(--color-success);
}

.form-success--visible {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.form-success svg {
  margin: 0 auto 16px;
}

.form-success h3 {
  font-family: var(--font-heading);
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.form-success p {
  font-size: 16px;
  color: var(--color-text-light);
}

.contact__image {
  height: 100%;
  min-height: 500px;
  overflow: hidden;
}

.contact__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   CONTACT INFO
   ============================================ */
.info__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

.info__card {
  text-align: center;
  padding: 40px 20px;
}

.info__icon {
  margin-bottom: 20px;
  color: var(--color-secondary);
}

.info__title {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 12px;
}

.info__card p {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.8;
}

.info__card a {
  color: var(--color-secondary);
}

.info__card a:hover {
  text-decoration: underline;
}

.info__map {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.info__map iframe {
  display: block;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background-color: #0a0a0a;
  color: var(--color-text-inverse);
  padding: 80px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 16px;
  color: var(--color-text-inverse);
}

.footer__logo:hover {
  color: var(--color-secondary);
}

.footer__tagline {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.6;
  max-width: 300px;
}

.footer__links h4,
.footer__contact h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__links a {
  font-size: 14px;
  opacity: 0.6;
  transition: opacity var(--transition), color var(--transition);
}

.footer__links a:hover {
  opacity: 1;
  color: var(--color-secondary);
}

.footer__contact p {
  font-size: 14px;
  opacity: 0.6;
  margin-bottom: 8px;
}

.footer__contact a:hover {
  color: var(--color-secondary);
  opacity: 1;
}

.footer__bottom {
  text-align: center;
  padding: 28px 0;
  margin-top: 0;
}

.footer__bottom p {
  font-size: 13px;
  opacity: 0.4;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 50px;
  height: 50px;
  background-color: var(--color-secondary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 999;
  box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--color-primary);
  transform: translateY(-3px);
}

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__inner {
    gap: 40px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* Mobile Landscape / Small Tablet */
@media (max-width: 768px) {
  :root {
    --nav-height: 70px;
  }

  .section {
    padding: 70px 0;
  }

  /* Mobile Navigation */
  .navbar__hamburger {
    display: flex;
  }

  .navbar__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.4s ease;
    z-index: 999;
  }

  .navbar__menu--open {
    right: 0;
  }

  .navbar__list {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .navbar__link {
    font-size: 18px;
    color: var(--color-text-inverse) !important;
  }

  .navbar__hamburger--active span {
    background-color: var(--color-text-inverse) !important;
  }

  /* About */
  .about__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__image img {
    height: 400px;
  }

  .about__image::after {
    display: none;
  }

  /* Services */
  .services__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  /* Gallery */
  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 220px;
  }

  .gallery__item--tall {
    grid-row: span 1;
  }

  .gallery__item--wide {
    grid-column: span 1;
  }

  /* Contact Form */
  .contact__wrapper {
    grid-template-columns: 1fr;
  }

  .contact__form {
    padding: 32px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact__image {
    min-height: 300px;
  }

  /* Info */
  .info__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .info__card {
    padding: 24px 20px;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer__tagline {
    max-width: 100%;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__title {
    font-size: 36px;
  }

  .hero__subtitle {
    font-size: 15px;
  }

  .btn {
    padding: 14px 28px;
    font-size: 13px;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
  }

  .section__title {
    font-size: 28px;
  }

  .info__map iframe {
    height: 280px;
  }
}
