/* The platform's own page, "/" for visitors (templates/landing/index.html).
 * Only layout for this page: colours, type and components come from
 * tokens.css, base.css and components.css. Phone first; two columns from 56rem.
 */

/* Wider than the app's pages: the whole screen of a computer, a comfortable
 * column on a tablet, the full width on a phone. */
.landing {
  --landing-max: 100%;
  --landing-gutter: var(--space-4);
}

.landing .page {
  max-width: var(--landing-max);
  padding-inline: max(var(--landing-gutter), env(safe-area-inset-left));
}

.landing main {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  padding-block: var(--space-6) var(--space-12);
}

.landing ul[role="list"],
.landing ol[role="list"] {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --- Top bar --------------------------------------------------------------- */
.landing-bar {
  position: sticky;
  top: var(--space-2);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: calc(100% - 2 * var(--space-2));
  max-width: calc(var(--landing-max) - 2 * var(--landing-gutter));
  margin: var(--space-2) auto 0;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
}

.landing-bar__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-display);
  text-decoration: none;
}

.landing-bar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* On a phone the hero's own "Start free" is right below: the bar keeps the
 * logo and "Log in" only, so nothing overflows. */
@media (max-width: 30rem) {
  .landing-bar__start {
    display: none;
  }

  /* On a phone the platform's pages take a second row, on the left under
     the logo; the logo and the account stay on the first. */
  .landing-bar {
    flex-wrap: wrap;
    row-gap: 0;
  }



  .landing-bar {
    padding-inline-start: var(--space-3);
  }

  .landing-bar__brand {
    font-size: var(--text-lg);
  }

  .landing-bar {
    column-gap: var(--space-1);
    padding-inline: var(--space-3) var(--space-1);
  }

  .landing-bar__brand {
    font-size: var(--text-base);
  }

  .landing-bar__nav {
    gap: 0;
    margin-inline-start: auto;
  }
}

.landing-bar__nav .link-tap {
  padding-inline: var(--space-2);
  font-weight: 600;
  text-decoration: none;
}

/* --- Hero ------------------------------------------------------------------ */
.landing-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: var(--space-10);
  align-items: center;
}

/* A small rounded label above the title, with a pink dot. */
.landing-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-2);
  min-height: 2.25rem;
  padding-inline: var(--space-4);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-muted);
  font: 600 var(--text-sm) / 1.2 var(--font-sans);
}

.landing-pill__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand-3);
}

/* Direction D: the hero's words are plain text, in the text colour. */
.landing-gradient-text {
  font-style: normal;
  color: inherit;
}

/* The hero's main button: the plain black (white in the dark theme) of D. */
.landing-cta--brand {
  background: var(--primary);
  color: var(--on-primary);
}

.landing-cta--brand:hover {
  filter: brightness(1.08);
}

/* A faint square grid behind the hero, fading out from its top left. */
.landing-hero::before {
  content: "";
  position: absolute;
  inset: -6rem 0 -2rem;
  z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 25% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 25% 30%, #000 20%, transparent 75%);
  pointer-events: none;
}

.landing-hero__title {
  font-size: clamp(2.25rem, 1.5rem + 3.6vw, 4rem);
}

.landing-cta {
  gap: var(--space-2);
}

.landing-ticks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.landing-ticks li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.landing-ticks .icon {
  color: var(--accent);
}

/* The example phone: the shop page's own template, made small. Not
 * interactive (preview=True), and hidden from screen readers. */
.landing-phone {
  justify-self: center;
  width: min(100%, 24rem);
  padding: var(--space-3);
  border-radius: calc(var(--radius-xl) + var(--space-3));
  background: var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--border),
    0 40px 80px -36px rgb(0 0 0 / 0.35),
    var(--shadow-float);
  rotate: -3deg;
}

.landing-phone__screen {
  max-height: 40rem;
  overflow: hidden;
  padding: var(--space-3);
  border-radius: var(--radius-xl);
  background: var(--bg);
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent);
  mask-image: linear-gradient(180deg, #000 85%, transparent);
}

.landing-phone .cover {
  min-height: 14rem;
}

@media (min-width: 64rem) {
  .landing-phone {
    width: min(100%, 27rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-phone {
    rotate: none;
  }
}

/* --- Sections -------------------------------------------------------------- */
.landing-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.landing-section__title {
  max-width: 22em;
  font-size: var(--text-2xl);
}

.landing-steps,
.landing-features {
  display: grid;
  gap: var(--space-4);
}

.landing-steps__number {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-ink-1), var(--brand-ink-2));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
}

.landing-features__icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
}

