/* ============ Cioma Atelier — estilos públicos ============ */
:root {
  --ink: #0b0b0b;
  --paper: #ffffff;
  --soft: #f4f4f2;
  --line: #e4e4e1;
  --muted: #6d6d6a;
  --radius: 14px;
  --serif: 'Bodoni Moda', 'Didot', 'Times New Roman', serif;
  --sans: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.lead { font-size: 17px; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 30px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 500 11px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: transparent; color: var(--paper); }
.btn-ghost-light { background: transparent; color: var(--paper); border-color: rgba(255,255,255,.7); }
.btn-ghost-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding-bottom: 6px;
}
.link-arrow::after { content: '→'; letter-spacing: 0; transition: transform .25s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.logo-main { font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: .02em; }
.logo-sub {
  font-family: var(--sans); font-size: 9.5px; font-weight: 400;
  letter-spacing: .32em; /* tracking ≈ 320 */
  margin-right: -.32em;   /* compensa el espaciado final para centrar */
  text-transform: uppercase; margin-top: 6px;
}

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background .3s, border-color .3s, color .3s;
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav { display: flex; gap: clamp(20px, 3vw, 44px); }
.nav a {
  position: relative;
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase; padding: 8px 0;
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: .26em; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: inherit; }
.menu-toggle span { display: block; width: 24px; height: 1px; background: currentColor; margin: 6px 0; transition: transform .3s, opacity .3s; }

/* Cabecera transparente sobre el hero (solo home) */
.is-home .site-header { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; color: var(--paper); backdrop-filter: none; }
.is-home .site-header.scrolled, .is-home .site-header.open { background: rgba(255,255,255,.96); color: var(--ink); border-color: var(--line); backdrop-filter: blur(8px); }

@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .logo-main { font-size: 26px; }
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--paper); color: var(--ink);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
  .nav a::after { display: none; }
  .site-header.open .nav { opacity: 1; visibility: visible; transform: none; }
  .site-header.open .menu-toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
  .site-header.open .menu-toggle span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
}

/* ---------- Hero ----------
   La imagen principal (ca001) se muestra completa, con los bordes fundidos sobre un
   degradado que reproduce los tonos de su propio fondo. */
.hero {
  position: relative; min-height: 100svh; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end;
  color: var(--paper);
  background: linear-gradient(180deg, #26282c 0%, #2b2d31 38%, #33353a 62%, #3b3d40 76%, #57575b 92%, #625e66 100%);
  padding: calc(var(--header-h) + 40px) 0 clamp(56px, 10vh, 110px);
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,0) 70%),
              linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 22%);
}
.hero-figure {
  position: absolute; z-index: -2; top: 0; right: 4%;
  height: 100%; width: auto; max-width: 56%; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.hero .wrap { position: relative; width: 100%; }
.hero .eyebrow { color: rgba(255,255,255,.8); }
.hero h1 { font-size: clamp(42px, 6.4vw, 92px); max-width: 12ch; margin-bottom: 20px; }
.hero p { font-size: 16px; color: rgba(255,255,255,.85); max-width: 40ch; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-scroll {
  position: absolute; right: var(--gutter); bottom: 0;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  writing-mode: vertical-rl; color: rgba(255,255,255,.75);
  display: flex; align-items: center; gap: 14px;
}
.hero-scroll::after { content: ''; width: 1px; height: 64px; background: rgba(255,255,255,.6); }

/* En pantallas estrechas: imagen arriba, texto debajo */
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; min-height: auto; padding: var(--header-h) 0 56px; }
  .hero-figure {
    position: relative; right: auto; z-index: -2;
    width: 100%; height: auto; max-width: none; max-height: 68svh;
    aspect-ratio: 945 / 1248; object-fit: cover; margin-bottom: -48px;
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  }
  .hero::before { background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 14%); }
  .hero-scroll { display: none; }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 11vw, 140px) 0; }
.section-soft { background: var(--soft); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .eyebrow, .section-dark .muted { color: rgba(255,255,255,.6); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(36px, 5vw, 60px); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
h2 { font-size: clamp(32px, 4.4vw, 56px); }
h3 { font-size: 24px; }

.page-head { padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(44px, 7vw, 88px); margin-bottom: 18px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 110px); align-items: center; }
.split-text h2 { margin-bottom: 28px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Bloque "Sobre" en home */
.about-quote { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 46px); line-height: 1.25; margin: 0; }
.about-quote em { font-style: italic; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-stats strong { display: block; font-family: var(--serif); font-size: 36px; font-weight: 400; line-height: 1.1; }
.about-stats span { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* Tarjetas de texto (política, valores, servicios) */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cols-3 > * { background: var(--paper); padding: clamp(28px, 3.4vw, 44px); }
.section-soft .cols-3 > * { background: var(--soft); }
.cols-3 .num { font-family: var(--serif); font-size: 15px; color: var(--muted); display: block; margin-bottom: 26px; }
.cols-3 h3 { margin-bottom: 14px; }
.cols-3 p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .cols-3 { grid-template-columns: 1fr; } }

/* Placeholder de imagen (hasta cargar fotos reales) */
.ph {
  background: var(--soft);
  display: flex; align-items: center; justify-content: center;
  color: #cfcfcb; font-family: var(--serif); font-size: clamp(48px, 8vw, 96px);
  width: 100%; height: 100%;
}
.ph::before { content: 'C'; }
.media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--soft); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Carrusel ---------- */
.carousel { position: relative; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 20px) / 3);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { scroll-snap-align: start; margin: 0; }
.carousel-slide .media { aspect-ratio: 3 / 4; }
.carousel-slide figcaption { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.carousel-controls { display: flex; gap: 10px; }
.carousel-btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; font-size: 16px; transition: background .25s, color .25s;
}
.carousel-btn:hover { background: var(--ink); color: var(--paper); }
.carousel-progress { height: 1px; background: var(--line); margin-top: 32px; position: relative; }
.carousel-progress span { position: absolute; left: 0; top: 0; height: 1px; background: var(--ink); transition: width .3s, left .3s; }
@media (max-width: 960px) { .carousel-track { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (max-width: 600px) { .carousel-track { grid-auto-columns: 82%; gap: 14px; } }

/* ---------- Tarjetas de producto ---------- */
.grid-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 32px); }
@media (max-width: 960px) { .grid-products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-products { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--paper);
  transition: border-color .3s, transform .3s;
}
.card:hover { border-color: var(--ink); }
.card-media { aspect-ratio: 4 / 5; background: var(--soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.04); }
.card-foot {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
  padding: 20px 22px 22px; border-top: 1px solid var(--line); flex: 1;
}
.card-info { min-width: 0; }
.card-info h3 { font-size: 21px; margin-bottom: 6px; }
.card-info p {
  font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price {
  flex-shrink: 0; text-align: right;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; padding-top: 5px;
}
.card-type { display: block; font-size: 10px; letter-spacing: .24em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.chip {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink);
  font: 400 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-current="true"], .chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* ---------- Ficha de producto ---------- */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; padding: clamp(40px, 6vw, 80px) 0; }
