/*
Theme Name: Piscinas El Tarragonès
Theme URI: https://piscinaseltarragones.com
Author: Piscinas El Tarragonès
Description: Web de una sola página para mantenimiento y construcción de piscinas en Tarragona. Español, catalán e inglés.
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: piscinas-el-tarragones
*/

:root {
  --navy: #0a1b33;
  --navy-mid: #122844;
  --ink: #142033;
  --pool: #1a6a9a;
  --pool-deep: #155a84;
  --water: #3a8bb8;
  --paper: #fbf9f4;
  --sand: #f3eee3;
  --cream: #e8e0d0;
  --muted: #5c6775;
  --line: #d6cfc0;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --shadow: 0 0 0 1px rgb(10 27 51 / 0.06), 0 1px 2px -1px rgb(10 27 51 / 0.06), 0 8px 24px -12px rgb(10 27 51 / 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  padding-bottom: 5.5rem;
}
@media (min-width: 640px) { body { padding-bottom: 0; } }
img { max-width: 100%; display: block; }
button, [role="button"] { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.03em; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
::selection { background: var(--pool); color: var(--paper); }

.wrap { width: min(72rem, calc(100% - 2rem)); margin-inline: auto; }
@media (min-width: 640px) { .wrap { width: min(72rem, calc(100% - 4rem)); } }

.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--paper); padding: 0.5rem 1rem; }

.topbar { background: var(--navy); color: var(--paper); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0; }
.topbar-note { display: none; font-size: 0.75rem; letter-spacing: 0.02em; opacity: 0.8; }
@media (min-width: 640px) { .topbar-note { display: block; } }
.topbar-right { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 0.75rem; }
@media (min-width: 640px) { .topbar-right { width: auto; justify-content: flex-end; } }
.phone-link { display: inline-flex; min-height: 44px; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; }

.lang { display: flex; overflow: hidden; border-radius: 2px; border: 1px solid rgb(251 249 244 / 0.25); position: relative; z-index: 2; }
.lang a, .lang button {
  min-height: 36px; min-width: 36px; border: 0; background: transparent !important;
  color: rgb(251 249 244 / 0.8) !important; font: 600 0.75rem/1 var(--font-sans); letter-spacing: 0.04em; padding: 0 0.6rem;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer;
  appearance: none; -webkit-appearance: none; box-shadow: none !important; border-radius: 0 !important;
}
.lang .is-active { background: var(--paper) !important; color: var(--navy) !important; }
.lang-foot { display: flex; gap: 0.75rem; padding-top: 0.5rem; }
.lang-foot a { color: rgb(251 249 244 / 0.6); font-weight: 600; }
.lang-foot a.is-active { color: #fbf9f4; }

.nav-bar { position: sticky; top: 0; z-index: 40; }
.nav-main { border-bottom: 1px solid rgb(214 207 192 / 0.8); background: rgb(251 249 244 / 0.95); backdrop-filter: blur(12px); }
.nav-main.is-scrolled { box-shadow: var(--shadow); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; }
.brand { display: flex; min-height: 44px; align-items: center; gap: 0.75rem; }
.brand img { height: 2.75rem; width: auto; }
.brand-k { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; color: var(--navy); }
.brand-n { font-family: var(--font-display); font-size: 1.125rem; line-height: 1; color: var(--navy); }
.nav-links { display: none; align-items: center; gap: 1.75rem; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links a { font-size: 0.875rem; font-weight: 500; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: none; align-items: center; gap: 0.5rem; }
@media (min-width: 640px) { .nav-cta { display: inline-flex; } }
.btn-wa-text { color: var(--pool); font-size: 0.875rem; font-weight: 500; min-height: 44px; padding: 0 0.75rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.menu-btn { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--navy); }
@media (min-width: 1024px) { .menu-btn { display: none; } }

.mobile-nav { display: none; position: fixed; inset: 0; z-index: 30; background: var(--paper); padding-top: 8rem; }
.mobile-nav.is-open { display: block; }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }
.mobile-nav a.big { display: flex; min-height: 56px; align-items: center; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 1.875rem; color: var(--navy); }
.mobile-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 2rem; }

