/* Bisqo web — shared styles (mobile-first, tuned at 390px wide). Brand: Bisqo-Brand-Kit/README.md */
:root {
  --ink: #221b4b;
  --ink-70: #57517c;
  --ink-50: #8f8baa;
  --biscotti: #f5b83d;
  --crust: #d9952a;
  --mist: #eef0fa;
  --cherry: #ef4b5f;
  --pistachio: #3e9b6b;
  --cream: #f6e6c6;
  --line: #d9d7e6;
  --bg: #ffffff;
  /* Bricolage Grotesque and Figtree have no Cyrillic: Russian (and Cyrillic shop names) fall through
     to Onest, whose Google Fonts CSS is loaded with the others (unicode-range, so its files are only
     downloaded when Cyrillic text is on the page). Turkish/Polish letters are in latin-ext. */
  --font-display: "Bricolage Grotesque", "Figtree", "Onest", system-ui, sans-serif;
  --font-ui: "Figtree", "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.page {
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page > main {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.join,
.ready {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- logo circle ---------- */
.logo-circle {
  --logo-h: 64px;
  width: var(--logo-h);
  height: var(--logo-h);
  border-radius: 50%;
  background: var(--cream);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}
.logo-circle img {
  width: 66%;
  height: 66%;
  object-fit: contain;
}
.logo-circle--sm {
  --logo-h: 36px;
}
/* The shop's logo shape (SPEC "Logo"; classes set by join.js once the logo has loaded): square and wide boxes
   are rounded by 22% of the height, wide ones are h x clamp(aspect, 1, 3.2) wide. Cut-out logos (or ones whose
   pixels the browser can't read) get the padding of their shape; opaque ones fill the box (the circle covers,
   the others contain). Nothing but a circle's corners is ever cropped. Without the plate the box shows the card
   colour (--logo-card), which inside the card is the card itself. */
.logo-circle.logo--square,
.logo-circle.logo--wide {
  border-radius: calc(var(--logo-h) * 0.22);
}
.logo-circle.logo--wide {
  width: calc(var(--logo-h) * var(--logo-aspect, 1));
}
.logo-circle.logo--noplate {
  background: var(--logo-card, transparent);
}
.logo-circle.logo--square.logo--inset img {
  width: 80%;
  height: 80%;
}
.logo-circle.logo--wide.logo--inset img {
  width: calc(100% - var(--logo-h) * 0.24);
  height: calc(100% - var(--logo-h) * 0.24);
}
.logo-circle.logo--cover img,
.logo-circle.logo--contain img {
  width: 100%;
  height: 100%;
}
.logo-circle.logo--cover img {
  object-fit: cover;
}
/* The shop hid its name next to the logo (showName: false): the card header shows only the logo. Set only once
   the shop's logo has loaded, so the Bisqo mark always has the name next to it. */
.card__head--noname .card__name {
  display: none;
}

/* ---------- type ---------- */
h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 18px 0 10px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.lede {
  margin: 0;
  color: var(--ink-70);
  font-size: 15px;
  line-height: 1.4;
  text-wrap: balance;
}

/* ---------- card preview ---------- */
.card {
  width: 100%;
  margin-top: 24px;
  padding: 20px 20px 18px;
  border-radius: 20px;
  background: #2f5e50;
  /* --card-fg / --card-fg-soft / --card-stamp are set by join.js from the card colour (SPEC "Readable colours"). */
  color: var(--card-fg, #fff);
  text-align: left;
}
.card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.card__name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The stamp band (SPEC "Card background"): edge to edge across the card (the -20px margins undo the card's
   padding) behind the stamp grid. Without a background it is invisible and the card looks as it always did;
   with one, join.js paints it and it gets some room above and below the stamps. */
.card__band {
  margin: 18px -20px 16px;
  padding: 0 20px;
}
.card__band--bg {
  margin: 16px -20px 14px;
  padding: 14px 20px;
  background-repeat: no-repeat;
  background-position: center;
}
.stamps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 0 auto;
}
.stamp {
  aspect-ratio: 1;
  width: 100%;
}
.stamp__ring {
  fill: none;
  stroke: var(--card-stamp, rgba(255, 255, 255, 0.5));
  stroke-width: 3.2;
  stroke-dasharray: 10.2 8.25; /* 16 dashes around r=47 (viewBox 100) */
  stroke-linecap: round;
}
/* Behind the ring: the card colour at 85% (--card-backing, set by join.js only when there is a background). */
.stamp__disc {
  fill: var(--card-backing, none);
  stroke: none;
}
.card__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--card-fg-soft, rgba(255, 255, 255, 0.92));
}
.card__foot span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}

/* ---------- name field ---------- */
.field {
  width: 100%;
  margin-top: 20px;
  text-align: left;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-70);
  margin: 0 0 6px 4px;
}
.field input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--mist);
  color: var(--ink);
  font: 500 16px/1 var(--font-ui); /* 16px avoids iOS zoom-on-focus */
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.field input::placeholder {
  color: var(--ink-50);
}
.field input:focus {
  border-color: var(--ink);
  background: #fff;
}
.field[data-invalid] input {
  border-color: var(--cherry);
}
.field__error {
  margin: 6px 0 0 4px;
  font-size: 13px;
  color: var(--cherry);
}

