/* ==========================================================================
   Pages
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* Home                                                                    */
/* ---------------------------------------------------------------------- */

/* Hero */
.hero {
  /* Figma mobile: the hero uses the full 24.375rem frame (0.625rem inner padding, no side gutter) */
  width: min(var(--content-max), 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  text-align: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
  padding: 0.625rem;
}

.hero__title {
  max-width: 47.875rem;
}

.hero__picture {
  width: 100%;
  padding: 0.625rem;
}

.hero__picture img {
  width: min(54.5rem, 100%);
  margin-inline: auto;
}

@media (min-width: 900px) {
  .hero {
    gap: 3.125rem;
    padding-top: 3rem;
    padding-bottom: 4.5rem;
  }

  .hero__text {
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .hero__title,
  .js .hero__lead,
  .js .hero__picture {
    animation: hero-in 1100ms var(--ease-out) both;
  }

  .js .hero__lead {
    animation-delay: 150ms;
  }

  .js .hero__picture {
    animation: hero-picture-in 1400ms var(--ease-out) 300ms both;
  }
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
}

@keyframes hero-picture-in {
  from {
    opacity: 0;
    transform: translateY(3rem) scale(0.96);
  }
}

/* Hotels */
.hotels {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  padding-block: 1.125rem;
}

/* Hotel logos — mobile: 3 × 2 grid (Figma mobile, scales with the screen) */
.hotels__logos {
  --u: calc(100vw / 390);
  display: grid;
  grid-template-columns: repeat(3, calc(74 * var(--u)));
  justify-content: center;
  gap: calc(16 * var(--u)) calc(32 * var(--u));
  margin-block: 0;
  padding: calc(8 * var(--u)) 0 calc(12 * var(--u));
  list-style: none;
}

.hotels__logo img {
  width: 100%;
}

@media (max-width: 899.98px) {
  .hotels__logo--oetker { order: 1; }
  .hotels__logo--ritz-carlton { order: 2; }
  .hotels__logo--peninsula { order: 3; }
  .hotels__logo--shangri-la { order: 4; }
  .hotels__logo--intercontinental { order: 5; }
  .hotels__logo--park-hyatt { order: 6; }
  .hotels__logo--six-senses { display: none; }
}

/* Desktop: one row, Figma frame "Hotels" (516 wide) scaled to the strip width, edges faded to white */
@media (min-width: 900px) {
  .hotels__logos {
    --u: calc(min(100vw, 110rem) / 516);
    display: flex;
    justify-content: center;
    gap: calc(12 * var(--u));
    padding: calc(22 * var(--u)) 0;
    overflow: hidden;
    -webkit-mask: linear-gradient(to right, transparent 4.61%, #000 23.06%, #000 76.94%, transparent 95.39%) center / calc(516 * var(--u)) 100% no-repeat;
    mask: linear-gradient(to right, transparent 4.61%, #000 23.06%, #000 76.94%, transparent 95.39%) center / calc(516 * var(--u)) 100% no-repeat;
  }

  .hotels__logo {
    flex: none;
    width: calc(60 * var(--u));
  }
}

@media (min-width: 900px) {
  .hotels {
    gap: 2.75rem;
    padding: 2rem 1.75rem;
  }
}

/* Inside Concierge Organizer — one feature per screen */
.inside {
  padding-top: 2rem;
}

.inside .section-head .t-text {
  font-size: var(--fs-text);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* One feature per screen, kept compact: 75% of the screen, capped at 32.5rem mobile / 45rem desktop */
  min-height: min(75svh, var(--feature-max, 32.5rem));
  padding-block: 1.5rem;
}

.feature + .feature {
  margin-top: 3rem;
}

.inside .section-head + .feature {
  margin-top: 3rem;
}

.feature__picture {
  flex: 1 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.5625rem;
}

.feature__picture--end {
  align-items: flex-end;
  padding-bottom: 3rem;
}

.feature__picture img {
  height: auto;
}

/* Illustration widths: mobile frame → desktop frame */
.ill-customise { width: clamp(9.8125rem, 9.8125rem + 157 * (100vw - 24.375rem) / 910, 19.625rem); }
.ill-notifications { width: clamp(18.25rem, 18.25rem + 297 * (100vw - 24.375rem) / 910, 36.8125rem); }
.ill-receipt { width: clamp(14.8125rem, 14.8125rem + 179 * (100vw - 24.375rem) / 910, 26rem); }

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(46rem, 100%);
  aspect-ratio: 736 / 169;
  padding: 4.3% 6.5%;
  border-radius: 16rem;
  background: var(--black-3);
}

.pill img {
  width: 100%;
}

/* Desktop: tighter capsule than the Figma frame (the illustration already has ~1.375rem of inner margin) */
@media (min-width: 900px) {
  .pill {
    width: auto;
    aspect-ratio: auto;
    padding: 1.375rem 2.25rem;
  }

  .pill img {
    width: 40rem;
    max-width: 100%;
  }
}

.feature__text {
  flex: 1 0 0;
  padding-inline: 0.75rem;
  font-size: var(--fs-h4);
  color: var(--black-68);
  text-align: center;
}

@media (min-width: 900px) {
  /* Desktop: one feature per screen. Illustration and text form one block (3rem apart),
     centred in a screen-high section capped at 60rem, so a single feature is in view at a time. */
  .inside .section-head + .feature {
    margin-top: 0;
  }

  .feature {
    min-height: min(100svh - var(--header-h), 60rem);
    justify-content: center;
    gap: 3rem;
    padding-block: 3rem;
  }

  .feature + .feature {
    margin-top: 0;
  }

  .feature__picture,
  .feature__picture--end {
    flex: none;
    align-items: center;
    padding: 0 1.5625rem;
  }

  .feature__text {
    flex: none;
    padding-inline: 6rem;
  }
}

/* "See our features": ends the series, inside the last feature's screen */
.feature .cta {
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .feature .cta {
    margin-top: 0;
  }
}

.feature .reveal + .reveal,
.feature__text.reveal {
  --reveal-delay: 150ms;
}

/* Security */
.security {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-block: 2rem;
}

@media (min-width: 900px) {
  .security {
    gap: 5.875rem;
  }

  .security .section-head .t-h4 {
    max-width: 63rem;
    margin-inline: auto;
  }
}

.security .cta {
  margin-top: -1.5rem;
}

@media (min-width: 900px) {
  .security .cta {
    margin-top: 0;
  }
}

/* Integrations teaser */
.partners {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-block: 2rem;
}

.partners .cta {
  margin-top: -1.5rem;
}

@media (min-width: 900px) {
  .partners {
    gap: 3.875rem;
    padding-block: 6rem;
  }

  .partners .cta {
    margin-top: 0;
  }

  .partners .section-head .t-h4 {
    max-width: 63rem;
    margin-inline: auto;
  }
}

/* Final call to action */
.closing {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3rem 0 2rem;
}

@media (min-width: 900px) {
  .closing {
    gap: 4.0625rem;
    padding-block: 6rem;
  }

  .closing .section-head .t-h4 {
    max-width: 39.875rem;
    margin-inline: auto;
  }
}

/* ---------------------------------------------------------------------- */
/* Integrations                                                            */
/* ---------------------------------------------------------------------- */

/* Hero: on mobile the text keeps the 1.5rem gutter (unlike the Home hero) */
.hero--page .hero__text {
  padding-inline: 1.5rem;
}

/* Integrations hero: logo wall, columns drifting slowly up and down */
.ih {
  --w: clamp(15.5625rem, 15.5625rem + 363 * (100vw - 24.375rem) / 910, 38.25rem);
  --u: calc(var(--w) / 612);          /* 1 unit = 1px of the 612px Figma illustration */
  --tile: calc(87.5 * var(--u));
  --pitch: calc(106.5 * var(--u));    /* tile + vertical gap */
  --loop: calc(4 * var(--pitch));     /* height of one set of 4 logos */
  position: relative;
  display: flex;
  justify-content: space-between;
  width: var(--w);
  height: calc(380 * var(--u));      /* under one set of 4 logos (426), so a logo never shows twice at once */
  margin-inline: auto;
  overflow: hidden;
  /* Faded top and bottom, outer columns softened, as in the Figma illustration */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%), linear-gradient(to right, rgba(0,0,0,.3) 0, rgba(0,0,0,.3) 14%, #000 26%, #000 74%, rgba(0,0,0,.3) 86%, rgba(0,0,0,.3) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%), linear-gradient(to right, rgba(0,0,0,.3) 0, rgba(0,0,0,.3) 14%, #000 26%, #000 74%, rgba(0,0,0,.3) 86%, rgba(0,0,0,.3) 100%);
  mask-composite: intersect;
}

.ih__col {
  width: var(--tile);
  padding-top: calc(var(--offset) * var(--u));
}

.ih__track {
  display: flex;
  flex-direction: column;
  gap: calc(var(--pitch) - var(--tile));
}

.ih__track img {
  width: var(--tile);
  height: var(--tile);
  border-radius: calc(4 * var(--u));
  box-shadow: 0 calc(3 * var(--u)) calc(10 * var(--u)) rgba(12, 12, 13, 0.08);
}

.ih__col--down .ih__track {
  transform: translateY(calc(-1 * var(--loop)));
}

@media (prefers-reduced-motion: no-preference) {
  .ih__track {
    animation: ih-up 112s linear infinite;
    will-change: transform;
  }

  .ih__col--down .ih__track {
    animation-name: ih-down;
  }

  .ih:hover .ih__track {
    animation-play-state: paused;
  }
}

@keyframes ih-up {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-1 * var(--loop))); }
}

