/* =========================================================
   Propuesta Lavin · hub con menú
   ========================================================= */

:root {
  --navy: #0a3478;
  --ink: #16202e;
  --ink-soft: #4a5568;
  --ivory: #faf8f4;
  --mist: #e8eef2;
  --champagne: #b5966a;
  --champagne-soft: #e2cfae;
  --line: rgba(22, 32, 46, .12);
  --white: #fff;
  --side: 300px;

  --serif: "Marcellus", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; }
h1 em, h2 em { font-style: normal; color: var(--champagne); }

.eyebrow {
  margin: 0 0 12px;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--champagne);
}

/* ---------- Menú lateral ---------- */
.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side);
  display: flex;
  flex-direction: column;
  padding: 40px 30px 30px;
  background: var(--ink);
  color: rgba(255, 255, 255, .65);
  z-index: 40;
  overflow-y: auto;
}
.side__brand img { width: 170px; }
.side__brand p { margin: 18px 0 0; font-size: .82rem; line-height: 1.6; }

.menu { display: grid; gap: 4px; margin: 48px 0 auto; }
.menu a {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 14px 16px;
  border-radius: 4px;
  font-size: .95rem;
  color: rgba(255, 255, 255, .8);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.menu a span { font-family: var(--serif); font-size: .85rem; color: var(--champagne); }
.menu a em {
  flex-basis: 100%;
  padding-left: 32px;
  font-style: normal;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
}
.menu a:hover { background: rgba(255, 255, 255, .05); color: var(--white); }
.menu a.is-active { background: rgba(255, 255, 255, .08); color: var(--white); }
.menu a.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 2px;
  background: var(--champagne);
}

.side__foot { padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; }
.side__foot p { margin: 0; letter-spacing: .2em; text-transform: uppercase; font-size: .62rem; }
.side__agency { width: 150px; height: auto; margin: 10px 0 8px; }

.menu-btn { display: none; }

/* ---------- Contenido ---------- */
.main { margin-left: var(--side); min-height: 100vh; }
.view[hidden] { display: none; }

/* Introducción */
.intro { max-width: 1040px; padding: 90px 64px 80px; }
.intro h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); max-width: 16em; }
.intro__lead { font-size: 1.1rem; max-width: 40em; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 54px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 32px 30px;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(22, 32, 46, .25); border-color: var(--champagne); }
.card__n { font-family: var(--serif); font-size: 2.4rem; color: var(--mist); line-height: 1; position: absolute; top: 22px; right: 26px; }
.card h2 { font-size: 1.5rem; }
.card p { margin: 0 0 24px; font-size: .95rem; }
.card__go {
  margin-top: auto;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--navy);
}
.card--soon { background: transparent; }
.card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.card--soon .card__go { color: var(--champagne); }

/* Vistas con iframe */
.view--frame { display: flex; flex-direction: column; height: 100vh; }
.view__bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 40px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--ivory);
}
.view__bar h2 { font-size: 1.6rem; margin: 0; }
.view__tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.device { display: inline-flex; border: 1px solid var(--line); border-radius: 40px; padding: 3px; background: var(--white); }
.device button {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: 40px;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  transition: .3s var(--ease);
}
.device button.is-active { background: var(--ink); color: var(--white); }

.btn-line {
  padding: 10px 18px;
  border: 1px solid var(--ink);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  transition: .3s var(--ease);
}
.btn-line:hover { background: var(--ink); color: var(--white); }

.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  background: var(--mist);
  padding: 0;
  transition: padding .4s var(--ease);
}
.stage iframe { width: 100%; height: 100%; border: 0; background: var(--white); display: block; }

/* Vista "celular" del sitio */
.stage.is-mobile { padding: 28px 0; }
.stage.is-mobile iframe {
  width: 390px;
  max-width: calc(100% - 32px);
  border-radius: 36px;
  border: 10px solid var(--ink);
  box-shadow: 0 40px 80px -40px rgba(22, 32, 46, .5);
}

/* Próximamente */
.view--soon { min-height: 100vh; display: grid; place-items: center; padding: 60px 32px; }
.soon { text-align: center; max-width: 520px; }
.soon h2 { font-size: clamp(2rem, 4vw, 3rem); }
.soon__tag {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  border: 1px solid var(--champagne);
  border-radius: 40px;
  font-size: .7rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--champagne);
}

/* ---------- Navegación de presentación ---------- */
.pager {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  background: var(--ink);
  color: rgba(255, 255, 255, .7);
  border-radius: 40px;
  box-shadow: 0 20px 40px -20px rgba(22, 32, 46, .5);
  font-size: .8rem;
  overflow: hidden;
}
.pager button {
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  font-size: 1rem;
  transition: background .3s var(--ease), opacity .3s;
}
.pager button:hover:not(:disabled) { background: var(--champagne); }
.pager button:disabled { opacity: .3; cursor: default; }
.pager__count strong { font-family: var(--serif); font-weight: 400; color: var(--white); font-size: 1rem; }
.pager__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .1); }
.pager__bar span { display: block; height: 100%; width: 0; background: var(--champagne); transition: width .5s var(--ease); }

.has-frame .pager { top: 26px; bottom: auto; right: 32px; box-shadow: none; }
.has-frame .view__bar { padding-right: 230px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .side {
    transform: translateX(-100%);
    transition: transform .45s var(--ease);
    width: min(320px, 86vw);
  }
  .side.is-open { transform: none; box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .4); }
  .main { margin-left: 0; }

  .menu-btn {
    display: block;
    position: fixed;
    top: 14px; right: 14px;
    z-index: 50;
    width: 46px; height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
  }
  .menu-btn span { position: absolute; left: 14px; right: 14px; height: 1px; background: var(--white); transition: .35s var(--ease); }
  .menu-btn span:first-child { top: 19px; }
  .menu-btn span:last-child { top: 26px; }
  .menu-btn[aria-expanded="true"] span:first-child { top: 22.5px; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { top: 22.5px; transform: rotate(-45deg); }

  .intro { padding: 80px 24px 60px; }
  .view__bar { padding: 22px 76px 18px 20px; }
  .has-frame .view__bar { padding-right: 76px; }
  .has-frame .pager { top: auto; bottom: 16px; right: 16px; transform: scale(.88); transform-origin: bottom right; }
  .view--frame { height: 100dvh; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .view__bar h2 { font-size: 1.25rem; }
  /* en el teléfono el sitio ya se ve en móvil: el selector sobra */
  .device { display: none; }
  .stage.is-mobile { padding: 0; }
  .stage.is-mobile iframe { width: 100%; max-width: none; border: 0; border-radius: 0; box-shadow: none; }
}
