/* TSURU Studio — estilos del sitio. Usa las variables de tokens.css. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-100);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--ink-muted); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
section[id] { scroll-margin-top: 72px; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tipografía ---------- */
.t-display { font-size: clamp(36px, 4.4vw, 64px); line-height: 1.08; font-weight: 300; letter-spacing: 0.02em; }
.t-h1 { font-size: 40px; line-height: 46px; font-weight: 300; }
.t-h2 { font-size: 28px; line-height: 34px; font-weight: 400; }
.t-h3 { font-size: 20px; line-height: 28px; font-weight: 500; }
.t-body-lg { font-size: 18px; line-height: 30px; font-weight: 300; }
.t-body { font-size: 16px; line-height: 26px; font-weight: 400; }
.t-small { font-size: 14px; line-height: 22px; }
.t-eyebrow { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; }
.t-material { font-size: 28px; line-height: 34px; font-weight: 300; letter-spacing: 0.1em; text-transform: uppercase; }
.muted { color: var(--ink-muted); }
@media (max-width: 720px) { .t-h1 { font-size: 32px; line-height: 38px; } }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max-width); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-200); }
.stack { display: flex; flex-direction: column; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-6); margin-bottom: var(--space-12); }
.section-head__title { display: flex; flex-direction: column; gap: var(--space-4); max-width: 680px; }

/* ---------- Botones y links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3);
  min-height: 52px; padding: 0 var(--space-8);
  border: 1px solid transparent; border-radius: var(--radius-none);
  font: 500 12px/16px var(--font-sans); letter-spacing: 0.3em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color 240ms ease-out, color 240ms ease-out;
}
.btn--primary { background: var(--action); color: var(--on-action); }
.btn--primary:hover { background: var(--action-hover); color: var(--on-action); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--surface-200); color: var(--ink); }
.btn--block { display: flex; width: 100%; min-height: 56px; }
.btn--sm { min-height: 44px; padding: 0 var(--space-6); }
.link-arrow {
  align-self: flex-start; display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px; text-decoration: none; border-bottom: 1px solid currentColor;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  color: #ffffff; background: transparent; border-bottom: 1px solid transparent;
  transition: background-color 300ms ease-out, border-color 300ms ease-out;
}
.site-header.is-scrolled,
.site-header.is-solid { background: rgba(1, 1, 1, 0.92); border-color: #2e2e2e; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); height: var(--header-h); transition: height 300ms ease-out; }
.site-header.is-scrolled .site-header__inner { height: 72px; }
.site-header a { color: #ffffff; text-decoration: none; }
.site-header a:hover { color: #a6a6a6; }
.site-header__logo { display: inline-flex; padding: var(--space-2) 0; }
.site-header__logo img { height: 36px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 40px; }
.site-nav a[aria-current="page"] { border-bottom: 1px solid currentColor; padding-bottom: var(--space-1); }
.site-header__actions { display: flex; align-items: center; gap: var(--space-4); }
.site-header .btn--secondary { color: #ffffff; border-color: rgba(255, 255, 255, 0.6); }
.site-header .btn--secondary:hover { background: #161616; color: #ffffff; }
.menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: #ffffff; cursor: pointer; }

/* Menú mobile */
.mobile-menu {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  padding: var(--space-4) var(--gutter) var(--space-12);
  box-shadow: var(--shadow-float);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.mobile-menu nav { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-12); }
.mobile-menu nav a { min-height: 56px; display: flex; align-items: center; border-bottom: 1px solid var(--line); text-decoration: none; }
.mobile-menu .btn { margin-top: auto; }