/* ---------- promotions: welcome / double-stamp lines, expiry note, birthday field ---------- */
.perk-note {
  margin: 10px 0 0;
  color: var(--ink-70);
  font-size: 13px;
}
.perk {
  margin: 14px 0 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
fieldset.field {
  border: 0;
  padding: 0;
  min-width: 0;
}
.field legend {
  float: left; /* lets the legend sit in normal flow like the name field's label */
  width: 100%;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-70);
  margin: 0 0 6px 4px;
}
.field__row {
  clear: both;
  display: flex;
  gap: 10px;
}
.field select {
  min-width: 0;
  height: 46px;
  padding: 0 36px 0 16px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--mist)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2357517c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  color: var(--ink);
  font: 500 16px/1 var(--font-ui); /* 16px avoids iOS zoom-on-focus */
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.field__day {
  flex: 2;
}
.field__month {
  flex: 3;
}
.field select:focus {
  border-color: var(--ink);
  background-color: #fff;
}
.field[data-invalid] select {
  border-color: var(--cherry);
}
.field__hint {
  margin: 6px 0 0 4px;
  font-size: 13px;
  color: var(--ink-50);
}

/* ---------- buttons ---------- */
.actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px; /* grows when a translation needs two lines */
  padding: 8px 24px;
  border-radius: 28px;
  border: 2px solid transparent;
  font: 800 18px/1.15 var(--font-ui);
  text-align: center;
  text-wrap: balance;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, opacity 0.15s;
}
.btn:active {
  transform: scale(0.985);
}
.btn:focus-visible {
  outline: 3px solid var(--biscotti);
  outline-offset: 3px;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}
.btn--apple {
  background: #000;
  color: #fff;
}
.btn--google {
  background: #fff;
  color: #000;
  border-color: var(--line);
}
.btn--primary {
  background: var(--ink);
  color: #fff;
}

.note {
  margin: 22px 0 0;
  font-size: 15px;
  color: var(--ink-70);
}
.status {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-70);
}
.status:empty {
  display: none;
}
.status[data-tone="error"] {
  color: var(--cherry);
}
.status[data-tone="ok"] {
  color: var(--pistachio);
}

/* ---------- states ---------- */
.state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 40px 8px;
}
.state h1 {
  font-size: 26px;
}
.state .btn {
  margin-top: 22px;
  max-width: 260px;
}
.state__mark {
  width: 72px;
  height: 72px;
}
.state__mark--spin {
  animation: bob 1.1s ease-in-out infinite alternate;
}
@keyframes bob {
  from {
    transform: translateY(0) rotate(-8deg);
  }
  to {
    transform: translateY(-10px) rotate(8deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .state__mark--spin {
    animation: none;
  }
}

.notice {
  width: 100%;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--mist);
  color: var(--ink);
  font-size: 15px;
}
.notice strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
  text-wrap: balance;
}

/* ---------- footer ---------- */
.powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
  font-size: 13px;
  color: var(--ink-50);
  text-decoration: none;
}
.powered img {
  height: 22px;
  width: auto;
  opacity: 0.72;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- landing ---------- */
.landing-lockup {
  width: 220px;
  height: auto;
  margin-top: 12vh;
}
.landing h1 {
  font-size: 32px;
  margin-top: 36px;
}
.landing .actions {
  margin-top: 28px;
}

@media (min-width: 480px) {
  .page {
    padding-top: 48px;
  }
  h1 {
    font-size: 32px;
  }
}

/* ---------- small footer links (index, join, 404) ---------- */
.site-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-50);
}
.site-links a {
  color: var(--ink-50);
  text-decoration: none;
}
.site-links a:hover,
.site-links a:focus-visible {
  text-decoration: underline;
}
.landing .site-links {
  margin-top: 36px;
}

/* ---------- legal / support pages (privacy.html, support.html) ---------- */
.doc {
  max-width: 720px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 20px 28px;
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow-wrap: break-word;
}
.doc__header {
  display: flex;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.doc__brand {
  display: inline-flex;
  border-radius: 8px;
}
.doc__brand img {
  display: block;
  height: 28px;
  width: auto;
}
.doc__main {
  flex: 1;
}
.doc h1 {
  font-size: 32px;
  margin: 32px 0 8px;
  text-align: left;
  overflow-wrap: break-word;
}
.doc h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 36px 0 10px;
  text-wrap: balance;
}
.doc h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 22px 0 6px;
}
.doc p,
.doc li {
  line-height: 1.55;
}
.doc p {
  margin: 0 0 12px;
}
.doc ul {
  margin: 0 0 14px;
  padding-left: 1.3em;
}
.doc li + li {
  margin-top: 6px;
}
.doc strong {
  font-weight: 700;
}
.doc a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.doc a:focus-visible {
  outline: 3px solid var(--biscotti);
  outline-offset: 2px;
  border-radius: 4px;
}
.doc__meta {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--ink-50);
}
.doc__lede {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-70);
}
.doc__box {
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--mist);
}
.doc__box p:last-child {
  margin-bottom: 0;
}
.doc .btn {
  width: auto;
  max-width: 100%;
  display: inline-flex;
  margin-top: 4px;
  text-decoration: none;
  font-size: 17px;
  min-height: 50px;
}
.doc .btn--primary {
  color: #fff;
}
.faq {
  display: grid;
  gap: 12px;
}
.faq__item {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--mist);
}
.faq__item h3 {
  margin: 0 0 6px;
}
.faq__item p:last-child,
.faq__item ul:last-child {
  margin-bottom: 0;
}
.doc__footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--ink-50);
}
.doc__footer a {
  color: var(--ink-50);
  text-decoration: none;
}
.doc__footer a:hover {
  text-decoration: underline;
}
.doc__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 10px;
  font-size: 13px;
}
.doc__langs a {
  color: var(--ink-50);
  text-decoration: none;
}
.doc__langs a[aria-current="true"] {
  color: var(--ink);
  font-weight: 700;
}

@media (min-width: 720px) {
  .doc {
    padding: 28px 32px 36px;
  }
  .doc h1 {
    font-size: 40px;
    margin-top: 44px;
  }
}
