/* ==========================================================================
   The public one-page site.

   Layout only. Every colour, radius, shadow and spacing step comes from the
   variables css/parts/base.css already defines, so the site matches the dashboard in
   both light and dark mode without repeating a single hex value.
   ========================================================================== */

.web {
  background: var(--bg);
  color: var(--text);
  /* the app is a fixed shell; this page scrolls */
  overflow-x: hidden;
}

/* The navbar's height, in one place. scroll-padding-top must match it or a
   jump link lands with the section heading hidden behind the bar. */
:root {
  --web-nav-h: 68px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--web-nav-h);
}

.web-wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------- navbar */
.web-nav {
  position: sticky;
  top: 0;
  z-index: 600;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.web-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: var(--web-nav-h);
}

/* ---- logo, top left ---- */
.web-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}

.web-brand__logo {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

/* shown only when no logo has been uploaded */
.web-brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--primary-600);
  color: #fff;
  font-size: 1.3rem;
}

.web-brand__name {
  font-size: var(--fs-lg, 1.05rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---- the menu ---- */
.web-menu {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-left: auto;
}

.web-menu a {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.web-menu a:hover {
  color: var(--text);
  background: var(--surface-3);
}

.web-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex: 0 0 auto;
}

/* the burger only exists on a phone */
.web-burger {
  display: none;
}

/* ---------------------------------------------------------------- hero */
.web-hero {
  padding: clamp(var(--s-8), 7vw, 96px) 0;
  background:
    radial-gradient(60% 120% at 80% 0%,
      color-mix(in srgb, var(--primary-500) 14%, transparent), transparent 70%),
    var(--bg);
}

.web-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(var(--s-5), 5vw, 64px);
  align-items: center;
}

.web-hero h1 {
  margin: var(--s-4) 0 var(--s-4);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
/* the second line, quieter than the first */
.web-hero h1 span {
  display: block;
  color: var(--text-2);
  font-weight: 600;
}
/* …but the red E of the name (partials/brand_name.html) stays in its word */
.web-hero h1 span.brand-e {
  display: inline;
  color: var(--brand-e);
  font-weight: inherit;
}

.web-hero__text > p {
  max-width: 56ch;
  margin: 0;
  font-size: var(--fs-lg, 1.05rem);
  line-height: 1.65;
  color: var(--text-2);
}

.web-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.web-hero__hours {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-5) !important;
  font-size: var(--fs-sm);
  color: var(--text-3);
}

/* ---- the three numbers ---- */
.web-stats {
  display: grid;
  gap: var(--s-3);
}

.web-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.web-stat strong {
  font-size: 1.9rem;
  line-height: 1;
  color: var(--primary-600);
  font-variant-numeric: tabular-nums;
}
.web-stat span {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ------------------------------------------------------------ sections */
.web-section {
  padding: clamp(var(--s-8), 6vw, 80px) 0;
}
.web-section--tint {
  background: var(--surface-2);
  border-block: 1px solid var(--border);
}

.web-title {
  margin: 0 0 var(--s-2);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
}

.web-lede {
  margin: 0 0 var(--s-6);
  color: var(--text-2);
  max-width: 62ch;
}

/* ---- about ---- */
.web-about {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(var(--s-5), 4vw, 56px);
  margin-top: var(--s-5);
  align-items: start;
}

.web-about__text {
  color: var(--text-2);
  line-height: 1.75;
}
.web-about__text :where(h1, h2, h3, h4) {
  color: var(--text);
  margin: var(--s-5) 0 var(--s-2);
}
.web-about__text :where(p, ul, ol) {
  margin: 0 0 var(--s-4);
}
.web-about__text a {
  color: var(--primary-600);
}
/* rich text from the admin can carry anything — keep it inside the column */
.web-about__text :where(img, table, iframe) {
  max-width: 100%;
  height: auto;
}

.web-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}
.web-points li {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.web-points ion-icon {
  flex: 0 0 auto;
  font-size: 1.5rem;
  color: var(--primary-600);
}
.web-points strong {
  display: block;
}
.web-points span {
  font-size: var(--fs-sm);
  color: var(--text-2);
}

/* ---- products ---- */
.web-grid {
  display: grid;
  /* min() so a card can shrink below its ideal width on a narrow phone
     instead of overflowing the section */
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: var(--s-4);
}

.web-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-fast), box-shadow var(--t-fast),
    border-color var(--t-fast);
}
.web-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-500);
  box-shadow: var(--shadow-md, var(--shadow-sm));
}

