/* ===================================================
   Dos Raices Group — Design System & Styles
   =================================================== */

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

/* --- Design Tokens --- */
:root {
  /* Colors */
  --clr-bg: #FAF7F2;
  --clr-surface: #FFFFFF;
  --clr-text: #2D2A26;
  --clr-muted: #6B6560;
  --clr-gold: #C9A84C;
  --clr-gold-dark: #A6872E;
  --clr-gold-light: #E8D5A0;
  --clr-divider: #E8E2D9;
  --clr-rose: #9B4D5A;
  --clr-rose-light: #F5E6E8;

  /* Hero dark palette */
  --clr-hero-bg: #1C1916;
  --clr-hero-text: #F5F0E8;
  --clr-hero-muted: #B8AFA3;

  /* Typography */
  --ff-heading: 'Playfair Display', Georgia, serif;
  --ff-body: 'Karla', 'Segoe UI', sans-serif;

  --fs-hero: clamp(2.5rem, 6vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 4vw, 2.5rem);
  --fs-body: clamp(1rem, 1.2vw, 1.125rem);
  --fs-small: 0.875rem;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;

  /* Spacing */
  --section-py: clamp(4rem, 10vw, 8rem);
  --container-px: clamp(1.25rem, 5vw, 2rem);
  --container-max: 960px;

  /* Effects */
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 250ms ease;
  --shadow-sm: 0 2px 8px rgba(45, 42, 38, 0.06);
  --shadow-md: 0 8px 32px rgba(45, 42, 38, 0.1);
  --shadow-lg: 0 16px 48px rgba(45, 42, 38, 0.12);
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.7;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

.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;
}

/* --- Typography --- */
h1,
h2,
h3 {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  color: var(--clr-text);
}

h1 {
  font-size: var(--fs-hero);
  letter-spacing: 0.02em;
}

h2 {
  font-size: var(--fs-h2);
  margin-bottom: 0.75rem;
}

.tagline {
  font-family: var(--ff-heading);
  font-weight: var(--fw-regular);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--clr-muted);
  max-width: 480px;
  margin-inline: auto;
  line-height: 1.6;
}

/* --- Gold Divider --- */
.divider {
  display: block;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--clr-gold), transparent);
  border: none;
  margin: 1.5rem auto;
}

/* ===================================================
   SECTIONS
   =================================================== */

/* --- Hero --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--section-py) var(--container-px);
  padding-bottom: clamp(5rem, 12vw, 10rem);
  min-height: 90vh;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(201, 168, 76, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(201, 168, 76, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 80%, rgba(201, 168, 76, 0.06) 0%, transparent 40%),
    var(--clr-hero-bg);
  color: var(--clr-hero-text);
}

/* Luminous gold top accent */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 10%, var(--clr-gold) 50%, transparent 90%);
}

/* Gradient fade into next section */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, #1C1916);
  pointer-events: none;
}

.hero__logo {
  width: clamp(180px, 25vw, 280px);
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 24px rgba(201, 168, 76, 0.35));
  animation: logoFadeIn 1.2s ease-out;
}

@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero h1 {
  color: var(--clr-hero-text);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
  animation: textFadeIn 1s ease-out 0.3s both;
}

.hero .tagline {
  color: var(--clr-hero-muted);
  animation: textFadeIn 1s ease-out 0.5s both;
}

.hero .divider {
  background: linear-gradient(90deg, transparent, var(--clr-gold), transparent);
  animation: textFadeIn 1s ease-out 0.7s both;
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

.hero__flourish {
  margin-top: 0.5rem;
  opacity: 0.5;
  animation: textFadeIn 1s ease-out 0.9s both;
}

/* --- Our Story --- */
.story {
  padding: var(--section-py) var(--container-px);
  background: linear-gradient(to bottom, #1C1916, #252019);
  color: var(--clr-hero-text);
  position: relative;
}

.story h2 {
  color: var(--clr-gold);
}

.story__content {
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
}

.story__content p {
  color: var(--clr-hero-muted);
  line-height: 1.85;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
}

.story__content p+p {
  margin-top: 1.25rem;
}

/* Highlighted brand name */
.story__content em {
  color: var(--clr-gold);
  font-style: italic;
}

/* Heritage badges */
.heritage {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.heritage__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  border-radius: 100px;
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--clr-gold);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.1), rgba(201, 168, 76, 0.03));
  letter-spacing: 0.03em;
  transition: all var(--transition);
}

