/* Avícola Lucy — estilos del landing
   Paleta tomada del logo: hojas oliva, plumaje terracota, arco dorado, cáscara de huevo. */

@font-face {
  font-family: "Alegreya";
  src: url("fonts/alegreya-var-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("fonts/alegreya-sans-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("fonts/alegreya-sans-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2C2A16;          /* texto principal */
  --ink-soft: #5B5838;     /* texto secundario */
  --olive: #3F3D20;        /* bloque de contacto */
  --olive-deep: #2E2C16;   /* pie de página */
  --leaf: #7C7443;         /* hojas del logo, detalles */
  --terracotta: #9C4A22;   /* botón principal */
  --terracotta-dark: #82391A;
  --gold: #C59641;         /* arco del logo */
  --gold-light: #E2BE74;
  --shell: #F7EEDF;        /* cáscara: fondo de pedidos */
  --paper: #FFFFFF;

  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 1.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-bottom: 6rem; /* el botón fijo en móvil no tapa el elemento enfocado */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.1875rem;   /* 19px: Alegreya Sans es de ojo pequeño */
  line-height: 1.55;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

a { color: inherit; }
a, .btn { touch-action: manipulation; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
  border-radius: .5rem;
}
.skip:focus { top: 1rem; }

/* ---------- Barra superior ---------- */
.topbar { padding-block: .75rem; }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  white-space: nowrap;
}
.brand img { width: 48px; height: 48px; }
.nowrap { white-space: nowrap; }
.nav {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: inline-block;
  padding: .6rem .5rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.0625rem;
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--terracotta); }
}

