/* Mykonos Cerámica · propuesta de Manel Webs
   Idea visual: muestrario mediterráneo. Cal, arena, tinta y azul Egeo; las tres piezas cuadradas del logo como firma. */

:root {
  --bg: #f4f1ea;
  --sand: #e9e2d4;
  --sand-2: #ddd3c1;
  --ink: #16191b;
  --ink-2: #2a2f32;
  --muted: #565b5e;
  --line: rgba(22, 25, 27, .14);
  --sea: #1d5470;
  --sea-ink: #ffffff;
  --paper: #ffffff;
  --on-dark: #efeae0;
  --on-dark-muted: #b9b3a7;
  --focus: #1d5470;
  --shadow: 0 18px 40px -22px rgba(22, 25, 27, .35);
  --radius: 14px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121516;
    --sand: #1b1f21;
    --sand-2: #262b2e;
    --ink: #ece7dd;
    --ink-2: #d8d2c6;
    --muted: #aaa498;
    --line: rgba(236, 231, 221, .16);
    --sea: #7fb6cf;
    --sea-ink: #0d1a21;
    --paper: #1b1f21;
    --focus: #8cc3db;
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
  .logo-dark { display: none; }
  .nav .logo-light { display: block; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--sea); color: var(--sea-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--sand-2) var(--bg); }

h1, h2, h3 { font-family: var(--f-display); font-weight: 380; line-height: 1.05; letter-spacing: -.02em; margin: 0; text-wrap: balance; font-variation-settings: "opsz" 96; }
h2 { font-size: clamp(2.2rem, 5.2vw, 4.2rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); letter-spacing: -.01em; font-variation-settings: "opsz" 36; }
h2 em, h1 em { font-style: italic; font-weight: 320; color: var(--sea); }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
.note { font-size: .85rem; color: var(--muted); margin-top: 1rem; }