.product .media { position: sticky; top: calc(var(--header-h) + 24px); }
.product h1 { font-size: clamp(38px, 5vw, 64px); }
.product-price { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; margin: 8px 0 32px; }
.product-desc { font-size: 16px; color: var(--muted); margin-bottom: 40px; }
.option-group { margin-bottom: 28px; }
.option-group > span { display: block; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.option-group .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-note { font-size: 13px; color: var(--muted); min-height: 1.6em; margin: -8px 0 24px; }
.variant-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 48px; }
.variant-table caption { text-align: left; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; }
.variant-table th, .variant-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.variant-table th { font-weight: 500; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
.variant-table td:last-child, .variant-table th:last-child { text-align: right; }
.breadcrumb { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding-top: 32px; }
.breadcrumb a:hover { color: var(--ink); }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } .product .media { position: static; } }

/* ---------- Portafolio ---------- */
.masonry { columns: 3 300px; column-gap: 20px; }
.masonry figure { break-inside: avoid; margin: 0 0 20px; }
.masonry img, .masonry .ph { border-radius: var(--radius); }
.masonry .ph { aspect-ratio: 4 / 5; }
.masonry figure:nth-child(3n+2) .ph { aspect-ratio: 1; }
.masonry figcaption { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }

/* ---------- Servicios ---------- */
.service { display: grid; grid-template-columns: 90px 1fr 1.3fr; gap: 32px; padding: 44px 0; border-top: 1px solid var(--line); }
.service:last-child { border-bottom: 1px solid var(--line); }
.service .num { font-family: var(--serif); color: var(--muted); font-size: 18px; }
.service h3 { font-size: clamp(26px, 3vw, 36px); margin: 0; }
.service p { color: var(--muted); margin: 0 0 14px; }
.service ul { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.service li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
@media (max-width: 860px) { .service { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 7vw, 110px); }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; }
.contact-list li { padding: 18px 0; border-top: 1px solid var(--line); }
.section-dark .contact-list li { border-color: rgba(255,255,255,.18); }
.contact-list span { display: block; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.section-dark .contact-list span { color: rgba(255,255,255,.55); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 10px 0; background: transparent; color: inherit; font: 400 15px/1.5 var(--sans);
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: currentColor; }
.section-dark .field input, .section-dark .field textarea { border-color: rgba(255,255,255,.25); }
.section-dark .field label { color: rgba(255,255,255,.55); }
.hp { position: absolute; left: -9999px; }
.notice { padding: 16px 20px; border: 1px solid currentColor; border-radius: 10px; font-size: 14px; margin-bottom: 28px; }
.notice ul { margin: 0; padding-left: 18px; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

/* ---------- Texto legal ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 30px; margin-top: 56px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #333; }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta h2 { max-width: 18ch; margin: 0 auto 32px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 88px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-grid .logo { align-items: flex-start; }
.footer-grid .logo-sub { margin-right: 0; }
.footer-grid h4 { font-family: var(--sans); font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { opacity: .65; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 72px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.15); font-size: 11px; letter-spacing: .14em; color: rgba(255,255,255,.55); text-transform: uppercase; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Aparición suave al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}

.hp:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); color: var(--ink); padding: 10px 16px; border: 1px solid var(--ink); }

/* ---------- Filosofía (bloque previo al pie, en todas las páginas) ---------- */
.manifesto { background: var(--soft); border-top: 1px solid var(--line); padding: clamp(72px, 10vw, 128px) 0 clamp(64px, 9vw, 112px); }
.manifesto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 110px); align-items: start; }
.manifesto-lead { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.25; margin: 0; }
.manifesto-body p { color: #3a3a38; font-size: 15.5px; }
.manifesto-body p:last-child { margin-bottom: 0; }
.manifesto-sign {
  font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 28px);
  text-align: center; margin: clamp(56px, 7vw, 88px) auto 0; padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--line); max-width: 30ch;
}
@media (max-width: 860px) { .manifesto-grid { grid-template-columns: 1fr; } }
