/* Base */
:root {
  color-scheme: light;
  --paper: #f3efe6;
  --paper-raised: #fbf8f2;
  --sand: #e7e1d4;
  --line: #d5cdbd;
  --ink: #172226;
  --ink-soft: #3a484e;
  --petrol: #0e3a45;
  --petrol-deep: #0a2c34;
  --copper: #c9843a;
  --copper-ink: #6d3d10;
  --whatsapp: #14653a;
  --danger: #7d2424;
  --danger-bg: #f8ecec;
  --ok-bg: #e7f2ea;
  --ok-ink: #123c26;
  --header-offset: 4.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img,
svg,
iframe,
video {
  max-width: 100%;
}

img {
  height: auto;
  display: block;
}

h1,
h2,
h3,
p,
li,
dd,
figcaption {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  line-height: 1.2;
  color: var(--petrol-deep);
}

h1 {
  font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.65rem);
  margin: 0 0 0.75rem;
  max-width: 18em;
}

h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.12rem;
  margin: 0 0 0.4rem;
}

p {
  margin: 0 0 0.9rem;
}

a {
  color: var(--petrol-deep);
}

a:visited {
  color: var(--petrol-deep);
}

a:hover {
  color: var(--copper-ink);
}

:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 3px;
}

.site-header :focus-visible,
.mobile-bar :focus-visible,
.section-petrol :focus-visible,
.site-footer :focus-visible {
  outline-color: #f0d8b8;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-140%);
  background: #fff;
  color: var(--ink);
  padding: 0.65rem 1rem;
  z-index: 80;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  transform: none;
  top: 0.5rem;
}

.wrap {
  width: min(1100px, 100%);
  margin-inline: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.rule {
  display: block;
  width: 2.75rem;
  height: 3px;
  background: var(--copper);
  margin: 0 0 0.55rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-weight: 700;
  color: var(--copper-ink);
}

.fine {
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* Encabezado */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--petrol);
  color: #f7f4ee;
  border-bottom: 4px solid var(--copper);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  min-height: 68px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  min-width: 0;
  margin-right: auto;
  padding: 0.2rem 0;
  color: #f7f4ee;
  text-decoration: none;
}

.brand:visited,
.brand:hover {
  color: #f7f4ee;
}

.brand img {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.brand-name {
  font-weight: 800;
  font-size: 1.12rem;
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.9rem;
  color: #f0d8b8;
  white-space: nowrap;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  margin-left: 0.25rem;
  padding: 0;
  border: 1px solid rgba(247, 244, 238, 0.45);
  background: transparent;
  color: #f7f4ee;
}

.nav-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.nav-menu {
  display: none;
  flex-basis: 100%;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  max-height: min(70dvh, 28rem);
  overflow: auto;
  padding: 0.25rem 0 0.6rem;
}

.nav-menu.is-open {
  display: flex;
}

.nav-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.35rem 0.7rem;
  color: #f7f4ee;
  text-decoration: none;
  font-weight: 600;
  border-radius: 2px;
}

.nav-menu a:visited {
  color: #f7f4ee;
}

.nav-menu a:hover {
  background: rgba(247, 244, 238, 0.08);
  color: #fff;
}

.nav-menu a[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--copper);
  font-weight: 800;
}

.header-actions {
  display: none;
}

.header-call,
.header-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid rgba(247, 244, 238, 0.5);
  color: #f7f4ee;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.header-call:visited,
.header-wa:visited,
.header-call:hover,
.header-wa:hover {
  color: #f7f4ee;
}

.header-wa {
  background: var(--whatsapp);
  border-color: var(--whatsapp);
}

/* Botones */
.actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.65rem 1rem;
  border: 2px solid transparent;
  border-radius: 2px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.btn-petrol,
.btn-petrol:visited {
  background: var(--petrol);
  color: #fff;
}

.btn-petrol:hover {
  background: var(--petrol-deep);
  color: #fff;
}

.btn-copper,
.btn-copper:visited {
  background: var(--copper);
  color: #1a1208;
  border-color: #a86a28;
}

.btn-copper:hover {
  background: #b86a28;
  color: #1a1208;
}

.btn-wa,
.btn-wa:visited {
  background: var(--whatsapp);
  color: #fff;
}

.btn-wa:hover {
  background: #0f4e2c;
  color: #fff;
}

.btn-ghost,
.btn-ghost:visited {
  background: transparent;
  color: #fff;
  border-color: #f7f4ee;
}