/* Aviso de propuesta */
.proposal-bar { margin: 0; padding: 8px var(--gutter); text-align: center; font-size: .78rem; letter-spacing: .02em; background: var(--ink); color: var(--on-dark); }
@media (prefers-color-scheme: dark) { .proposal-bar { background: #000; } }

/* ============ BOTONES ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 180ms var(--ease-out), color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-light { background: #f4f1ea; color: #16191b; }
.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: .9rem; }
@media (hover: hover) and (pointer: fine) {
  .btn-light:hover { background: #fff; }
  .btn-ghost:hover { background: rgba(255, 255, 255, .14); }
  .btn-dark:hover { background: var(--sea); color: var(--sea-ink); }
}
.link-arrow { display: inline-flex; align-items: center; gap: .45em; min-height: 44px; font-weight: 600; color: var(--sea); text-decoration: none; }
.link-arrow::after { content: "→"; transition: transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover::after { transform: translateX(4px); } .link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; } }

/* ============ CABECERA ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  height: 72px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 200ms var(--ease-out);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-logo { display: block; flex: none; }
.nav-logo img { width: 150px; height: auto; }
.nav .logo-light { display: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: .95rem; transition: background-color 160ms var(--ease-out); }
.nav-links a.is-current { background: var(--sand); }
.nav-links-cta { display: none !important; }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { background: var(--sand); } }
.nav-lang { display: flex; gap: 2px; font-size: .85rem; font-weight: 600; }
.nav-lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.nav-lang a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav-cta { background: var(--ink); color: var(--bg); }
@media (hover: hover) and (pointer: fine) { .nav-cta:hover { background: var(--sea); color: var(--sea-ink); } }
.nav-burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; border-radius: 999px; }
.nav-burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); transition: transform 200ms var(--ease-out); }
.nav-burger span:first-child { top: 17px; } .nav-burger span:last-child { top: 25px; }
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-cta { display: none; }
}
@media (max-width: 900px) {
  .nav { gap: 8px; }
  .nav-lang { margin-left: auto; }
  .nav-burger { display: block; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; margin: 0; flex-direction: column; gap: 0;
    padding: 12px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms;
  }
  .nav-links.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
  .nav-links a { font-family: var(--f-display); font-size: 1.6rem; min-height: 56px; padding: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-links a.is-current { background: none; color: var(--sea); }
  .nav-links-cta { display: inline-flex !important; }
}

/* ============ PORTADA ============ */
.hero { position: relative; min-height: min(92svh, 900px); display: grid; align-items: end; color: #fff; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; animation: kenburns 26s var(--ease-io) infinite alternate; transform-origin: 62% 55%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 16, .1) 0%, rgba(10, 14, 16, .12) 35%, rgba(10, 14, 16, .72) 100%); }
.hero-tiles { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: repeat(var(--cols, 8), 1fr); grid-auto-rows: 1fr; pointer-events: none; }
.js .hero-tiles:empty { background: var(--bg); animation: uncover 300ms 2.5s forwards; } /* tapa la foto hasta que se colocan las piezas; si algo falla, se destapa sola */
@keyframes uncover { to { opacity: 0; } }
.hero-tiles i { background: var(--bg); box-shadow: 0 0 0 1px var(--bg); transition: opacity 460ms var(--ease-out), transform 460ms var(--ease-out); }
.hero-tiles.is-laid i { opacity: 0; transform: scale(.95); }
.hero-copy { position: relative; z-index: 2; width: min(100% - 2 * var(--gutter), var(--wrap)); margin: 0 auto; padding: 120px 0 clamp(56px, 9vh, 96px); }
.hero-kicker { font-weight: 600; font-size: .9rem; letter-spacing: .04em; margin-bottom: 1rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.hero-title { font-size: clamp(2.8rem, 8.4vw, 6rem); font-weight: 340; letter-spacing: -.03em; max-width: 13ch; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.hero-title .w { display: inline-block; opacity: 0; transform: translateY(.35em); animation: word 700ms var(--ease-out) forwards; animation-delay: calc(500ms + var(--i) * 70ms); }
@keyframes word { to { opacity: 1; transform: none; } }
.hero-lead { max-width: 52ch; font-size: clamp(1.02rem, 1.5vw, 1.2rem); margin: 1.4rem 0 2rem; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-caption { position: absolute; right: var(--gutter); bottom: 18px; z-index: 2; margin: 0; font-size: .78rem; color: rgba(255, 255, 255, .85); }
@media (max-width: 640px) { .hero-caption { display: none; } .hero { min-height: 88svh; } }

/* ============ CIFRAS ============ */
.figures { border-bottom: 1px solid var(--line); }
.figures-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.figure { padding: 34px 24px 34px 0; border-right: 1px solid var(--line); margin-right: 24px; }
.figure:last-child { border-right: 0; margin-right: 0; }
.figure strong { display: block; font-family: var(--f-display); font-weight: 360; font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1; letter-spacing: -.02em; margin-bottom: .45rem; font-variant-numeric: tabular-nums; }
.figure > span { display: block; color: var(--muted); font-size: .95rem; max-width: 26ch; }
@media (max-width: 860px) {
  .figures-grid { grid-template-columns: 1fr 1fr; }
  .figure { margin-right: 0; padding: 26px 16px 26px 0; }
  .figure:nth-child(2n) { border-right: 0; padding-left: 16px; }
  .figure:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .figure:nth-child(2n+1) { padding-right: 16px; }
}

/* ============ SECCIONES ============ */
.section { padding: clamp(72px, 11vw, 140px) 0; }
.section-sand { background: var(--sand); }
.section-ink { background: #15191b; color: var(--on-dark); --line: rgba(239, 234, 224, .16); --muted: var(--on-dark-muted); }
.section-ink h2 em { color: #8cc3db; }
.head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px 48px; align-items: end; margin-bottom: clamp(36px, 6vw, 64px); }
.head h2 { position: relative; padding-top: 34px; }
.head h2::before { /* las tres piezas del logo */
  content: ""; position: absolute; top: 0; left: 0; width: 13px; height: 13px; background: currentColor;
  box-shadow: 20px 0 0 currentColor, 40px 0 0 currentColor;
}
.head-lead { color: var(--muted); max-width: 46ch; margin: 0; font-size: 1.08rem; }
@media (max-width: 860px) { .head { grid-template-columns: 1fr; } }

/* ============ COLECCIONES ============ */
.styles-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 28px; scrollbar-width: none; }
.styles-tabs::-webkit-scrollbar { display: none; }
.styles-tabs button {
  flex: none; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer;
  font-weight: 600; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 140ms var(--ease-out);
}
.styles-tabs button span { font-weight: 500; color: var(--muted); margin-left: 4px; font-size: .85em; }
.styles-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.styles-tabs button[aria-selected="true"] span { color: inherit; opacity: .7; }
.styles-tabs button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .styles-tabs button:not([aria-selected="true"]):hover { background: var(--sand); } }
.style-panel { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.style-panel:not([hidden]) { animation: panel 420ms var(--ease-out); }
@keyframes panel { from { opacity: 0; transform: translateY(10px); } }
.style-media { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand); }
.style-media img { width: 100%; height: 100%; object-fit: cover; }
.style-media figcaption, .g-item figcaption { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: rgba(244, 241, 234, .92); color: #16191b; }
.style-copy h3 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin-bottom: .6rem; }
.style-copy > p { color: var(--muted); max-width: 46ch; }
.series { list-style: none; padding: 0; margin: 1.2rem 0 1rem; display: flex; flex-wrap: wrap; gap: 6px; }
.series li { padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; }
@media (max-width: 860px) { .style-panel { grid-template-columns: 1fr; } }

/* ============ REGLA DE FORMATOS ============ */
.ruler-stage { background: var(--bg); border-radius: var(--radius); padding: 24px 20px 12px; }
.ruler-svg { width: 100%; height: auto; max-height: 340px; display: block; overflow: visible; }
.ruler-svg rect { fill: transparent; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; transition: fill 240ms var(--ease-out), stroke 240ms var(--ease-out); }
.ruler-svg rect.is-on { fill: var(--sea); stroke: var(--sea); }
.ruler-svg .ruler-draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.ruler.is-visible .ruler-draw { animation: draw 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 60ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ruler-svg text { font: 600 13px var(--f-text); fill: var(--muted); }
.ruler-svg line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ruler-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.ruler-buttons button { min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.ruler-buttons button[aria-pressed="true"] { background: var(--sea); color: var(--sea-ink); border-color: var(--sea); }
.ruler-buttons button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ruler-buttons button:not([aria-pressed="true"]):hover { background: var(--bg); } }
.ruler-out { margin: 18px 0 0; font-size: 1.05rem; min-height: 3.3em; }

/* ============ PARA QUIÉN ============ */
.audience { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; }
.audience-title { font-size: clamp(2.6rem, 6.5vw, 5.4rem); position: sticky; top: 110px; align-self: start; }
.audience-list { list-style: none; margin: 0; padding: 0; }
.audience-list li { padding: 28px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px 32px; }
.audience-list li:last-child { border-bottom: 1px solid var(--line); }
.audience-list p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .audience, .audience-list li { grid-template-columns: 1fr; } .audience-title { position: static; } }

/* ============ AMBIENTES ============ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 600; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 140ms var(--ease-out); }
.filters button[aria-pressed="true"] { background: var(--on-dark); color: #15191b; border-color: var(--on-dark); }
.filters button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .filters button:not([aria-pressed="true"]):hover { background: rgba(239, 234, 224, .1); } }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; grid-auto-flow: dense; gap: 12px; }
.g-item { margin: 0; position: relative; border-radius: 12px; overflow: hidden; background: #22282b; transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
.g-item.is-hidden { display: none; }
.g-item.is-in { animation: gIn 360ms var(--ease-out) both; }
@keyframes gIn { from { opacity: 0; transform: scale(.97); } }
.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }
.g-item button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .g-item button:hover img { transform: scale(1.04); } }
@media (max-width: 980px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; } }
@media (max-width: 520px) { .gallery { grid-auto-rows: 150px; gap: 8px; } }

/* ============ PROYECTOS ============ */
.feature { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-areas: "main copy"; gap: 24px 40px; align-items: start; }
.feature-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.feature-main { grid-area: main; margin: 0; border-radius: var(--radius); overflow: hidden; }
.feature-main img { width: 100%; aspect-ratio: 1100 / 555; object-fit: cover; }
.feature-copy { grid-area: copy; }
.feature-copy h3 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin-bottom: .8rem; }
.feature-copy p { color: var(--muted); }
.feature-side { margin: 0; border-radius: 12px; overflow: hidden; }
.feature-side img { width: 100%; aspect-ratio: 800 / 404; object-fit: cover; }
.facts { margin: 1.4rem 0 0; }
.facts div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 600; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; grid-template-areas: "main" "copy"; } }
.projects { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 20px; margin-top: clamp(48px, 7vw, 80px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; }
.project { scroll-snap-align: start; }
.project img { border-radius: 12px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 14px; }
.project h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.project p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ============ CATÁLOGOS ============ */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 200px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 20px; scrollbar-width: thin; }
.book { scroll-snap-align: start; text-decoration: none; display: block; }
.book img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px 10px 10px 4px; box-shadow: var(--shadow); transition: transform 260ms var(--ease-out); background: var(--paper); }
.book span { display: block; margin-top: 12px; font-weight: 600; font-size: .95rem; }
.book span::after { content: " · PDF"; color: var(--muted); font-weight: 500; }
.book-main { grid-column: span 1; }
@media (hover: hover) and (pointer: fine) { .book:hover img { transform: translateY(-6px) rotate(-1deg); } }
.book:active img { transform: scale(.98); }
.shelf-more { color: var(--muted); margin-top: 18px; max-width: 75ch; }
.shelf.is-dragging, .projects.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.shelf.is-dragging a, .projects.is-dragging * { pointer-events: none; user-select: none; }

/* ============ ÁREA TÉCNICA ============ */
.tech { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.tech-copy h2 { margin-bottom: 1rem; }
.checks { list-style: none; padding: 0; margin: 2rem 0 0; }
.checks li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid var(--line); }
.checks li::before { content: ""; position: absolute; left: 0; top: 18px; width: 11px; height: 11px; background: var(--sea); }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; font-family: var(--f-display); font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 380; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 14px; height: 14px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-3px, -3px); transition: transform 200ms var(--ease-out); }
details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
details p { color: var(--muted); max-width: 62ch; margin: 0 0 20px; animation: panel 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { summary:hover { color: var(--sea); } }
@media (max-width: 860px) { .tech { grid-template-columns: 1fr; } }

/* ============ PASOS ============ */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.steps li { counter-increment: s; padding: 28px 24px 8px 0; border-top: 2px solid var(--ink); margin-right: 24px; }
.steps li:last-child { margin-right: 0; }
.step-n::before { content: counter(s); font-family: var(--f-display); font-size: 3rem; font-weight: 300; line-height: 1; color: var(--sea); display: block; margin-bottom: 14px; }
.steps h3 { margin-bottom: .5rem; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; gap: 24px 0; } .steps li:nth-child(2n) { margin-right: 0; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { margin-right: 0; } }

/* ============ NOSOTROS ============ */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-media { margin: 0; border-radius: var(--radius); overflow: hidden; }
.about-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-copy h2 { margin-bottom: 1.4rem; }
.about-copy p { color: var(--muted); max-width: 60ch; }
.motto { font-family: var(--f-display); font-style: italic; font-weight: 320; font-size: 1.2rem; color: var(--sea); margin-bottom: .6rem; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about-media img { aspect-ratio: 4 / 3; } }

/* ============ PREGUNTAS ============ */
.faq-wrap { display: grid; grid-template-columns: .7fr 1.3fr; gap: 48px; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; gap: 24px; } }

