/* ============================================
   Fort Interior - Modern Interior Design Website
   ============================================ */

:root {
  /* Warm, sophisticated palette */
  --color-bg: #faf8f5;
  --color-bg-alt: #f2efe8;
  --color-text: #2c2a26;
  --color-text-muted: #6b6560;
  --color-accent: #8b7355;
  --color-accent-dark: #6b5842;
  --color-border: #e5e0d8;
  
  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', -apple-system, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* Layout */
  --container-max: 72rem;
  --header-height: 4.5rem;
  
  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.3s;
  --duration-slow: 0.5s;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 calc(var(--space-md) + env(safe-area-inset-right, 0)) 0 calc(var(--space-md) + env(safe-area-inset-left, 0));
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: background var(--duration) var(--ease);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-current {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  position: relative;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--header-height) var(--space-xl) var(--space-2xl);
  background-image: url('site-images/hero.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
  animation: overlayFadeIn 1.2s var(--ease-out) forwards;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 36rem;
  animation: heroFadeIn 1s var(--ease-out) forwards;
}

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

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  color: #fff;
}

.hero-tagline {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 28rem;
  margin: 0 auto var(--space-lg);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}

/* Default: buttons on light backgrounds (sections, inner pages) */
.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
  border: 2px solid var(--color-text);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-bg);
}

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

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

/* Hero: override for dark background */
.hero .btn-primary {
  background: #fff;
  color: var(--color-text);
  border-color: #fff;
}

.hero .btn-primary:hover {
  background: transparent;
  border-color: #fff;
  color: #fff;
}

.hero .btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.hero .btn-secondary:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-whatsapp {
  background: #25D366 !important;
  color: #fff !important;
  border: 2px solid #25D366 !important;
}

.btn-whatsapp:hover {
  background: #20bd5a !important;
  border-color: #20bd5a !important;
  color: #fff !important;
}

.btn-whatsapp i {
  margin-right: 0.5rem;
}

.btn-nav {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-whatsapp-footer {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-md);
}

/* Inner pages (no hero) */
body.page .page-content {
  padding-top: var(--header-height);
}

/* Home page quick links */
.home-links {
  background: var(--color-bg-alt);
}

.home-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.home-link-card {
  display: block;
  padding: var(--space-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  text-align: center;
  transition: all var(--duration) var(--ease);
}

.home-link-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 24px rgba(139, 115, 85, 0.08);
}