.btn {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 6px; padding: 0 1.5rem; font-weight: 600; border: 0; font-family: var(--font-sans);
  transition: transform 150ms ease-out, background 150ms ease-out;
}
.btn:active { transform: scale(0.96); }
.btn-pool { background: var(--pool); color: var(--paper); }
.btn-pool:hover { background: var(--pool-deep); }
.btn-ghost { border: 1px solid rgb(251 249 244 / 0.4); color: var(--paper); background: rgb(10 27 51 / 0.3); }
.btn-outline { border: 1px solid var(--line); color: var(--navy); background: transparent; }
.btn-row { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 2rem; }
@media (min-width: 640px) { .btn-row { flex-direction: row; } }

.hero { position: relative; min-height: 100svh; color: var(--paper); }
.hero img.bg, .cta-band img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(10 27 51 / 0.28) 0%, rgb(10 27 51 / 0.15) 38%, rgb(10 27 51 / 0.72) 100%);
}
.hero-inner { position: relative; z-index: 1; display: flex; min-height: 100svh; flex-direction: column; justify-content: flex-end; padding: 8rem 0 7rem; }
.kicker { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pool); margin: 0; }
.kicker.light { color: var(--water); }
.hero h1 { margin-top: 1rem; max-width: 48rem; font-size: clamp(2rem, 5vw, 4.5rem); font-weight: 500; line-height: 1.1; }
.hero .lead { margin-top: 1.25rem; max-width: 36rem; font-size: 1.05rem; line-height: 1.6; color: rgb(251 249 244 / 0.85); }
@media (min-width: 640px) {
  .hero .btn-ghost, .hero .btn-wa { display: inline-flex; }
}
.hero .btn-ghost, .hero .btn-wa { display: none; }
@media (min-width: 640px) { .hero .btn-ghost, .hero .btn-wa { display: inline-flex; } }

.trust { position: relative; z-index: 2; margin-top: 1.5rem; }
@media (min-width: 640px) { .trust { margin-top: -4rem; } }
.trust ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border-radius: 12px; background: var(--line); box-shadow: var(--shadow); list-style: none; margin: 0; padding: 0; }
@media (min-width: 768px) { .trust ul { grid-template-columns: repeat(4, 1fr); } }
.trust li { background: var(--paper); padding: 1.5rem 1.25rem; }
.trust h2 { margin-top: 0.75rem; font-size: 1.15rem; color: var(--navy); }
.trust p { margin: 0.35rem 0 0; font-size: 0.875rem; color: var(--muted); line-height: 1.5; }
.trust svg { color: var(--pool); }

.section { padding: 5rem 0; }
@media (min-width: 1024px) { .section { padding: 7rem 0; } }
.section h2 { margin-top: 0.75rem; font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 500; color: var(--navy); }
.muted { color: var(--muted); line-height: 1.65; }
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.frame { overflow: hidden; border-radius: 12px; }
.frame img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: bottom; outline: 1px solid rgb(10 27 51 / 0.1); outline-offset: -1px; }

.sand { background: var(--sand); }
.navy-sec { background: var(--navy); color: var(--paper); }
.navy-sec h2 { color: var(--paper); }

