/* Scoped motion and overlays for the independent Serranía Viva site. */
:root {
  --sv-exp-ink: #18342b;
  --sv-exp-green: #184b36;
  --sv-exp-paper: #faf7ee;
  --sv-exp-lime: #d3e9aa;
  --sv-exp-gold: #efbe72;
  --sv-exp-ease: cubic-bezier(.22, .75, .22, 1);
}

@keyframes sv-exp-lift {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sv-exp-ribbon {
  from { opacity: 0; transform: translate3d(14%, -12%, 0) rotate(-11deg); }
  to { opacity: .92; transform: translate3d(0, 0, 0) rotate(0); }
}

@keyframes sv-exp-notice-enter {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#sv-home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
}

#sv-home-hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
  inline-size: min(65%, 44rem);
  block-size: 125%;
  inset: -27% -12% auto auto;
  opacity: .92;
  background: repeating-radial-gradient(
    ellipse at 72% 28%, transparent 0 12px, rgb(93 125 75 / .12) 13px 14px, transparent 15px 28px
  );
  mask-image: linear-gradient(134deg, transparent, #000 41%, #000 76%, transparent);
  animation: sv-exp-ribbon .8s var(--sv-exp-ease) both;
}

#sv-home-hero .sv-title,
#sv-home-hero .sv-subtitle,
#sv-home-hero form {
  animation: sv-exp-lift .55s var(--sv-exp-ease) both;
}

#sv-home-hero .sv-subtitle { animation-delay: .05s; }
#sv-home-hero form { animation-delay: .11s; }

html[data-sv-notice="open"] { overflow: hidden; }

dialog.sv-notice {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  max-block-size: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: max(4.75rem, calc(env(safe-area-inset-top, 0px) + 3.75rem))
    clamp(1rem, 4.5vw, 4rem) max(2rem, env(safe-area-inset-bottom, 0px));
  border: none;
  color: var(--sv-exp-ink);
  background:
    radial-gradient(ellipse at 13% 12%, #567c48 0%, transparent 47%),
    radial-gradient(ellipse at 93% 95%, #39674a 0%, transparent 54%),
    #112e25;
  font-family: inherit;
}

.sv-notice[open] {
  display: grid;
  place-items: safe center;
}

.sv-notice::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: repeating-radial-gradient(
    ellipse at 91% 12%, transparent 0 16px, rgb(225 244 180 / .14) 17px 18px, transparent 19px 33px
  );
  mask-image: linear-gradient(211deg, #000 12%, transparent 62%);
}

.sv-notice__card {
  z-index: 1;
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr);
  inline-size: min(100%, 57rem);
  border: 1px solid rgb(255 255 255 / .52);
  border-radius: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--sv-exp-paper);
  box-shadow: 0 2rem 5rem rgb(8 20 13 / .38);
  overflow: hidden;
  animation: sv-exp-notice-enter .46s var(--sv-exp-ease) both;
}

.sv-notice__card:has(.sv-notice__media) {
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
}

.sv-notice__media {
  display: grid;
  place-items: center;
  min-inline-size: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #213d2d, #42664a);
}

.sv-notice__image {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  max-block-size: min(65svh, 36rem);
  object-fit: contain;
  animation: sv-exp-lift .5s .08s var(--sv-exp-ease) both;
}

.sv-notice__copy {
  position: relative;
  align-self: center;
  padding: clamp(1.6rem, 5.2vw, 4rem);
}