@keyframes ih-down {
  from { transform: translateY(calc(-1 * var(--loop))); }
  to { transform: translateY(0); }
}

@media (min-width: 900px) {
  .hero--page {
    padding-bottom: 3rem;
  }

  .hero--page .hero__text {
    padding-inline: 0.625rem;
  }
}

/* Integration sections */
.integrations {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-block: 2rem;
}

/* Mobile: one bordered accordion list (Figma "Accordeon") */
.integrations__list {
  margin-inline: 1rem;
  border: 0.4px solid var(--border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.integration + .integration {
  border-top: 0.4px solid var(--border-card);
}

.integration__head {
  margin: 0;
  font: inherit;
}

.integration__toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.375rem 0.75rem;
  text-align: left;
}

.integration__toggle img {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
}

.integration__name {
  flex: 1;
  font-weight: 600;
  font-size: var(--fs-h3);
  color: var(--black-87);
}

.integration__chevron {
  flex: none;
  color: var(--black-54);
  transform: rotate(-90deg);
  transition: transform 250ms var(--ease-out);
}

.integration.is-open .integration__chevron {
  transform: none;
}

.integration__body {
  padding: 0.75rem 1.125rem;
  background: var(--black-3);
  font-size: var(--fs-text-alt);
  color: var(--black-68);
}

/* Collapsed by default on mobile, only when JS can open the panels */
@media (max-width: 899.98px) {
  .js .integration:not(.is-open) .integration__body {
    display: none;
  }
}

@media (min-width: 900px) {
  .integrations {
    gap: 5.875rem;
  }

  .integrations .section-head {
    padding-inline: 6rem;
  }

  /* Desktop: a grid of open cards */
  .integrations__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.375rem 1.75rem;
    margin-inline: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .integration,
  .integration + .integration {
    display: flex;
    flex-direction: column;
    gap: 2.625rem;
    padding: 2.2125rem 1.7125rem;
    border: 0.4px solid var(--border-card);
    border-radius: var(--radius-card);
    background: var(--white);
    filter: drop-shadow(0.1875rem 0.25rem 0.25rem var(--black-6));
  }

  .integration__toggle {
    padding: 0;
    cursor: default;
    pointer-events: none;
  }

  .integration__toggle img {
    width: 4.375rem;
    height: 4.375rem;
  }

  .integration__chevron {
    display: none;
  }

  .integration__body {
    padding: 0;
    background: none;
  }
}

/* Closing */
@media (min-width: 900px) {
  .closing--integrations {
    padding-block: 2rem;
  }

  .closing--integrations .section-head {
    padding-inline: 6rem;
  }

  .closing--integrations .section-head .t-h4 {
    max-width: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Contact (demo request form)                                             */
/* ---------------------------------------------------------------------- */

.hero--form,
.hero--success {
  gap: 0.75rem;
}

.demo-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding-inline: 1.5rem;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field__label {
  font-size: var(--fs-text-alt);
  color: var(--black);
}

.field__input {
  width: 100%;
  height: 3rem;
  padding: 0 0.875rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  background: var(--white);
  font: inherit;
  font-size: 1rem; /* 1rem minimum avoids the iOS zoom on focus */
  color: var(--black-87);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

textarea.field__input {
  height: 6.5rem;
  padding-block: 0.75rem;
  resize: vertical;
}

.field__input:focus {
  outline: none;
  border-color: var(--blue-87);
  box-shadow: 0 0 0 0.1875rem rgba(55, 136, 216, 0.2);
}

.field__input.is-invalid,
.field__input:user-invalid {
  border-color: #d93025;
}

.demo-form__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.375rem;
}

.demo-form__footer .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.demo-form__note {
  font-size: var(--fs-footer);
  color: var(--black-54);
  text-align: center;
}

.demo-form__note a {
  color: var(--black);
}

.demo-form__note a:hover {
  text-decoration: underline;
}

@media (min-width: 900px) {
  .hero--form {
    gap: 3.125rem;
    padding-block: 0.625rem;
  }

  .demo-form {
    width: auto;
    gap: 1.5rem;
    padding: 0.625rem;
  }

  .field {
    flex-direction: row;
    align-items: center;
    gap: 0.625rem;
  }

  .field--area {
    align-items: flex-start;
  }

  .field__label {
    width: 15.75rem;
    min-height: 2.8125rem;
    display: flex;
    align-items: center;
  }

  .field--area .field__label {
    min-height: 3.375rem;
  }

  .field__input {
    width: 24.8125rem;
    height: 3.375rem;
  }

  textarea.field__input {
    height: 10.125rem;
  }

  .demo-form__footer {
    gap: 1.5rem;
    padding-block: 0.75rem;
  }
}

/* ---------------------------------------------------------------------- */
/* Success                                                                 */
/* ---------------------------------------------------------------------- */

.hero--success {
  gap: 1.5rem;
}

.success__picture {
  width: 100%;
  padding: 0.625rem 3rem;
}

.success__picture img {
  width: min(60rem, 100%);
  margin-inline: auto;
}

@media (min-width: 900px) {
  .hero--success {
    gap: 0;
    padding-block: 0.625rem;
  }

  .hero--success .hero__text {
    margin-bottom: 6rem;
  }

  .success__picture {
    padding: 0.375rem 2.1875rem 0;
    margin-bottom: 1.5rem;
  }

  .hero--success .cta {
    padding-block: 0.75rem;
  }
}

/* Figma mobile: the contact hero uses the full frame width (0.625rem padding) */
.hero--form .hero__text {
  padding-inline: 0.625rem;
}

/* ---------------------------------------------------------------------- */
/* Legal pages (Legal Notice, Privacy Policy, Terms of Service)            */
/* ---------------------------------------------------------------------- */

.legal {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.legal__hero {
  padding-block: 0.625rem;
  text-align: center;
}

.legal__section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal__title {
  font-weight: 400;
  font-size: var(--fs-h4);
  color: var(--black);
}

.legal__text {
  font-size: var(--fs-text);
  color: var(--black-68);
}

/* Figma separates paragraphs with one empty line */
.legal__text > :not(:first-child) {
  margin-top: 1lh;
}

.legal__text ul {
  margin-block: 0;
  padding: 0;
  list-style: none;
}

.legal__text li::before {
  content: "- ";
}

.legal__text li + li {
  margin-top: 0;
}

.legal__text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.legal__text a:hover {
  color: var(--black-87);
}

.legal__text strong {
  color: inherit;
}

@media (min-width: 900px) {
  .legal {
    gap: 3.125rem;
  }

  .legal__section {
    gap: 1.25rem;
  }
}

/* ---------------------------------------------------------------------- */
/* Features                                                                */
/* ---------------------------------------------------------------------- */

/* Hero: the animated tracking bar (Figma "Tracking Bar - Restaurant Request") */
.hero__picture--tracking {
  display: flex;
  flex-direction: column; /* the stepper sits under the bar */
  align-items: center;
  justify-content: center;
  min-height: 13.75rem;
}

@media (min-width: 900px) {
  .hero--features {
    padding-bottom: 4.5rem;
  }

  .hero__picture--tracking {
    min-height: 26.25rem;
  }

  /* Larger on wide screens, keeping the Figma proportions */
  .hero__picture--tracking .tb {
    zoom: 1.3;
  }
}

/* One section = a heading and a horizontal carousel of cards */
.feature-group {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-block: 2rem;
}

@media (min-width: 900px) {
  .feature-group {
    gap: 3.5rem;
  }

  .feature-group .section-head .t-h4 {
    max-width: 63rem;
    margin-inline: auto;
  }
}

/* Carousel (Apple style): cards scroll sideways, the first one is centred,
   the next one peeks in from the right; snaps on each card. */
.carousel {
  --card-w: min(20rem, 82vw);
  --card-gap: 1rem;
}

/* Enters on scroll just after its heading, as the pictures do on Home */
.carousel.reveal {
  --reveal-delay: 150ms;
}

@media (min-width: 900px) {
  .carousel {
    --card-w: 25rem;
    --card-gap: 3rem;
  }
}

.carousel__track {
  display: flex;
  gap: var(--card-gap);
  margin: 0;
  padding: 0.5rem calc(50% - var(--card-w) / 2) 1.5rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track:focus-visible {
  outline-offset: -0.25rem;
}

.carousel__item {
  flex: none;
  display: flex;
  width: var(--card-w);
  scroll-snap-align: center;
}

.card--feature {
  width: 100%;
}

.card--feature .card__picture {
  height: auto;
  padding: 0;
}

.card--feature .card__picture img {
  width: 100%;
  height: auto;
  aspect-ratio: 402 / 240;
}

@media (min-width: 900px) {
  .card--feature {
    min-height: 0;
  }
}

/* Previous / next buttons, under the cards, aligned right */
.carousel__controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.carousel__btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--black-6);
  color: var(--black-87);
  transition: background-color 300ms ease, opacity 300ms ease;
}

.carousel__btn:hover:not(:disabled) {
  background: var(--black-12);
}

.carousel__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Figma: the Features title spans the full content width (two lines on desktop) */
.hero--features .hero__title {
  max-width: 77.5rem;
}

/* Desktop feature cards are 400 wide instead of the Figma 456: everything inside
   is scaled by the same ratio (400 / 456), so titles keep their single line. */
@media (min-width: 900px) {
  .card--feature {
    gap: calc(2.625rem * 400 / 456);
    padding: calc(2.1875rem * 400 / 456) calc(1.6875rem * 400 / 456);
  }

  .card--feature .card__title {
    font-size: calc(1.75rem * 400 / 456);
  }

  .card--feature .card__text {
    margin-top: calc(1.5rem * 400 / 456);
    font-size: calc(1.3125rem * 400 / 456);
  }
}

/* By the numbers (Features) — Figma 782:774, set in the site fonts.
   Mobile: 2 columns; desktop: 2 rows of 3, as in the mockup. */
.stats {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-block: 2rem;
}

.stats__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.875rem;
  color: var(--black-68);
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.25rem, 1.5rem + 3.297vw, 4rem); /* 36 mobile → 64 desktop */
  line-height: 1.2;
  color: var(--black-87);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 900px) {
  .stats {
    gap: 5.875rem;
  }

  .stats .section-head .t-h4 {
    max-width: 63rem;
    margin-inline: auto;
  }

  .stats__list {
    grid-template-columns: repeat(3, 15rem);
    justify-content: center;
    gap: 3rem 2rem;
  }

  .stat {
    font-size: 1rem;
  }
}