/* ---------- Portada ---------- */
.hero { padding-block: 1rem 3.5rem; }
.hero__grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
.hero__seal { order: -1; justify-self: center; }
.hero__seal {
  position: relative;
  width: min(44vw, 11rem);
  aspect-ratio: 1;
}
/* El arco dorado del logo, repetido a mayor escala alrededor del sello */
.hero__seal::before {
  content: "";
  position: absolute;
  inset: -6%;
  border: 3px solid var(--gold);
  border-radius: 50%;
  -webkit-mask: conic-gradient(from 235deg, #000 0 250deg, transparent 250deg);
  mask: conic-gradient(from 235deg, #000 0 250deg, transparent 250deg);
}
.hero__seal img {
  position: relative;
  width: 100%;
  height: auto;
  /* el logo trae fondo blanco: multiply lo funde con la página y deja ver el arco */
  mix-blend-mode: multiply;
}

.hero h1 {
  font-size: clamp(2.35rem, 8.4vw, 4.1rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.lead {
  margin-top: 1rem;
  font-size: clamp(1.1875rem, 2.4vw, 1.375rem);
  color: var(--ink-soft);
  max-width: 34rem;
}
.hero__actions { margin-top: 1.75rem; }
.hero__number {
  margin-top: .9rem;
  font-size: 1.0625rem;
  color: var(--ink-soft);
}
.hero__number a {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  text-underline-offset: .2em;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.2;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 120ms ease-out, transform 120ms ease-out;
}
.btn:active { transform: scale(.97); }
.btn__icon { width: 1.4rem; height: 1.4rem; flex: none; }
.btn--primary { background: var(--terracotta); color: #fff; }
.btn--light { background: var(--shell); color: var(--olive); }
.btn--block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--terracotta-dark); }
  .btn--light:hover { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* ---------- Pedidos ---------- */
.orders {
  background: var(--shell);
  padding-block: 3.5rem 4.5rem;
}
.orders h2,
.contact h2 { font-size: clamp(2rem, 5.6vw, 3rem); }
.section-intro {
  margin-top: .75rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.formats {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
.format {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.format__art { width: 7.5rem; height: auto; margin-bottom: 1rem; }
.format h3 { font-size: 1.75rem; }
.format p { margin-top: .35rem; color: var(--ink-soft); }
.textlink {
  display: inline-block;
  margin-top: auto;
  padding-top: 1.25rem;
  padding-bottom: .35rem;
  color: var(--terracotta);
  font-weight: 700;
  text-underline-offset: .22em;
  text-decoration-thickness: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .textlink:hover { color: var(--terracotta-dark); }
}

.howto { margin-top: 3rem; max-width: 40rem; }
.howto h3 { font-size: 1.75rem; }
.steps {
  list-style: none;
  counter-reset: paso;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}
.steps li {
  counter-increment: paso;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  align-items: start;
}
/* Cada paso va numerado dentro de un huevo */
.steps li::before {
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 3rem;
  margin-top: -.25rem;
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  background: var(--paper);
  border: 2px solid var(--gold);
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--terracotta);
}
/* Precios por caja: etiqueta a la izquierda, monto alineado a la derecha */
.prices {
  align-self: stretch;
  margin: 1rem 0 0;
  border-top: 1px solid #E6D6B8;
}
.prices div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid #E6D6B8;
}
.prices dt { color: var(--ink-soft); }
.prices dd {
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  background: var(--olive);
  color: var(--shell);
  padding-block: 3.5rem 4rem;
  /* borde superior en forma de cúpula de huevo */
  border-radius: 50% 50% 0 0 / 2.25rem 2.25rem 0 0;
  margin-top: -2.25rem;
}
.contact__grid { display: grid; gap: 2.5rem; }
.contact h2 { color: var(--paper); }
.contact__lead {
  margin-top: .75rem;
  margin-bottom: 1.75rem;
  max-width: 28rem;
}
.contact__list {
  margin: 0;
  display: grid;
  gap: 1.25rem;
}
.contact__list dt {
  font-size: 1rem;
  color: var(--gold-light);
  font-weight: 700;
}
.contact__list dd {
  margin: .1rem 0 0;
  font-size: 1.3125rem;
  overflow-wrap: anywhere;
}
.contact__list a {
  display: inline-block;
  padding-block: .25rem;
  color: var(--paper);
  text-underline-offset: .2em;
}

/* ---------- Pie ---------- */
.footer {
  background: var(--olive-deep);
  color: #D8D3B8;
  font-size: 1rem;
  padding-block: 2rem;
}
.footer__inner { display: grid; gap: .35rem; }
.footer strong { color: var(--paper); }
.footer a { display: inline-block; padding-block: .2rem; color: inherit; text-underline-offset: .2em; }

/* ---------- Botón fijo en móvil ---------- */
.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  border-top: 1px solid rgba(63, 61, 32, .14);
}
@supports (backdrop-filter: blur(8px)) {
  .dock {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(8px);
  }
}
body { padding-bottom: calc(5.25rem + env(safe-area-inset-bottom)); }

/* ---------- Pantallas medianas y grandes ---------- */
@media (min-width: 40rem) {
  .formats { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .format { padding: 2rem; }
  .dock { display: none; }
  body { padding-bottom: 0; }
  .contact__grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
  }
}

/* En móvil el botón principal ocupa todo el ancho, igual que el botón fijo */
@media (max-width: 39.99rem) {
  .hero__actions .btn { width: 100%; }
}

@media (min-width: 56rem) {
  .topbar { padding-block: 1.25rem; }
  .hero { padding-block: 2.5rem 6rem; }
  .hero__grid {
    grid-template-columns: 1.15fr .85fr;
    gap: 4rem;
  }
  .hero__seal { order: 0; width: min(100%, 26rem); }
  .hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
  }
  .hero__number { margin-top: 0; }

  .orders { padding-block: 5rem 7rem; }
  .formats { margin-top: 2.5rem; }
  .howto { max-width: 44rem; margin-top: 4rem; }

  .contact {
    padding-block: 5rem 5.5rem;
    border-radius: 50% 50% 0 0 / 4rem 4rem 0 0;
    margin-top: -4rem;
  }
  .contact__grid { gap: 4rem; }
}

/* En móvil, el botón fijo aparece al bajar más allá de la portada (si el navegador
   soporta animaciones ligadas al scroll; si no, queda siempre visible). */
@supports (animation-timeline: scroll()) {
  @media (max-width: 39.99rem) and (prefers-reduced-motion: no-preference) {
    .dock {
      animation: dock-in linear both;
      animation-timeline: scroll(root);
      animation-range: 0 32rem;
    }
    @keyframes dock-in {
      0%, 70% { opacity: 0; transform: translateY(100%); visibility: hidden; }
      100% { opacity: 1; transform: none; visibility: visible; }
    }
  }
}