/* ============ CONTACTO ============ */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.big-phone { display: inline-block; font-family: var(--f-display); font-weight: 340; font-size: clamp(2.4rem, 5.5vw, 4rem); letter-spacing: -.02em; text-decoration: none; line-height: 1.1; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .big-phone:hover { color: var(--sea); } }
.contact-info dl { margin: 0 0 24px; }
.contact-info dl div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.contact-info dt { color: var(--muted); font-size: .9rem; }
.contact-info dd { margin: 0; overflow-wrap: anywhere; }
.contact-info dd a { text-underline-offset: 3px; }
.socials { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.socials a { display: inline-flex; align-items: center; min-height: 32px; }
.map-load { width: 100%; min-height: 180px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--sand); cursor: pointer; display: grid; place-content: center; gap: 4px; text-align: center; transition: transform 140ms var(--ease-out); }
.map-load:active { transform: scale(.99); }
.map-load small { color: var(--muted); }
.map iframe { width: 100%; height: 300px; border: 0; border-radius: var(--radius); display: block; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: var(--paper); padding: clamp(20px, 4vw, 36px); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); background: var(--bg); transition: border-color 160ms var(--ease-out); }
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--focus); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.field-check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--sea); }
.form .btn { justify-self: start; }
.form-msg { grid-column: 1 / -1; margin: 0; font-weight: 600; min-height: 1.4em; }
.form-msg.is-error { color: #b3261e; }
@media (prefers-color-scheme: dark) { .form-msg.is-error, .field [aria-invalid="true"] { color: #ffb4ab; border-color: #ffb4ab; } }
.form .note { grid-column: 1 / -1; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ============ PIE ============ */
.footer { background: #15191b; color: var(--on-dark); padding: 64px 0 120px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 32px; }
.footer img { width: 170px; height: auto; margin-bottom: 10px; }
.footer .motto { color: #8cc3db; }
.footer p { color: var(--on-dark-muted); }
.footer a { color: var(--on-dark); text-underline-offset: 3px; display: inline-block; padding: 4px 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
@media (min-width: 901px) { .footer { padding-bottom: 64px; } }

/* ============ BARRA MÓVIL ============ */
.quickbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none; grid-template-columns: repeat(3, 1fr); background: var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.quickbar a { display: flex; align-items: center; justify-content: center; min-height: 56px; color: var(--bg); text-decoration: none; font-weight: 600; font-size: .95rem; border-right: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); }
.quickbar a:last-child { background: var(--sea); color: var(--sea-ink); border-right: 0; }
.quickbar a:active { opacity: .85; }
@media (max-width: 900px) { .quickbar { display: grid; } body { padding-bottom: 56px; } }

/* ============ ASISTENTE ============ */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
@media (max-width: 900px) { .chat { right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); } }
.chat-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--sea); color: var(--sea-ink); font-weight: 600; cursor: pointer; box-shadow: var(--shadow); transition: transform 140ms var(--ease-out); }
.chat-toggle:active { transform: scale(.97); }
@media (max-width: 520px) { .chat-toggle span { display: none; } .chat-toggle { width: 52px; padding: 0; justify-content: center; } }
.chat-teaser { display: flex; align-items: flex-start; max-width: 290px; background: var(--paper); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow); animation: panel 300ms var(--ease-out); }
@media (max-width: 700px) { .chat-teaser { display: none !important; } } /* en móvil no tapa el contenido */
.chat-teaser-text { border: 0; background: none; text-align: left; padding: 14px 4px 14px 16px; cursor: pointer; font-size: .92rem; }
.chat-teaser-x { border: 0; background: none; width: 44px; height: 44px; cursor: pointer; color: var(--muted); flex: none; }
.chat-panel { width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100svh - 150px)); display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); overflow: hidden; transform-origin: bottom right; animation: chatIn 240ms var(--ease-out); }
@keyframes chatIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head strong { display: block; font-size: .98rem; }
.chat-status { font-size: .8rem; color: var(--muted); }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--sand); display: flex; align-items: center; justify-content: center; gap: 2px; flex: none; }
.chat-avatar i { width: 7px; height: 7px; background: var(--ink); margin-top: 10px; }
.chat-close { margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; border-radius: 999px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: .95rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-bot { background: var(--sand); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--sea); color: var(--sea-ink); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-typing { color: var(--muted); }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.chat-suggest button { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: .84rem; text-align: left; }
@media (hover: hover) and (pointer: fine) { .chat-suggest button:hover { background: var(--sand); } }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); min-width: 0; }
.chat-form button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: var(--bg); cursor: pointer; font-size: 1.1rem; flex: none; }
.chat-form button:disabled { opacity: .5; cursor: wait; }
.chat-note { margin: 0; padding: 0 14px 12px; font-size: .74rem; color: var(--muted); }

