/* ═══════════════════════════════════════════════
   Ayvu Digital — Style v1.0
   Mobile-first, custom properties, zero bloat
   ═══════════════════════════════════════════════ */

/* ── Custom Properties ── */
:root {
  /* Brand Colors */
  --color-amber: #1C5752;
  --color-amber-light: #248078;
  --color-teal: #E8A030;
  --color-teal-light: #EDB55B;
  --color-offwhite: #F7F5F0;
  --color-charcoal: #1A1D23;

  /* Support Colors */
  --color-gray-400: #9CA3AF;
  --color-gray-200: #E5E7EB;
  --color-teal-bg: #FDF2E4;
  --color-amber-bg: #E8F2F0;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #D4902A, #E8A030);
  --gradient-accent: linear-gradient(135deg, var(--color-teal), var(--color-teal-light));

  /* Typography */
  --font-heading: 'Cal Sans', 'Space Grotesk', sans-serif;
  --font-body: 'Urbanist', sans-serif;

  /* Sizing */
  --container-max: 1100px;
  --container-narrow: 720px;
  --radius: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.1);

  /* Spacing */
  --space-section: 5rem;
  --space-section-mobile: 3.5rem;

  /* Transitions */
  --transition: 0.25s ease;
  --transition-slow: 0.4s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-charcoal);
  background-color: var(--color-offwhite);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--color-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

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

ul {
  list-style: none;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ── Section ── */
.section {
  padding: var(--space-section-mobile) 0;
}

.section--alt {
  background-color: var(--color-teal-bg);
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--color-charcoal);
  margin-bottom: 0.75rem;
}

.section__sub {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--color-gray-400);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--color-teal);
  color: var(--color-offwhite);
  border-color: var(--color-teal);
}

.btn--primary:hover {
  background-color: var(--color-teal-light);
  border-color: var(--color-teal-light);
  color: var(--color-offwhite);
}

.btn--accent {
  background-color: var(--color-amber);
  color: var(--color-charcoal);
  border-color: var(--color-amber);
}

.btn--accent:hover {
  background-color: var(--color-amber-light);
  border-color: var(--color-amber-light);
  color: var(--color-charcoal);
}

/* Hero CTA — white button with amber text */
.btn--hero-primary {
  background-color: #fff;
  color: #C47A1A;
  border-color: #fff;
}

.btn--hero-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
  color: #A86515;
}

.btn--ghost {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
}

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

.btn--full {
  width: 100%;
}

/* ════════════════ NAV ════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-offwhite);
  border-bottom: 1px solid var(--color-gray-200);
  transition: box-shadow var(--transition);
}

.nav--scrolled {
  box-shadow: var(--shadow-card);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo img {
  height: 36px;
  width: auto;
}

.nav__links {
  display: none;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background-color: var(--color-offwhite);
  border-bottom: 1px solid var(--color-gray-200);
  padding: 1rem 1.5rem 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-card);
}

.nav__links--open {
  display: flex;
}

.nav__link {
  display: block;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1rem;
  color: var(--color-charcoal);
  text-decoration: none;
  padding: 0.625rem 0;
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--color-teal);
}

.nav__cta-desktop {
  display: none;
}

.nav__cta-mobile {
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-gray-200);
  margin-top: 0.25rem;
}

.nav__cta-mobile .btn {
  width: 100%;
}

/* Hamburger */
.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-charcoal);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
}

.nav__toggle--open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle--open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle--open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ════════════════ HERO ════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  overflow: hidden;
  padding-top: 68px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__pattern {
  position: absolute;
  inset: 0;
  background-image: url('../img/05-brand-pattern.png');
  background-size: 600px;
  background-repeat: repeat;
  opacity: 0.10;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 1.5rem;
}

.hero__logo {
  margin-bottom: 2rem;
}

.hero__logo-img {
  margin: 0 auto;
  max-width: 240px;
  height: auto;
}

.hero__logo-img--light {
  filter: brightness(0) invert(1);
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 1rem;
}

.hero__sub {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  max-width: 540px;
  margin: 0 auto 2rem;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  animation: bounce 2s ease infinite;
}

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

/* ════════════════ CARDS GRID ════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* ════════════════ CARD ════════════════ */
.card {
  background-color: #fff;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card__icon {
  color: var(--color-teal);
  margin-bottom: 1rem;
}

.card__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--color-charcoal);
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-gray-400);
}

/* Product Card */
.card--product {
  display: flex;
  flex-direction: column;
  position: relative;
}

.card--featured {
  border-color: var(--color-amber);
  box-shadow: 0 2px 12px rgba(232, 160, 48, 0.15);
}

.card__badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.card__badge--accent {
  color: var(--color-amber);
  background-color: var(--color-amber-bg);
}

.card--product .card__title {
  font-size: 1.25rem;
  margin-bottom: 0.625rem;
}

.card--product .card__text {
  margin-bottom: 1.25rem;
}

.card__features {
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card__features li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-charcoal);
  line-height: 1.5;
}

.card__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231C5752' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
}

.card__pricing {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-gray-200);
}

.card__price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--color-teal);
}

.card__period {
  font-size: 0.875rem;
  color: var(--color-gray-400);
}

