/* ==========================================================================
   Bodegas Bianchi — Brindemos por lo que nos hace Famiglia
   style.css · Mobile-first · Etapa 1
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fuentes locales
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Black Mango";
  src: url("../fonts/BlackMangoVariableGX.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */
:root {
  /* Colores */
  --color-primary:    #dc9100;
  --color-primary-hi: #f4c25a;
  --color-primary-lo: #8a5a10;
  --color-bg:         #0e0a07;
  --color-bg-alt:     #17110c;
  --color-border:     #3a2c1f;
  --color-text:       #f3ebdf;
  --color-text-muted: #b5a690;
  --color-wa:         #25d366;

  /* Tipografía */
  --font-primary:  "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display:  "Black Mango", Georgia, serif;

  /* Espaciados */
  --spacing-sm:  1rem;
  --spacing-md:  2rem;
  --spacing-lg:  clamp(72px, 10vw, 120px);
  --wrap-max:    1180px;
}

/* --------------------------------------------------------------------------
   Reset y base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  margin: 0;
}

img { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 300; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding-inline: max(20px, env(safe-area-inset-left, 0px));
}

section { position: relative; }

/* Compensar header fijo en navegación por anclas */
section[id] { scroll-margin-top: 90px; }

.band { padding-block: var(--spacing-lg); }
.band.alt { background: var(--color-bg-alt); }
#motivos { padding-bottom: clamp(96px, 13vw, 160px); }

/* --------------------------------------------------------------------------
   Tipografía utilitaria
   -------------------------------------------------------------------------- */
.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .75em 1.3em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn img { width: 1.3em; height: 1.3em; flex: none; }

.btn-gold {
  background: linear-gradient(135deg, var(--color-primary-hi), var(--color-primary) 55%, var(--color-primary-lo));
  color: #1a1006;
  box-shadow: 0 8px 30px -10px rgba(220, 145, 0, .65);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px rgba(220, 145, 0, .85);
}

.btn-ghost {
  border: 1px solid rgba(243, 235, 223, .35);
  color: var(--color-text);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--color-primary-hi);
  color: var(--color-primary-hi);
}

.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-primary-hi);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Cabecera de sección
   -------------------------------------------------------------------------- */
.sec-head {
  display: grid;
  gap: .9rem;
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.sec-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}
.sec-head h2 .accent {
  color: var(--color-primary-hi);
}
.sec-head p { color: var(--color-text-muted); max-width: 52ch; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s;
}
.site-header.scrolled {
  background: rgba(14, 10, 7, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--color-border);
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 22px;
  transition: padding-block .35s;
}
.site-header.scrolled .wrap {
  padding-block: 10px;
}

.brand {
  display: block;
  text-decoration: none;
  line-height: 1;
}
.brand img {
  height: 42px;
  width: auto;
  transition: height .35s;
}
.site-header.scrolled .brand img {
  height: 28px;
}

.site-header .btn {
  padding: .7em 1.2em;
  font-size: .75rem;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
  z-index: 0;
}

/* Velo: mobile = gradiente con ventana semi-abierta al centro */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(14,10,7,.88) 0%,
    rgba(14,10,7,.42) 30%,
    rgba(14,10,7,.42) 68%,
    rgba(14,10,7,.88) 100%
  );
}

.hero .wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  padding-block: 88px 36px;
}

.hero-headline {
  font-family: var(--font-display);
  line-height: 1;
  letter-spacing: -.01em;
}
.hero-headline .l1 {
  display: block;
  font-size: clamp(2rem, 6.5vw, 5.6rem);
  font-weight: 300;
  color: var(--color-primary);
}
.hero-headline .l2 {
  display: block;
  font-size: clamp(2rem, 6.5vw, 5.6rem);
  font-weight: 300;
  color: #fff;
}
.hero-headline .l3 {
  display: block;
  margin-top: -.25em;
  margin-left: clamp(1rem, 4vw, 4rem);
}
.hero-headline .l3 img {
  height: clamp(4.8rem, 18vw, 24rem);
  width: auto;
}

.hero .sub {
  margin-top: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: clamp(.8rem, 1.4vw, .95rem);
  line-height: 1.6;
  color: var(--color-text);
}

.hero .ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.8rem;
}

.hero .fine {
  margin-top: auto;
  padding-top: 16px;
  font-size: .75rem;
  color: var(--color-text-muted);
  letter-spacing: .04em;
}

/* --------------------------------------------------------------------------
   Premios
   -------------------------------------------------------------------------- */
.prizes {
  display: grid;
  gap: 16px;
}

.prize {
  display: grid;
  grid-template-columns: 100px 1fr;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  min-height: 140px;
}

