/* CSS Variables */
:root {
  --color-carbon: #0e0e0e;
  --color-gold: #c9a857;
  --color-white: #f5f3ee;
  --color-grey: #d1d1d1;
  --color-gold-light: rgba(201, 168, 87, 0.1);
  --color-gold-hover: rgba(201, 168, 87, 0.2);

  /* Typographic / UI colors that other rules reference */
  --color-text: rgba(14, 14, 14, 0.87);
  --color-text-muted: rgba(14, 14, 14, 0.7);
  --header-bg: rgba(245, 243, 238, 0.95);
  --hero-bg: linear-gradient(135deg, var(--color-white) 0%, rgba(201, 168, 87, 0.05) 100%);
  --about-bg: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-white) 100%);
  --card-border: rgba(209, 209, 209, 0.3);
  --border-weak: rgba(209, 209, 209, 0.2);
  --footer-bottom-color: rgba(245, 243, 238, 0.7);

  --font-heading: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-soft: 0 4px 20px rgba(14, 14, 14, 0.1);
  --shadow-hover: 0 8px 30px rgba(14, 14, 14, 0.15);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 8px;
  --max-width: 1200px;
}

/* Dark mode: respects user's system preference or a manual data-theme attribute */
@media (prefers-color-scheme: dark) {
  :root {
    --color-gold-hover: rgba(201, 168, 87, 0.2);
    --color-gold-dark: #b8965a;
    --color-white: #0e0e0e;
    --color-grey: #3a3a3a;
    --color-gold-light: rgba(201, 168, 87, 0.06);
    --color-gold-hover: rgba(201, 168, 87, 0.15);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.7);

    --color-text: rgba(245, 243, 238, 0.92);
    --color-text-muted: rgba(245, 243, 238, 0.75);
    --header-bg: rgba(14, 14, 14, 0.85);
    --hero-bg: linear-gradient(135deg, var(--color-white) 0%, rgba(201, 168, 87, 0.02) 100%);
    --about-bg: linear-gradient(135deg, rgba(201, 168, 87, 0.02) 0%, var(--color-white) 100%);
    --card-border: rgba(255, 255, 255, 0.06);
    --border-weak: rgba(255, 255, 255, 0.06);
    --footer-bottom-color: rgba(14, 14, 14, 0.7);
      --color-gold-hover: rgba(201, 168, 87, 0.15);
      --color-gold-dark: #b8965a;
}

/* Manual toggle: add data-theme="dark" on the <html> or <body> to force dark theme */
:root[data-theme="dark"] {
  --color-carbon: #f5f3ee;
  --color-white: #0e0e0e;
  --color-grey: #3a3a3a;
  --color-gold-light: rgba(201, 168, 87, 0.06);
  --color-gold-hover: rgba(201, 168, 87, 0.15);

  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.7);

  --color-text: rgba(245, 243, 238, 0.92);
  --color-text-muted: rgba(245, 243, 238, 0.75);
  --header-bg: rgba(14, 14, 14, 0.85);
  --hero-bg: linear-gradient(135deg, var(--color-white) 0%, rgba(201, 168, 87, 0.02) 100%);
    --color-gold-hover: rgba(201, 168, 87, 0.15);
    --color-gold-dark: #b8965a;
  --card-border: rgba(255, 255, 255, 0.06);
  --border-weak: rgba(255, 255, 255, 0.06);
  --footer-bottom-color: rgba(14, 14, 14, 0.7);
}
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-white);
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  text-wrap: pretty;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-weak);
  z-index: 1000;
  transition: var(--transition);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
}

.logo::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

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

.language-selector {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-grey);
  background: transparent;
  color: var(--color-carbon);
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

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

.lang-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lang-btn:not(.disabled):hover {
  background: var(--color-gold-hover);
  border-color: var(--color-gold);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  background: var(--hero-bg);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A857' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
    repeat;
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero-title {
  margin-bottom: 1.5rem;
  position: relative;
}

.hero-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: 2.5rem;
  color: var(--color-text-muted);
  font-weight: 300;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--color-gold);
  color: var(--color-white);
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.cta-button:hover::before {
  left: 100%;
}

/* Services Section */
.services {
  padding: 6rem 0;
  background: var(--color-white);
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--color-gold);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--color-white);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--card-border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-gold);
}

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

.service-card h3 {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.service-card p {
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* About Section */
.about {
  padding: 6rem 0;
  background: var(--about-bg);
}

.about-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

/* Contact Section */
.contact {
  padding: 6rem 0;
  background: var(--color-white);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  color: var(--color-text);
  padding: 1rem;
  border: 1px solid var(--color-grey);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-light);
}

.form-consent {
  margin: 2rem 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.submit-button {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--color-gold);
  color: var(--color-white);
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
}

.submit-button:hover {
  background: var(--color-gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Footer */
.footer {
  background: var(--color-carbon);
  color: #fff;
  padding: 3rem 0 1rem;
  position: relative;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
}

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

.footer-nav a.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-weak);
  color: var(--footer-bottom-color);
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--color-gold);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-gold-dark);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    min-height: 70vh;
    padding: 6rem 1rem 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-card {
    padding: 2rem;
  }

  .nav {
    padding: 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Loading animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}