@media (max-width: 960px) {
  .site-nav, .hide-sm { display: none !important; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 720px) {
  .site-header__logo img { height: 28px; }
  .site-header.is-scrolled .site-header__inner { height: 72px; }
}

/* ---------- Hero (carrusel a pantalla completa) ---------- */
.hero { position: relative; height: 100vh; min-height: 640px; max-height: 1000px; overflow: hidden; }
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1);
  transition: opacity 900ms ease-out, transform 6000ms ease-out;
}
.hero__slide.is-active { opacity: 1; transform: scale(1.06); }
.hero__overlay { position: absolute; inset: 0; background: rgba(1, 1, 1, 0.42); }
.hero__overlay--bottom { inset: auto 0 0 0; height: 60%; background: linear-gradient(to top, rgba(1, 1, 1, 0.7), rgba(1, 1, 1, 0)); }
.hero__overlay--top { inset: 0 0 auto 0; height: 160px; background: linear-gradient(to bottom, rgba(1, 1, 1, 0.45), rgba(1, 1, 1, 0)); }
.hero__inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-12);
  padding-top: var(--space-32); padding-bottom: var(--space-8);
}
.hero__text { max-width: 680px; display: flex; flex-direction: column; gap: var(--space-8); }
.hero__lead { max-width: 460px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-4); padding-top: var(--space-2); }
.hero .btn--secondary { border-color: #767676; }
.hero .btn--secondary:hover { background: #161616; }
.hero__controls { display: flex; flex-direction: column; gap: var(--space-1); }
.hero__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); padding-top: var(--space-6); border-top: 1px solid rgba(255, 255, 255, 0.3); }
.hero__caption { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.hero__nav { display: flex; align-items: center; gap: var(--space-4); }
.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; background: transparent; border: 1px solid #767676; border-radius: var(--radius-none);
  color: #ffffff; cursor: pointer;
}
.icon-btn:hover { background: #161616; }
.hero__dots { display: flex; gap: var(--space-2); }
.hero__dot { flex: 1 1 0; height: 44px; padding: 0; background: transparent; border: 0; cursor: pointer; display: flex; align-items: center; }
.hero__dot span { display: block; width: 100%; height: 2px; background: #767676; transition: background-color 300ms ease-out; }
.hero__dot[aria-pressed="true"] span { background: #ffffff; }

@media (max-width: 720px) {
  .hero { height: auto; min-height: 100svh; max-height: none; }
  .hero__inner { min-height: 100svh; padding-top: 120px; padding-bottom: 88px; gap: var(--space-8); } /* 88px: deja lugar al botón de WhatsApp */
  .hero__text { gap: 20px; }
  .hero__text .t-display { font-size: 36px; line-height: 42px; letter-spacing: 0.01em; }
  .hero__lead { font-size: 16px; line-height: 26px; }
  .hero__ctas { flex-direction: column; gap: var(--space-3); }
  .hero__ctas .btn { width: 100%; }
  .hide-xs { display: none !important; }
}

/* ---------- Pilares ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); padding-block: var(--space-16); }
.pillar { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6) var(--space-8) var(--space-6) 0; border-top: 1px solid var(--line); }

/* ---------- Catálogo ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  min-height: 44px; padding: var(--space-3) 20px;
  background: var(--surface-100); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-none);
  font: 500 12px/16px var(--font-sans); letter-spacing: 0.3em; text-transform: uppercase; cursor: pointer;
}
.chip:hover { background: var(--surface-200); }
.chip[aria-pressed="true"] { background: var(--action); color: var(--on-action); border-color: var(--action); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--space-12) var(--space-6); }
.product-card { display: flex; flex-direction: column; gap: var(--space-4); }
.product-card[hidden] { display: none; }
.product-card__media { display: block; aspect-ratio: 4 / 5; background: #fcfcfc; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__info { display: flex; flex-direction: column; gap: var(--space-2); }
.custom-card { display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-4); aspect-ratio: 4 / 5; padding: 40px; background: var(--surface-200); }
.custom-card[hidden] { display: none; }

/* Zoom en hover */
.zoom { overflow: hidden; }
.zoom img { transition: transform 400ms ease-out; }
.zoom:hover img { transform: scale(1.03); }

/* ---------- Ambientes ---------- */
.gallery-row { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.gallery-row + .gallery-row { margin-top: var(--space-6); }
.gallery-item { min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.gallery-item__media { aspect-ratio: 3 / 2; background: var(--surface-300); }
.gallery-item__media img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item--wide { flex: 2 1 560px; }
.gallery-item--tall { flex: 1 1 320px; }
.gallery-item--tall .gallery-item__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 320px; }
.gallery-item--half { flex: 1 1 420px; }

/* ---------- Materiales ---------- */
.materials { display: flex; flex-wrap: wrap; gap: var(--space-16); }
.materials__col { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-8); }
.materials__col > h3 { padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.material { display: flex; gap: var(--space-6); align-items: flex-start; }
.material img { width: 120px; height: 150px; object-fit: cover; flex: 0 0 auto; background: var(--surface-300); }
.material__text { display: flex; flex-direction: column; gap: var(--space-2); }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-6); margin-top: var(--space-16); padding-top: var(--space-8); border-top: 1px solid var(--line); }
.details > div { display: flex; flex-direction: column; gap: var(--space-2); }

/* ---------- Nosotros ---------- */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16); }
.split__media { flex: 1.2 1 480px; min-width: 0; aspect-ratio: 3 / 2; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-6); }