/* Bento: the first feature a big tile with a large time in the gradient,
   the second a wide one tinted with the brand colours. */
.landing-features__big {
  position: relative;
  overflow: hidden;
}

/* The big tile's made-up "Today" (landing/index.html): rows like the panel's. */
.landing-today {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.landing-today__row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.landing-today__row--past {
  opacity: 0.55;
}

.landing-today__row--next {
  background: color-mix(in srgb, var(--brand-1) 16%, var(--surface));
  box-shadow: inset 3px 0 0 var(--brand-1);
}

.landing-today__time {
  font: 600 var(--text-base) / 1 var(--font-sans);
  font-variant-numeric: tabular-nums;
}

.landing-today__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-family: var(--font-sans);
}

.landing-today__who > * {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.landing-today__who > span {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* The one tile in colour, the same in both themes: honey with dark text
   (the 10% that breaks the black and white). */
.landing-features__wide {
  border-color: transparent;
  background: var(--accent-fill);
  color: var(--on-accent-fill);
}

.landing-features__wide .landing-features__icon {
  background: color-mix(in srgb, var(--on-accent-fill) 12%, transparent);
  color: var(--on-accent-fill);
}

.landing-features .landing-features__wide p {
  color: color-mix(in srgb, var(--on-accent-fill) 80%, var(--accent-fill));
}

.landing-steps p,
.landing-features p {
  color: var(--text-muted);
}

.landing-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.landing-categories li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch-min);
  padding-inline: var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  font-weight: 600;
}

.landing-categories .icon {
  color: var(--accent);
}

.landing-note {
  font-size: var(--text-sm);
}

.landing-split {
  display: grid;
  gap: var(--space-4);
}

.landing-list {
  display: grid;
  gap: var(--space-3);
}

.landing-list li {
  position: relative;
  padding-inline-start: var(--space-6);
}

.landing-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent-fill);
}

/* "Free for the first shops": a link to the pricing page. */
.landing-price-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-8) var(--space-6);
  color: var(--text);
  text-decoration: none;
  background:
    radial-gradient(120% 120% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
}

.landing-price-link > .icon {
  flex: none;
  width: 2rem;
  height: 2rem;
}

.landing-price-link:hover > .icon {
  translate: 4px 0;
}

.landing-bar__link[aria-current="page"] {
  color: var(--accent);
}

/* --- The pricing page (landing/pricing.html) ------------------------------- */
.pricing__head {
  max-width: 44rem;
}

.pricing__plans {
  display: grid;
  gap: var(--space-5);
  align-items: stretch;
}

@media (min-width: 52rem) {
  .pricing__plans {
    grid-template-columns: 3fr 2fr;
  }
}

.pricing-plan {
  padding: var(--space-6);
}

.pricing-plan--main {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--accent-fill);
}

.pricing-plan__price {
  margin: 0;
  font-family: var(--font-sans);
}

.pricing-plan__amount {
  font: 600 var(--text-2xl) / 1 var(--font-display);
}

/* The 0%: the one number the page is about. */
.pricing-plan__zero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  font: 600 var(--text-lg) / 1.2 var(--font-sans);
}

.pricing-plan__zero-number {
  font: 600 clamp(5rem, 3.5rem + 7vw, 9rem) / 0.9 var(--font-display);
  letter-spacing: -0.05em;
}

.landing-faq details {
  padding: 0 var(--space-5);
  border-top: 1px solid var(--border);
}

.landing-faq details:first-child {
  border-top: 0;
}

.landing-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--touch-min);
  padding-block: var(--space-4);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.landing-faq summary::-webkit-details-marker {
  display: none;
}

.landing-faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-size: var(--text-xl);
  line-height: 1;
}

.landing-faq details[open] summary::after {
  content: "–";
}

.landing-faq summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.landing-faq details p {
  padding-bottom: var(--space-5);
  color: var(--text-muted);
}

.landing-final {
  align-items: center;
  text-align: center;
}

.landing-final .landing-section__title,
.landing-final .lead {
  margin-inline: auto;
}

/* --- Wider screens ---------------------------------------------------------- */
/* Tablet: a medium column. */
@media (min-width: 40rem) {
  .landing {
    --landing-max: 58rem;
    --landing-gutter: var(--space-8);
  }
}

