/* Mas de l'Obaga — web d'exemple (negoci inventat).
   Direcció tasteskill «The place carries it», seed 1185226740. Proporcions de la paleta «Navy on white»,
   amb la tinta presa del verd fosc de l'obaga i el taronja del faig a la tardor com a únic accent. */

@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-400-ext.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-500.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --surface: #f3f4f1;
  --ink: #1c2b24;
  --muted: #56625b;
  --accent: #f7941d;
  --accent-ink: #1c2b24;
  --field-1: #0b120e;  --field-1-ink: #ffffff;
  --field-2: #e4e6e0;  --field-2-ink: #1c2b24;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-text: "Barlow", system-ui, sans-serif;
  /* cinc mides, i prou: petita, text, entrada, títol i el nom */
  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.5rem, 1.2rem + 0.9vw, 2rem);
  --step-head: clamp(3rem, 1rem + 6.5vw, 7.5rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(6rem, 12vw, 11rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; background: var(--surface); }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 1rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 0.95; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; }
.head { font-size: var(--step-head); text-transform: uppercase; }
.nums { font-variant-numeric: tabular-nums; }
.wrap { padding-inline: var(--margin); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.link-plain { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; transition: text-decoration-color 180ms ease, color 180ms ease; }
.link-plain:hover { text-decoration-color: var(--accent); }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.4rem;
  background: var(--accent); color: var(--accent-ink); font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 180ms ease;
}
.button:hover { background: #ffab45; }
.button:active { transform: scale(0.97); }
.button-paper { background: var(--bg); color: var(--ink); }
.button-paper:hover { background: var(--surface); }

/* ---- Avís de web d'exemple ---- */
.demo { max-width: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; justify-content: space-between; padding: 0.6rem var(--margin); background: var(--field-1); color: var(--field-1-ink); font-size: var(--step-small); line-height: 1.4; }
.demo a { color: var(--accent); }

/* ---- Capçalera sobre la foto ---- */
.top { position: absolute; z-index: 5; left: 0; right: 0; margin-top: 0.4rem; display: flex; justify-content: space-between; align-items: center; padding: 1rem var(--margin); color: #fff; font-size: var(--step-small); }
.top-action { display: none; }
.wordmark { font: 700 var(--step-lead)/1 var(--font-display); text-decoration: none; text-transform: uppercase; letter-spacing: 0.01em; }
.nav { display: flex; gap: 1.5rem; }
.nav a { text-decoration: none; transition: color 180ms ease; }
.nav a:hover { color: var(--accent); }

/* ---- Portada: una foto que canvia de llum ---- */
.hero { position: relative; height: 100svh; min-height: 34rem; overflow: hidden; background: var(--field-1); color: #fff; }
.hero-photos, .hero-photos img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photos img { object-fit: cover; object-position: center 40%; opacity: 0; transition: opacity 1.6s ease; }
.hero-photos img.is-on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0)); pointer-events: none; } /* el vel neutre sota el nom: l'única excepció permesa */
.hero-text { position: absolute; z-index: 2; inset: auto 0 0 0; padding: 0 var(--margin) 2rem; display: grid; grid-template-columns: 1fr auto; align-items: end; row-gap: 0.6rem; }
.hero-lead { font-size: var(--step-body); line-height: 1.35; max-width: 24ch; }
.hero-action { justify-self: end; }
.hero-name { grid-column: 1 / -1; font-size: min(31vw, 42svh); line-height: 0.8; letter-spacing: -0.02em; text-transform: uppercase; }
@media (prefers-reduced-motion: no-preference) {
  .hero-photos img.is-on { animation: drift 14s ease-out both; }
}
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---- Intro: el paràgraf a la meitat dreta ---- */
.intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-block: var(--section); }
.intro-text { grid-column: 7 / 13; grid-row: 1; font-size: var(--step-lead); line-height: 1.3; text-indent: 3em; max-width: 34ch; }
.intro-photo { grid-column: 1 / 5; grid-row: 1 / 3; margin-top: 7rem; aspect-ratio: 1; overflow: hidden; }
.intro-photo img { width: 200%; max-width: none; height: 100%; object-fit: cover; object-position: left center; filter: grayscale(1); }
.intro-note { grid-column: 1 / 4; grid-row: 3; margin-top: 2rem; font-size: var(--step-small); }

