/* Casa Cotcho — tokens del DESIGN.md */
:root {
  --terracota: #B85430; --terracota-deep: #A0462A; --terracota-glow: #E08A62;
  --bg: #FAF6EF; --surface: #FFFFFF; --rosa: #E8CFC1; --rosa-soft: #F2E3D8; --olive: #5F6B45;
  --ink: #2E221B; --ink-soft: #5E4E44; --ink-muted: #7A685C; --border: #E6DAD0;
  --night: #2A201B; --on-night: #F7EEE6; --on-night-soft: #C9B6A8;
  --display: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --sans: 'Jost', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --script: 'Allison', cursive;
  --container: 1200px; --gutter: clamp(16px, 4vw, 40px); --section-y: clamp(80px, 11vw, 144px);
  --r-sm: 4px; --r-md: 10px; --vault: 999px 999px 10px 10px; --pill: 999px;
  --shadow: 0 1px 0 rgba(46,34,27,.04), 0 24px 48px -28px rgba(46,34,27,.35);
  --ease: cubic-bezier(.22, 1, .36, 1); --dur: 300ms; --reveal: 900ms;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.7 var(--sans); overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--terracota-deep); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--surface); padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 16px; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; text-align: center; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; }
h2 { font-size: clamp(32px, 4.5vw, 54px); line-height: 1.1; margin: .3em 0 .55em; text-wrap: balance; }
h3 { font-size: clamp(22px, 2vw, 26px); font-weight: 600; line-height: 1.25; }
.kicker { font: 500 12px/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--terracota-deep); }
.lead { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-soft); max-width: 36em; }
.lead + .lead { margin-top: 1em; }
.script { font: 400 clamp(40px, 6vw, 72px)/1 var(--script); }
.ic { width: 24px; height: 24px; flex: none; }

/* Botons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btns.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: var(--pill); font: 500 16px/1 var(--sans); text-decoration: none; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.btn .ic { width: 20px; height: 20px; }
.btn-wa { background: var(--terracota); color: #fff; }
.btn-wa:hover { background: var(--terracota-deep); }
.btn-air, .btn-line { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-air:hover, .btn-line:hover { background: var(--ink); color: var(--bg); }

/* Header */
.top { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 32px; padding: 14px var(--gutter); color: var(--on-night); transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.top.solid { background: rgba(250,246,239,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--ink); box-shadow: 0 1px 0 var(--border); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.owl-mark { width: 26px; height: 35px; background: currentColor; -webkit-mask: url(img/owl.png) center/contain no-repeat; mask: url(img/owl.png) center/contain no-repeat; }
.top.solid .owl-mark { background: var(--terracota); }
.brand-name { font: 500 13px var(--sans); letter-spacing: .26em; text-transform: uppercase; }
.nav { display: flex; gap: 28px; }
.nav a, .langs a { text-decoration: none; font: 500 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.nav a:hover, .langs a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.langs { display: flex; gap: 12px; }
.langs a { opacity: .65; }
.langs a[aria-current] { opacity: 1; }
.menu-btn { display: none; width: 44px; height: 44px; position: relative; }
.menu-btn span:not(.sr) { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform var(--dur) var(--ease); }
.menu-btn span:first-child { top: 18px; } .menu-btn span:nth-child(2) { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.mnav { position: fixed; inset: 0; z-index: 15; background: var(--bg); padding: 110px var(--gutter) 40px; display: flex; flex-direction: column; gap: 40px; }
.mnav[hidden] { display: none; }
.mnav nav { display: flex; flex-direction: column; gap: 18px; }
.mnav nav a { font: 500 34px/1.1 var(--display); text-decoration: none; }
.mnav .langs a { font-size: 15px; padding: 10px 4px; }
body.menu-open .top { background: var(--bg); color: var(--ink); }
body.menu-open .top .owl-mark { background: var(--terracota); }
@media (max-width: 960px) { .top > .nav, .top > .langs { display: none; } .menu-btn { display: block; } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; color: var(--on-night); background: var(--night) url(video/hero-1280-poster.webp) center/cover; overflow: hidden; }
@media (max-aspect-ratio: 1/1) { .hero { background-image: url(video/hero-720x1280-poster.webp); } }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42,32,27,.5) 0%, rgba(42,32,27,.18) 38%, rgba(42,32,27,.72) 100%); }
.hero-in { position: relative; z-index: 1; padding: 110px var(--gutter) 72px; }
.hero-logo { width: clamp(140px, 20vw, 220px); margin: 0 auto; }
.hero .script { margin: .2em 0 .25em; font-size: clamp(46px, 6.5vw, 80px); }
.hero-sub { font: 500 13px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--on-night); }
.facts { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; margin: 14px 0 30px; font-size: 15px; color: var(--on-night); }
.hero-in { text-shadow: 0 1px 14px rgba(42,32,27,.55); }
.hero-in .btn { text-shadow: none; }
.facts li + li::before { content: "·"; margin-right: 20px; }
.hero .btns { justify-content: center; }
.hero .btn-air { border-color: var(--on-night); color: var(--on-night); }
.hero .btn-air:hover { background: var(--on-night); color: var(--ink); }

