/* Page-owned styles for PokéStopy i Gimy */
#pokestopy-main {
  --page-section-gap: var(--space-96);
  --page-section-gap-mobile: var(--space-64);
  --page-card-gap: var(--space-24);
  --page-card-gap-mobile: var(--space-16);
  --page-copy-max: 68ch;
  --page-copy-max-narrow: 65ch;
  --page-copy-max-center: 60ch;
  --page-copy-max-wide: 70ch;
  --page-hero-overlay: linear-gradient(90deg, rgba(43, 43, 43, 0.75) 0%, rgba(43, 43, 43, 0.45) 55%, rgba(43, 43, 43, 0.15) 100%);
  --page-map-line: rgba(43, 43, 43, 0.05);
}

/* Hero */
.pokestopy-hero {
  position: relative;
  background-image: url("/public/media/pokestop-outdoor-adventure.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 560px;
  display: flex;
  align-items: center;
  padding-block: var(--space-96) var(--space-64);
  isolation: isolate;
}

.pokestopy-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--page-hero-overlay);
  z-index: -1;
}

.pokestopy-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 39px, var(--page-map-line) 39px, var(--page-map-line) 40px), repeating-linear-gradient(90deg, transparent, transparent 39px, var(--page-map-line) 39px, var(--page-map-line) 40px);
  z-index: -1;
  pointer-events: none;
}

.pokestopy-hero__inner {
  width: 100%;
}

.pokestopy-hero__content {
  width: 60%;
  max-width: 720px;
  color: var(--warm-white);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-24);
}

.pokestopy-hero__content h1 {
  color: var(--warm-white);
  font-size: clamp(var(--text-h1-mobile), 5vw + 1rem, var(--text-display-desktop));
  line-height: 1.05;
  margin-block-end: 0;
}

.pokestopy-hero__content p {
  font-size: var(--text-body-large);
  line-height: 1.6;
  color: rgba(251, 249, 244, 0.92);
  max-width: var(--page-copy-max);
  margin-block-end: 0;
}

.pokestopy-hero__list {
  list-style: none;
  padding-inline-start: 0;
  margin-block-end: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.pokestopy-hero__list li {
  position: relative;
  padding-inline-start: var(--space-24);
  color: rgba(251, 249, 244, 0.9);
  font-size: var(--text-body);
}

.pokestopy-hero__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--sky-blue);
}

.pokestopy-hero__cta {
  margin-block-start: var(--space-8);
}

/* Shared section layout */
.pokestopy-section {
  padding-block: var(--page-section-gap);
}

.pokestopy-section__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-48);
  align-items: start;
}

.pokestopy-section__inner--narrow {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
  margin-inline: auto;
}

.pokestopy-section__inner--battle {
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: var(--space-32);
}

.pokestopy-section__inner--safety {
  grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  gap: var(--space-32);
}

.pokestopy-section__inner--etiquette {
  grid-template-columns: minmax(0, 1fr);
  max-width: 700px;
  margin-inline: auto;
  text-align: center;
}

.pokestopy-section__inner--summary {
  grid-template-columns: minmax(0, 1fr);
  max-width: 700px;
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.pokestopy-section__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.pokestopy-section__text h2,
.pokestopy-section__text h3,
.pokestopy-section__text p,
.pokestopy-section__text ul {
  max-width: var(--page-copy-max-narrow);
  margin-inline: 0;
}

.pokestopy-section__text h2 {
  margin-block-end: 0;
}

.pokestopy-section__text h3 {
  margin-block-end: 0;
}

.pokestopy-section__text p {
  margin-block-end: 0;
}

.pokestopy-section__text ul {
  margin-block-end: 0;
}

.pokestopy-section__media {
  min-width: 0;
  margin-block-end: 0;
}

.pokestopy-section__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast);
}

.pokestopy-section__media img:hover {
  transform: scale(1.02);
}

.pokestopy-section__media figcaption {
  margin-block-start: var(--space-8);
  text-align: left;
}

