/* Elna Fotografia
   Maqueta: la mateixa estètica que la web actual. Fons blanc, Playfair Display per als títols
   i el text destacat, Lora per al menú i el text, botons arrodonits amb vora. Portada amb foto
   a tota amplada i títol a la dreta, blocs asimètrics i una banda en blanc i negre per a la frase. */
:root {
  --bg: #ffffff;
  --soft: #f6f5f2;
  --ink: #111111;
  --muted: #5d5a56;
  --line: #dedbd6;
  --on-photo: #ffffff;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Lora", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141414; --soft: #1d1c1b; --ink: #f1efeb; --muted: #b3aea8; --line: #34322f; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141414; --soft: #1d1c1b; --ink: #f1efeb; --muted: #b3aea8; --line: #34322f; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.7; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.gutter { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1180px; margin-left: auto; margin-right: auto; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* Capçalera */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.logo { font-family: var(--display); font-size: 25px; text-decoration: none; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 16px; }
.nav a { text-decoration: none; white-space: nowrap; padding-block: 2px; border-bottom: 1px solid transparent; }
.nav a:hover, .nav [aria-current="page"] { border-bottom-color: var(--ink); }
.nav .pill, .nav .pill:hover { border: 1.5px solid var(--ink); }
.drop { position: relative; }
.drop > a::after { content: "▾"; font-size: 12px; margin-left: 8px; }
.drop-menu { position: absolute; top: 100%; left: -18px; min-width: 220px; padding: 12px 0; background: var(--bg); box-shadow: 0 6px 24px rgba(0,0,0,.08); display: none; }
.drop-menu a { display: block; padding: 7px 18px; border: 0; }
.drop-menu a:hover { text-decoration: underline; }
.drop:hover .drop-menu, .drop:focus-within .drop-menu { display: block; }
.drop::before { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.nav-mobile { display: none; }

/* Botons arrodonits, com «Veure imatges» de la web actual */
.pill { display: inline-block; font-family: var(--body); font-size: 17px; text-decoration: none; padding: 10px 22px; border: 1.5px solid var(--ink); border-radius: 18px; transition: background .2s, color .2s; white-space: nowrap; }
.pill:hover { background: var(--ink); color: var(--bg); }
.pill.solid { background: var(--ink); color: var(--bg); }
.pill.solid:hover { opacity: .85; }
.pill.light { border-color: var(--on-photo); color: var(--on-photo); }
.pill.light:hover { background: var(--on-photo); color: #111; }
.pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Portada */
.hero { position: relative; height: min(84vh, 800px); min-height: 440px; overflow: hidden; background: var(--soft); }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0) 35%, rgba(0,0,0,.4)); }
.hero-text { position: absolute; z-index: 1; right: 8%; top: 50%; transform: translateY(-50%); color: var(--on-photo); display: grid; gap: 22px; justify-items: start; max-width: 520px; }
.hero-text h1 { font-size: clamp(40px, 5vw, 64px); }
.hero-text p { font-size: 18px; }

/* Bloc asimètric de la portada */
.trio-home { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 56px; align-items: start; }
.trio-home .left { display: grid; gap: 64px; }
.trio-home .left figure { margin: 0; aspect-ratio: 1; max-width: 100%; overflow: hidden; background: var(--soft); }
.trio-home .left h2 { font-size: clamp(34px, 3.8vw, 50px); padding-left: 24%; }
.trio-home .mid { display: grid; gap: 28px; padding-top: 110px; }
.lead { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.6; }
.trio-home .mid p:not(.lead) { font-family: var(--display); font-size: 20px; line-height: 1.6; }
.grid-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 150px; }
.grid-photos figure { margin: 0; overflow: hidden; background: var(--soft); aspect-ratio: 2 / 3; max-width: 100%; }
.grid-photos figure.land { aspect-ratio: 3 / 2; align-self: start; }
.grid-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid-photos .pill { align-self: center; justify-self: center; }

/* Banda en blanc i negre amb frase */
.band { position: relative; min-height: 460px; display: grid; place-items: center; overflow: hidden; background: #222; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.band p { position: relative; z-index: 1; color: var(--on-photo); font-family: var(--display); font-size: clamp(22px, 2.6vw, 32px); text-align: center; padding: 40px 24px; max-width: 40ch; }
.band .pill { position: relative; z-index: 1; }
.band .inner { position: relative; z-index: 1; display: grid; gap: 18px; justify-items: center; }

/* Seccions */
.sec { padding-block: 104px; }
.center { text-align: center; display: grid; gap: 22px; justify-items: center; }
.label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.title { font-size: clamp(32px, 4vw, 48px); }
.intro { font-family: var(--display); font-size: 20px; line-height: 1.6; max-width: 54ch; }
.small { font-size: 15px; color: var(--muted); }

.page-title { padding-block: 72px 48px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.page-title h1 { font-size: clamp(34px, 4.4vw, 52px); }
.page-title p { font-family: var(--display); font-style: italic; font-size: 20px; color: var(--muted); }

.wide { height: min(64vh, 600px); min-height: 300px; overflow: hidden; background: var(--soft); }
.wide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Tres entrades amb foto */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 64px; }
.col { display: grid; gap: 14px; align-content: start; justify-items: center; text-align: center; min-width: 0; }
.col figure { margin: 0 0 8px; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: var(--soft); max-width: 100%; }
.col figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.col h3 { font-size: 28px; }
.col p { color: var(--muted); max-width: 32ch; }

/* Moments de l'experiència */
.moments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 64px; text-align: center; }
.moment { display: grid; gap: 10px; justify-items: center; align-content: start; min-width: 0; }
.moment h3 { font-size: 28px; }
.moment p:last-child { color: var(--muted); max-width: 34ch; }