/* La casa */
.casa { padding: var(--section-y) 0 calc(var(--section-y) * .6); }
.casa-grid, .entorn-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.vault { border-radius: var(--vault); overflow: hidden; aspect-ratio: 4 / 5; }
.vault img { width: 100%; height: 100%; object-fit: cover; }
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(56px, 8vw, 96px); }
.highlights li { border-top: 1px solid var(--border); padding-top: 22px; }
.highlights h3 { margin-bottom: 6px; }
.highlights p { color: var(--ink-soft); }
.owl-sep { width: 34px; height: 46px; margin: 0 auto calc(var(--section-y) * .6); background: var(--terracota); -webkit-mask: url(img/owl.png) center/contain no-repeat; mask: url(img/owl.png) center/contain no-repeat; opacity: .85; }

/* Espais */
.espais { background: var(--rosa-soft); padding: var(--section-y) 0; }
.head { margin-bottom: clamp(32px, 5vw, 56px); }
.room { margin-top: clamp(36px, 5vw, 56px); }
.room h3 { margin-bottom: 14px; }
.g { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(120px, 15vw, 200px); gap: 10px; }
.g li:first-child { grid-column: span 2; grid-row: span 2; }
.g-2 { grid-template-columns: 1fr 1fr; grid-auto-rows: clamp(200px, 26vw, 360px); }
.g-2 li:first-child { grid-column: auto; grid-row: auto; }
.g-4 li:last-child { grid-column: span 2; }
.ph { display: block; width: 100%; height: 100%; padding: 0; border-radius: var(--r-sm); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ph:hover img { transform: scale(1.04); }
.beds { margin-top: clamp(48px, 7vw, 80px); }
.beds ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.beds li { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; color: var(--terracota); }
.beds li span { display: flex; flex-direction: column; color: var(--ink); line-height: 1.4; }
.beds b { font-weight: 500; }

/* Comoditats */
.com { padding: var(--section-y) 0; }
.amen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
.amen li { display: flex; gap: 14px; align-items: center; }
.amen .ic { width: 30px; height: 30px; color: var(--terracota); }
.more { margin-top: 32px; color: var(--ink-soft); max-width: 46em; }
.info { margin-top: clamp(48px, 7vw, 72px); padding-top: 32px; border-top: 1px solid var(--border); }
.info ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 14px; }
.info li { display: flex; flex-direction: column; }
.info b { font: 500 12px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted); }