/* Computer: most of the screen, bigger type. */
@media (min-width: 64rem) {
  .landing {
    --landing-max: min(92vw, 112rem);
    --landing-gutter: var(--space-10);
  }

  /* A faint square grid behind the hero, fading out from its top left. */
.landing-hero::before {
  content: "";
  position: absolute;
  inset: -6rem 0 -2rem;
  z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 25% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 25% 30%, #000 20%, transparent 75%);
  pointer-events: none;
}

.landing-hero__title {
    font-size: clamp(3.5rem, 1.2rem + 3.6vw, 5.75rem);
  }

  .landing-hero .lead {
    max-width: 34em;
    font-size: clamp(var(--text-lg), 0.9rem + 0.6vw, 1.625rem);
  }

  .landing-section__title {
    font-size: clamp(var(--text-2xl), 1.2rem + 1.5vw, 3rem);
  }

  .landing-phone {
    width: min(100%, 27rem);
  }

  .landing-phone__screen {
    max-height: 40rem;
  }
}

@media (min-width: 40rem) {
  .landing-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56rem) {
  .landing main {
    gap: var(--space-16);
    padding-top: var(--space-12);
  }

  .landing-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

/* Four features a row only where the column is wide (after the tablet's). */
@media (min-width: 72rem) {
  .landing-features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: dense;
  }

  .landing-features__big {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 22rem;
  }

  .landing-features__wide {
    grid-column: span 2;
  }
}

/* On a phone and a tablet the big tile keeps room for its time. */
@media (max-width: 71.99rem) {
  .landing-features__big {
    min-height: 15rem;
  }
}

.pricing-plan > .chip {
  align-self: flex-start;
}

/* The bar's left side: the logo, then the platform's pages. */
.landing-bar__start-group {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}

.landing-bar__pages {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* On a phone the platform's pages take a second row, on the left under the
   logo; the logo and the account stay on the first. After the rules above. */
@media (max-width: 30rem) {
  .landing-bar__start-group {
    display: contents;
  }

  .landing-bar__pages {
    order: 3;
    width: 100%;
  }

  .landing-bar__pages .link-tap {
    min-height: 2rem;
    font-size: var(--text-sm);
  }

  .landing-bar {
    column-gap: var(--space-1);
    padding-inline: var(--space-3) var(--space-1);
  }

  .landing-bar__brand {
    font-size: var(--text-base);
  }

  .landing-bar__nav {
    gap: 0;
    margin-inline-start: auto;
  }
}

/* --- The shop search (public/search.html) ---------------------------------- */
.search-page {
  gap: var(--space-5);
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.search-form__input {
  flex: 1 1 16rem;
  min-height: 3.25rem;
  font-size: var(--text-lg);
}

.search-form__near.is-on {
  border-color: var(--accent);
  color: var(--accent);
}

.search-categories a {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.search-results {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 64rem) {
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.search-result {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-3);
  color: var(--text);
  text-decoration: none;
}

.search-result:hover {
  border-color: var(--accent);
}

.search-result__picture {
  display: grid;
  place-items: center;
  width: 6rem;
  height: 6rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.search-result__picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result__initials {
  font: 600 var(--text-xl) / 1 var(--font-display);
}

.search-result__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.search-result__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.search-result__name {
  font: 600 var(--text-lg) / 1.2 var(--font-display);
}

.search-result__top .rating-badge {
  margin-top: 0;
}

.search-result__meta,
.search-result__services {
  color: var(--text-muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

/* --- The search's map (static/js/maps.js) ----------------------------------- */
.search-map {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.search-map__canvas {
  height: min(60vh, 32rem);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.search-map__note {
  margin: 0;
  font-size: var(--text-sm);
}

/* A shop's marker: its score on a pill in the platform's colour. */
.map-pin {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  padding: 4px 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #5b4ce0;
  color: #fff;
  font: 600 14px / 1 system-ui, sans-serif;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
}

/* A shop's card on the map (InfoWindow): Google draws it on white. */
.map-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 15rem;
  color: #14142b;
  font: 400 14px / 1.35 system-ui, sans-serif;
}

.map-card__photo {
  width: 100%;
  height: 7rem;
  object-fit: cover;
  border-radius: 8px;
}

.map-card__name {
  font-size: 16px;
}

.map-card__line {
  color: #4d4e68;
}

.map-card__link {
  margin-top: 4px;
  color: #5144d8;
  font-weight: 600;
}

/* --- The front page before a search (public/search.html) ----------------------- */
.search-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

@media (min-width: 64rem) {
  .search-results--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.search-steps {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .search-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.search-steps > li {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.search-steps__n {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-round);
  background: var(--accent-fill);
  color: var(--on-accent-fill);
  font: 600 var(--text-sm) / 1 var(--font-sans);
}

.search-steps__title {
  font: 600 var(--text-md) / 1.3 var(--font-sans);
  letter-spacing: 0;
}

.search-business {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
}