.btn-ghost:hover {
  background: #f7f4ee;
  color: var(--petrol);
}

.btn-line,
.btn-line:visited {
  background: transparent;
  color: var(--petrol);
  border-color: var(--petrol);
}

.btn-line:hover {
  background: var(--petrol);
  color: #fff;
}

/* Hero y secciones */
.hero {
  padding: 1.5rem 0 2rem;
}

.hero-grid,
.card-grid,
.fail-grid,
.steps,
.footer-grid,
.contact-layout,
.split {
  display: grid;
  gap: 1rem;
}

.hero-grid > *,
.card-grid > *,
.fail-grid > *,
.steps > *,
.footer-grid > *,
.contact-layout > *,
.split > * {
  min-width: 0;
}

.hero-art {
  background: var(--sand);
  border: 1px solid var(--line);
  padding: 0.4rem;
}

.hero-art img {
  width: 100%;
}

.ticket {
  background: #fffdf8;
  border: 1px dashed #a85f22;
  padding: 1rem;
  margin-top: 1rem;
}

.ticket .kicker {
  margin: 0;
  font-weight: 700;
  color: var(--copper-ink);
}

.price {
  margin: 0.25rem 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--petrol);
}

.section {
  padding: 2.1rem 0;
}

.section-sand {
  background: var(--sand);
}

.section-petrol {
  background: var(--petrol);
  color: #f7f4ee;
}

.section-petrol h2,
.section-petrol h3,
.section-petrol p,
.section-petrol li {
  color: #f7f4ee;
}

.section-petrol a {
  color: #fff;
}

.section-petrol a:hover {
  color: #f0d8b8;
}

.section-petrol a.btn-copper:hover {
  color: #1a1208;
}

.section-petrol a.btn-wa:hover,
.section-petrol a.btn-petrol:hover {
  color: #fff;
}

.section-petrol a.btn-ghost:hover {
  color: var(--petrol);
}

.page-intro {
  padding: 1.6rem 0 0.4rem;
}

.card,
.fail,
.step,
.panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-top: 4px solid var(--copper);
  padding: 1rem;
  min-width: 0;
}

.card p:last-child,
.fail p:last-child,
.step p:last-child,
.panel p:last-child {
  margin-bottom: 0;
}

.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.4rem;
  font-weight: 700;
}

.icon {
  width: 52px;
  height: 52px;
  margin-bottom: 0.6rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.55rem;
  background: var(--petrol);
  color: #fff;
  font-weight: 800;
}

.zones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.zones li {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  background: var(--paper-raised);
  border: 1px solid #c9c0af;
}

.reasons {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reasons li {
  position: relative;
  margin: 0.55rem 0;
  padding-left: 1.35rem;
}

.reasons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--copper);
}

.section-petrol .reasons li::before {
  background: #f0d8b8;
}

.notice {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  background: var(--paper-raised);
  border: 1px solid var(--petrol);
  border-left: 4px solid var(--copper);
}

.section-petrol .notice {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(247, 244, 238, 0.35);
  color: #f7f4ee;
}

.facts {
  margin: 0;
}

.facts div {
  margin: 0 0 0.95rem;
}

.facts dt {
  font-weight: 800;
  color: var(--petrol);
}

.facts dd {
  margin: 0.15rem 0 0;
}

.facts a {
  overflow-wrap: anywhere;
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin-top: 1.8rem;
}

.prose h3 {
  margin-top: 1.15rem;
}

.prose ul,
.prose ol {
  margin: 0.4rem 0 1rem;
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.35rem 0;
}

.prose a {
  text-underline-offset: 0.15em;
}

/* Contacto y formulario */
.contact-layout {
  grid-template-areas:
    "info"
    "map"
    "form";
}

.contact-info {
  grid-area: info;
}

.contact-map {
  grid-area: map;
}

.contact-form-wrap {
  grid-area: form;
}

.map-embed {
  max-width: 100%;
  background: var(--sand);
  border: 1px solid var(--line);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
}

.map-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.map-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

form {
  margin: 0;
  max-width: 100%;
}

.form-panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 1rem;
}

.field {
  margin: 0 0 1rem;
}

.field label,
.check span {
  font-weight: 700;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="tel"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #b7b0a2;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.field-help {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.field-error {
  margin: 0.35rem 0 0;
  color: var(--danger);
  font-weight: 700;
}

.is-invalid {
  border-color: var(--danger);
  box-shadow: inset 3px 0 0 var(--danger);
}