/* Packs en rectangles, de costat */
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; align-items: stretch; }
.pack { border: 1px solid var(--line); padding: 40px 28px 34px; display: grid; gap: 14px; align-content: start; justify-items: center; text-align: center; position: relative; min-width: 0; }
.pack.featured { border: 1.5px solid var(--ink); }
.pack .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--bg); padding: 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.pack h3 { font-size: 28px; }
.pack .price { font-family: var(--display); font-size: 44px; line-height: 1; }
.pack ul { list-style: none; margin: 6px 0 4px; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; width: 100%; color: var(--muted); font-size: 16px; }
.pack .pill { margin-top: 6px; font-size: 16px; padding: 8px 20px; }
.pack-group { display: grid; gap: 8px; padding-top: 72px; }
.pack-group > .head { text-align: center; display: grid; gap: 8px; justify-items: center; }
.pack-group h2 { font-size: clamp(30px, 3.4vw, 40px); }
.pack-group > .head p { color: var(--muted); max-width: 56ch; }

/* Eleva el teu pack */
.extras { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 640px; border-top: 1px solid var(--line); text-align: left; }
.extras li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.extras b { font-weight: 400; white-space: nowrap; }

/* Parella de fotos */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duo figure { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); max-width: 100%; }
.duo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Text amb foto al costat */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
.split figure { margin: 0; overflow: hidden; background: var(--soft); max-width: 100%; }
.split figure img { width: 100%; height: auto; display: block; }
.split .txt { display: grid; gap: 22px; justify-items: start; min-width: 0; }

/* Projectes amb galeria */
.project { display: grid; gap: 22px; padding-block: 64px; border-top: 1px solid var(--line); }
.project h2 { font-size: clamp(30px, 3.4vw, 42px); }
.project > p { color: var(--muted); max-width: 56ch; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery figure { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); max-width: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot { display: grid; place-items: center; aspect-ratio: 4 / 5; max-width: 100%; border: 1px dashed var(--muted); color: var(--muted); font-size: 14px; text-align: center; padding: 16px; }

/* Desplegables */
.more { border-top: 1px solid var(--line); width: 100%; max-width: 720px; text-align: left; }
.more details { border-bottom: 1px solid var(--line); }
.more summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-family: var(--display); font-size: 22px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 26px; transition: transform .2s; }
.more details[open] summary::after { transform: rotate(45deg); }
.more .body { padding: 0 0 22px; color: var(--muted); display: grid; gap: 10px; }

/* Formulari de contacte */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; max-width: 640px; text-align: left; }
.form label { display: grid; gap: 6px; font-size: 15px; }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; width: 100%; }
.form textarea { min-height: 150px; resize: vertical; }
.form button { justify-self: start; cursor: pointer; font: inherit; }

/* Text legal */
.legal { display: grid; gap: 14px; max-width: 68ch; margin: 0 auto; font-size: 16px; }
.legal h2 { font-size: 28px; margin-top: 24px; }

