/* Cerrajero Jávea — estilos críticos + layout */
:root {
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --yellow: #facc15;
  --yellow-hover: #eab308;
  --wa: #16a34a;
  --wa-hover: #15803d;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  --font: "Outfit", system-ui, sans-serif;
  --font-brand: "Syne", "Outfit", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--slate-800);
  background: var(--slate-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--slate-200);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.88;
}

.brand__logo {
  width: auto;
  height: 2.75rem;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.brand__text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand__name {
  color: var(--slate-900);
  text-transform: uppercase;
}

.brand__tld {
  color: #d4a017;
  font-weight: 700;
  font-size: 1em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .brand__text {
    font-size: 1.35rem;
  }
  .brand__logo {
    height: 2.35rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 10px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--wa {
  background: var(--wa);
  color: var(--white);
  padding: 0.55rem 0.9rem;
  font-size: 0.875rem;
}

.btn--wa:hover {
  background: var(--wa-hover);
}

.btn--call {
  background: var(--blue-600);
  color: var(--white);
  padding: 0.55rem 0.9rem;
  font-size: 0.875rem;
}

.btn--call:hover {
  background: var(--blue-700);
}

.btn--cta {
  background: var(--yellow);
  color: var(--blue-900);
  padding: 0.95rem 1.6rem;
  font-size: 1.05rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(250, 204, 21, 0.35);
}

.btn--cta:hover {
  background: var(--yellow-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(82vh, 720px);
  display: grid;
  place-items: center;
  color: var(--white);
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1f4d 0%, #1e3a8a 45%, #0f172a 100%);
}

.hero picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.62) 55%, rgba(15, 23, 42, 0.78) 100%),
    radial-gradient(ellipse at 50% 40%, rgba(15, 23, 42, 0.15), transparent 55%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 1rem 5rem;
  max-width: 820px;
  will-change: opacity, transform;
  contain: layout style;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #bfdbfe;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero__lead {
  margin: 0 0 1.5rem;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 500;
  color: #e2e8f0;
}

.hero__phone {
  margin: 1rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.hero__phone a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.section--dark,
.cta-band,
.faq,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 600px;
}

/* Services CTA */
.services-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.services-cta .btn {
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--white);
}

.section--dark {
  background: var(--blue-900);
  color: var(--white);
}

.section__title {
  margin: 0 0 0.5rem;
  text-align: center;
  color: var(--blue-900);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.section--dark .section__title {
  color: var(--white);
}

.section__sub {
  margin: 0 auto 2.5rem;
  text-align: center;
  max-width: 40rem;
  color: var(--slate-600);
}

.section--dark .section__sub {
  color: #cbd5e1;
}

/* Services */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--services {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: #bfdbfe;
}

.card__icon {
  font-size: 1.6rem;
  margin-bottom: 0.65rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  color: var(--blue-900);
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.95rem;
}

/* Locations */
.grid--locations {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.loc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.loc:hover {
  border-color: var(--blue-600);
  transform: translateY(-2px);
}

.loc__pin {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.loc strong {
  color: var(--slate-800);
  font-size: 0.95rem;
}

.loc span {
  color: var(--slate-500);
  font-size: 0.75rem;
}

/* Content / SEO body */
.prose {
  max-width: 48rem;
  margin: 0 auto;
  color: var(--slate-700);
}

.prose p {
  margin: 0 0 1rem;
}

.prose strong {
  color: var(--slate-900);
}

.prose-wrap {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .prose-wrap {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.checklist {
  display: grid;
  gap: 0.75rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.checklist li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 600;
  color: var(--slate-800);
}

.checklist li::before {
  content: "✓";
  color: var(--blue-600);
  font-weight: 800;
}

/* Testimonials */
.grid--reviews {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.review {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.review__stars {
  color: #fbbf24;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.review p {
  margin: 0 0 1rem;
  color: #e2e8f0;
  font-style: italic;
}

.review__meta strong {
  display: block;
  color: var(--white);
}

.review__meta span {
  color: #94a3b8;
  font-size: 0.85rem;
}

/* FAQ */
.faq {
  max-width: 44rem;
  margin: 0 auto;
}

.faq details {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue-900);
}

.faq details p {
  margin: 0.75rem 0 0;
  color: var(--slate-600);
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 3.5rem 0;
  background: linear-gradient(135deg, #0ea5e9, #2563eb 55%, #1e3a8a);
  color: var(--white);
}

.cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-band p {
  margin: 0 0 1.25rem;
  opacity: 0.92;
}

/* Footer */
.footer {
  background: var(--slate-900);
  color: #cbd5e1;
  padding: 3.5rem 0 6.5rem;
}

@media (min-width: 768px) {
  .footer {
    padding-bottom: 3rem;
  }
}

.footer__top {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 900px) {
  .footer__top {
    grid-template-columns: 1.1fr 1.6fr;
    gap: 3rem;
    align-items: start;
  }
}

.footer__logo {
  display: inline-block;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.footer__tagline {
  margin: 0.85rem 0 1.1rem;
  max-width: 28rem;
  line-height: 1.55;
  color: #94a3b8;
  font-size: 0.95rem;
}

.footer__phone {
  display: inline-block;
  font-size: 1.45rem;
  font-weight: 800;
  color: #60a5fa;
  margin-bottom: 1rem;
}

.footer__phone:hover {
  color: #93c5fd;
  text-decoration: none;
}

.footer__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer__cols {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.footer__title {
  margin: 0 0 0.9rem;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer__list {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.footer__list--zones {
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.85rem;
}

.footer__list a {
  color: #cbd5e1;
}

.footer__list a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.footer__bottom p {
  margin: 0;
}

/* Sticky mobile call bar */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(8px);
}

.mobile-bar .btn {
  width: 100%;
  padding: 0.85rem;
  border-radius: 10px;
}

@media (min-width: 768px) {
  .mobile-bar {
    display: none;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.breadcrumbs a:hover {
  color: var(--blue-600);
  text-decoration: underline;
}

.breadcrumbs span {
  color: var(--slate-700);
}

/* Skip link a11y */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue-900);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .card,
  .loc {
    transition: none;
  }
}
