/* QRcigar landing page (cigarshare frontend/QRCIGAR-ONBOARDING.md §8).
   Its own identity, not CigarShare's: vibrant red, white and gray. Every
   color is a token here; the text/background pairs below clear WCAG AA
   (red on white 4.96:1, white on red 4.96:1, gray-500 on white 5.05:1,
   gray-500 on gray-50 4.67:1, red on gray-50 4.59:1, white on gray-500 for
   the disabled button 5.05:1). */

:root {
  --red: #d7263d;
  --red-deep: #a3122a;
  --red-tint: #fdeef0;
  --white: #ffffff;
  --gray-50: #f6f6f7;
  --gray-100: #eef0f2;
  --gray-200: #dfe2e6;
  --gray-400: #9a9ea6;
  --gray-500: #6b6f76;
  --gray-700: #3c4047;
  --ink: #1b1d21;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 29, 33, 0.06), 0 12px 32px rgba(27, 29, 33, 0.08);
  --gutter: 16px;
  --measure: 62ch;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* The footer reaches the bottom of a short page (request-access on a
     tall screen) instead of stopping with white under it. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--red-deep);
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

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

.narrow {
  max-width: 760px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  background: var(--ink);
  color: var(--white);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: var(--gutter);
}

#main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* ...and the last band grows into the spare height, so the gap above the
   footer is that band's gray or red, not bare white. */
#main > section:last-child {
  flex: 1 0 auto;
}

/* header ------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 28px;
  height: 28px;
  fill: var(--red);
}

.brand-word {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--red);
}

.brand-word span {
  color: var(--ink);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-nav a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.top-nav a:hover {
  color: var(--ink);
}

.top-nav a[aria-current="page"] {
  color: var(--red);
  box-shadow: inset 0 -2px 0 var(--red);
  padding-bottom: 2px;
}

.top-nav .signin {
  color: var(--red);
}

/* The header's one button. `.top-nav a` above outranks `.btn-dark` (an
   element in the selector beats a lone class), so without this the button's
   text came out gray-700 on ink. Spelled with the element for the same
   reason: white on ink, 16:1, body-text size. */
.top-nav a.btn {
  color: var(--white);
  font-size: 0.95rem;
  padding: 0.6rem 1.1rem;
}

.top-nav a.btn:hover {
  color: var(--white);
}

.top-nav a.btn.is-current {
  background: var(--red);
  border-color: var(--red);
}

/* Phones: the page links drop to a row of their own under the brand and
   the button, scrolling sideways if they must, instead of vanishing (the
   footer was the only way to the other pages). `display: contents` lets the
   nav's children sit in the header row directly. */
.top-links {
  display: contents;
}

@media (max-width: 760px) {
  .top-row {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.7rem; /* not the shorthand: it would zero the gutter */
  }

  .top-nav {
    display: contents;
  }

  .brand {
    margin-right: auto;
  }

  .top-links {
    display: flex;
    order: 3;
    flex-basis: 100%;
    gap: 1.1rem;
    overflow-x: auto;
    padding: 0.55rem 0 0.75rem;
    scrollbar-width: none;
  }

  .top-links::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  .top-nav .signin {
    display: none;
  }
}

/* buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.btn-solid {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-solid:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: var(--white);
}

.btn-solid[disabled],
.btn-solid[aria-disabled="true"] {
  background: var(--gray-500);
  border-color: var(--gray-500);
  cursor: default;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--gray-200);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.btn-dark:hover {
  background: var(--gray-700);
  border-color: var(--gray-700);
  color: var(--white);
}

/* on the red band */
.btn-light {
  background: var(--white);
  color: var(--red);
  border-color: var(--white);
}

.btn-light:hover {
  background: var(--red-tint);
  border-color: var(--red-tint);
  color: var(--red-deep);
}

/* page heads ----------------------------------------------------------- */

.page-head {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(ellipse 60% 60% at 90% 0%, var(--red-tint), transparent 70%),
    var(--white);
}

.page-head .lede {
  margin-bottom: 0;
}

.more {
  margin: 2rem 0 0;
  font-weight: 700;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-band h2 {
  margin-bottom: 0.3em;
}

.cta-band p {
  margin: 0;
}

.step-long {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.step-long:last-child {
  border-bottom: 0;
}

.step-long .step-num {
  margin-top: 0.2rem;
}

.step-long h2 {
  font-size: 1.5rem;
}

.step-long p {
  color: var(--gray-700);
}

.step-long p:last-child {
  margin-bottom: 0;
}

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

.check-list li {
  position: relative;
  padding-left: 2rem;
  font-weight: 600;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* hero --------------------------------------------------------------- */

.hero {
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(2rem, 6vw, 5rem);
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, var(--red-tint), transparent 70%),
    var(--white);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }
}

.eyebrow {
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--gray-700);
  max-width: var(--measure);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

.fineprint {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.label-stage {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1 / 1.1;
}

.label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56%;
  height: auto;
  transform: translate(-50%, -50%) rotate(-6deg);
  filter: drop-shadow(0 18px 30px rgba(27, 29, 33, 0.22));
}

.label-bg {
  fill: var(--red);
}

.label-word {
  fill: var(--white);
  font-family: Cantarell, var(--font);
  font-weight: 700;
  font-size: 3.36021px;
  text-anchor: middle;
  letter-spacing: 0;
}

.label-word-info {
  letter-spacing: 0.56px;
}

.label-qr {
  fill: var(--white);
}

.scan-card {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--gray-700);
}

.scan-card strong {
  color: var(--ink);
}