.heritage__badge:hover {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.2), rgba(201, 168, 76, 0.08));
  box-shadow: 0 2px 16px rgba(201, 168, 76, 0.2);
  border-color: rgba(201, 168, 76, 0.5);
}

.heritage__badge svg {
  width: 18px;
  height: 18px;
}

/* --- Venture Section --- */
.venture {
  padding: var(--section-py) var(--container-px);
  position: relative;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
    linear-gradient(to bottom, #252019, #2D2721);
  color: var(--clr-hero-text);
}

.venture h2 {
  color: var(--clr-gold);
}

.venture__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 720px;
  margin-inline: auto;
  background: rgba(201, 168, 76, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: box-shadow var(--transition), transform var(--transition);
}

.venture__card:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(201, 168, 76, 0.25);
  transform: translateY(-4px);
}

/* Gold accent on top of card */
.venture__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-gold-light), var(--clr-gold), var(--clr-gold-light));
}

.venture__image-wrap {
  width: clamp(140px, 30vw, 200px);
  flex-shrink: 0;
}

.venture__image-wrap img {
  border-radius: var(--radius);
  transition: transform 0.4s ease;
}

.venture__card:hover .venture__image-wrap img {
  transform: scale(1.03);
}

.venture__info h3 {
  font-family: var(--ff-heading);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-bottom: 0.75rem;
  color: var(--clr-gold);
}

.venture__info p {
  color: var(--clr-hero-muted);
  margin-bottom: 1.5rem;
  max-width: 420px;
  margin-inline: auto;
  line-height: 1.8;
}

.venture__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-body);
  font-weight: var(--fw-medium);
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-surface);
  background: linear-gradient(135deg, var(--clr-gold), var(--clr-gold-dark));
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

.venture__link:hover,
.venture__link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 168, 76, 0.45);
  background: linear-gradient(135deg, var(--clr-gold-dark), var(--clr-gold));
}

.venture__link:active {
  transform: translateY(0);
}

.venture__link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.venture__link:hover svg {
  transform: translateX(4px);
}

/* --- Footer (dark, bookends with hero) --- */
.footer {
  padding: 3.5rem var(--container-px) 2.5rem;
  text-align: center;
  background: var(--clr-hero-bg);
  color: var(--clr-hero-muted);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 10%, var(--clr-gold) 50%, transparent 90%);
}

.footer__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.footer__logo {
  width: 32px;
  height: 32px;
  opacity: 0.5;
  filter: drop-shadow(0 2px 4px rgba(201, 168, 76, 0.2));
}

.footer__brand-name {
  font-family: var(--ff-heading);
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--clr-hero-muted);
  letter-spacing: 0.04em;
}

.footer p {
  font-size: var(--fs-small);
  color: rgba(184, 175, 163, 0.6);
  line-height: 1.6;
}

.footer p+p {
  margin-top: 0.25rem;
}

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

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

/* Stagger children within revealed sections */
.reveal.is-visible .heritage__badge:nth-child(1) {
  animation: badgePop 0.5s ease 0.2s both;
}

.reveal.is-visible .heritage__badge:nth-child(2) {
  animation: badgePop 0.5s ease 0.35s both;
}

@keyframes badgePop {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===================================================
   RESPONSIVE — Tablet+
   =================================================== */
@media (min-width: 768px) {
  .venture__card {
    flex-direction: row;
    text-align: left;
    padding: 3rem;
    gap: 2.5rem;
  }

  .venture__info p {
    margin-inline: 0;
  }
}

/* ===================================================
   ACCESSIBILITY — Reduced Motion
   =================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__logo {
    animation: none;
  }

  .hero h1,
  .hero .tagline,
  .hero .divider,
  .hero__flourish {
    animation: none;
  }

  .reveal.is-visible .heritage__badge {
    animation: none;
  }

  .venture__link svg,
  .venture__card,
  .venture__image-wrap img {
    transition: none;
  }
}