/* Entorn */
.entorn { padding: var(--section-y) 0; background: var(--rosa-soft); }
.entorn-grid { grid-template-columns: 1fr 1.15fr; }
.places { margin: 28px 0 18px; }
.places li { display: grid; grid-template-columns: 76px 1fr; column-gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.places .time { grid-row: span 2; font: 500 13px var(--sans); color: var(--olive); padding-top: 4px; }
.places h3 { font-size: 21px; }
.places p { color: var(--ink-soft); font-size: 15px; }
.note { font-size: 14px; color: var(--ink-muted); margin-bottom: 24px; }

/* Opinió i lema */
.opinio { padding: var(--section-y) 0; }
.stars { color: var(--terracota); letter-spacing: .3em; margin: 14px 0 6px; }
blockquote p { font: 500 italic clamp(22px, 2.6vw, 32px)/1.4 var(--display); }
blockquote p::before { content: "“"; display: block; font-size: 2.4em; line-height: .6; color: var(--rosa); }
blockquote footer { margin-top: 20px; color: var(--ink-muted); font-size: 14px; }
.lema { background: var(--rosa); text-align: center; padding: clamp(64px, 9vw, 110px) var(--gutter); }
.lema .script { font-size: clamp(60px, 10vw, 128px); color: var(--ink); }
.lema-sub { margin-top: 10px; font: 500 12px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }

/* Reserva */
.reserva { background: var(--night); color: var(--on-night); padding: var(--section-y) 0; }
.reserva .kicker { color: var(--terracota-glow); }
.reserva .lead { color: var(--on-night-soft); margin: 0 auto 32px; }
.reserva .btn-air { border-color: var(--on-night); color: var(--on-night); }
.reserva .btn-air:hover { background: var(--on-night); color: var(--ink); }
.phone { margin-top: 24px; color: var(--on-night-soft); }
.phone a { color: var(--on-night); }
.owl-eyes { width: 64px; height: 86px; margin: 0 auto 24px; background: var(--on-night); -webkit-mask: url(img/owl.png) center/contain no-repeat; mask: url(img/owl.png) center/contain no-repeat; }

/* Peu */
.foot { background: var(--night); color: var(--on-night-soft); padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(247,238,230,.12); font-size: 15px; }
.foot-grid { display: flex; gap: 32px; align-items: center; }
.foot img { width: 90px; }
.foot p + p { margin-top: 8px; }
.foot a { color: var(--on-night); }
.small { font-size: 13px; }

/* Barra de reserva (mòbil) */
.bar { display: none; }
@media (max-width: 760px) {
  .bar { position: fixed; inset: auto 0 0; z-index: 12; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); transform: translateY(110%); transition: transform var(--dur) var(--ease); }
  .bar.show { transform: none; }
  .bar .btn { padding: 0 12px; }
  .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Visor de fotos */
.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: 0; border: 0; background: rgba(28,21,17,.96); color: var(--on-night); }
.lb[open] { display: grid; place-items: center; }
.lb::backdrop { background: rgba(28,21,17,.9); }
.lb figure { max-width: min(92vw, 1600px); }
.lb img { max-height: 82dvh; width: auto; margin: 0 auto; border-radius: var(--r-sm); }
.lb figcaption { text-align: center; margin-top: 12px; font-size: 15px; color: var(--on-night-soft); }
.lb button { position: absolute; width: 52px; height: 52px; font-size: 38px; line-height: 1; color: var(--on-night); }
.lb-x { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Aparició en fer scroll (només amb JS) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity var(--reveal) var(--ease), transform var(--reveal) var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .vault img { transform: scale(1.06); transition: transform 2.4s var(--ease); }
.js .vault.in img { transform: none; }

/* Responsive */
@media (max-width: 960px) {
  .amen, .beds ul, .info ul { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .casa-grid, .entorn-grid { grid-template-columns: 1fr; }
  .entorn-grid .vault { order: 2; aspect-ratio: 1; }
  .highlights { grid-template-columns: 1fr; gap: 20px; }
  .g { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; }
  .g li:first-child { grid-column: span 2; grid-row: span 2; }
  .g-2 li:first-child { grid-column: auto; grid-row: auto; }
  .g-2 { grid-auto-rows: 220px; }
  .g-4 li:last-child { grid-column: span 2; }
  .amen { gap: 22px 16px; font-size: 15px; }
  .foot-grid { flex-direction: column; text-align: center; }
  .hero .btns { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; }
  .js .reveal { transition-duration: 600ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .vault img { opacity: 1; transform: none; transition: none; }
  .ph img { transition: none; }
}