.prize-icon {
  display: grid;
  place-items: center;
  padding: 28px 10px;
  background: linear-gradient(145deg, rgba(220,145,0,.22) 0%, rgba(220,145,0,.08) 60%, rgba(14,10,7,0) 100%);
  border-right: 1px solid var(--color-border);
}

.medal {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(to right, #583a00, #d08900);
  box-shadow: inset 0 0 0 2px rgba(255, 230, 170, .35), 0 10px 30px -12px rgba(220, 145, 0, .6);
}
.medal img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.prize-body {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(to right, rgba(220,145,0,.05), rgba(14,10,7,0) 70%);
}

.prize-body h3 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.3;
}
.prize-body p { color: var(--color-text-muted); font-size: .88rem; line-height: 1.5; }

.chip {
  align-self: flex-start;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-primary-hi);
  border: 1px solid rgba(244, 194, 90, .4);
  border-radius: 999px;
  padding: .28em .72em;
}

/* Portfolio */
.portfolio {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 32px;
}
.portfolio .eyebrow {
  color: var(--color-text-muted);
  flex-basis: 100%;
}
.portfolio-logo {
  height: auto;
  max-height: 30px;
  width: auto;
  opacity: .8;
  transition: opacity .2s;
}
.portfolio-logo--lg { max-height: 40px; }
.portfolio-logo:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Motivos
   -------------------------------------------------------------------------- */
.motivos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.motivo {
  position: relative;
  margin: 0;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 6px;
  background: var(--color-bg);
}
.motivo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s;
}
.motivo:hover img { transform: scale(1.04); }

.motivo figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 160px 16px 28px;
  background: linear-gradient(0deg, rgba(14,10,7,.92) 0%, rgba(14,10,7,0) 100%);
  font-family: var(--font-primary);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 400;
  line-height: 1.35;
  color: #fff;
}

@media (min-width: 768px) {
  .motivos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Pasos
   -------------------------------------------------------------------------- */
.steps-grid {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
}

.steps {
  list-style: none;
  counter-reset: s;
}
.steps li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
  counter-increment: s;
}
.steps li:last-child { border-bottom: 1px solid var(--color-border); }
.steps li::before {
  content: counter(s);
  font-size: 3rem;
  font-weight: 300;
  line-height: .85;
  color: var(--color-primary);
}
.steps h3 { font-size: 1.05rem; font-weight: 500; margin-bottom: .3rem; }
.steps p { color: var(--color-text-muted); font-size: .93rem; max-width: 44ch; }

/* Puntos */
.points { margin-top: 32px; display: grid; gap: 14px; }
.points-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.points-head h3 { font-size: 1.05rem; font-weight: 500; }
.points-head small { font-size: .75rem; color: var(--color-text-muted); }

.points-grid {
  display: grid;
  gap: 8px;
}

.pt {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 0;
}
.pt .val {
  flex-shrink: 0;
  width: 80px;
  text-align: center;
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1;
  color: var(--color-text);
  letter-spacing: -.02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pt .val small {
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.pt-body {
  flex: 1;
  padding-left: 20px;
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt p { font-size: .88rem; color: var(--color-text-muted); line-height: 1.5; margin: 0; }
.pt b { color: var(--color-text); font-weight: 600; }

.pt.plus .val { color: var(--color-primary-hi); }
.pt.plus .pt-body { border-left-color: rgba(244, 194, 90, .2); }

.pt.max {
  border-color: var(--color-primary);
  background: linear-gradient(to right, rgba(220,145,0,.12), rgba(220,145,0,.03));
}
.pt.max .val { color: var(--color-primary-hi); }
.pt.max .pt-body { border-left-color: rgba(220,145,0,.3); }

.pt .tag {
  align-self: start;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #1a1006;
  background: var(--color-primary);
  border-radius: 999px;
  padding: .28em .65em;
}

.steps-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Mock Chat */
.chat {
  display: none;
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: #0b141a;
  overflow: hidden;
  width: 100%;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
  user-select: none;
}
.chat::after {
  content: "FPO";
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  font-family: var(--font-primary);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: .3em;
  color: rgba(255, 255, 255, .65);
  background: rgba(0, 0, 0, .45);
  transform: rotate(-20deg);
  pointer-events: none;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #1f2c33;
}
.chat-head .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--color-primary-hi), var(--color-primary-lo));
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: .8rem;
  color: #1a1006;
  flex: none;
}
.chat-head b { display: block; font-size: .9rem; font-weight: 600; }
.chat-head small { font-size: .7rem; color: #8696a0; }

.chat-body {
  padding: 18px 14px 20px;
  display: grid;
  gap: 8px;
  font-size: .85rem;
  line-height: 1.45;
}
.msg {
  max-width: 84%;
  padding: 8px 11px;
  border-radius: 9px;
  color: #e9edef;
}
.msg.in  { background: #202c33; justify-self: start; border-top-left-radius: 2px; }
.msg.out { background: #005c4b; justify-self: end;   border-top-right-radius: 2px; }
.msg time {
  display: block;
  text-align: right;
  font-size: .64rem;
  color: rgba(233, 237, 239, .5);
  margin-top: 2px;
}

.msg.photo { padding: 4px 4px 6px; }
.msg.photo .ph {
  height: 110px;
  border-radius: 6px;
  background: url(../img/hero.webp) center/cover;
  display: flex;
  align-items: flex-end;
  padding: 6px 8px;
  font-size: .7rem;
}
.msg.photo .ph span {
  background: rgba(0, 0, 0, .55);
  border-radius: 4px;
  padding: 2px 6px;
}

.chat-cap {
  font-size: .72rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 0 16px 14px;
  background: #0b141a;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--color-border); }
.faq details { border-bottom: 1px solid var(--color-border); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary i {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  position: relative;
  transition: transform .25s, border-color .25s;
}
.faq summary i::before,
.faq summary i::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 11px; height: 1.5px;
  background: var(--color-primary-hi);
  transform: translate(-50%, -50%);
}
.faq summary i::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] summary i { transform: rotate(45deg); border-color: var(--color-primary); }

.faq details p {
  color: var(--color-text-muted);
  padding: 0 0 22px;
  max-width: 60ch;
}
.faq .tbc {
  display: block;
  color: #7fc4d9;
  font-size: .76rem;
  font-weight: 500;
  margin-top: .35em;
}

/* --------------------------------------------------------------------------
   Cierre
   -------------------------------------------------------------------------- */
.closing {
  position: relative;
  overflow: hidden;
}

.closing-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: 0;
}
.closing-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(14, 10, 7, .85) 0%,
    rgba(14, 10, 7, .65) 50%,
    rgba(14, 10, 7, .85) 100%
  );
}