/* ============ VISOR ============ */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(10, 12, 13, .94); display: grid; place-items: center; padding: 64px 16px; animation: panel 220ms var(--ease-out); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(100%, 1400px); max-height: calc(100svh - 150px); width: auto; object-fit: contain; border-radius: 8px; }
.lb-close { position: absolute; top: 14px; right: 14px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; font-weight: 600; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.3rem; cursor: pointer; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-nav:active, .lb-close:active { transform: translateY(-50%) scale(.95); }
.lb-close:active { transform: scale(.95); }
.lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #e9e4da; margin: 0; font-size: .9rem; padding: 0 16px; }

/* ============ APARICIONES ============ */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 640ms var(--ease-out), transform 640ms var(--ease-out); transition-delay: calc(var(--d, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ============ MENOS MOVIMIENTO ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-photo { animation: none; }
  .hero-title .w { animation: fadeOnly 500ms ease-out forwards; animation-delay: 200ms; transform: none; }
  @keyframes fadeOnly { to { opacity: 1; } }
  .hero-tiles i { transform: none !important; }
  .js [data-reveal] { transform: none; transition: opacity 400ms ease-out; }
  .style-panel:not([hidden]), details p, .g-item.is-in, .chat-panel, .lightbox { animation-name: fadeOnly; }
  .ruler.is-visible .ruler-draw { animation: none; stroke-dashoffset: 0; }
  .g-item img, .book img { transition: none; }
}

/* ============ PÁGINAS LEGALES Y 404 ============ */
.page-simple .nav { position: static; }
.legal { padding: clamp(48px, 8vw, 96px) 0 96px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: 1.2rem; }
.legal h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 2.4rem 0 .8rem; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--ink); }
.legal a { color: var(--sea); text-underline-offset: 3px; }
.legal .confirm { background: #fff3b0; color: #3d3300; padding: 0 4px; border-radius: 3px; }
.legal .updated { font-size: .9rem; }
.notfound { min-height: 70svh; display: grid; place-content: center; text-align: center; padding: 64px var(--gutter); gap: 18px; }
.notfound h1 { font-size: clamp(3rem, 10vw, 6rem); }
.notfound .tiles404 { display: flex; gap: 10px; justify-content: center; }
.notfound .tiles404 i { width: 22px; height: 22px; background: var(--ink); }
.notfound .tiles404 i:nth-child(2) { background: transparent; border: 2px dashed var(--muted); }
.notfound p { color: var(--muted); max-width: 44ch; margin: 0 auto; }
.page-simple .nav-back { margin-left: auto; }

/* ============ CALCULADOR DE PEDIDO ============ */
.calc { border: 0; margin: 8px 0 0; padding: 20px 0 4px; border-top: 1px solid var(--line); min-width: 0; }
.calc legend { font-family: var(--f-display); font-size: 1.5rem; font-weight: 380; padding: 0; float: left; width: 100%; margin-bottom: 4px; }
.calc legend + * { clear: both; }
.calc-intro { color: var(--muted); font-size: .95rem; margin: 0 0 14px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field select:disabled { opacity: .55; cursor: not-allowed; }
.calc-out { margin-top: 18px; padding: 18px 20px; border-radius: 12px; background: var(--sand); }
.calc-empty { margin: 0; color: var(--muted); }
.calc-row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-variant-numeric: tabular-nums; }
.calc-row span { color: var(--muted); }
.calc-row.is-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }
.calc-row.is-total strong { font-family: var(--f-display); font-size: 1.5rem; font-weight: 400; color: var(--sea); }
.calc-note { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
@media (max-width: 560px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-row strong { white-space: nowrap; }