/* ---------- Nosotros (video de fondo) ---------- */
.about { position: relative; overflow: hidden; display: grid; align-items: center; min-height: 560px; }
.about__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.about__overlay { position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(1, 1, 1, 0.82) 0%, rgba(1, 1, 1, 0.55) 48%, rgba(1, 1, 1, 0.2) 100%); }
.about__inner { position: relative; z-index: 1; }
.about__text { max-width: 600px; display: flex; flex-direction: column; gap: var(--space-6); }
@media (max-width: 720px) {
  .about { min-height: 440px; }
  .about__overlay { background: rgba(1, 1, 1, 0.68); }
}

/* ---------- Contacto ---------- */
.contact { display: flex; flex-wrap: wrap; gap: var(--space-16); }
.contact__intro { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.contact__channels { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.contact__channels a { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 44px; text-decoration: none; }
.form { flex: 1.3 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); padding: var(--space-12); background: var(--surface-100); }
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; grid-column: span 2; }
.field--half { grid-column: span 1; }
.field input, .field select, .field textarea {
  min-height: 52px; padding: 0 var(--space-4); min-width: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius-none);
  background: var(--surface-200); color: var(--ink); font: 400 16px/26px var(--font-sans);
}
.field textarea { padding: var(--space-4); resize: vertical; }
.field__error { color: var(--danger); }
.form__footer { grid-column: span 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.form__status { grid-column: span 2; }
.form__status--ok { color: var(--success); }
@media (max-width: 720px) {
  .form { padding: var(--space-6); }
  .field--half { grid-column: span 2; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-12); padding-block: var(--space-16) var(--space-12); }
.site-footer__brand { flex: 1 1 240px; display: flex; flex-direction: column; gap: var(--space-6); }
.site-footer__brand img { height: 88px; width: auto; align-self: flex-start; }
.site-footer nav { flex: 1 1 200px; display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer nav a { text-decoration: none; color: var(--ink-muted); }
.site-footer nav a:hover { color: var(--ink); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-6) var(--space-8); border-top: 1px solid var(--line); }

/* ---------- WhatsApp flotante ---------- */
.whatsapp-fab {
  position: fixed; right: var(--space-6); bottom: var(--space-6); z-index: 30;
  width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center;
  background: #010101; color: #ffffff; border-radius: var(--radius-pill); box-shadow: var(--shadow-float);
}
.whatsapp-fab:hover { background: #5c5c5c; color: #ffffff; }

/* ---------- Ficha de producto ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: var(--space-3); padding-top: calc(var(--header-h) + var(--space-8)); color: var(--ink-muted); }
.breadcrumb a { text-decoration: none; color: var(--ink-muted); }
.breadcrumb [aria-current] { color: var(--ink); }
.pdp { display: flex; flex-wrap: wrap; gap: var(--space-16); padding-top: var(--space-8); padding-bottom: var(--space-24); }
.pdp__gallery { flex: 1.3 1 520px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.pdp__main { aspect-ratio: 4 / 5; background: #fcfcfc; overflow: hidden; }
.pdp__main img { width: 100%; height: 100%; object-fit: cover; }
.pdp__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.thumb { position: relative; padding: 0; border: 0; background: var(--surface-300); aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer; transition: opacity 240ms ease-out; }
.thumb:hover { opacity: 0.8; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--ink); }
.pdp__info { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-8); padding-top: var(--space-4); }
.pdp__info .t-display { font-size: 56px; line-height: 60px; }
.specs { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.specs > div { display: flex; justify-content: space-between; gap: var(--space-6); padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.specs dd { text-align: right; color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.detail-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--space-6); }
.detail-card { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--surface-100); }
.detail-card img { width: 208px; height: 167px; object-fit: cover; }
.wide-figure { aspect-ratio: 3 / 2; background: var(--surface-300); }
.wide-figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Movimiento ---------- */
.fade-up { animation: fade-up 400ms ease-out both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { animation: fade-in 300ms ease-out both; }
  .zoom:hover img { transform: none; }
  .hero__slide { transition: opacity 300ms ease-out; }
  .hero__slide.is-active { transform: none; }
}