/* Marques de contingut pendent: treure-les quan estigui omplert */
.pending { display: inline-block; font-family: var(--body); font-size: 12px; color: #b3261e; border: 1px dashed #b3261e; padding: 1px 8px; border-radius: 4px; }

/* Peu */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { padding-block: 64px 40px; display: grid; gap: 14px; justify-items: center; text-align: center; color: var(--muted); font-size: 15px; }
.site-foot .logo { color: var(--ink); }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.site-foot nav a { text-decoration: none; }
.site-foot nav a:hover { text-decoration: underline; }
.sel { user-select: all; }

/* Botó de reserva fix al mòbil */
.book-bar { display: none; }

@media (max-width: 980px) {
  .nav { display: none; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; gap: 10px; padding-block: 14px 8px; }
  .nav-mobile { display: flex; width: 100%; gap: 20px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; font-size: 15px; }
  .nav-mobile::-webkit-scrollbar { display: none; }
  .nav-mobile a { text-decoration: none; white-space: nowrap; }
  .nav-mobile [aria-current="page"] { text-decoration: underline; }
  .book-bar { display: block; position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; background: var(--bg); box-shadow: 0 -1px 0 var(--line); padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .book-bar a { display: block; text-align: center; }
  body { padding-bottom: 72px; }
  .sec { padding-block: 72px; }
  .hero-text { right: auto; left: 0; top: auto; bottom: 0; transform: none; padding: 0 20px 40px; }
  .hero::after { background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 60%); }
  .trio-home { grid-template-columns: 1fr; gap: 40px; }
  .trio-home .left h2 { padding-left: 0; }
  .trio-home .mid, .grid-photos { padding-top: 0; }
  .cols, .moments, .packs { grid-template-columns: 1fr; gap: 32px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .form { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .grid-photos { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Galeria: foto horitzontal que ocupa dues columnes */
.gallery { grid-auto-flow: dense; }
.gallery figure.span2 { grid-column: span 2; aspect-ratio: 8 / 5; position: relative; }
.gallery figure.span2 img { position: absolute; inset: 0; }
@media (max-width: 980px) { .gallery figure.span2 { aspect-ratio: 3 / 2; } }

/* Packs combinats: dues targetes */
.packs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin-left: auto; margin-right: auto; }
@media (max-width: 980px) { .packs.two { grid-template-columns: 1fr; } }

/* Botó sota la graella de fotos de la portada */
.grid-cta { text-align: center; margin-top: 28px; }

/* Índex de projectes: targetes petites amb una foto */
.proj-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 20px; }
.proj { display: grid; gap: 8px; align-content: start; text-decoration: none; min-width: 0; }
.proj figure { margin: 0 0 6px; aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); max-width: 100%; }
.proj img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.proj:hover img { transform: scale(1.03); }
.proj h3 { font-size: 22px; }
.proj p { font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 980px) { .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; } }

/* Packs combinats: preu de cada combinació */
.combo-price { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--ink); margin: 2px 0 8px; }
.combo-head { font-family: var(--display); font-weight: 400; font-size: 24px; text-align: center; margin: 48px 0 0; }
.gallery figure.wide3 { grid-column: 1 / -1; aspect-ratio: 12 / 5; position: relative; }
.gallery figure.wide3 img { position: absolute; inset: 0; }
@media (max-width: 980px) { .gallery figure.wide3 { aspect-ratio: 3 / 2; } }

/* Animacions */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.hero img { animation: hero-zoom 9s ease-out both; }
.hero-text > * { animation: hero-up 1.1s cubic-bezier(.2,.7,.2,1) both; }
.hero-text > *:nth-child(2) { animation-delay: .2s; }
.hero-text > *:nth-child(3) { animation-delay: .4s; }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes hero-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.gallery figure img, .cols .col figure img, .proj figure img, .grid-photos figure img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.gallery figure:hover img, .cols .col:hover figure img, .proj:hover figure img, .grid-photos figure:hover img { transform: scale(1.04); }
.pill { transition: background-color .3s ease, color .3s ease, transform .3s ease; }
.pill:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .hero img, .hero-text > * { animation: none; }
  .gallery figure img, .cols .col figure img, .proj figure img, .grid-photos figure img, .pill { transition: none; }
  .gallery figure:hover img, .cols .col:hover figure img, .proj:hover figure img, .grid-photos figure:hover img, .pill:hover { transform: none; }
}

/* Carrusel */
.carousel { position: relative; }
.carousel .track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carousel .track::-webkit-scrollbar { display: none; }
.carousel figure { flex: 0 0 calc((100% - 24px) / 3); margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); scroll-snap-align: start; }
.carousel img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.carousel figure:hover img { transform: scale(1.04); }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.88); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 12px rgba(0,0,0,.12); transition: background-color .3s ease; }
.car-btn:hover { background: #fff; }
.car-prev { left: 12px; }
.car-next { right: 12px; }
@media (max-width: 980px) { .carousel figure { flex-basis: 78%; } .car-btn { width: 40px; height: 40px; font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .carousel .track { scroll-behavior: auto; } .carousel img { transition: none; } }

/* Formulari de contacte */
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.form .check input { width: auto; margin-top: 4px; }
.form-ok, .form-ko { max-width: 640px; margin: 0 auto 24px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 8px; }
.form-ko { border-color: #b3261e; }

/* Carrusel de projectes */
.proj-car .track > .proj { flex: 0 0 calc((100% - 36px) / 4); scroll-snap-align: start; }
.proj-car .proj figure { flex: none; width: 100%; }
.proj-car .car-btn { top: calc((100vw - 120px) / 4 * 5 / 8); }
@media (min-width: 1300px) { .proj-car .car-btn { top: 170px; } }
@media (max-width: 980px) { .proj-car .track > .proj { flex-basis: 70%; } .proj-car .car-btn { top: 38vw; } }

/* Formulari de l'Halora */
.halora-form { margin-top: 40px; text-align: left; min-height: 200px; }