/* Lists */
.pokestopy-list {
  list-style: none;
  padding-inline-start: 0;
  margin-block-end: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.pokestopy-list li {
  position: relative;
  padding-inline-start: var(--space-32);
  color: var(--charcoal);
}

.pokestopy-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--grass-green);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pokestopy-list--items li::before {
  background-color: var(--sky-blue);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pokestopy-list--gym li::before {
  background-color: var(--poke-red);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pokestopy-list--safety li::before {
  background-color: var(--poke-red);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pokestopy-list--etiquette li::before {
  background-color: var(--grass-green);
}

/* Steps */
.pokestopy-steps {
  list-style: none;
  counter-reset: pokestop-step;
  padding-inline-start: 0;
  margin-block-end: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.pokestopy-steps li {
  counter-increment: pokestop-step;
  position: relative;
  padding-inline-start: var(--space-48);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.pokestopy-steps li::before {
  content: counter(pokestop-step);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--grass-green);
  color: var(--warm-white);
  font-family: var(--font-heading);
  font-size: var(--text-body);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Callouts */
.pokestopy-callout {
  padding: var(--space-16);
  border-radius: var(--radius-md);
  background-color: var(--mist-blue);
  border-inline-start: 4px solid var(--sky-blue);
  margin-block-end: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.pokestopy-callout--green {
  background-color: var(--moss-light);
  border-inline-start-color: var(--grass-green);
}

.pokestopy-callout--blue {
  background-color: var(--mist-blue);
  border-inline-start-color: var(--sky-blue);
}

.pokestopy-callout h4 {
  margin-block-end: 0;
}

.pokestopy-callout p {
  margin-block-end: 0;
}

.pokestopy-warning {
  padding: var(--space-16);
  border-radius: var(--radius-md);
  background-color: #FDECEA;
  border-inline-start: 4px solid var(--poke-red);
  margin-block-end: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.pokestopy-warning h4 {
  margin-block-end: 0;
  color: var(--poke-red);
}

.pokestopy-warning p {
  margin-block-end: 0;
}

/* Battle section */
.pokestopy-battle__steps {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.pokestopy-battle__steps h2,
.pokestopy-battle__steps h3,
.pokestopy-battle__steps ol {
  max-width: var(--page-copy-max-wide);
  margin-inline: 0;
}

.pokestopy-battle__steps h2,
.pokestopy-battle__steps h3 {
  margin-block-end: 0;
}

.pokestopy-battle__steps ol {
  margin-block-end: 0;
}

/* Safety section */
.pokestopy-safety__tips {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.pokestopy-safety__tips h2,
.pokestopy-safety__tips h3,
.pokestopy-safety__tips ul {
  max-width: var(--page-copy-max-narrow);
  margin-inline: 0;
}

.pokestopy-safety__tips h2,
.pokestopy-safety__tips h3 {
  margin-block-end: 0;
}

.pokestopy-safety__tips ul {
  margin-block-end: 0;
}

/* Etiquette section */
.pokestopy-section__inner--etiquette h2,
.pokestopy-section__inner--etiquette h3,
.pokestopy-section__inner--etiquette p,
.pokestopy-section__inner--etiquette ul {
  max-width: var(--page-copy-max-wide);
  margin-inline: auto;
}

.pokestopy-section__inner--etiquette h2,
.pokestopy-section__inner--etiquette h3,
.pokestopy-section__inner--etiquette p {
  margin-block-end: 0;
}

.pokestopy-section__inner--etiquette ul {
  margin-block-end: 0;
  text-align: left;
}

/* Summary section */
.pokestopy-section__inner--summary h2,
.pokestopy-section__inner--summary p {
  max-width: var(--page-copy-max-center);
  margin-inline: auto;
}

.pokestopy-section__inner--summary h2 {
  margin-block-end: 0;
}

.pokestopy-section__inner--summary p {
  margin-block-end: 0;
}

.pokestopy-summary__cta {
  margin-block-start: var(--space-8);
}

/* Scroll animation */
.pokestopy-fade-up {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 250ms ease-out, transform 250ms ease-out;
}

.pokestopy-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .pokestopy-fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Tablet */
@media (max-width: 1023px) {
  .pokestopy-hero {
    min-height: 480px;
    padding-block: var(--space-64) var(--space-48);
  }

  .pokestopy-hero__content {
    width: 75%;
  }

  .pokestopy-section {
    padding-block: var(--page-section-gap-mobile);
  }

  .pokestopy-section__inner {
    gap: var(--space-32);
  }

  .pokestopy-section__inner--battle,
  .pokestopy-section__inner--safety {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-24);
  }

  .pokestopy-battle__steps h2,
  .pokestopy-battle__steps h3,
  .pokestopy-battle__steps ol,
  .pokestopy-safety__tips h2,
  .pokestopy-safety__tips h3,
  .pokestopy-safety__tips ul {
    max-width: var(--page-copy-max-wide);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .pokestopy-hero {
    min-height: 0;
    padding-block: var(--space-64) var(--space-48);
    background-position: 65% center;
  }

  .pokestopy-hero::before {
    background-image: linear-gradient(180deg, rgba(43, 43, 43, 0.8) 0%, rgba(43, 43, 43, 0.55) 100%);
  }

  .pokestopy-hero__content {
    width: 100%;
    max-width: 100%;
    gap: var(--space-16);
  }

  .pokestopy-hero__content h1 {
    font-size: var(--text-h1-mobile);
    line-height: 1.15;
  }

  .pokestopy-hero__content p {
    font-size: var(--text-body);
  }

  .pokestopy-hero__cta {
    width: 100%;
  }

  .pokestopy-section {
    padding-block: var(--space-48);
  }

  .pokestopy-section__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--page-card-gap-mobile);
  }

  .pokestopy-section__inner--narrow,
  .pokestopy-section__inner--etiquette,
  .pokestopy-section__inner--summary {
    max-width: 100%;
  }

  .pokestopy-section__text h2,
  .pokestopy-section__text h3,
  .pokestopy-section__text p,
  .pokestopy-section__text ul,
  .pokestopy-battle__steps h2,
  .pokestopy-battle__steps h3,
  .pokestopy-battle__steps ol,
  .pokestopy-safety__tips h2,
  .pokestopy-safety__tips h3,
  .pokestopy-safety__tips ul,
  .pokestopy-section__inner--etiquette h2,
  .pokestopy-section__inner--etiquette h3,
  .pokestopy-section__inner--etiquette p,
  .pokestopy-section__inner--etiquette ul,
  .pokestopy-section__inner--summary h2,
  .pokestopy-section__inner--summary p {
    max-width: 100%;
  }

  .pokestopy-section__media {
    order: -1;
  }

  .pokestopy-section__media img {
    aspect-ratio: 16 / 9;
  }

  .pokestopy-steps li {
    padding-inline-start: var(--space-48);
  }

  .pokestopy-summary__cta {
    width: 100%;
  }
}

@media (max-width: 479px) {
  .pokestopy-hero {
    padding-block: var(--space-48) var(--space-32);
  }

  .pokestopy-hero__content h1 {
    font-size: 32px;
  }

  .pokestopy-section {
    padding-block: var(--space-32);
  }

  .pokestopy-section__inner {
    gap: var(--space-16);
  }
}