/* ---- Habitacions: un primer pla i una fitxa que avança de columna ---- */
.room { position: relative; height: 100svh; min-height: 40rem; overflow: hidden; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; padding-inline: var(--margin); }
.room-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.room-card { position: relative; z-index: 1; grid-column: 2; min-width: 19rem; min-height: 52svh; display: flex; flex-direction: column; gap: 0.5rem; padding: 1.6rem; background: var(--ink); color: #fff; }
.room-2 .room-card { grid-column: 3; }
.room-3 .room-card { grid-column: 4; justify-self: end; }
.room-card h3 { font-size: var(--step-lead); text-transform: uppercase; }
.room-kind, .room-fact { font-size: var(--step-body); }
.room-fact { font-weight: 500; color: var(--accent); }
.plan { width: 100%; aspect-ratio: 3 / 2; height: auto; margin: 0.8rem 0; }
.room-note { font-size: var(--step-small); color: #d8ded9; }
.room-card .button { margin-top: auto; width: 100%; }

/* ---- Preus, com una carta ---- */
.prices { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-block: var(--section); }
.prices-side { grid-column: 1 / 5; }
.calc { margin-top: 2.5rem; display: grid; gap: 1.1rem; padding: 1.5rem; background: var(--surface); }
.step { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.step-label { font-weight: 500; }
.stepper { display: flex; align-items: center; gap: 0.25rem; }
.stepper button { width: 2.75rem; height: 2.75rem; background: var(--ink); color: #fff; font-size: var(--step-lead); line-height: 1; transition: transform 140ms var(--ease-out), background-color 180ms ease; }
.stepper button:hover { background: #2e4439; }
.stepper button:active { transform: scale(0.92); }
.stepper button:disabled { background: var(--field-2); color: var(--muted); cursor: default; }
.stepper output { min-width: 2.2ch; text-align: center; font: 500 var(--step-lead)/1 var(--font-text); }
.check { display: flex; gap: 0.6rem; align-items: center; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--ink); }
.calc-out { padding-top: 0.6rem; }
.calc-room { font: 700 var(--step-lead)/1 var(--font-display); text-transform: uppercase; }
.calc-total { margin-top: 0.35rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; }
.calc-total #calc-total { font: 700 var(--step-lead)/1 var(--font-display); color: var(--ink); }
.calc-detail { color: var(--muted); font-size: var(--step-small); }
.calc-send { width: 100%; }
.calc-room, .calc-total #calc-total { transition: opacity 200ms ease; }
.calc.is-changing .calc-room, .calc.is-changing #calc-total { opacity: 0.35; }

.menu { grid-column: 6 / 13; columns: 2; column-gap: 4rem; }
.menu-group { break-inside: avoid; padding-top: 5rem; }
.menu-group:first-child { padding-top: 0.4rem; }
.menu-group h3 { font: 700 var(--step-lead)/1.1 var(--font-display); text-transform: uppercase; margin-bottom: 1rem; }
.item { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; margin-bottom: 1.35rem; }
.item dt, .item dd.nums { font-size: var(--step-body); font-weight: 500; }
.item dd.nums { text-align: right; }
.item .desc { grid-column: 1 / -1; color: var(--muted); font-size: var(--step-small); max-width: 36ch; }
.menu-note { break-inside: avoid; padding-top: 2.5rem; color: var(--muted); font-size: var(--step-small); }

/* ---- Un dia: fila que es pot arrossegar ---- */
.day { padding-block: 0 var(--section); overflow: hidden; }
.day-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.day-buttons { display: flex; gap: 0.5rem; }
.square { width: 3rem; height: 3rem; display: grid; place-items: center; background: var(--ink); color: #fff; transition: transform 140ms var(--ease-out), background-color 180ms ease; }
.square:hover { background: #2e4439; }
.square:active { transform: scale(0.92); }
.square svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2.5; }
.day-bar { margin-top: 1.5rem; }
.day-track { display: block; height: 6px; background: var(--field-2); }
.day-fill { display: block; height: 100%; width: 30%; background: var(--ink); transform-origin: left; transition: width 120ms linear; }
.day-row { display: flex; gap: 2rem; margin-top: 2.5rem; padding-inline: var(--margin); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding-inline: var(--margin); }
.day-row::-webkit-scrollbar { display: none; }
.moment { flex: 0 0 18rem; scroll-snap-align: start; display: flex; flex-direction: column; }
.moment h3 { font: 700 var(--step-lead)/1 var(--font-display); text-transform: uppercase; }
.moment p { margin-top: 0.5rem; font-size: var(--step-body); }
.moment figure { margin-top: 5rem; }
.m2 figure { margin-top: 8rem; } .m3 figure { margin-top: 3rem; } .m4 figure { margin-top: 7rem; } .m5 figure { margin-top: 4rem; } .m6 figure { margin-top: 9rem; }
.moment img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.moment figcaption { margin-top: 0.5rem; font-size: var(--step-small); color: var(--muted); }

/* ---- Preguntes, al costat d'una foto alta ---- */
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); background: var(--field-2); color: var(--field-2-ink); }
.faq-text { grid-column: 1 / 6; padding-block: var(--section); }
.facts { margin-top: 2rem; display: grid; gap: 0.4rem; font-size: var(--step-body); }
.questions { margin-top: 3rem; display: grid; gap: 1.75rem; }
.questions summary { position: relative; list-style: none; cursor: pointer; padding-right: 2.5rem; font-size: var(--step-body); font-weight: 500; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: ""; position: absolute; right: 0.4rem; top: 0.45em; width: 0.6rem; height: 0.6rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 240ms var(--ease-out); }
.questions details[open] summary::after { transform: translateY(0.25em) rotate(225deg); }
.questions details p { margin-top: 0.5rem; font-size: var(--step-body); }
.faq-actions { margin-top: 3rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.faq-photos { grid-column: 7 / 13; position: relative; padding-bottom: 5rem; }
.faq-tall { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.faq-square { position: absolute; left: -2.5rem; bottom: 2.5rem; width: 34%; aspect-ratio: 1; object-fit: cover; }

/* ---- Com arribar: una targeta sobre la muntanya ---- */
.visit { position: relative; min-height: 100svh; display: flex; align-items: flex-start; padding-bottom: 7.5rem; }
.visit-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.visit-card { position: relative; margin: 3.75rem 3.75rem 0 auto; z-index: 1; width: 24rem; max-width: calc(100% - 2rem); padding: 2rem; background: var(--bg); display: flex; flex-direction: column; gap: 0.9rem; }
.visit-card h2 { font-size: var(--step-lead); text-transform: uppercase; }
.visit-address { font-size: var(--step-body); }
.hours { display: grid; gap: 0.3rem; font-size: var(--step-body); }
.hours div { display: flex; justify-content: space-between; }
.hours dt { color: var(--muted); }
.visit-phone { font: 700 var(--step-lead)/1 var(--font-display); }
.visit-how { font-size: var(--step-small); color: var(--muted); }
.visit-button { margin: 0.4rem -2rem -2rem; min-height: 3.25rem; }

/* ---- Peu: el correu és el titular ---- */
.end { min-height: 90svh; display: flex; flex-direction: column; background: var(--ink); color: #fff; padding-block: 2.5rem 1.5rem; }
.end-top { display: flex; justify-content: space-between; align-items: start; gap: 1rem; font-size: var(--step-small); }
.end-mail { margin-top: auto; padding-top: 6rem; display: flex; flex-wrap: wrap; text-decoration: none; font: 700 var(--step-head)/0.9 var(--font-display); letter-spacing: -0.02em; transition: color 180ms ease; }
.end-mail:hover { color: var(--accent); }
.end-meta { margin-top: 2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; font-size: var(--step-small); }
.credits { margin-top: 1.5rem; max-width: none; columns: 3 18rem; column-gap: 3rem; font-size: var(--step-small); line-height: 1.5; color: #fff; }

/* ---- Moviment: entrada de cada part, una vegada ---- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shutter[data-reveal] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter[data-reveal] img { transform: scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js .shutter[data-reveal].is-in { clip-path: inset(0); }
  .js .shutter[data-reveal].is-in img { transform: none; }
  .js .intro-note[data-reveal], .js .calc[data-reveal], .js .facts[data-reveal] { transition-delay: 90ms; }
  .js .questions[data-reveal] { transition-delay: 160ms; }
  .js .faq-actions[data-reveal] { transition-delay: 230ms; }
  .js .menu-group:nth-child(2) { transition-delay: 80ms; } .js .menu-group:nth-child(3) { transition-delay: 160ms; }
  .js .m2 { transition-delay: 70ms; } .js .m3 { transition-delay: 140ms; } .js .m4 { transition-delay: 210ms; } .js .m5 { transition-delay: 280ms; } .js .m6 { transition-delay: 350ms; }
  .js .room-card[data-reveal] { transform: translateY(48px); }
  .js .room-card[data-reveal].is-in { transform: none; }
}

/* ---- Mòbil: una composició pròpia ---- */
@media (max-width: 900px) {
  .nav { display: none; }
  .top-action { display: inline-flex; min-height: 2.75rem; }
  .hero-action { display: none; }
  .intro-text { grid-column: 4 / 13; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .top-action { display: inline-flex; min-height: 2.75rem; }
  .hero-text { grid-template-columns: 1fr; }
  .hero-action { display: none; }
  .hero-name { font-size: 25vw; line-height: 0.82; }
  .intro { grid-template-columns: 1fr 1fr; row-gap: 2rem; padding-block: 5rem; }
  .intro-text { grid-column: 1 / -1; text-indent: 0; }
  .intro-photo { grid-column: 2; grid-row: 2; aspect-ratio: 4 / 5; margin-top: 0; }
  .intro-note { grid-column: 1; grid-row: 2; align-self: end; margin-top: 0; padding-right: 0.5rem; }
  .room { display: flex; align-items: flex-end; padding: 0; min-height: 0; }
  .room-card, .room-2 .room-card, .room-3 .room-card { width: 100%; min-width: 0; min-height: 46svh; padding: 1.25rem; }
  .plan { width: 60%; margin: 0.4rem 0; }
  .prices { grid-template-columns: 1fr; padding-block: 5rem; }
  .prices-side, .menu { grid-column: 1; }
  .menu { columns: 1; margin-top: 3rem; }
  .menu-group { padding-top: 2.5rem; }
  .day-buttons { display: none; }
  .day-row { gap: 1rem; }
  .moment { flex-basis: 72vw; }
  .moment figure, .m2 figure, .m3 figure, .m4 figure, .m5 figure, .m6 figure { margin-top: 2rem; }
  .m2 figure, .m4 figure { margin-top: 4rem; }
  .faq { grid-template-columns: 1fr; }
  .faq-photos { grid-column: 1; grid-row: 1; padding-bottom: 0; }
  .faq-tall { aspect-ratio: 4 / 5; }
  .faq-square { left: auto; right: var(--margin); bottom: -2rem; width: 38%; }
  .faq-text { grid-column: 1; padding-block: 4.5rem 5rem; }
  .questions { gap: 0.5rem; }
  .questions summary { min-height: 2.75rem; display: flex; align-items: center; }
  .faq-actions .button { width: 100%; }
  .visit { min-height: 0; display: block; padding: 70svh var(--margin) 3rem; }
  .visit-bg { height: 70svh; }
  .visit-card { position: relative; top: auto; margin: -5rem 0 0; width: auto; max-width: none; padding: 1.5rem; }
  .visit-button { margin: 0.4rem -1.5rem -1.5rem; min-height: 3.5rem; }
  .end-top { flex-direction: column; }
  .end-mail { font-size: 12.5vw; flex-direction: column; }
  .end-meta { flex-direction: column; }
}
