/*
 * PhoneStamp sites, the classic design of markup v1. It loads after core.css, which holds the fonts, the design
 * properties' fallbacks and the mechanics of the menus, the lightbox, the app banner and the cookie banner; the
 * site's own CSS replaces this file, never the core. It is a reference an own design may take from, not a base
 * to undo.
 */

body.ps-body {
  background: var(--ps-surface);
  color: var(--ps-text);
  font-family: var(--ps-font-app, var(--ps-font-body));
  font-size: 1rem;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  color: var(--ps-heading);
  font-family: var(--ps-font-app-heading, var(--ps-font-app, var(--ps-font-heading)));
  font-weight: var(--ps-heading-weight);
  line-height: 1.3;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
  font-size: 1.5rem;
}

a {
  color: var(--ps-link);
}

a:hover {
  color: var(--ps-link-hover);
}

/* Header and menu */

.ps-header {
  position: relative;
  z-index: 3;
  background: var(--ps-header-surface);
  color: var(--ps-on-header);
}

/* On the home page the header lies over the hero */
.ps-body--home .ps-header {
  position: absolute;
  inset: 0 0 auto;
  background: transparent;
}

.ps-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ps-gap);
  max-width: var(--ps-width);
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

.ps-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--ps-font-app-heading, var(--ps-font-app, var(--ps-font-heading)));
  font-size: 1.25rem;
}

.ps-header__brand:hover {
  color: inherit;
}

.ps-header__icon {
  border-radius: var(--ps-radius);
}

.ps-nav__list {
  display: flex;
  gap: 1.5rem;
}

.ps-nav__link {
  color: color-mix(in srgb, var(--ps-on-header) 75%, transparent);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ps-nav__link:hover,
.ps-nav__link[aria-current="page"] {
  color: var(--ps-on-header);
}

.ps-nav__link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--ps-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}

.ps-nav__toggle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 40rem) {
  .ps-nav__list--mobile {
    flex-direction: column;
    gap: 1rem;
    min-width: 12rem;
    padding: 1.25rem;
  }
}

/* Language menu, after the main menu */

.ps-nav {
  margin-left: auto;
}

.ps-languages__toggle {
  color: color-mix(in srgb, var(--ps-on-header) 75%, transparent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ps-languages__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 8rem;
  padding: 1rem 1.25rem;
}

.ps-languages__link {
  color: color-mix(in srgb, var(--ps-on-header) 75%, transparent);
  text-decoration: none;
  font-size: 0.75rem;
}

.ps-languages__link[aria-current="true"],
.ps-languages__link:hover {
  color: var(--ps-on-header);
}

/* App banner on phones; the core places it at the bottom of the screen and hides it on wide screens */

@media (max-width: 40rem) {
  .ps-app-banner__icon {
    border-radius: var(--ps-radius);
  }

  .ps-app-banner__name {
    flex: 1;
    font-weight: 700;
  }

  .ps-app-banner__link {
    color: var(--ps-link);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
}

.ps-open-in-app {
  margin-top: 2rem;
}

/* Content */

.ps-main {
  flex: 1;
  width: 100%;
  max-width: var(--ps-width);
  margin: 0 auto;
  padding: 3rem 1rem;
}

.ps-body--home .ps-main {
  max-width: none;
  padding: 0;
}

/* Hero: the site's image under a dark overlay, filling the screen, or the hero's surface without one */

.ps-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ps-hero-surface);
  color: var(--ps-on-hero);
  text-align: center;
}

.ps-hero__image {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ps-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(0 0 0 / 0.5);
}

/* The overlay darkens only an image */
.ps-hero:not(:has(.ps-hero__image))::after {
  content: none;
}

/* Parallax: the image moves at half the scroll speed, only where the browser can tie it to scrolling */
@keyframes ps-parallax {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(50%);
  }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .ps-hero__image {
      animation: ps-parallax linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 100vh;
    }
  }
}

.ps-hero__content {
  position: relative;
  max-width: 48rem;
  padding: 6rem 1rem 4rem;
}

.ps-hero__pretitle {
  margin: 0;
  color: color-mix(in srgb, var(--ps-on-hero) 75%, transparent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ps-hero__title {
  margin: 1rem 0 1.5rem;
  color: var(--ps-on-hero);
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.2;
}

.ps-hero__subtitle {
  margin: 0;
  color: color-mix(in srgb, var(--ps-on-hero) 75%, transparent);
}

.ps-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.ps-home__blocks {
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 1rem;
}

/* The app's recommendations under the home page's blocks, in a grid sized like the app's items */

.ps-home__recommendations {
  display: grid;
  gap: 3rem;
  max-width: var(--ps-width);
  margin: 0 auto;
  padding: 4rem 1rem;
}

.ps-recommendation__title {
  margin: 0 0 1.5rem;
}

.ps-recommendation__items {
  --ps-recommendation-item: 16rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--ps-recommendation-item), 100%), 1fr));
  gap: var(--ps-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

[data-ps-size="small"] .ps-recommendation__items {
  --ps-recommendation-item: 12rem;
}

[data-ps-size="large"] .ps-recommendation__items {
  --ps-recommendation-item: 22rem;
}

.ps-recommendation__more {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 700;
}

/* Lists */

.ps-list__title {
  margin-top: 0;
}

.ps-list__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--ps-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ps-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
}

