/*
  SanTa Homes — Main Stylesheet
  Design tokens + shared component styles
*/

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

:root {
  --sand: #E8DFD4;
  --sand-light: #F4F0EB;
  --sand-dark: #C4B8A9;
  --charcoal: #1A1A1A;
  --charcoal-soft: #2D2D2D;
  --warm-white: #FDFBF8;
  --olive: #5C6B4F;
  --olive-light: #7A8C6A;
  --terracotta: #B8704A;
  --terracotta-light: #D4956E;
  --gold: #C9A96E;
  --gold-light: #DFC89A;
  --text-primary: #1A1A1A;
  --text-secondary: #6B6358;
  --text-light: #9A9188;
  --heading: 'Cormorant Garamond', Georgia, serif;
  --body: 'DM Sans', -apple-system, sans-serif;
  --nav-height: 80px;
}

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

body {
  font-family: var(--body);
  color: var(--text-primary);
  background: var(--warm-white);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 60px);
  background: rgba(253, 251, 248, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 26, 26, 0.06);
}

.nav-logo {
  display: none;
}

.nav-wordmark {
  height: 75px;
  width: auto;
  max-width: 200px;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}

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

.nav-links a.active {
  color: var(--charcoal);
  font-weight: 600;
}

/* Language dropdown */
.lang-dropdown {
  position: relative;
  margin-left: 8px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--sand-dark);
  border-radius: 20px;
  color: var(--text-primary);
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: var(--charcoal);
  color: var(--warm-white);
  border-color: var(--charcoal);
}

.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 140px;
  padding-top: 6px;
  z-index: 100;
}

.lang-menu-inner {
  background: var(--warm-white);
  border: 1px solid var(--sand-dark);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.lang-dropdown:hover .lang-menu,
.lang-btn:focus+.lang-menu {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
}

.lang-option:hover {
  background: var(--sand-light);
}

.lang-option.active {
  background: var(--sand);
  font-weight: 600;
}

.lang-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.lang-mobile-grid {
  display: none;
}

.lang-label {
  flex: 1;
}

/* Hamburger Button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 110;
  width: 40px;
  height: 40px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.visible {
  display: block;
  opacity: 1;
}

/* ── SHARED COMPONENTS ── */

/* Hero for inner pages (contact, experience, etc.) */
.page-hero {
  min-height: 20vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(184, 112, 74, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(92, 107, 79, 0.08) 0%, transparent 50%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.page-hero h1 {
  font-family: var(--heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  color: var(--warm-white);
  line-height: 1.1;
}

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

/* Two-column grid layout */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.two-col-grid--start {
  align-items: start;
}

.two-col-grid--center {
  align-items: center;
}

/* Section content heading */
.content-heading {
  font-family: var(--heading);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 24px;
  line-height: 1.2;
}

/* Hover card effect (used by service cards, testimonials, etc.) */
.hover-card {
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

.hover-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--terracotta), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

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

/* --- MAIN --- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── SECTIONS ── */
.section {
  padding: clamp(60px, 10vw, 120px) clamp(24px, 5vw, 80px);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 16px;
}

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

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-header .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 28px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
}

.btn--primary {
  background: var(--olive);
  color: #d4e8c4;
}

.btn--primary:hover {
  background: var(--olive-light);
}

.btn--disabled {
  background: var(--sand-dark);
  color: var(--text-light);
  cursor: default;
}

/* ── LOGIN PAGE ── */
.login-section {
  background: var(--warm-white);
}

.login-container {
  max-width: 400px;
  margin: 0 auto;
}

.login-form {
  background: var(--sand-light);
  padding: 32px;
  border-radius: 16px;
}

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

.login-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--sand-dark);
  background: var(--warm-white);
  font-family: var(--body);
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--olive-light);
  box-shadow: 0 0 0 3px rgba(122, 140, 106, 0.2);
}

.login-form .btn {
  width: 100%;
  text-align: center;
}

.login-error {
  background: rgba(184, 112, 74, 0.1);
  color: var(--terracotta);
  padding: 14px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* Admin Header */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.btn--logout {
  background: transparent;
  border: 1px solid var(--sand-dark);
  color: var(--sand-dark);
  font-size: 0.75rem;
  padding: 8px 16px;
}

.btn--logout:hover {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--warm-white);
}

/* ── FOOTER ── */
.footer {
  background: var(--charcoal);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 48px clamp(24px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  width: 170px;
  height: auto;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav {
    padding: 0 16px;
    height: 60px;
  }

  .nav-wordmark {
    display: none;
  }

  .nav-logo {
    display: block;
    height: 30px;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--warm-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 24px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow-y: auto;
  }

  .nav-links.mobile-open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    padding: 16px 0;
    width: 100%;
    border-bottom: 1px solid var(--sand);
  }

  .nav-links a:last-of-type {
    border-bottom: none;
  }

  .nav-links .lang-dropdown {
    margin-top: 16px;
    width: 100%;
  }

  .nav-links .lang-btn {
    display: none;
  }

  .nav-links .lang-menu {
    display: none !important;
  }

  .lang-mobile-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--sand);
  }

  .lang-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: transparent;
    border: 1px solid var(--sand-dark);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    transition: all 0.2s;
  }

  .lang-mobile-btn:hover {
    background: var(--charcoal);
    color: var(--warm-white);
    border-color: var(--charcoal);
  }

  .lang-mobile-btn.active {
    background: var(--olive);
    color: var(--warm-white);
    border-color: var(--olive);
  }

  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}