/* ============================================
   ANA GALA MARTÍN — Inmobiliaria Segovia
   Plum + Amber · Editorial Serif
   ============================================ */

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

:root {
  --plum-deep:    #1A0A1E;
  --plum:         #3B1F3A;
  --plum-mid:     #5C2D54;
  --plum-light:   #7E4070;
  --plum-pale:    #F3ECF5;
  --amber:        #D4A017;
  --amber-light:  #E8C04A;
  --amber-pale:   #FDF6E3;
  --cream:        #FDF9F3;
  --white:        #FFFFFF;
  --text:         #1A0A1E;
  --text-muted:   #5C4A5E;
  --text-light:   #8A7090;
  --font-serif:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --radius:       8px;
  --shadow:       0 4px 24px rgba(59,31,58,0.08);
  --shadow-lg:    0 12px 48px rgba(59,31,58,0.12);
  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
address { font-style: normal; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.15; }

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--plum-deep);
  margin-bottom: 20px;
}

.section-title em {
  font-style: italic;
  color: var(--plum);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: var(--plum-deep);
}
.btn-primary:hover { background: var(--amber-light); transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

.btn-outline-light {
  background: transparent;
  color: var(--plum-deep);
  border: 1.5px solid var(--plum);
}
.btn-outline-light:hover { background: var(--plum); color: var(--white); }

.btn-full { width: 100%; justify-content: center; }

/* ---------- HEADER ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253,249,243,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(59,31,58,0.08);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(59,31,58,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--amber);
  border: 1.5px solid var(--amber);
  border-radius: 4px;
  padding: 4px 7px;
  letter-spacing: 0.05em;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--plum-deep);
}

/* NAV */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-menu a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: var(--transition);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--amber);
  transition: var(--transition);
}

.nav-menu a:hover { color: var(--plum-deep); }
.nav-menu a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--plum-deep);
  border-radius: 2px;
  transition: var(--transition);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26,10,30,0.82) 0%,
    rgba(59,31,58,0.70) 50%,
    rgba(26,10,30,0.60) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 120px 0 80px;
  max-width: 720px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5rem);
  color: var(--white);
  margin-bottom: 24px;
  line-height: 1.05;
}

.hero-title em {
  font-style: italic;
  color: var(--amber-light);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 540px;
}

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

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: rgba(255,255,255,0.5);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 64px;
}

/* ---------- SERVICIOS ---------- */
.servicios { background: var(--white); }

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.servicio-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.servicio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(212,160,23,0.2);
}

.servicio-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--plum);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  margin-bottom: 24px;
}

.servicio-title {
  font-size: 1.3rem;
  color: var(--plum-deep);
  margin-bottom: 12px;
}

.servicio-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- PROPIEDADES ---------- */
.propiedades { background: var(--cream); }

.propiedades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.propiedad-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.propiedad-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.propiedad-img {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
}

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

.propiedad-card:hover .propiedad-img img { transform: scale(1.05); }

.propiedad-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--plum);
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
}

.propiedad-info {
  padding: 24px 28px 28px;
}

.propiedad-ubicacion {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.propiedad-nombre {
  font-size: 1.2rem;
  color: var(--plum-deep);
  margin-bottom: 8px;
}

.propiedad-detalle {
  font-size: 0.9rem;
  color: var(--text-light);
}

.propiedades-aviso {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

/* ---------- NOSOTROS ---------- */
.nosotros { background: var(--white); overflow: hidden; }

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

.nosotros-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.nosotros-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 7/9;
}

.nosotros-content { max-width: 480px; }

.nosotros-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.nosotros-valores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.valor {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.valor svg {
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 2px;
}

.valor span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--plum-deep);
  line-height: 1.4;
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
}

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

.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26,10,30,0.88) 0%,
    rgba(59,31,58,0.80) 100%
  );
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--white);
  margin-bottom: 20px;
}

.cta-text {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.75;
  margin-bottom: 36px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- CONTACTO ---------- */
.contacto { background: var(--cream); }

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

.contacto-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 36px;
}

.contacto-datos {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dato {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.dato svg {
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 2px;
}

.dato span, .dato a {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.dato a:hover { color: var(--plum); }

/* ---------- FORM ---------- */
.contacto-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid rgba(59,31,58,0.15);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}

.form-aviso {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 16px;
  line-height: 1.5;
}

.form-success {
  text-align: center;
  padding: 48px 24px;
}

.form-success svg {
  color: var(--amber);
  margin-bottom: 20px;
}

.form-success h3 {
  font-size: 1.5rem;
  color: var(--plum-deep);
  margin-bottom: 12px;
}

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

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--plum-deep);
  color: rgba(255,255,255,0.7);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 48px;
  align-items: start;
  padding: 64px 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .logo-mark {
  border-color: var(--amber);
  color: var(--amber);
  width: fit-content;
}

.footer-brand .logo-text {
  color: var(--white);
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

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

.footer-contact p {
  font-size: 0.85rem;
  line-height: 1.8;
}

.footer-contact a {
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* ---------- ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .nosotros-grid,
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nosotros-img-wrap { max-width: 500px; }
  .nosotros-content { max-width: 100%; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer-brand { align-items: center; }
  .footer-nav { align-items: center; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(253,249,243,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 32px 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(59,31,58,0.08);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-content { padding: 100px 0 60px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { justify-content: center; }

  .section { padding: 72px 0; }
  .section-header { margin-bottom: 48px; }

  .servicios-grid { grid-template-columns: 1fr; }
  .propiedades-grid { grid-template-columns: 1fr; }

  .nosotros-valores { grid-template-columns: 1fr; }

  .cta { padding: 72px 0; }

  .contacto-form-wrap { padding: 28px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 2.25rem; }
  .section-title { font-size: 1.75rem; }
}
