/* Can Borrat · web pública */
:root {
  --green: #2f6f5e;
  --green-dark: #1f4d41;
  --green-soft: #e3efea;
  --cream: #f7f5f0;
  --card: #ffffff;
  --text: #1e2422;
  --muted: #66706c;
  --line: #e3e0d8;
  --orange: #e8954a;
  --orange-soft: #fcebdc;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(31, 77, 65, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
/* L'atribut hidden ha de guanyar sempre (p. ex. la pàgina «Tornem aviat» quan la web està activa). */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--cream); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; color: var(--green-dark); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--green-dark); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.center { text-align: center; margin-top: 2rem; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

/* Botons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  background: var(--green); color: #fff; text-decoration: none; font-weight: 700;
  padding: 14px 24px; border-radius: 999px; border: 2px solid var(--green);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 22px rgba(47, 111, 94, 0.25);
}
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-2px); background: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green); box-shadow: none; }
.btn-ghost:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-light { background: #fff; color: var(--green-dark); border-color: #fff; }
.btn-light:hover { background: var(--green-soft); border-color: var(--green-soft); }
.btn-small { padding: 9px 16px; font-size: 0.9rem; box-shadow: none; }

/* Capçalera */
.top { position: sticky; top: 0; z-index: 20; background: rgba(247, 245, 240, 0.85); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.15rem; color: var(--green-dark); }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--green-dark); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { font: inherit; font-weight: 700; font-size: 0.85rem; background: var(--card); color: var(--green); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.lang:hover { border-color: var(--green); }
@media (max-width: 860px) { .nav { display: none; } }
@media (max-width: 420px) { .top-actions .btn { display: none; } }

/* Inici */
.hero { padding: clamp(40px, 7vw, 90px) 0 clamp(50px, 8vw, 110px); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); background: var(--green-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #3c4542; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 26px; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.ticks li::before { content: "✓"; color: var(--green); font-weight: 900; margin-right: 8px; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 420px; }
.blob { position: absolute; width: 440px; height: 440px; max-width: 95%; aspect-ratio: 1; border-radius: 42% 58% 55% 45% / 47% 40% 60% 53%; background: radial-gradient(circle at 30% 30%, #f3d9bf, var(--orange-soft) 45%, var(--green-soft) 75%); animation: morph 14s ease-in-out infinite; }
.hero-logo { position: relative; width: min(340px, 72%); height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.22)); animation: float 7s ease-in-out infinite; }
.float { position: absolute; background: var(--card); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); font-weight: 700; font-size: 0.92rem; display: flex; align-items: center; gap: 8px; white-space: nowrap; animation: float 6s ease-in-out infinite; }
.f1 { top: 10%; left: -2%; }
.f2 { bottom: 16%; right: -4%; animation-delay: -2s; }
.f3 { bottom: 0; left: 6%; animation-delay: -4s; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.ok { background: #2ea36b; box-shadow: 0 0 0 4px #d6f2e3; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes morph { 0%, 100% { border-radius: 42% 58% 55% 45% / 47% 40% 60% 53%; } 50% { border-radius: 58% 42% 45% 55% / 55% 58% 42% 45%; } }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .cta, .ticks { justify-content: center; }
  .hero-art { min-height: 340px; order: -1; }
  .blob { width: 320px; height: 320px; }
  .f1 { left: 0; } .f2 { right: 0; } .f3 { display: none; }
}

/* Seccions */
.section { padding: clamp(60px, 9vw, 110px) 0; }
.section.soft { background: var(--green-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: #4a5350; }
.icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 28px; height: 28px; }
.icon.sun { background: var(--orange-soft); fill: #c86f1f; }
.icon.moon { background: var(--green-soft); fill: var(--green); }
.icon.cap { background: #e8e6f6; fill: #5b55a6; }
.price { margin-top: auto; margin-bottom: 0; padding-top: 14px; border-top: 1px dashed var(--line); font-weight: 800; font-size: 1.4rem; color: var(--green-dark); }
.price small { font-size: 0.95rem; font-weight: 600; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; counter-reset: s; }
.steps li { background: var(--card); border-radius: var(--radius); padding: 28px; position: relative; }
.steps .n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 16px; }
.steps p { color: #4a5350; margin: 0; }

.app-in { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.phones { display: flex; justify-content: center; gap: 18px; }
.phones img { width: min(240px, 45%); height: auto; border-radius: 32px; border: 8px solid #1c1e1d; box-shadow: var(--shadow); background: #fff; }
.phones img:nth-child(2) { transform: translateY(40px); }
.features { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 14px; }
.features li { padding-left: 34px; position: relative; color: #4a5350; }
.features li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232f6f5e' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/16px no-repeat; }
.features b { color: var(--text); }
@media (max-width: 860px) { .app-in { grid-template-columns: 1fr; text-align: center; } .features { text-align: left; } .phones { order: 2; } }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.panel { background: var(--card); border-radius: var(--radius); padding: clamp(24px, 4vw, 38px); }
.panel h2 { font-size: 1.8rem; }
.hours { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.hours td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-weight: 600; }
.hours tr.today td { background: var(--green-soft); color: var(--green-dark); font-weight: 800; }
.hours tr.today td:first-child { border-radius: 10px 0 0 10px; }
.hours tr.today td:last-child { border-radius: 0 10px 10px 0; }
.hours .closed { color: var(--muted); font-weight: 500; }
.holidays { margin-top: 18px; background: #eeece6; border-radius: 14px; padding: 14px 18px; }
.holidays h3 { font-size: 1rem; margin-bottom: 6px; }
.holidays ul { margin: 0; padding-left: 18px; color: #4a5350; }
.address { font-size: 1.15rem; font-weight: 700; }
.phones-list { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.phones-list a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--cream); text-decoration: none; font-weight: 700; }
.phones-list a:hover { background: var(--green-soft); }
.phones-list span { color: var(--muted); font-weight: 600; }
.panel .btn { margin-top: 6px; }

.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--green); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: #4a5350; padding-bottom: 6px; }

.final { background: linear-gradient(135deg, var(--green-dark), var(--green)); color: #fff; padding: clamp(60px, 9vw, 100px) 0; text-align: center; }
.final h2 { color: #fff; }
.final p { color: #d9ebe4; font-size: 1.15rem; }
.final-in img { margin: 0 auto 20px; width: 96px; height: 96px; }

.foot { padding: 34px 0 40px; border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; align-items: start; }
.foot-in > p { grid-column: 1 / -1; margin: 10px 0 0; }
.foot-links { display: flex; gap: 18px; font-weight: 600; }
.foot-links a { text-decoration: none; color: var(--green); }
@media (max-width: 600px) { .foot-in { grid-template-columns: 1fr; } }

/* Web desactivada des de l'app */
html.wait body > :not(.skip) { visibility: hidden; }
.offline { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 32px 16px; background: var(--green-soft); }
.offline img { width: 200px; height: 200px; margin-bottom: 14px; filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.2)); }
.offline .lead { max-width: 30em; margin: 0 auto 18px; }
body.is-offline > :not(.offline):not(.skip) { display: none; }

/* Aparicions en fer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .hero-logo, .float { animation: none; }
}
