/* =========================================================
   ASMEL — Joyería de fantasía
   Paleta tomada del logo: dorado + turquesa, sobre marfil.
   ========================================================= */

:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --sand: #F1EBE1;
  --ink: #1D1B18;
  --ink-soft: #3A352E;
  --muted: #6F675C;
  --line: #E6DED1;
  --gold: #A7832E;
  --gold-light: #D8C28A;
  --teal: #0E7C7E;
  --night: #16130F;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 4px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--gold); }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ---------- Tipografía utilitaria ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.section { padding: 120px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-title { font-size: clamp(34px, 4.2vw, 52px); }
.section-lead { color: var(--muted); margin-top: 18px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
  white-space: nowrap;
}
.btn--sm { height: 42px; padding: 0 20px; font-size: 12px; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--gold); }
.btn--outline { border-color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }

.link-arrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold-light);
  padding-bottom: 4px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.link-arrow span { display: inline-block; transition: transform .3s var(--ease); }
.link-arrow:hover { color: var(--gold); border-color: var(--gold); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.header.is-scrolled {
  background: rgba(250, 247, 242, .92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand__name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 36px; }
.nav a:not(.btn) {
  position: relative;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:not(.btn):hover::after,
.nav a.is-active::after { transform: scaleX(1); }
.nav__cta-mobile { display: none; }

.header__actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 11px; right: 11px;
  height: 1.5px; background: var(--ink);
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-open .menu-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--header-h) + 64px) 0 96px; position: relative; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 46%; height: 100%;
  background: var(--sand);
  z-index: -1;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 72px; align-items: center; }
.hero__seal { width: 88px; height: 88px; border-radius: 50%; margin-bottom: 32px; box-shadow: 0 10px 30px rgba(29, 27, 24, .08); }
.hero__title { font-size: clamp(48px, 6.4vw, 92px); font-weight: 400; margin-bottom: 28px; }
.hero__lead { max-width: 470px; font-size: 18px; color: var(--muted); margin-bottom: 40px; }
.hero__actions { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }

