/* ===== Fuentes ===== */
@font-face {
  font-family: 'CreatoDisplay';
  src: url('../Fonts/CreatoDisplay-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CreatoDisplay';
  src: url('../Fonts/CreatoDisplay-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CreatoDisplay';
  src: url('../Fonts/CreatoDisplay-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CreatoDisplay';
  src: url('../Fonts/CreatoDisplay-ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bluesty';
  src: url('../Fonts/Bluesty.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TheSeasons';
  src: url('../Fonts/the-seasons.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== Variables ===== */
:root {
  --navy-text: #1a1a39;
  --teal: #12ded1;
  --marble-bg: #f1efe9;
  --border-grey: #bab4a8;
  --placeholder-grey: #948e82;
  --content-width: 640px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'CreatoDisplay', sans-serif;
  background: var(--marble-bg);
  color: var(--navy-text);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.page {
  position: relative;
  overflow: hidden;
}

.content-col {
  position: relative;
  max-width: var(--content-width);
  margin: 0 auto;
  padding-top: clamp(34px, 5.5vw, 62px);
}

/* ===== Ola superior ===== */
.top-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(26px, 2.4vw, 44px);
  object-fit: cover;
  object-position: center bottom;
  z-index: 3;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 55vw;
  max-height: 980px;
  min-height: 320px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 46%;
  background: linear-gradient(to bottom,
    rgba(4, 14, 28, 0.95) 0%,
    rgba(4, 14, 28, 0.88) 32%,
    rgba(4, 14, 28, 0.55) 62%,
    rgba(4, 14, 28, 0.18) 85%,
    rgba(4, 14, 28, 0) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.03) 12%,
    rgba(255, 255, 255, 0.1) 24%,
    rgba(255, 255, 255, 0.25) 36%,
    rgba(255, 255, 255, 0.48) 50%,
    rgba(255, 255, 255, 0.75) 62%,
    #fff 78%,
    #fff 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(1.12) contrast(1.06) brightness(1.02);
  animation: heroKenBurns 14s ease-out forwards;
  will-change: transform;
}

@keyframes heroKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-text {
  position: absolute;
  top: 9%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1100px;
  padding: 0 5%;
  text-align: center;
  color: #fff;
  z-index: 2;
}

.hero-heading {
  margin: 0;
  font-weight: normal;
  font-size: inherit;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-text .lead,
.hero-text .headline,
.hero-text .sub-band {
  opacity: 0;
  animation: heroReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-text .lead { animation-delay: 0.2s; }
.hero-text .headline { animation-delay: 0.45s; }
.hero-text .sub-band { animation-delay: 0.7s; }

@media (prefers-reduced-motion: reduce) {
  .hero-img,
  .hero-text .lead,
  .hero-text .headline,
  .hero-text .sub-band {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero-text .lead {
  display: block;
  font-size: clamp(22px, 4.6vw, 32px);
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 2px;
}

.hero-text .lead strong {
  display: inline-block;
  font-size: clamp(30px, 6.6vw, 46px);
  margin-bottom: 2px;
}

.hero-text .lead strong,
.hero-text .sub-band strong {
  font-weight: 800;
}

.hero-text .headline {
  display: block;
  font-family: 'TheSeasons', serif;
  font-size: clamp(46px, 10.5vw, 72px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--teal);
  margin: 10px 0 16px;
  text-transform: uppercase;
}

.hero-text .sub-band {
  display: block;
  width: 130%;
  margin-left: -15%;
  background: linear-gradient(to right, rgba(6, 34, 54, 0) 0%, rgba(6, 34, 54, 0.6) 18%, rgba(6, 34, 54, 0.6) 82%, rgba(6, 34, 54, 0) 100%);
  padding: 16px 6%;
  font-size: clamp(20px, 4.4vw, 28px);
  line-height: 1.45;
  font-weight: 400;
}

/* ===== Contenido sobre marmol ===== */
.marble-section {
  background: url('../imagenes/rooftop/fondo.jpg') top center / 100% auto no-repeat;
  background-color: var(--marble-bg);
  padding-bottom: 56px;
}

/* ===== Precios ===== */
.price-block {
  position: relative;
  text-align: center;
  padding-top: 44px;
}

.price-block + .price-block {
  padding-top: 26px;
}

.price-block--overlap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  padding-top: 0;
  z-index: 2;
}

.ribbon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92%;
  aspect-ratio: 1198 / 81;
  min-height: 40px;
  margin: 0 auto;
}

.ribbon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ribbon span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: clamp(15px, 3.4vw, 19px);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.price-line {
  margin: 16px 0 0;
  font-family: 'CreatoDisplay', sans-serif;
  font-size: clamp(30px, 7.6vw, 44px);
  font-weight: 700;
  color: var(--navy-text);
}

.price-line .cifra-num {
  font-family: 'CreatoDisplay', sans-serif;
  font-weight: 800;
}

.price-line .desde {
  font-family: 'Bluesty', cursive;
  font-weight: 400;
  font-size: 0.62em;
  margin-right: 6px;
  vertical-align: middle;
}

.price-line .cifra {
  font-weight: 800;
}

/* ===== Registro ===== */
.register-title {
  text-align: center;
  padding: 64px 6% 4px;
}

.register-title .flourish-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.register-title .flourish-row img {
  width: 22%;
  max-width: 110px;
}

.register-title h2 {
  margin: 0;
  font-family: 'TheSeasons', serif;
  font-size: clamp(38px, 10vw, 56px);
  font-weight: 400;
  color: var(--navy-text);
}

.register-title p {
  margin: 12px 0 0;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--navy-text);
}

/* ===== Formulario ===== */
.form-wrap {
  padding: 34px 7% 0;
}

form { margin: 0; }

.rf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  border: 1.4px solid var(--border-grey);
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.field.full { grid-column: 1 / -1; }

.field input,
.field select {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-family: 'CreatoDisplay', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-text);
}

.field input::placeholder { color: var(--placeholder-grey); }

.field .flag {
  font-size: 18px;
  line-height: 1;
  flex: none;
}

.field .caret {
  font-size: 9px;
  color: var(--placeholder-grey);
  flex: none;
}

.rf-code {
  flex: 0 0 84px;
  padding-right: 4px !important;
}

/* ===== Estado de error (validacion JS) ===== */
.field.rf-invalid {
  box-shadow: 0 0 0 2px #e0554f;
}

.field.rf-invalid input,
.field.rf-invalid select,
.field.rf-invalid textarea {
  color: #e0554f;
}

.field.rf-invalid input::placeholder,
.field.rf-invalid textarea::placeholder {
  color: #e0554f;
}

.consent-row.rf-invalid {
  animation: rf-shake 0.38s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.consent-row.rf-invalid input[type="checkbox"] {
  outline: 2px solid #e0554f;
  outline-offset: 2px;
}

@keyframes rf-shake {
  10%, 90%      { transform: translateX(-2px); }
  20%, 80%      { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60%      { transform: translateX(4px); }
}

textarea.field {
  border-radius: 26px;
  width: 100%;
  min-height: 140px;
  resize: vertical;
  align-items: flex-start;
  padding-top: 16px;
}

textarea.field::placeholder {
  font-family: 'CreatoDisplay', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--placeholder-grey);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--navy-text);
}

.consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--navy-text);
  flex: none;
}

.cf-turnstile { margin: 14px 0; }

.rf-form-error {
  display: none;
  margin: 10px 0 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(200, 40, 40, 0.08);
  color: #a32b2b;
  font-size: 13px;
}

.rf-form-error.visible { display: block; }

.rf-form-success {
  display: none;
  margin: 10px 0 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(18, 222, 209, 0.12);
  color: var(--navy-text);
  font-size: 13px;
  font-weight: 500;
}

.rf-form-success.visible { display: block; }

.submit-btn.is-loading { opacity: 0.65; cursor: wait; }

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 20px;
  margin: 22px 0 44px;
  border: 1.6px solid var(--navy-text);
  border-radius: 999px;
  background: transparent;
  color: var(--navy-text);
  font-family: 'TheSeasons', serif;
  font-size: clamp(20px, 4.6vw, 25px);
  font-weight: 400;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.submit-btn:hover {
  background: var(--navy-text);
  color: #fff;
}

.submit-btn .btn-icon {
  flex: none;
  width: auto;
  height: 24px;
}

/* ===== Ola inferior ===== */
.bottom-wave {
  width: 100%;
  display: block;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero::before { height: 66%; }
  .hero::after { height: 30%; }

  .hero-text { top: 7%; padding: 0 7%; }

  .hero-text .lead {
    font-size: 18px;
    line-height: 1.35;
  }

  .hero-text .lead strong {
    font-size: 24px;
  }

  .hero-text .headline {
    font-size: 42px;
    margin: 10px 0 14px;
  }

  .hero-text .sub-band {
    font-size: 17px;
    padding: 12px 6%;
  }
}

@media (max-width: 480px) {
  .hero { height: 110vw; min-height: 220px; }

  .hero::before { height: 72%; }
  .hero::after { height: 16%; }

  .hero-text {
    top: 8%;
    padding: 0 8%;
  }

  .hero-text .lead {
    font-size: 14px;
    line-height: 1.35;
    margin: 0;
  }

  .hero-text .lead strong {
    font-size: 18px;
    margin-bottom: 1px;
  }

  .hero-text .headline {
    font-size: 28px;
    letter-spacing: 0.01em;
    margin: 8px 0 10px;
  }

  .hero-text .sub-band {
    font-size: 13px;
    line-height: 1.4;
    padding: 9px 6%;
  }
}

@media (max-width: 480px) {
  .rf-row { grid-template-columns: 1fr; }

  .field input {
    font-size: 12px;
    letter-spacing: 0.02em;
  }
}