.web-card__shot {
  aspect-ratio: 4 / 3;
  background: var(--bg);
}
.web-card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.web-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-4);
  min-width: 0;
}
.web-card__body strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.web-card__body small {
  color: var(--text-3);
  font-size: var(--fs-sm);
}

.web-card__price {
  margin-top: var(--s-2);
  font-size: var(--fs-lg, 1.05rem);
  font-weight: 700;
  color: var(--primary-600);
}
.web-card__price small {
  display: block;
  font-weight: 400;
}

.web-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-5);
}

.web-more {
  margin-top: var(--s-6);
}

/* ---- contact ---- */
.web-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(var(--s-5), 4vw, 48px);
  margin-top: var(--s-5);
  align-items: start;
}

.web-contact__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}
.web-contact__list li {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.web-contact__list ion-icon {
  flex: 0 0 auto;
  font-size: 1.4rem;
  color: var(--primary-600);
}
.web-contact__list strong {
  display: block;
}
.web-contact__list span {
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.web-contact__list a {
  color: var(--primary-600);
  text-decoration: none;
}
.web-contact__list a:hover {
  text-decoration: underline;
}

.web-map iframe {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: block;
}

/* --------------------------------------------------------------- footer */
.web-foot {
  padding: var(--s-6) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-3);
}

.web-foot__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  justify-content: space-between;
}

/* the logo again, small, beside the copyright line */
.web-foot__brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.web-foot__logo {
  height: 28px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.web-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
}
.web-foot__links a {
  color: var(--text-2);
  text-decoration: none;
}
.web-foot__links a:hover {
  color: var(--primary-600);
}

/* the maintainer credit, on its own line under the copyright row */
.web-foot__by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.web-foot__by a {
  color: var(--text-2);
  text-decoration: none;
}
.web-foot__by a:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

.web-foot__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
}
.web-foot__contact a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.web-foot__contact ion-icon {
  font-size: 1rem;
  color: var(--primary-600);
}

.web-social {
  display: flex;
  gap: var(--s-3);
  font-size: 1.2rem;
}
.web-social a {
  color: var(--text-3);
}
.web-social a:hover {
  color: var(--primary-600);
}

/* -------------------------------------------------------- back to top */
.web-up {
  position: fixed;
  right: var(--gutter);
  bottom: var(--s-5);
  z-index: 700;

  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-600);
  color: #fff;
  font-size: 1.3rem;
  box-shadow: var(--shadow-md, var(--shadow-sm));

  /* hidden until the page has been scrolled, and not tabbable while hidden */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--t-fast), transform var(--t-fast),
    visibility var(--t-fast);
}
.web-up.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.web-up:hover {
  background: var(--primary-500);
}

/* ------------------------------------------------- hero: quick ticks */
.web-ticks {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
}
.web-ticks li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.web-ticks ion-icon {
  font-size: 1.1rem;
  color: var(--accent-500);
}

/* ------------------------------------------- hero: the invoice picture */
.web-mock {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 420px;
  /* the extra room at the bottom is where the chip hangs, clear of the total */
  padding: var(--s-5) var(--s-5) var(--s-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-md);
}

.web-mock__head,
.web-mock__party,
.web-mock__row,
.web-mock__total {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.web-mock__head {
  justify-content: space-between;
  padding-bottom: var(--s-4);
  border-bottom: 1px dashed var(--border-strong);
}
.web-mock small {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.web-mock__party {
  padding: var(--s-4) 0;
  min-width: 0;
}
.web-mock__party > div {
  min-width: 0;
}
.web-mock__party strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.web-mock__rows,
.web-mock__tax {
  display: grid;
  gap: var(--s-2);
}
.web-mock__tax {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: var(--fs-sm);
}

.web-mock__row {
  justify-content: space-between;
}
.web-mock__row span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-2);
}
.web-mock__row b {
  flex: 0 0 auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.web-mock__total {
  justify-content: space-between;
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--primary-600);
  color: var(--text-on-primary);
  font-weight: 600;
}
.web-mock__total strong {
  font-size: var(--fs-xl);
  font-variant-numeric: tabular-nums;
}