.ps-card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.ps-card__link:hover {
  color: inherit;
}

.ps-card__link:hover .ps-card__title {
  color: var(--ps-link);
}

.ps-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ps-card__title,
.ps-card__meta {
  margin: 1rem 1.25rem;
}

.ps-card__title {
  font-size: 1.375rem;
}

.ps-card__meta {
  font-size: 0.875rem;
}

[data-cancelled] .ps-event__start,
.ps-card__status {
  text-decoration: line-through;
}

.ps-card__status {
  text-decoration: none;
  font-weight: 700;
}

/* Detail pages */

.ps-place,
.ps-event,
.ps-route,
.ps-page,
.ps-information {
  display: grid;
  gap: var(--ps-gap);
  max-width: 48rem;
}

.ps-place > *,
.ps-event > *,
.ps-route > *,
.ps-page > *,
.ps-information > * {
  margin: 0;
}

.ps-place__title,
.ps-event__title,
.ps-route__title,
.ps-information__title {
  margin: 0;
}

.ps-event__when,
.ps-event__status,
.ps-route__facts {
  margin: 0.5rem 0 0;
  font-family: var(--ps-font-app-heading, var(--ps-font-app, var(--ps-font-heading)));
}

.ps-event__status {
  font-weight: 700;
}

.ps-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.ps-gallery__item {
  flex: 0 0 min(80%, 24rem);
  scroll-snap-align: start;
}

.ps-gallery__image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--ps-radius);
}

.ps-place__details,
.ps-content__details {
  display: grid;
  gap: 0.5rem;
}

/* The app's contents on the information page, each a block of its own like on the app's information screen */

.ps-information__contents {
  display: grid;
  gap: calc(var(--ps-gap) * 2);
}

.ps-content {
  display: grid;
  gap: var(--ps-gap);
}

.ps-content > *,
.ps-content__description > :last-child {
  margin: 0;
}

.ps-links {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ps-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
  font-style: normal;
}

.ps-address__street::after {
  content: ",";
}

.ps-contact {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ps-contact__item,
.ps-event__place {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ps-icon {
  flex: none;
}

/* Opening hours: the day as a small label, the hours in the heading font */

.ps-hours__title,
.ps-hours__period-title {
  margin: 0 0 1rem;
}

.ps-hours__period-title {
  font-size: 1.125rem;
}

.ps-hours__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: baseline;
  gap: 0.25rem 2rem;
  margin: 0;
}

.ps-hours__day {
  grid-column: 1;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ps-hours__time {
  grid-column: 2;
  margin: 0;
  font-family: var(--ps-font-app-heading, var(--ps-font-app, var(--ps-font-heading)));
}

.ps-hours__period + .ps-hours__period {
  margin-top: var(--ps-gap);
}

.ps-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ps-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--ps-primary);
  border-radius: var(--ps-radius);
  background: var(--ps-primary);
  color: var(--ps-on-primary);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ps-button:hover {
  border-color: var(--ps-secondary);
  background: var(--ps-secondary);
  color: var(--ps-on-secondary);
}

.ps-route__map,
.ps-page__cover,
.ps-information__cover,
.ps-block__image {
  display: block;
  width: 100%;
  border-radius: var(--ps-radius);
}

.ps-route__facts {
  display: flex;
  gap: 1rem;
}

.ps-route__places {
  margin: 0;
  padding-left: 1.25rem;
}

.ps-block {
  margin: 0 0 1.5rem;
}

.ps-block--image {
  margin-inline: 0;
}

/* A page's header blocks render one level below its title; each keeps the size of its own level */
.ps-page__blocks .ps-block--h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.ps-page__blocks .ps-block--h2 {
  font-size: 1.5rem;
}

.ps-page__blocks .ps-block--h3 {
  font-size: 1.17rem;
}

.ps-out-of-service {
  padding: 4rem 0;
  text-align: center;
}

/* Footer */

.ps-footer {
  background: var(--ps-footer-surface);
  color: color-mix(in srgb, var(--ps-on-footer) 75%, transparent);
}

.ps-footer a {
  color: inherit;
}

.ps-footer a:hover {
  color: var(--ps-on-footer);
}

.ps-footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem var(--ps-gap);
  max-width: var(--ps-width);
  margin: 0 auto;
  padding: 4rem 1rem 3rem;
}

/* The social links as icons only; their names are in the links' labels */
.ps-social {
  grid-column: 1 / -1;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ps-social__link {
  display: inline-flex;
}

.ps-social__link .ps-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.ps-footer__legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ps-footer__copyright {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
}

.ps-footer__copyright::before {
  content: "";
  width: 2rem;
  border-top: 2px solid var(--ps-on-footer);
}

/* Cookie banner: the core places it and keeps it usable; the classic design gives its buttons the look of the site's */

.ps-cookie__accept,
.ps-cookie__reject,
.ps-cookie__settings,
.ps-cookie__open {
  border-color: var(--ps-primary);
  color: var(--ps-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ps-cookie__accept {
  color: var(--ps-on-primary);
}

.ps-cookie__settings {
  border-color: transparent;
}

.ps-cookie__open {
  border-color: var(--ps-border);
}