.cards { display: grid; gap: 1.25rem; margin-top: 3rem; }
@media (min-width: 768px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { overflow: hidden; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
@media (min-width: 640px) { .card img { aspect-ratio: 1; } }
.card-body { padding: 1.5rem 1.75rem 2rem; }
.card h3 { font-size: 1.5rem; color: var(--navy); }
.card p { margin-top: 0.75rem; color: var(--muted); line-height: 1.6; }

.spec-grid { display: grid; gap: 2.5rem; margin-top: 3rem; }
@media (min-width: 768px) { .spec-grid { grid-template-columns: repeat(3, 1fr); } }
.spec { border-top: 1px solid rgb(251 249 244 / 0.15); padding-top: 1.5rem; }
.spec .n { font-family: var(--font-display); font-size: 0.875rem; color: var(--water); }
.spec h3 { margin-top: 0.5rem; font-size: 1.5rem; }
.spec p { margin-top: 0.75rem; font-size: 0.9rem; line-height: 1.6; color: rgb(251 249 244 / 0.7); }

.steps { display: grid; gap: 2rem; margin-top: 3rem; list-style: none; padding: 0; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps .n { font-family: var(--font-display); font-size: 2.25rem; color: rgb(26 106 154 / 0.45); }
.steps h3 { margin-top: 0.5rem; font-size: 1.25rem; color: var(--navy); }
.steps p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 2.5rem; }
.gallery .wide { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; min-height: 14rem; object-fit: cover; border-radius: 8px; outline: 1px solid rgb(10 27 51 / 0.1); outline-offset: -1px; }
.gallery .wide img { min-height: 18rem; }

.towns { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.towns li { border: 1px solid var(--line); background: var(--sand); border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.875rem; color: var(--navy); }

.cta-band { position: relative; overflow: hidden; color: var(--paper); }
.cta-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(10 27 51 / 0.82) 0%, rgb(10 27 51 / 0.55) 55%, rgb(10 27 51 / 0.28) 100%);
}
.cta-inner { position: relative; z-index: 1; padding: 5rem 0; }
.cta-inner h2 { color: var(--paper); max-width: 36rem; }
.cta-inner p { max-width: 32rem; color: rgb(251 249 244 / 0.8); }

.faq { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 2.5rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.25rem 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-display); font-size: 1.25rem; color: var(--navy); cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .plus { color: var(--pool); transition: transform 200ms; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq p { margin: 0.75rem 0 0; max-width: 48rem; color: var(--muted); line-height: 1.65; }

.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 2fr 3fr; } }
.contact-card { background: var(--paper); border-radius: 12px; padding: 1.5rem; box-shadow: var(--shadow); }
@media (min-width: 640px) { .contact-card { padding: 2rem; } }
label { display: grid; gap: 0.4rem; font-size: 0.875rem; font-weight: 500; }
input, select, textarea {
  min-height: 48px; width: 100%; border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); color: var(--ink); font: 1rem var(--font-sans); padding: 0 1rem;
}
textarea { min-height: 8rem; padding: 0.75rem 1rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgb(26 106 154 / 0.35); border-color: var(--pool); }
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .form-actions { flex-direction: row; } }
.form-error { color: var(--pool-deep); font-size: 0.875rem; font-weight: 500; }
.thanks { text-align: center; padding: 2.5rem 1.5rem; background: var(--sand); border-radius: 12px; }
.thanks h3 { font-size: 1.5rem; color: var(--navy); }
.meta-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; color: var(--muted); margin: 0; }
.meta-val { display: inline-flex; min-height: 44px; align-items: center; gap: 0.5rem; font-size: 1.125rem; font-weight: 500; color: var(--navy); }

.site-footer { background: var(--navy); color: var(--paper); border-top: 1px solid var(--line); }
.foot-grid { display: grid; gap: 2.5rem; padding: 3.5rem 0; }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 1fr 1fr 1fr; } }
.foot-mark { width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center; background: var(--paper); border-radius: 6px; padding: 0.25rem; }
.foot-mark img { height: 2rem; width: auto; }
.foot-col h4 { font-size: 0.75rem; letter-spacing: 0.16em; font-family: var(--font-sans); font-weight: 600; color: rgb(251 249 244 / 0.5); margin: 0; }
.foot-col ul { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.foot-col li { margin: 0.4rem 0; font-size: 0.875rem; }
.foot-col a:hover { color: var(--water); }
.legal { border-top: 1px solid rgb(251 249 244 / 0.1); }
.legal-inner { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.25rem 0; font-size: 0.75rem; color: rgb(251 249 244 / 0.5); }
@media (min-width: 640px) { .legal-inner { flex-direction: row; justify-content: space-between; } }

.float-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  border-top: 1px solid var(--line); background: rgb(251 249 244 / 0.95);
  padding: 0.75rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  backdrop-filter: blur(12px);
}
@media (min-width: 640px) { .float-bar { display: none; } }
.float-bar .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.btn-navy { background: var(--navy); color: var(--paper); }

.icon { width: 1.25rem; height: 1.25rem; fill: currentColor; flex-shrink: 0; }
.icon-stroke { width: 1.25rem; height: 1.25rem; stroke: currentColor; fill: none; flex-shrink: 0; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
