/*
 * Azee marketing site.
 *
 * Deliberately one stylesheet, no build step and no framework - matching the
 * app's own "no React, no Tailwind" rule. The tokens below extend what already
 * ships in extensions/loyalty-widget/assets/loyalty.css so the site, the
 * storefront widget and the App Store screenshots read as one product.
 */

:root {
  /* Brand, from brand/README.md: ink #141B34, amber #F5A524.
     Matching these exactly is what makes the site, the App Store icon and the
     listing header read as one product rather than three. */
  --ink: #141B34;
  --ink-soft: #3a4257;
  --muted: #6b7280;
  --rule: #e3e5ea;
  --bg: #ffffff;
  --bg-sunk: #f8f9fb;

  /* Amber is a graphic colour - at 2:1 on white it is unreadable as text, so
     anything that has to be READ uses --accent-ink instead. */
  --accent: #f5a524;
  --accent-ink: #8a5300;
  --accent-wash: #fdf6e8;
  --accent-rule: #f3ddb0;

  /* Shopify's own green, used for one thing only: buttons that leave for the
     Shopify App Store. It is a platform affordance, not our brand - which is
     why it never appears anywhere else on the site. Contrast with white text
     is 4.9:1, so it passes AA for body-sized text. */
  --shopify: #008060;
  --shopify-dark: #004c3f;

  /* No third hue. Everything that would conventionally be green or red is
     drawn in ink or muted instead - the page carries enough meaning through
     position and weight, and a fourth colour made it noisy. */
  --down: #8a8f9c;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  --shell: 1120px;
  --prose: 62ch;

  --step: clamp(3rem, 7vw, 5.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: var(--muted); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; color: #fff; }

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

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-head .shell {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 650; letter-spacing: -.02em; font-size: 1.05rem;
  color: var(--ink); text-decoration: none;
}
.brand svg { display: block; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav .btn { text-decoration: none; }
@media (max-width: 640px) {
  .nav { gap: 14px; }
  .nav .nav-hide { display: none; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r-sm); border: 1px solid transparent;
  font: inherit; font-size: .95rem; font-weight: 550; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
/* Install / upgrade actions that hand off to the Shopify App Store. */
.btn-shopify { background: var(--shopify); color: #fff; }
.btn-shopify:hover { background: var(--shopify-dark); color: #fff; }
.btn-shopify svg { flex: none; opacity: .9; }

/* Same platform colour, secondary weight - for the free plan, so the paid card
   still reads as the primary action. */
.btn-shopify-outline {
  background: #fff; color: var(--shopify-dark);
  box-shadow: inset 0 0 0 1px var(--shopify);
}
.btn-shopify-outline:hover { background: #f2f9f6; color: var(--shopify-dark); }
.btn-shopify-outline svg { flex: none; opacity: .85; }

.btn-secondary { background: #fff; color: var(--ink); border-color: var(--rule); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: .875rem; color: var(--muted); margin: 14px 0 0; }

/* -------------------------------------------------------------- sections */

section { padding: var(--step) 0; }
/* The header is sticky, so an anchored section would otherwise land underneath it. */
section[id] { scroll-margin-top: 76px; }
section + section { border-top: 1px solid var(--rule); }
section.sunk { background: var(--bg-sunk); }

.eyebrow {
  font-size: .78rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px;
}

h1, h2, h3 { letter-spacing: -.025em; line-height: 1.12; margin: 0 0 16px; font-weight: 640; }
h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.1rem; line-height: 1.3; }

.lede { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--ink-soft); max-width: var(--prose); }
.sub { color: var(--muted); max-width: var(--prose); }
.sec-head { max-width: var(--prose); margin-bottom: 44px; }
.sec-head p { margin: 0; }

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

.hero { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.02fr .98fr; } }
.hero h1 { margin-bottom: 20px; }
.hero .lede { margin: 0 0 28px; }

.hero-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 9px; }
.hero-points li {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px;
  font-size: .95rem; color: var(--ink-soft);
}
.hero-points svg { margin-top: 5px; color: var(--ink); }

/* ------------------------------------------------------------ demo panel */

.demo-frame {
  border: 1px solid var(--rule); border-radius: var(--r-lg); background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -12px rgba(0,0,0,.14);
  overflow: hidden;
}
.demo-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--rule); background: var(--bg-sunk);
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots i { width: 9px; height: 9px; border-radius: 50%; background: #d9d9d9; display: block; }
.demo-url {
  font-size: .75rem; color: var(--muted); background: #fff;
  border: 1px solid var(--rule); border-radius: 999px; padding: 3px 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.demo-tag {
  margin-left: auto; font-size: .68rem; font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.demo-body { padding: 22px; }

/* The widget mock mirrors extensions/loyalty-widget/assets/loyalty.css so what
   a visitor plays with here looks like what they will actually install. */
.w-card {
  border: 1px solid rgba(0,0,0,.1); border-radius: var(--r-md); padding: 20px;
}
.w-title { margin: 0 0 12px; font-size: 1.1rem; font-weight: 600; }
.w-balance { font-size: 2rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.w-sub { opacity: .7; font-size: .875rem; margin-top: 4px; }
.w-btn {
  margin-top: 14px; padding: 10px 16px; border-radius: var(--r-sm); border: 0;
  background: #1a1a1a; color: #fff; cursor: pointer; font: inherit; font-size: .9rem;
}
/* A filled grey slab reads as a broken button. Outline it instead - it is a
   state, not an action. */
.w-btn[disabled] {
  background: transparent; color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--rule); cursor: not-allowed;
}
/* The one place amber does real work: the reward itself. */
.w-code {
  margin-top: 12px; padding: 10px; border-radius: var(--r-sm);
  background: var(--accent-wash); border: 1px solid var(--accent-rule);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem;
}
.w-history { margin-top: 14px; font-size: .8rem; opacity: .75; }
.w-history div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.w-history span:last-child { font-variant-numeric: tabular-nums; }

.demo-controls {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 14px 22px; border-top: 1px solid var(--rule); background: var(--bg-sunk);
}
.demo-controls .hint { font-size: .8rem; color: var(--muted); margin-left: auto; }
@media (max-width: 520px) { .demo-controls .hint { margin-left: 0; width: 100%; } }

.ledger {
  margin: 0; padding: 14px 16px; border-top: 1px solid var(--rule);
  background: #fbfbfb;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem; line-height: 1.7; color: var(--ink-soft);
  max-height: 170px; overflow-y: auto;
}
.ledger-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: -apple-system, system-ui, sans-serif; font-size: .7rem;
  font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.ledger-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.ledger-row span:nth-child(2),
.ledger-row span:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-row .up { color: var(--ink); font-weight: 600; }
.ledger-row .down { color: var(--down); font-weight: 600; }
.ledger-check {
  display: flex; align-items: center; gap: 7px;
  font-family: -apple-system, system-ui, sans-serif; font-size: .78rem;
  color: var(--ink); margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--rule);
}

/* ------------------------------------------------------------- POS mock */

.split { display: grid; gap: clamp(2rem, 4.5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split.flip > *:first-child { order: 2; }
@media (max-width: 899px) { .split.flip > *:first-child { order: 0; } }

.pos {
  max-width: 380px; margin: 0 auto;
  border: 1px solid var(--rule); border-radius: 22px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 18px 40px -18px rgba(0,0,0,.2);
  overflow: hidden;
}
.pos-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; background: var(--ink); color: #fff; font-size: .9rem; font-weight: 550;
}
.pos-bar .pos-close { margin-left: auto; opacity: .55; font-size: 1.1rem; line-height: 1; }
.pos-body { padding: 20px 18px 22px; }
.pos-cust { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pos-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--accent-wash); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 650; font-size: .85rem;
}
.pos-cust strong { display: block; font-size: .95rem; font-weight: 600; }
.pos-cust span { font-size: .8rem; color: var(--muted); }
.pos-figure {
  border: 1px solid var(--rule); border-radius: var(--r-md);
  padding: 16px; text-align: center; margin-bottom: 14px;
}
.pos-figure b { display: block; font-size: 2rem; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pos-figure span { font-size: .85rem; color: var(--muted); }
.pos-btn {
  display: block; width: 100%; padding: 13px; border: 0; border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font: inherit; font-size: .95rem; font-weight: 600;
}
.pos-foot { font-size: .78rem; color: var(--muted); text-align: center; margin: 12px 0 0; }

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

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

.card {
  border: 1px solid var(--rule); border-radius: var(--r-md);
  padding: 24px; background: #fff;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .95rem; color: var(--muted); }
.card .ico { color: var(--ink); margin-bottom: 14px; display: block; }

/* The symptom / answer pairs. */
.fail {
  border: 1px solid var(--rule); border-radius: var(--r-md);
  padding: 22px; background: #fff;
}
.fail .symptom {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: .95rem; font-weight: 550; color: var(--ink); margin: 0 0 12px;
}
.fail .symptom svg { flex: none; margin-top: 3px; color: var(--down); }
.fail .answer {
  margin: 0; padding-top: 12px; border-top: 1px solid var(--rule);
  font-size: .9rem; color: var(--muted);
}
.fail .answer b { color: var(--ink-soft); font-weight: 600; }

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

.steps { counter-reset: s; display: grid; gap: 22px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { counter-increment: s; }
.step::before {
  content: counter(s);
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; margin-bottom: 14px;
  background: var(--ink); color: #fff; font-size: .85rem; font-weight: 650;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; font-size: .95rem; color: var(--muted); }

/* -------------------------------------------------------------- pricing */

.plans { display: grid; gap: 20px; align-items: start; }
@media (min-width: 820px) { .plans { grid-template-columns: 1fr 1fr; } }

.plan {
  border: 1px solid var(--rule); border-radius: var(--r-lg);
  padding: 28px; background: #fff; display: flex; flex-direction: column; height: 100%;
}
.plan.feature { border-color: var(--ink); box-shadow: 0 12px 32px -18px rgba(0,0,0,.3); }
.plan-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.plan-name { font-size: .8rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.plan.feature .plan-name { color: var(--ink); }
.pill {
  font-size: .68rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  background: var(--accent-wash); color: var(--accent-ink);
  border: 1px solid var(--accent-rule); border-radius: 999px; padding: 2px 9px;
}
.price { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 4px; }
.price b { font-size: 2.6rem; font-weight: 640; letter-spacing: -.03em; line-height: 1; }
.price span { color: var(--muted); font-size: .95rem; }
.plan .plan-for { margin: 0 0 20px; font-size: .95rem; color: var(--muted); }
.plan .btn { width: 100%; }
.plan-trial { font-size: .85rem; color: var(--muted); text-align: center; margin: 10px 0 0; }

.ticks { list-style: none; margin: 22px 0 0; padding: 22px 0 0; border-top: 1px solid var(--rule); display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: .93rem; }
.ticks svg { margin-top: 5px; color: var(--ink); }
.ticks .inherit { color: var(--muted); font-weight: 550; }

.plan-flex { flex: 1 1 auto; }

/* -------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: var(--r-md); }
table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: .95rem; background: #fff; }
caption { text-align: left; padding: 16px 18px 0; font-size: .95rem; color: var(--muted); }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--rule); }
thead th {
  font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-sunk);
}
tbody tr:last-child td { border-bottom: 0; }
td.no { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* ----------------------------------------------------------- promises */

.promise {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  border: 1px solid var(--rule); background: #fff;
  border-radius: var(--r-md); padding: 18px 20px;
}
.promise svg { margin-top: 4px; color: var(--ink); }
.promise p { margin: 0; font-size: .95rem; }
.promise p + p { margin-top: 6px; color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------- FAQ */

.faq { max-width: 780px; }
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 30px 18px 0; position: relative;
  font-weight: 550; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; font-weight: 400; color: var(--muted); line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: .95rem; max-width: var(--prose); }

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

.lead-form { display: grid; gap: 12px; max-width: 460px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 550; }
.field input, .field textarea {
  font: inherit; font-size: .95rem; padding: 11px 13px;
  border: 1px solid var(--rule); border-radius: var(--r-sm); background: #fff; color: var(--ink);
  width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; }
.field .help { font-size: .8rem; color: var(--muted); }
/* Honeypot: hidden from people, reachable by naive bots. Not display:none,
   which some bots specifically skip. */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------- closing */

.closer { text-align: center; }
.closer .sec-head { margin-left: auto; margin-right: auto; }
.closer .cta-row { justify-content: center; }

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

.site-foot {
  border-top: 1px solid var(--rule); padding: 40px 0;
  font-size: .9rem; color: var(--muted);
}
.site-foot .shell { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .spacer { margin-left: auto; }
/* Trademark attribution. Required by Shopify's guidelines: a page naming them
   must link to shopify.com, and must not imply their endorsement. */
.site-foot .legal {
  margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--rule);
  font-size: .8rem; line-height: 1.6; color: var(--muted); max-width: 70ch;
}
.site-foot .legal a { text-decoration: underline; }
@media (max-width: 640px) { .site-foot .spacer { margin-left: 0; width: 100%; } }

.small { font-size: .85rem; color: var(--muted); }