/* ════════════════ STEPS ════════════════ */
.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.step {
  text-align: center;
  max-width: 320px;
}

.step__number {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--color-teal);
  opacity: 0.15;
  margin-bottom: -1.25rem;
  position: relative;
  z-index: 0;
}

.step__icon {
  color: var(--color-teal);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.step__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--color-charcoal);
  margin-bottom: 0.5rem;
}

.step__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-gray-400);
}

.step__connector {
  color: var(--color-gray-200);
  transform: rotate(90deg);
}

/* ════════════════ SOBRE ════════════════ */
.sobre__grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.sobre__content {
  max-width: 600px;
}

.sobre__content .section__title {
  text-align: left;
  margin-bottom: 1.25rem;
}

.sobre__text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-charcoal);
  margin-bottom: 1rem;
}

.sobre__text:last-child {
  margin-bottom: 0;
}

.sobre__highlight {
  color: var(--color-teal);
  font-weight: 600;
}

.sobre__visual {
  position: relative;
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.sobre__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

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

.sobre__symbol {
  position: relative;
  z-index: 1;
  background-color: var(--color-offwhite);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.sobre__founder {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-gray-200);
}

.sobre__founder-inner {
  max-width: 100%;
}

/* ════════════════ CONTACTO ════════════════ */
.contacto__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.contacto__form {
  background-color: #fff;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.form__group {
  margin-bottom: 1.25rem;
}

.form__label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-charcoal);
  margin-bottom: 0.375rem;
}

.form__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-charcoal);
  background-color: var(--color-offwhite);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form__input::placeholder {
  color: var(--color-gray-400);
}

.form__input:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(28, 87, 82, 0.15);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

.form__feedback {
  text-align: center;
  font-size: 0.875rem;
  margin-top: 0.75rem;
  min-height: 1.25rem;
}

.form__feedback--success {
  color: var(--color-teal);
}

.form__feedback--error {
  color: #d32f2f;
}

.contacto__info {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  justify-content: center;
}

.contacto__info-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.contacto__info-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--color-teal);
  text-decoration: none;
}

.contacto__info-link:hover {
  color: var(--color-amber);
}

.contacto__info-text {
  font-size: 1.125rem;
  color: var(--color-charcoal);
}

/* ════════════════ FOOTER ════════════════ */
.footer {
  background-color: var(--color-charcoal);
  color: var(--color-gray-400);
  padding: 3rem 0 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__logo {
  height: 32px;
  width: auto;
}

.footer__logo--light {
  filter: brightness(0) invert(1);
}

.footer__tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.footer__col-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__col a {
  font-size: 0.875rem;
  color: var(--color-gray-400);
  text-decoration: none;
}

.footer__col a:hover {
  color: #fff;
}

.footer__bottom {
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer__bottom strong {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

/* ════════════════ ANIMATIONS ════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.1s; }
.fade-up:nth-child(2) { animation-delay: 0.25s; }
.fade-up:nth-child(3) { animation-delay: 0.4s; }
.fade-up:nth-child(4) { animation-delay: 0.55s; }

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

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════ RESPONSIVE — Tablet ════════════════ */
@media (min-width: 640px) {
  .hero__title {
    font-size: 3rem;
  }

  .hero__sub {
    font-size: 1.25rem;
  }

  .hero__logo-img {
    max-width: 280px;
  }

  .hero__cta {
    flex-direction: row;
    justify-content: center;
  }

  .section__title {
    font-size: 2.25rem;
  }

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

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

  .steps {
    flex-direction: row;
    gap: 0;
  }

  .step__connector {
    transform: rotate(0deg);
    margin: 0 0.5rem;
    flex-shrink: 0;
  }

  .contacto__grid {
    grid-template-columns: 1.2fr 1fr;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .footer__links {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ════════════════ RESPONSIVE — Desktop ════════════════ */
@media (min-width: 900px) {
  .section {
    padding: var(--space-section) 0;
  }

  .hero__title {
    font-size: 4rem;
  }

  .hero__sub {
    font-size: 1.25rem;
  }

  .section__title {
    font-size: 2.5rem;
  }

  /* Nav Desktop */
  .nav__links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .nav__links--open {
    display: flex;
  }

  .nav__link {
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
  }

  .nav__cta-desktop {
    display: inline-flex;
  }

  .nav__cta-mobile {
    display: none;
  }

  .nav__toggle {
    display: none;
  }

  /* Cards */
  .cards-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card--product {
    padding: 2rem;
  }

  /* Sobre */
  .sobre__grid {
    flex-direction: row;
    gap: 4rem;
  }

  .sobre__content {
    flex: 1;
  }

  .sobre__visual {
    flex: 0 0 320px;
  }

  /* Contacto */
  .contacto__form {
    padding: 2.25rem;
  }

  /* Footer */
  .footer__inner {
    gap: 4rem;
  }
}

/* ════════════════ RESPONSIVE — Large Desktop ════════════════ */
@media (min-width: 1100px) {
  .cards-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ════════════════ Reduced Motion ════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ════════════════ Selection ════════════════ */
::selection {
  background-color: var(--color-teal);
  color: var(--color-offwhite);
}