.hero__media { position: relative; padding: 0 0 48px 48px; }
.hero__arch {
  margin: 0;
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  aspect-ratio: 4 / 5.3;
  box-shadow: 0 30px 60px -30px rgba(29, 27, 24, .35);
}
.hero__arch img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero__inset {
  position: absolute;
  left: 0; bottom: 0;
  width: 38%;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 8px solid var(--bg);
  box-shadow: 0 20px 40px -20px rgba(29, 27, 24, .4);
}
.hero__inset img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Valores ---------- */
.values { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.values__row { display: flex; justify-content: space-around; gap: 24px; padding-top: 26px; padding-bottom: 26px; }
.value {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
}
.value__mark { color: var(--teal); font-size: 12px; }

/* ---------- Colección ---------- */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.filter {
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: all .3s var(--ease);
}
.filter:hover { border-color: var(--ink); }
.filter[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 28px; }

.card { display: flex; flex-direction: column; }
.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--sand);
  border-radius: var(--radius);
  cursor: pointer;
  border: 0; padding: 0;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.card__media::after {
  content: "Vista rápida";
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translate(-50%, 8px);
  padding: 9px 18px;
  background: rgba(255, 255, 255, .94);
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.card:hover .card__media img { transform: scale(1.05); }
.card:hover .card__media::after { opacity: 1; transform: translate(-50%, 0); }

.card__body { padding-top: 18px; display: flex; flex-direction: column; flex: 1; }
.card__cat { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.card__title { font-size: 24px; margin-bottom: 8px; }
.card__desc {
  font-size: 14px; line-height: 1.6; color: var(--muted); margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.card__price, .card__link { white-space: nowrap; }
.card__price { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.card__price--ask { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.card__link {
  background: none; border: 0; padding: 0;
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid var(--gold-light);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.card__link:hover { color: var(--gold); border-color: var(--gold); }

.card.is-entering { animation: cardIn .6s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.collection__more { text-align: center; margin-top: 64px; }
.collection__more[hidden] { display: none; }

/* ---------- Sobre nosotros ---------- */
.about { background: var(--surface); }
.about__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 96px; align-items: center; }
.about__media { position: relative; }
.about__media > img:first-child { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about__seal {
  position: absolute;
  right: -40px; bottom: 40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 6px solid var(--surface);
  box-shadow: 0 14px 40px rgba(29, 27, 24, .14);
}
.about__copy .section-title { margin-bottom: 28px; }
.about__copy > p { color: var(--muted); font-size: 17px; max-width: 520px; }

.pillars { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillars li { border-top: 1px solid var(--gold-light); padding-top: 18px; }
.pillars strong { display: block; font-family: var(--serif); font-size: 22px; font-weight: 500; margin-bottom: 6px; }
.pillars span { font-size: 14px; color: var(--muted); line-height: 1.55; display: block; }

/* ---------- Galería ---------- */
.gallery__grid { columns: 3; column-gap: 20px; }
.gallery__item {
  display: block;
  width: 100%;
  margin: 0 0 20px;
  padding: 0; border: 0;
  background: var(--sand);
  overflow: hidden;
  border-radius: var(--radius);
  break-inside: avoid;
  cursor: zoom-in;
}
.gallery__item img { width: 100%; transition: transform 1.1s var(--ease), opacity .4s; }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item--tall img { aspect-ratio: 3 / 4.6; object-fit: cover; }
.gallery__item--wide img { aspect-ratio: 4 / 3.6; object-fit: cover; }

/* ---------- Contacto ---------- */
.contact { background: var(--night); color: #F4EFE7; }
.section-head--light .section-lead { color: #B9B0A2; }
.section-head--light .eyebrow { color: var(--gold-light); }
.contact__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.contact-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 32px 28px;
  border: 1px solid rgba(216, 194, 138, .22);
  border-radius: var(--radius);
  transition: border-color .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}
.contact-card[href]:hover { border-color: var(--gold-light); background: rgba(255, 255, 255, .03); transform: translateY(-3px); }
.contact-card__icon { width: 26px; height: 26px; color: var(--gold-light); margin-bottom: 28px; }
.contact-card__icon svg { width: 100%; height: 100%; }
.contact-card__label { font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #B9B0A2; margin-bottom: 6px; }
.contact-card__value { font-family: var(--serif); font-size: 21px; line-height: 1.3; word-break: break-word; }
.contact-card.is-pending { cursor: default; }
.contact-card.is-pending .contact-card__value { color: #8C8478; font-style: italic; }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: #B9B0A2; border-top: 1px solid rgba(216, 194, 138, .15); padding: 56px 0 40px; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 32px 48px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 20px; }
.footer__brand img { width: 72px; height: 72px; border-radius: 50%; }
.footer__brand p { margin: 0; font-family: var(--serif); font-size: 20px; }
.footer__brand em { color: var(--gold-light); }
.footer__nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__nav a { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; transition: color .3s; }
.footer__nav a:hover { color: var(--gold-light); }
.footer__legal { grid-column: 1 / -1; margin: 16px 0 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 13px; }

/* ---------- Botón flotante ---------- */
.fab {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 40;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(14, 124, 126, .55);
  transition: transform .35s var(--ease), background .35s var(--ease);
}
.fab:hover { transform: translateY(-3px); background: #0A6466; }
.fab span { width: 26px; height: 26px; }
.fab svg { width: 100%; height: 100%; }

/* ---------- Modal de producto ---------- */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(22, 19, 15, .6); backdrop-filter: blur(4px); }

.modal {
  width: min(960px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: auto;
}
.modal[open] { animation: modalIn .45s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal__body { display: grid; grid-template-columns: 1fr 1fr; }
.modal__media { background: var(--sand); }
.modal__media img { width: 100%; height: 100%; max-height: 640px; object-fit: cover; }
.modal__info { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.modal__title { font-size: 40px; margin-bottom: 12px; }
.modal__price { font-family: var(--serif); font-size: 24px; color: var(--gold); margin-bottom: 20px; }
.modal__desc { color: var(--muted); margin-bottom: 32px; }
.modal__actions { display: flex; flex-direction: column; gap: 12px; }
.modal__close, .lightbox__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  font-size: 26px; line-height: 1;
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  background: transparent;
  display: none;
  place-items: center;
}
.lightbox[open] { display: grid; }
.lightbox img { max-width: min(92vw, 720px); max-height: 88vh; object-fit: contain; border-radius: var(--radius); animation: modalIn .4s var(--ease); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  font-size: 30px; line-height: 1;
}
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }

/* ---------- Animaciones de scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(3, 1fr); }
  .contact__grid { grid-template-columns: repeat(3, 1fr); }
  .nav { gap: 26px; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .section { padding: 88px 0; }

  .header__cta { display: none; }
  .menu-toggle { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav a:not(.btn) { font-family: var(--serif); font-size: 30px; letter-spacing: .02em; text-transform: none; color: var(--ink); }
  .nav__cta-mobile { display: inline-flex; margin-top: 12px; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .header { background: var(--bg); box-shadow: 0 1px 0 var(--line); }
  .menu-open { overflow: hidden; }

  .hero { padding-top: calc(var(--header-h) + 40px); }
  .hero::before { width: 100%; height: 46%; inset: auto 0 0 0; }
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .hero__copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__media { max-width: 520px; width: 100%; margin: 0 auto; }

  .about__grid { grid-template-columns: 1fr; gap: 64px; }
  .about__media { max-width: 520px; margin: 0 auto; width: 100%; }
  .about__seal { right: 16px; bottom: -36px; }

  .gallery__grid { columns: 2; }

  .modal__body { grid-template-columns: 1fr; }
  .modal__media img { max-height: 52vh; }
  .modal__info { padding: 32px 24px 28px; }
  .modal__title { font-size: 32px; }

  .footer__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer__brand { flex-direction: column; gap: 14px; }
  .footer__nav { justify-content: center; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }

  .brand__name { font-size: 20px; }
  .hero__seal { width: 72px; height: 72px; margin-bottom: 24px; }
  .hero__lead { font-size: 16px; }
  .hero__media { padding: 0 0 32px 24px; }
  .hero__inset { width: 40%; border-width: 5px; }

  .values__row { flex-direction: column; align-items: center; gap: 10px; padding-top: 22px; padding-bottom: 22px; }
  .value { font-size: 12px; }

  .filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px 32px; padding: 0 16px 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }

  .products { grid-template-columns: repeat(2, 1fr); gap: 32px 12px; }
  .card__body { padding-top: 12px; }
  .card__cat { font-size: 10px; letter-spacing: .16em; }
  .card__title { font-size: 19px; }
  .card__desc { font-size: 13px; margin-bottom: 12px; }
  .card__foot { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 10px; }
  .card__price { font-size: 17px; }
  .card__price--ask { font-size: 12px; }
  .card__link { font-size: 11px; }
  .card__media::after { display: none; }

  .pillars { grid-template-columns: 1fr; gap: 18px; }
  .about__copy > p { font-size: 16px; }

  .gallery__grid { column-gap: 10px; }
  .gallery__item { margin-bottom: 10px; }

  .contact__grid { grid-template-columns: 1fr; gap: 12px; }
  .contact-card { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 20px; column-gap: 16px; }
  .contact-card__icon { margin: 0; flex: none; }
  .contact-card__label { margin: 0; flex: 1; }
  .contact-card__value { width: 100%; font-size: 19px; padding-left: 42px; margin-top: 4px; }

  .fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .lightbox__nav { width: 44px; height: 44px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}