.closing .wrap {
  position: relative;
  z-index: 2;
  padding-block: clamp(90px, 12vw, 150px);
}
.closing h2 {
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  line-height: 1.05;
  max-width: 13em;
}
.closing h2 .accent { color: var(--color-primary-hi); }
.closing .btn { margin-top: 2rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #080605;
  padding-block: 36px calc(36px + env(safe-area-inset-bottom, 0px));
}
.site-footer .wrap { display: grid; gap: 18px; }

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.footer-row .brand img { height: 34px; }

.footer-row a {
  font-size: .85rem;
  color: var(--color-primary-hi);
}

.legal {
  font-size: .68rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s cubic-bezier(.22, 1, .36, 1),
              transform .65s cubic-bezier(.22, 1, .36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------------------
   Botón flotante WhatsApp
   -------------------------------------------------------------------------- */
.wa-float {
  position: fixed;
  right: max(18px, calc(env(safe-area-inset-right, 0px) + 18px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-wa);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px -8px rgba(37, 211, 102, .6);
  transition: transform .2s, opacity .3s;
  text-decoration: none;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float img { width: 30px; height: 30px; }

.wa-float.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(.9);
}

/* --------------------------------------------------------------------------
   Tablet — 768px+
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .hero-img { object-position: 60% center; }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(14,10,7,.92) 0%, rgba(14,10,7,.7) 38%, rgba(14,10,7,.2) 65%, rgba(14,10,7,.05) 100%),
      linear-gradient(180deg, rgba(14,10,7,.5) 0%, rgba(14,10,7,0) 20%, rgba(14,10,7,0) 72%, var(--color-bg) 100%);
  }

  .hero .wrap {
    display: block;
    align-self: auto;
    padding-block: 160px 110px;
  }
  .hero .sub { margin-top: 1.4rem; white-space: nowrap; }
  .hero .fine { margin-top: 1.2rem; padding-top: 0; }

  .btn { font-size: .9rem; padding: .9em 1.6em; }

  .hero-headline .l3 img { height: clamp(7.65rem, 16vw, 15rem); }

  .portfolio { justify-content: flex-start; }

  .prizes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .prize { grid-template-columns: 110px 1fr; }
  .medal { width: 72px; height: 72px; }
  .medal img { width: 40px; height: 40px; }

  .steps-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }

  .chat { display: block; max-width: 380px; justify-self: end; }

  .closing-overlay {
    background: linear-gradient(90deg, rgba(14,10,7,.92) 0%, rgba(14,10,7,.65) 52%, rgba(14,10,7,.25) 100%);
  }
}

/* --------------------------------------------------------------------------
   Desktop — 1025px+
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  .hero-img { object-position: 62% center; }

  .hero-headline .l3 img { height: clamp(10rem, 13vw, 16rem); }

  .prize { grid-template-columns: 130px 1fr; min-height: 160px; }
  .medal { width: 80px; height: 80px; }
  .medal img { width: 44px; height: 44px; }

  .faq details p { padding-right: 42px; }
}