.sv-notice__eyebrow {
  margin: 0 0 .9rem;
  color: #27523b;
  font-size: .77rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.sv-notice__eyebrow::before {
  display: inline-block;
  inline-size: .6rem;
  block-size: .6rem;
  margin-inline-end: .5rem;
  border-radius: 50%;
  background: #ad6b2d;
  content: "";
}

.sv-notice__title {
  margin: 0 0 .95rem;
  color: var(--sv-exp-ink);
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  font-weight: 850;
  letter-spacing: -.055em;
  line-height: 1.02;
  text-wrap: balance;
}

.sv-notice__body {
  max-inline-size: 65ch;
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.sv-notice__link {
  color: #185232;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .17em;
  text-decoration-thickness: .11em;
}

.sv-notice__link:hover { color: #87501e; }

.sv-notice__close {
  position: fixed;
  z-index: 2;
  inset: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) auto auto;
  inline-size: 3rem;
  block-size: 3rem;
  border: 1px solid rgb(255 255 255 / .62);
  border-radius: 50%;
  background: #214a35;
  color: #fff;
  font: 500 2rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.sv-notice__close:hover { background: #376b4c; }

.sv-notice :focus-visible,
.sv-pwa :focus-visible,
.sv-analytics-consent :focus-visible,
.sv-analytics-settings:focus-visible {
  outline: 3px solid #c98d36;
  outline-offset: 3px;
}

.sv-pwa {
  position: fixed;
  z-index: 900;
  inset: auto max(1rem, env(safe-area-inset-right, 0px)) max(.85rem, env(safe-area-inset-bottom, 0px)) auto;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .65rem;
  inline-size: min(26rem, calc(100% - 1.55rem));
  padding: .65rem;
  border: 1px solid #d2e4cf;
  border-radius: 1.35rem;
  color: var(--sv-exp-ink);
  background: #f6faf3;
  box-shadow: 0 .7rem 2.35rem rgb(20 58 38 / .2);
  font: inherit;
  touch-action: pan-y;
  animation: sv-exp-notice-enter .32s var(--sv-exp-ease) both;
}

html[data-sv-notice="open"] .sv-pwa { visibility: hidden; }

.sv-pwa__icon { border-radius: .65rem; }
.sv-pwa__copy { min-inline-size: 0; }
.sv-pwa__title,
.sv-pwa__hint { display: block; }
.sv-pwa__title { font-size: .92rem; line-height: 1.15; }
.sv-pwa__hint { margin-top: .15rem; color: #4b6157; font-size: .75rem; line-height: 1.25; }

.sv-pwa__install,
.sv-pwa__close {
  min-block-size: 2.75rem;
  border: 0;
  border-radius: .9rem;
  font: inherit;
  cursor: pointer;
}

.sv-pwa__install {
  padding-inline: .85rem;
  background: var(--sv-exp-green);
  color: #fff;
  font-size: .85rem;
  font-weight: 750;
}

.sv-pwa__install:hover { background: #2e6548; }
.sv-pwa__install:disabled { opacity: .6; cursor: progress; }
.sv-pwa__close { min-inline-size: 2.75rem; background: #e9f1e6; color: var(--sv-exp-ink); font-size: 1.3rem; }
.sv-pwa__close:hover { background: #dbe8d8; }
.sv-pwa__instructions { grid-column: 1 / -1; margin: 0; padding: .15rem .35rem .2rem; font-size: .87rem; line-height: 1.5; }

.sv-analytics-consent {
  position: fixed;
  z-index: 905;
  inset: auto auto max(.85rem, env(safe-area-inset-bottom, 0px)) max(.8rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  inline-size: min(27rem, calc(100% - 1.6rem));
  padding: 1.1rem;
  border: 1px solid #d4e4d3;
  border-radius: 1rem;
  color: var(--sv-exp-ink);
  background: #f6faf3;
  box-shadow: 0 .7rem 2.35rem rgb(20 58 38 / .2);
}

.sv-analytics-consent h2 { margin: 0 0 .35rem; font-size: 1.1rem; }
.sv-analytics-consent p { margin: 0 0 .8rem; font-size: .9rem; line-height: 1.4; }
.sv-analytics-consent__buttons { display: flex; flex-wrap: wrap; gap: .55rem; }

.sv-analytics-consent__choice {
  min-block-size: 2.75rem;
  padding: .5rem 1rem;
  border: 1px solid var(--sv-exp-green);
  border-radius: .65rem;
  background: #fff;
  color: var(--sv-exp-green);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.sv-analytics-consent__choice:hover { background: #e5efdf; }

.sv-analytics-settings {
  border: 0;
  padding: .6rem .75rem;
  color: inherit;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: .18em;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 640px) {
  .sv-notice__card:has(.sv-notice__media) { grid-template-columns: minmax(0, 1fr); }
  .sv-notice__image { max-block-size: min(45svh, 24rem); }
  .sv-pwa { inset-inline-end: max(.75rem, env(safe-area-inset-right, 0px)); gap: .45rem; }
  .sv-pwa__install { padding-inline: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  #sv-home-hero::after,
  #sv-home-hero .sv-title,
  #sv-home-hero .sv-subtitle,
  #sv-home-hero form,
  .sv-notice__card,
  .sv-notice__image,
  .sv-pwa { animation: none; }
}

dialog.sv-notice {
  --sv-notice-prime: #1d5b3a;
  --sv-notice-tail: #3a2564;
  --sv-notice-glow: #4b8d67;
  background: radial-gradient(ellipse at 16% 12%, var(--sv-notice-glow), transparent 55%),
    linear-gradient(149deg, var(--sv-notice-prime), var(--sv-notice-tail));
}
dialog.sv-notice .sv-notice__card {border-radius:clamp(17px,4vw,38px)}
.sv-notice__continue {
  margin-top:1.25rem; min-height:44px; padding:.65rem 1.15rem; border:0; border-radius:999px;
  background:linear-gradient(124deg,var(--sv-notice-prime),var(--sv-notice-tail));
  color:#fff; font:700 .94rem/1.25 system-ui,sans-serif; cursor:pointer;
}
.sv-notice__continue:hover { box-shadow:0 6px 16px #171a2430 }
.sv-notice__close { background:var(--sv-notice-tail) }
