/* Reballution · Gabriel Gascon */

:root {
  --ink: #000;
  --paper: #f5f3ef;
  --muted: #9b968f;
  --line: rgb(255 255 255 / 0.1);
  --red: #c8102e;
  --card: #0d0c0c;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

::selection { background: var(--red); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(16px, 4vw);
  background: rgb(0 0 0 / 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__logo img { height: 34px; width: auto; }

.site-nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 32px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current='page'] { color: var(--paper); }

@media (max-width: 720px) {
  .site-header { flex-direction: column; gap: 10px; padding-block: 12px; }
  .site-nav { flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 11px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(88svh, 820px);
  padding: 80px 16px 120px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.hero__sponges {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  z-index: -1;
  background: url('img/esponjas.jpg') center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to top, rgb(0 0 0 / 0.9), transparent);
  mask-image: linear-gradient(to top, rgb(0 0 0 / 0.9), transparent);
  opacity: 0.55;
  transform: scale(1.05);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift { to { transform: scale(1.12) translateY(-2%); } }

.hero__logo {
  width: min(640px, 88vw);
  opacity: 0;
  transform: translateY(12px);
  animation: rise 1.6s var(--ease) 0.2s forwards;
}

.hero__line {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  animation: rise 1.4s var(--ease) 0.9s forwards;
}

@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section {
  padding: clamp(80px, 11vw, 150px) max(16px, 5vw);
  border-top: 1px solid var(--line);
}

.section__inner { max-width: 1180px; margin: 0 auto; }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.section__note {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}

.grid--routines { grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.5s var(--ease);
}

.card:hover { border-color: rgb(255 255 255 / 0.22); transform: translateY(-3px); }

.card__media { aspect-ratio: 1000 / 531; overflow: hidden; background: #2a0006; }

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.card:hover .card__media img { transform: scale(1.04); }

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 22px 22px 24px;
}

.card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.card__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
}

.card__price {
  flex-shrink: 0;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.card__sub {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card__text { margin: 0; color: #c9c4bd; font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c9c4bd;
  font-size: 12px;
}

.chips li::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dot, #888);
}

details.includes {
  margin-top: 2px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: #c9c4bd;
  font-size: 14px;
}

details.includes summary {
  cursor: pointer;
  list-style: none;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

details.includes summary::-webkit-details-marker { display: none; }
details.includes summary::after { content: ' +'; color: var(--muted); }
details.includes[open] summary::after { content: ' –'; }
details.includes ul { margin: 10px 0 0; padding-left: 18px; }

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.tag { color: var(--muted); font-size: 12px; }

.buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.buy:hover { background: transparent; color: var(--paper); }

.buy[aria-disabled='true'] { background: transparent; border-color: var(--line); color: var(--muted); cursor: default; }

/* ---------- Wholesale ---------- */
.wholesale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.wholesale div { padding: 28px 24px; border-right: 1px solid var(--line); }
.wholesale div:last-child { border-right: 0; }
.wholesale strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 40px; color: var(--paper); }
.wholesale span { color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 36px max(16px, 5vw);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--paper); }

/* ---------- Fool Us page ---------- */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}

.story img { border-radius: 18px; }

.story__text p { color: #c9c4bd; font-size: 17px; }

.story__kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.placeholder {
  padding: 14px 16px;
  border: 1px dashed rgb(255 255 255 / 0.25);
  border-radius: 12px;
  color: var(--muted) !important;
  font-size: 14px !important;
}

@media (max-width: 760px) {
  .story { grid-template-columns: 1fr; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero__sponges { animation: none; }
  .hero__logo, .hero__line { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card__media img { transition: none; }
}

/* ---------- Language toggle ---------- */
.lang {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.lang:hover { color: var(--paper); border-color: rgb(255 255 255 / 0.3); }

/* ---------- Hero CTA ---------- */
.hero__cta {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 26px;
  border: 1px solid var(--red);
  border-radius: 999px;
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  animation: rise 1.4s var(--ease) 1.2s forwards;
  transition: background 0.3s var(--ease);
}
.hero__cta:hover { background: var(--red); }

/* ---------- Routines: featured rows ---------- */
.section--routines .section__head { margin-bottom: clamp(48px, 7vw, 96px); }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(28px, 4vw, 56px);
  border-top: 1px solid var(--line);
}
.feature--flip .feature__media { order: 2; }

.feature__media {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 1000 / 531;
  background: #2a0006;
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.feature:hover .feature__media img { transform: scale(1.03); }

.feature__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.feature__num { margin: 0; color: var(--red); font-size: 13px; letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
.feature__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.015em;
}
.feature__sub { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; }
.feature__tut { margin: 8px 0 0; color: #c9c4bd; font-size: 15px; }
.feature__foot { display: flex; align-items: center; gap: 20px; margin-top: 14px; }
.feature__price { font-size: 22px; font-variant-numeric: tabular-nums; }

@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: 0; }
}

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.tabs button {
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.tabs button[aria-selected='true'] { background: var(--paper); color: #000; }
.panel__note { margin: 0 0 28px; color: var(--muted); font-size: 15px; }

/* ---------- Care ---------- */
.care { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); }
.care__intro p { color: #c9c4bd; font-size: 17px; }
.care__intro strong, .care__list dt { color: var(--paper); font-weight: 500; }
.accent { color: var(--red); font-weight: 500; }
.care__h { margin: 10px 0 6px; font-family: var(--serif); font-weight: 500; font-size: 28px; }
.care__lead { margin: 0 0 22px; color: var(--muted); }
.care__list { margin: 0; display: grid; gap: 18px; }
.care__list div { padding-top: 16px; border-top: 1px solid var(--line); }
.care__list dd { margin: 4px 0 0; color: #c9c4bd; }
.care__short { margin: 32px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; line-height: 1.9; }
.care__closing { margin: 24px 0 0; color: var(--red); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
@media (max-width: 820px) { .care { grid-template-columns: 1fr; } }

/* ---------- Book ---------- */
.feature__media--book { aspect-ratio: auto; background: none; display: grid; place-items: center; padding: clamp(16px, 3vw, 40px); }
.feature__media--book img { width: auto; height: auto; max-height: 520px; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.6); }
.book-facts { margin: 6px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; line-height: 1.9; }
.book-cover { width: min(300px, 70vw); aspect-ratio: 15 / 22.5; display: grid; place-items: center; padding: 24px; background: #050505; border: 1px solid var(--line); border-radius: 4px 10px 10px 4px; box-shadow: inset 6px 0 0 #1a1a1a, 0 30px 80px rgb(0 0 0 / 0.7); }
.book-cover img { box-shadow: none !important; max-height: none !important; }

/* ---------- Book mockup (3D) ---------- */
.book3d { --w: min(290px, 64vw); --h: calc(var(--w) * 1.5636); --d: calc(var(--w) * 0.075); perspective: 1600px; padding: 20px 0 40px; }
.book3d__inner {
  position: relative;
  width: var(--w);
  height: var(--h);
  transform-style: preserve-3d;
  transform: rotateY(-28deg) rotateX(4deg);
  transition: transform 1.2s var(--ease);
}
.feature:hover .book3d__inner, .book3d:focus-within .book3d__inner { transform: rotateY(-12deg) rotateX(2deg); }
.book3d__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px 6px 6px 2px;
  transform: translateZ(calc(var(--d) / 2));
  box-shadow: inset 4px 0 6px rgb(255 255 255 / 0.08);
}
.book3d__cover::after { content: none; }
.book3d__pages {
  position: absolute;
  top: 4px;
  left: calc(var(--w) - var(--d) / 2);
  width: var(--d);
  height: calc(100% - 8px);
  background: repeating-linear-gradient(90deg, #efe9de 0 1px, #cfc7b8 1px 2px);
  transform: rotateY(90deg);
}
.book3d__back {
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  border-radius: 6px 2px 2px 6px;
  transform: translateZ(calc(var(--d) / -2));
  box-shadow: 30px 40px 60px rgb(0 0 0 / 0.75);
}
.feature__media--book { overflow: visible; }
@media (prefers-reduced-motion: reduce) { .book3d__inner { transition: none; } }

/* ---------- Book sample viewer ---------- */
.ghost-btn { min-height: 42px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--paper); font: 500 13px/1 var(--sans); letter-spacing: 0.08em; cursor: pointer; }
.ghost-btn:hover { border-color: rgb(255 255 255 / 0.4); }
.sample { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 0 0 / 0.94); color: var(--paper); }
.sample::backdrop { background: rgb(0 0 0 / 0.7); }
.sample[open] { display: flex; flex-direction: column; }
.sample__top { display: flex; justify-content: space-between; align-items: center; padding: 14px max(16px, 3vw); color: var(--muted); font-size: 13px; letter-spacing: 0.12em; }
.sample__close { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--paper); font-size: 22px; cursor: pointer; }
.sample__stage { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 max(8px, 2vw) 24px; }
.sample__stage img { justify-self: center; max-width: 100%; max-height: calc(100dvh - 110px); width: auto; height: auto; background: #fff; box-shadow: 0 20px 80px rgb(0 0 0 / 0.8); }
.sample__nav { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--paper); font-size: 28px; line-height: 1; cursor: pointer; }
.sample__nav:hover { border-color: rgb(255 255 255 / 0.4); }
@media (max-width: 600px) { .sample__nav { width: 36px; height: 36px; font-size: 22px; } }

/* ---------- Multipage: page top + "keep exploring" thumbnails ---------- */
.section--page { border-top: 0; padding-top: clamp(56px, 7vw, 96px); }
.explore { background: #070606; }
.explore__title { margin: 0 0 28px; font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.6vw, 34px); }
.explore__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.thumb { display: block; text-decoration: none; color: var(--paper); }
.thumb__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: #2a0006; }
.thumb__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity 0.4s var(--ease); opacity: 0.85; }
.thumb--contain .thumb__media { background: #0d0c0c; padding: 10px; }
.thumb--contain .thumb__media img { object-fit: contain; }
.thumb:hover .thumb__media img { transform: scale(1.05); opacity: 1; }
.thumb__label { display: block; margin-top: 10px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); transition: color 0.3s var(--ease); }
.thumb:hover .thumb__label { color: var(--paper); }