.home-link-icon {
  display: block;
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.home-link-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.home-link-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Sections */
.section {
  padding: var(--space-2xl) 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.section.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.section.animate-in .service-card {
  animation: cardFadeIn 0.5s var(--ease-out) forwards;
}

.section.animate-in .service-card:nth-child(1) { animation-delay: 0.1s; }
.section.animate-in .service-card:nth-child(2) { animation-delay: 0.15s; }
.section.animate-in .service-card:nth-child(3) { animation-delay: 0.2s; }
.section.animate-in .service-card:nth-child(4) { animation-delay: 0.25s; }
.section.animate-in .service-card:nth-child(5) { animation-delay: 0.3s; }
.section.animate-in .service-card:nth-child(6) { animation-delay: 0.35s; }

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

.section.animate-in .gallery-item {
  animation: galleryFadeIn 0.5s var(--ease-out) forwards;
}

.section.animate-in .gallery-item:nth-child(1) { animation-delay: 0.05s; }
.section.animate-in .gallery-item:nth-child(2) { animation-delay: 0.08s; }
.section.animate-in .gallery-item:nth-child(3) { animation-delay: 0.11s; }
.section.animate-in .gallery-item:nth-child(4) { animation-delay: 0.14s; }
.section.animate-in .gallery-item:nth-child(5) { animation-delay: 0.17s; }
.section.animate-in .gallery-item:nth-child(6) { animation-delay: 0.2s; }
.section.animate-in .gallery-item:nth-child(n+7) { animation-delay: 0.25s; }

@keyframes galleryFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.section-header {
  margin-bottom: var(--space-xl);
}

.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* About */
.about {
  background: var(--color-bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-content {
  max-width: 40rem;
}

.about-content .section-header {
  margin-bottom: var(--space-lg);
}

.about-image {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(44, 42, 38, 0.1);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 400px;
}

.about-lead {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.about-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* Services */
.services-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.services-images img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.service-card {
  padding: var(--space-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: all var(--duration) var(--ease);
  opacity: 0;
}

.section.animate-in .service-card {
  opacity: 1;
}

.service-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 24px rgba(139, 115, 85, 0.08);
}

.service-icon {
  font-size: 1.75rem;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.service-icon i {
  display: inline-block;
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Gallery */
.gallery {
  background: var(--color-bg-alt);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
}

.section.animate-in .gallery-item {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration) var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info .btn-whatsapp {
  margin-bottom: var(--space-lg);
}

.contact-item {
  margin-bottom: var(--space-lg);
}

.contact-item h4,
.contact-social h4 {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.contact-item p {
  color: var(--color-text-muted);
}

.contact-item a {
  display: block;
  margin-bottom: var(--space-xs);
}

.contact-social {
  margin-bottom: var(--space-lg);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  font-weight: 500;
}

.contact-map-iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: none;
  border-radius: 4px;
  display: block;
}

.contact-map {
  position: relative;
  aspect-ratio: 16/10;
  min-height: 280px;
  border-radius: 4px;
  overflow: hidden;
}

.contact-map-caption {
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Footer */
.footer {
  padding: var(--space-xl) 0;
  background: var(--color-text);
  color: var(--color-bg);
}

.footer a {
  color: rgba(255, 255, 255, 0.9);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-about .footer-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.footer-tagline {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: var(--space-sm);
}

.footer-desc {
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.6;
}

.footer-contact h4 {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.footer-contact p {
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  opacity: 0.9;
}

.footer-contact p i {
  margin-right: var(--space-xs);
  opacity: 0.8;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.footer-social a {
  font-size: 1.25rem;
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}

/* Responsive - Tablet */
@media (max-width: 900px) {
  .hero {
    padding: var(--header-height) var(--space-lg) var(--space-xl);
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .services-images {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: var(--space-lg);
  }

  .home-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 4rem;
  }

  .container {
    padding: 0 calc(var(--space-sm) + env(safe-area-inset-right, 0)) 0 calc(var(--space-sm) + env(safe-area-inset-left, 0));
  }

  .nav-toggle {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--header-height) var(--space-lg) var(--space-xl);
    gap: 0.25rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), visibility 0.4s;
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links li {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
    width: 100%;
    max-width: 20rem;
    text-align: center;
  }

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

  .nav-links.active li:nth-child(1) { transition-delay: 0.08s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.12s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.16s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(5) { transition-delay: 0.24s; }
  .nav-links.active li:nth-child(6) { transition-delay: 0.28s; }

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem var(--space-md);
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    font-size: 1.05rem;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .logo {
    font-size: 1.25rem;
  }

  .hero {
    padding: var(--header-height) calc(var(--space-sm) + env(safe-area-inset-right, 0)) calc(var(--space-lg) + env(safe-area-inset-bottom, 0)) calc(var(--space-sm) + env(safe-area-inset-left, 0));
  }

  .hero-title {
    font-size: clamp(2.25rem, 10vw, 3.5rem);
  }

  .hero-tagline {
    font-size: 0.875rem;
    letter-spacing: 0.06em;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-cta {
    gap: var(--space-sm);
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .section-header {
    margin-bottom: var(--space-lg);
  }

  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about-image {
    order: -1;
  }

  .services-images {
    grid-template-columns: 1fr;
    margin-bottom: var(--space-lg);
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .home-links-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: var(--space-md);
  }

  .service-icon {
    font-size: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .contact-item a {
    padding: 0.25rem 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .social-link {
    padding: 0.5rem 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .contact-map {
    min-height: 220px;
    aspect-ratio: 16/9;
  }

  .contact-map-iframe {
    min-height: 220px;
  }

  .footer {
    padding: var(--space-lg) var(--space-sm);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    text-align: center;
  }

  .footer-contact {
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-about .footer-brand {
    font-size: 1.1rem;
  }

  .footer-tagline,
  .footer-desc,
  .footer-copy {
    font-size: 0.85rem;
  }
}

/* Responsive - Small mobile */
@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .about-lead {
    font-size: 1.1rem;
  }
}

/* Safe area for notched devices (iPhone X+, etc.) */
.footer {
  padding-bottom: max(var(--space-xl), env(safe-area-inset-bottom, 0));
}

/* Prevent horizontal overflow */
html, body {
  overflow-x: hidden;
}