/* the floating "this month" chip, hanging off the card's corner */
.web-mock__chip {
  position: absolute;
  left: calc(var(--s-6) * -1);
  bottom: calc(var(--s-5) * -1);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4) var(--s-2) var(--s-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
}
.web-mock__chip ion-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
}
.web-mock__chip strong {
  font-size: var(--fs-md);
  color: var(--success);
}

/* ------------------------------------------------------------ features */
.web-features {
  display: grid;
  /* min() so a card can shrink below its ideal width on a narrow phone
     instead of overflowing the section */
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--s-4);
}

.web-feature {
  --feature-color: var(--primary-600);
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform var(--t-fast), box-shadow var(--t-fast),
    border-color var(--t-fast);
}
.web-feature:hover {
  transform: translateY(-2px);
  border-color: var(--feature-color);
  box-shadow: var(--shadow-md);
}

.web-feature__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  font-size: 1.4rem;
  color: var(--feature-color);
  background: color-mix(in srgb, var(--feature-color) 12%, transparent);
}

.web-feature h3 {
  margin: var(--s-4) 0 var(--s-2);
  font-size: var(--fs-lg);
}
.web-feature p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.6;
}

/* --------------------------------------------------------- how it works */
.web-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}

.web-step {
  position: relative;
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.web-step__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-600);
  color: var(--text-on-primary);
  font-weight: 800;
}

.web-step h3 {
  margin: var(--s-4) 0 var(--s-2);
  font-size: var(--fs-lg);
}
.web-step p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.6;
}

/* ------------------------------------------------------------ cta band */
.web-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-5);
  padding: clamp(var(--s-6), 5vw, 56px);
  border-radius: var(--r-xl);
  color: #fff;
  background:
    radial-gradient(80% 140% at 100% 0%, var(--accent-500), transparent 60%),
    linear-gradient(135deg, var(--primary-600), var(--primary-900));
  box-shadow: var(--shadow-lg);
}
.web-cta h2 {
  margin: 0 0 var(--s-2);
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.01em;
}
.web-cta p {
  margin: 0;
  opacity: 0.85;
}

/* white on the purple band — the usual primary button would vanish into it */
.web-cta__btn,
.web-cta__btn:hover {
  background: #fff;
  color: var(--primary-700);
  border-color: transparent;
}
.web-cta__btn:hover {
  box-shadow: var(--shadow-md);
}

/* ========================================================== responsive */

@media (max-width: 900px) {
  .web-hero__inner,
  .web-about,
  .web-contact {
    grid-template-columns: minmax(0, 1fr);
  }

  /* the invoice sits under the text, centred */
  .web-mock {
    justify-self: center;
  }

  .web-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  /* three across, so the numbers still read as a row on a tablet */
  .web-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .web-stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* Tablets and below: five links plus the theme and log-in buttons need
   about 980px, so under that the links fold behind the burger. This used to
   wait until 720px, and on a 768px tablet the bar ran off the right edge,
   cutting the Log in button in half. */
@media (max-width: 980px) {
  .web-burger {
    display: grid;
  }

  /* the menu drops out of the bar and becomes a sheet under it */
  .web-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-2);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md, var(--shadow-sm));
  }
  .web-menu.is-open {
    display: flex;
  }
  .web-menu a {
    padding: var(--s-3) var(--s-4);
  }

  .web-nav__inner {
    position: relative;
  }

  /* with the links gone, the buttons sit on the right, not in the middle */
  .web-nav__actions {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  /* the bar gets shorter here, so the jump offset follows it */
  :root {
    --web-nav-h: 60px;
  }

  /* the name can go; the logo carries it on a small screen */
  .web-brand__name {
    display: none;
  }

  .web-hero__cta .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  /* the chip tucks inside the card: hanging off the edge would push the
     page sideways on a narrow screen */
  .web-mock__chip {
    left: var(--s-4);
  }

  .web-cta {
    text-align: center;
    justify-content: center;
  }
  .web-cta__btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .web-foot__inner {
    justify-content: center;
    text-align: center;
  }
  /* stacked and centred, so the credit and the two contacts each get a line */
  .web-foot__by {
    justify-content: center;
    text-align: center;
  }
  .web-foot__contact {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .web-mock {
    padding: var(--s-4) var(--s-4) var(--s-8);
  }
  .web-feature,
  .web-step {
    padding: var(--s-5);
  }

  .web-stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .web-stat {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}