.scan-card-a {
  left: -3%;
  top: 2%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: rise 0.9s ease both;
}

.scan-card-b {
  right: -3%;
  bottom: 0;
  display: grid;
  gap: 0.2rem;
  animation: rise 0.9s 0.25s ease both;
}

.scan-stat strong {
  display: inline-block;
  min-width: 3.2em;
  color: var(--red);
}

.scan-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-tint);
  flex: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scan-card {
    animation: none;
  }
}

/* bands -------------------------------------------------------------- */

.band {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  /* the sticky header must not cover a section an anchor scrolls to */
  scroll-margin-top: 72px;
}

.band-gray {
  background: var(--gray-50);
}

.band-red {
  background: var(--red);
  color: var(--white);
}

.band-red h2 {
  color: var(--white);
}

.band-red p {
  color: var(--white);
}

.link-light {
  color: var(--white);
  font-weight: 700;
}

.link-light:hover {
  color: var(--white);
  text-decoration-thickness: 2px;
}

.section-lede {
  color: var(--gray-500);
  font-size: 1.1rem;
  max-width: var(--measure);
  margin-bottom: 2rem;
}

/* steps -------------------------------------------------------------- */

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.steps li {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.steps p {
  color: var(--gray-700);
  margin: 0;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  margin-bottom: 1rem;
}

/* cards -------------------------------------------------------------- */

.cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(27, 29, 33, 0.04);
}

.card p {
  color: var(--gray-700);
  margin: 0;
}

.card-icon {
  width: 36px;
  height: 36px;
  fill: var(--red);
  color: var(--red);
  margin-bottom: 1rem;
}

/* split -------------------------------------------------------------- */

.split {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 880px) {
  .split {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
  }
}

@media (min-width: 880px) {
  .split.split-even {
    grid-template-columns: 1fr 1fr;
  }
}

/* faq ---------------------------------------------------------------- */

.faq {
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1.25rem;
}

.faq dt {
  font-weight: 700;
  font-size: 1.05rem;
}

.faq dd {
  margin: 0.25rem 0 0;
  color: var(--gray-700);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}

.faq dd:last-child {
  border-bottom: 0;
}

/* form --------------------------------------------------------------- */

.form {
  display: grid;
  gap: 1.1rem;
  max-width: 560px;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.optional {
  color: var(--gray-500);
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-tint);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--red);
}

.field textarea {
  resize: vertical;
  min-height: 6rem;
}

.captcha {
  min-height: 78px;
}

.status {
  min-height: 1.5em;
  margin: 0;
  font-weight: 600;
  color: var(--red);
}

.status.ok {
  color: var(--gray-700);
}

.done {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 560px;
}

.done h2,
.done h3 {
  color: var(--red);
  font-size: 1.5rem;
}

.done p {
  margin: 0;
}

/* footer ------------------------------------------------------------- */

.foot {
  /* The same faint rose as the infoblast card, so the foot of every page
     is set off from the content without another band of red. */
  background: #fdf4f5;
  border-top: 1px solid #f0d3d7;
  padding: 2rem 0;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.brand-word-foot {
  font-size: 1.1rem;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.foot a {
  color: var(--gray-500);
  text-decoration: none;
  font-weight: 600;
}

.foot a:hover {
  color: var(--ink);
}

/* the one card that leads the features page */

.card-featured {
  grid-column: 1 / -1;
  display: grid;
  gap: 2rem;
  align-items: center;
  /* A faint rose, lighter than --red-tint, on a soft rose border: set apart
     from the white cards without reading as a warning (owner, 2026-11-03). */
  background: #fdf4f5;
  border-color: #f0d3d7;
}

@media (min-width: 640px) {
  .card-featured {
    grid-template-columns: 1fr auto;
    padding-right: 2.5rem;
  }
}

.card-featured h3 {
  font-size: 1.4rem;
}

/* A real infoblast on a phone (assemble.py PHONE): the screenshot sits in a
   dark rounded frame. */
.phone-figure {
  margin: 0;
}

.phone-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--gray-500);
  text-align: center;
}

.phone-figure-float {
  margin: 0.25rem 0 1.25rem;
}

@media (min-width: 700px) {
  .phone-figure-float {
    float: right;
    width: 210px;
    margin: 0.25rem 0 1rem 2rem;
  }
}

.phone {
  width: 210px;
  margin: 0 auto;
  padding: 9px;
  border-radius: 28px;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.phone-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.card-featured p {
  color: var(--ink);
  max-width: var(--measure);
}

.list-tail {
  margin: 1.25rem 0 0 2rem;
  color: var(--gray-500);
  font-weight: 600;
}

/* Home, the infoblast section: the phone beside its four points. */
.phone-and-list {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
}

@media (min-width: 560px) {
  .phone-and-list {
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
  }
}

/* What you get, the labels card: the hero's label three times, in three
   colorways, as the tool would make them. */
.label-row {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  margin-top: 1.4rem;
  padding: 0 0.25rem;
}

.label.label-sm {
  position: static;
  width: 62px;
  transform: rotate(-5deg);
  filter: drop-shadow(0 6px 12px rgba(27, 29, 33, 0.18));
}

.label.label-sm:nth-child(2) {
  transform: rotate(3deg);
}

.label.label-sm:nth-child(3) {
  transform: rotate(-2deg);
}

.label-navy .label-bg {
  fill: #1f2a44;
}

.label-navy .label-word,
.label-navy .label-qr {
  fill: #e3c57a;
}

.label-cream .label-bg {
  fill: #f1e6cf;
}

.label-cream .label-word,
.label-cream .label-qr {
  fill: #4a2e1e;
}