.check {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  margin: 0.25rem 0 0.75rem;
}

.check input {
  width: 44px;
  height: 44px;
  margin: 0;
  accent-color: var(--petrol);
}

.check a {
  font-weight: 800;
}

.form-errors {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-weight: 700;
}

.form-status {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--ok-bg);
  border: 1px solid var(--whatsapp);
  color: var(--ok-ink);
  font-weight: 600;
}

.form-status a {
  color: var(--ok-ink);
  font-weight: 800;
}

.form-submit {
  width: 100%;
}

[hidden] {
  display: none !important;
}

/* Pie */
.site-footer {
  background: var(--petrol-deep);
  color: #f7f4ee;
  border-top: 4px solid var(--copper);
  padding: 2rem 0 1.25rem;
}

.site-footer h2,
.site-footer p,
.site-footer address,
.site-footer li {
  color: #f7f4ee;
}

.footer-name {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.footer-label {
  margin: 0 0 0.2rem;
  font-weight: 800;
  color: #f0d8b8;
}

.site-footer address {
  font-style: normal;
}

.site-footer a {
  color: #fff;
  overflow-wrap: anywhere;
}

.site-footer a:visited,
.site-footer a:hover {
  color: #f0d8b8;
}

.footer-nav {
  margin-top: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(247, 244, 238, 0.2);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.footer-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-base {
  margin-top: 0.8rem;
  color: #f0d8b8;
}

/* Barra móvil */
.mobile-bar {
  display: none;
}

@media (max-width: 999px) {
  body {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }

  .mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
    background: var(--petrol-deep);
    border-top: 3px solid var(--copper);
  }

  .mobile-bar a {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-bar svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }

  .mobile-bar .call,
  .mobile-bar .call:visited {
    background: #f3efe6;
    color: var(--petrol);
  }

  .mobile-bar .wa,
  .mobile-bar .wa:visited,
  .mobile-bar .wa:hover {
    background: var(--whatsapp);
    color: #fff;
  }

  .mobile-bar .call:hover {
    color: var(--petrol);
    background: #fff;
  }
}

@media (min-width: 480px) {
  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .actions .btn {
    flex: 0 0 auto;
  }

  .form-submit {
    width: auto;
    min-width: 16rem;
  }
}

@media (min-width: 720px) {
  .section {
    padding: 3rem 0;
  }

  .card-grid.cols-2,
  .fail-grid,
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
  }

  .map-embed iframe {
    height: 340px;
  }
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu,
  .nav-menu.is-open {
    display: flex;
    flex-direction: row;
    flex-basis: auto;
    align-items: center;
    width: auto;
    max-height: none;
    overflow: visible;
    padding: 0;
    gap: 0.1rem;
  }

  .nav-menu a {
    min-height: 44px;
    padding: 0.25rem 0.55rem;
  }

  .nav-menu a[aria-current="page"] {
    box-shadow: inset 0 -3px 0 var(--copper);
  }

  .hero {
    padding: 2.4rem 0 2.8rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 1.75rem;
    align-items: center;
  }

  .contact-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    grid-template-areas:
      "info form"
      "map form";
    align-items: start;
    gap: 1.25rem 1.5rem;
  }
}

@media (min-width: 1000px) {
  .footer-grid {
    grid-template-columns: 1.15fr 1.15fr 0.9fr 1fr;
  }

  .header-actions {
    display: flex;
    gap: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-header,
  .mobile-bar,
  .nav-toggle,
  .actions,
  .header-actions {
    position: static;
  }

  .mobile-bar,
  .nav-toggle,
  .header-actions {
    display: none !important;
  }

  body {
    padding-bottom: 0;
    background: #fff;
  }

  .site-header,
  .site-footer,
  .section-petrol {
    background: #fff;
    color: #000;
  }
}

/* Aviso de cookies */
.cookie {
  background: var(--petrol-deep);
  color: #f7f4ee;
  padding: 0.6rem 0;
}

.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
}

.cookie p {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.98rem;
  color: #f7f4ee;
}

.cookie a,
.cookie a:visited {
  color: #f0d8b8;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

.cookie .btn {
  min-height: 44px;
  padding: 0.4rem 0.9rem;
}

.cookie :focus-visible {
  outline-color: #f0d8b8;
}

/* Botones del formulario */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .form-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.panel .reasons li:first-child {
  margin-top: 0.2rem;
}

code {
  font-size: 0.95em;
  overflow-wrap: anywhere;
}
