/* iCafePos public site.
   The site wears the product's own skin: every colour below is sampled from
   the shipped apps — page ground and panels from POS/pos_touch.css, the
   deep header/footer and accent from SERVER/static/css/admin.css. No
   framework, no external fonts (shared hosting, no CDN): Segoe is what the
   product itself renders in, and the monospace "receipt voice" (Consolas)
   is the product's most tangible artifact — the printed slip — used for
   eyebrows, prices and codes.
   Signature element: the white receipt card in the hero (and the pricing
   slip). It is deliberately the ONLY white surface on the site — the
   customer's shop name big, "Powered by iCafePos" small, which is the
   product's brand model made visible. */

:root {
  /* dark ground — POS palette */
  --ground: #141719;
  --panel: #1a1e21;
  --panel-2: #20252a;
  --line: #2c3338;
  --text: #d4dade;
  --text-2: #a9b3ba;
  --muted: #84909a;
  /* deepest edges — Back Office sidebar */
  --edge: #0d1316;
  /* accent — the family teal */
  --teal: #22b6c9;
  --teal-hi: #35c4d6;
  --teal-ink: #04181c;
  /* the receipt: the one white thing */
  --paper: #ffffff;
  --paper-ink: #1c2422;
  --paper-soft: #5c6b67;
  --paper-rule: #cfd8d5;
  /* status (Back Office trio) */
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;

  --mono: Consolas, "Cascadia Mono", "SF Mono", Menlo, monospace;
  --max-width: 1000px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }   /* native widgets and scrollbars render dark */
html, body { margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--ground);
  line-height: 1.55;
  font-size: 17px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

img { max-width: 100%; }

a { color: var(--teal); }
a:hover { color: var(--teal-hi); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* The receipt voice: labels, prices, codes. */
.mono, .eyebrow {
  font-family: var(--mono);
}

.eyebrow {
  font-size: 0.72em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1em;
}

/* Header */

.site-header {
  background: var(--edge);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
}

.brand { display: flex; align-items: center; }
.brand img { display: block; }

.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95em;
}

.site-nav a:hover { color: #ffffff; }

.site-nav a.active {
  background: rgba(34, 182, 201, 0.16);
  color: var(--teal-hi);
}

/* Main content */

main { min-height: 60vh; }

section { padding: 44px 0; }

/* Pages that don't open with the hero still get air under the header. */
main > section.wrap:first-child { padding-top: 64px; }

/* Receipt-style tear line between the page's sections. */
section.wrap + section.wrap {
  border-top: 1px dashed var(--line);
}

h1 {
  font-size: 2.3em;
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: -0.02em;
  color: #ffffff;
}

h2 {
  font-size: 1.5em;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: #ffffff;
}

h3 { font-size: 1.15em; margin: 0 0 0.4em; }

p { margin: 0 0 1em; }

.lede {
  font-size: 1.12em;
  color: var(--text-2);
  max-width: 34em;
}

/* Hero */

.hero {
  background: linear-gradient(180deg, var(--edge) 0%, var(--ground) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero .wrap {
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, auto);
  gap: 48px;
  align-items: center;
}

/* The receipt — the signature. White paper, mono, a slight tilt, a torn
   bottom edge. The demo shop's own name leads; iCafePos is the small
   credit at the foot, exactly as it is on a real slip. */

.receipt {
  background: var(--paper);
  color: var(--paper-ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  width: 300px;
  padding: 20px 18px 26px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  transform: rotate(1.6deg);
  position: relative;
  justify-self: center;
}

.receipt::after {
  /* torn bottom edge */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px; height: 8px;
  background:
    linear-gradient(-45deg, transparent 70%, var(--paper) 71%) 0 0 / 12px 8px repeat-x,
    linear-gradient(45deg, transparent 70%, var(--paper) 71%) 6px 0 / 12px 8px repeat-x;
}

.receipt .shop {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.receipt .shop-sub {
  text-align: center;
  color: var(--paper-soft);
  font-size: 11px;
  margin-bottom: 8px;
}

.receipt hr {
  border: 0;
  border-top: 1px dashed var(--paper-rule);
  margin: 8px 0;
}

.receipt .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.receipt .row span:last-child { white-space: nowrap; }

.receipt .sub {
  color: var(--paper-soft);
  font-size: 11px;
  padding-left: 10px;
}

.receipt .total { font-weight: 700; font-size: 14px; }

.receipt .credit {
  text-align: center;
  color: var(--paper-soft);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  margin-top: 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero .receipt {
    animation: receipt-print 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  }
  @keyframes receipt-print {
    from { transform: translateY(28px) rotate(1.6deg); opacity: 0; }
    to   { transform: translateY(0) rotate(1.6deg); opacity: 1; }
  }
}

/* Buttons */

.btn {
  display: inline-block;
  background: var(--teal);
  color: var(--teal-ink);
  text-decoration: none;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 8px;
  border: none;
  font-size: 1em;
  cursor: pointer;
}

.btn:hover { background: var(--teal-hi); color: var(--teal-ink); }

.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
  padding: 11px 21px;
}

.btn-secondary:hover {
  background: rgba(34, 182, 201, 0.12);
  color: var(--teal-hi);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.2em;
}

/* Grids of cards (value props / audience) */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 1.5em;
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: var(--panel);
  transition: border-color 0.15s ease;
}

.card:hover { border-color: var(--teal); }

.card h3 { color: var(--teal); }

.card p { color: var(--text-2); margin: 0; }

/* Feature list rows */

.feature-list {
  list-style: none;
  margin: 1.5em 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.feature-list li {
  border-left: 3px solid var(--teal);
  padding: 6px 0 6px 16px;
}

.feature-list h3 { margin-bottom: 0.2em; color: #ffffff; }

.feature-list p { margin: 0; color: var(--text-2); }

/* Screenshot / image placeholders */

.screenshot-placeholder {
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  padding: 60px 20px;
  text-align: center;
  font-weight: 600;
}

/* App screenshots — quiet framed windows. The receipt stays the one white,
   bold thing on the site; these sit back on the dark panel and just show the
   product. A hairline frame, a soft drop, and a mono caption in the receipt
   voice. */

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.shot img { display: block; width: 100%; height: auto; }

.shot figcaption {
  font-family: var(--mono);
  font-size: 0.76em;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

/* The lead shot under the hero — the till, shown big and centred. */
.shot-lead { max-width: 880px; margin: 0 auto; }

/* Product tour — a screenshot beside its explanation, sides alternating.
   Deliberately NOT numbered: these are surfaces of one product shown at
   once, not steps in a sequence. The mono eyebrow names the surface. */

.tour { display: grid; gap: 44px; margin-top: 1.8em; }

.tour-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.tour-row.reverse .tour-media { order: 2; }

.tour-text .eyebrow { margin-bottom: 0.5em; }
.tour-text h3 { font-size: 1.3em; color: #ffffff; margin-bottom: 0.3em; }
.tour-text p { color: var(--text-2); margin: 0; }

/* Checklist beside a feature screenshot — teal ticks, the receipt's ok-green
   would fight the accent, so ticks take the family teal. */
.tour-text ul {
  list-style: none;
  margin: 0.6em 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tour-text li {
  position: relative;
  padding-left: 24px;
  color: var(--text-2);
}

.tour-text li strong { color: var(--text); font-weight: 600; }

.tour-text li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal);
  font-weight: 700;
}

/* Pricing — the price prints on the same paper as the hero slip. */

.price-slip {
  margin: 1.5em 0;
}

.price-slip .receipt {
  width: 340px;
  transform: none;
  justify-self: start;
}

.price-slip .receipt .row.price-line span:last-child {
  font-weight: 700;
  font-size: 15px;
}

.price-note {
  color: var(--ok);
  font-size: 11px;
  padding-left: 10px;
}

/* Legacy price box (kept styled in case anything still uses it) */
.price-box {
  border: 1px solid var(--teal);
  border-radius: 12px;
  padding: 28px;
  max-width: 420px;
  background: var(--panel);
}

.price-figure {
  font-family: var(--mono);
  font-size: 2.2em;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 0.2em;
}

.price-figure small { font-size: 0.4em; font-weight: 600; color: var(--text-2); }

.inclusions { margin: 1em 0; padding-left: 1.2em; color: var(--text-2); }
.inclusions li { margin-bottom: 0.5em; }

/* Pricing plans — three ways to pay for the one product (the tiers differ
   only in billing, so the features live once, below). Dark family cards; the
   price speaks in the receipt's mono voice, and the yearly plan is featured. */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 1.8em 0 0.5em;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 28px 24px 26px;
}

.plan.featured {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal) inset, 0 16px 40px rgba(0, 0, 0, 0.45);
}

.plan-tag {
  position: absolute;
  top: -11px;
  left: 24px;
  font-family: var(--mono);
  font-size: 0.62em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--teal);
  color: var(--teal-ink);
  padding: 3px 10px;
  border-radius: 6px;
}

.plan-name {
  font-family: var(--mono);
  font-size: 0.78em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 0.5em;
}

.plan-price {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 2.7em;
  line-height: 1;
  color: var(--teal);
  margin: 0;
}

.plan-price small {
  font-size: 0.32em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-left: 5px;
}

.plan-note {
  font-size: 0.92em;
  color: var(--text-2);
  margin: 0.7em 0 0;
}

.plan-note.save { color: var(--ok); }

/* Full-width CTA, pinned to the card foot so all three line up whatever the
   note length. The 22px min-gap keeps it off the note on the shortest card. */
.plan .btn,
.plan .btn-secondary {
  display: block;
  text-align: center;
  margin-top: auto;
  padding: 12px 22px;
}

.plan-note { margin-bottom: 22px; }

/* Screenshot gallery — grouped thumbnails; click one to open it full-size. */

.gallery-group { margin-top: 2.2em; }

.gallery-group > h2 {
  font-family: var(--mono);
  font-size: 0.86em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 0.8em;
}

.thumb {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  cursor: zoom-in;
  transition: border-color 0.15s ease;
}

.thumb:hover { border-color: var(--teal); }
.thumb img { display: block; width: 100%; height: auto; }

/* Lightbox overlay (built by gallery.js) */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 9, 11, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 6vw;
}

.lightbox[hidden] { display: none; }

.lb-fig {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-fig img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6);
}

.lb-fig figcaption {
  font-family: var(--mono);
  font-size: 0.8em;
  color: var(--text-2);
  text-align: center;
  padding-top: 12px;
}

.lb-btn {
  position: fixed;
  background: rgba(20, 23, 25, 0.85);
  color: var(--text);
  border: 1px solid var(--line);
  width: 46px;
  height: 46px;
  border-radius: 8px;
  font-size: 1.5em;
  line-height: 1;
  cursor: pointer;
}

.lb-btn:hover { border-color: var(--teal); color: #ffffff; }

.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: no-preference) {
  .lightbox { animation: lb-in 0.18s ease both; }
  @keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
}

/* Forms */

form.stacked { max-width: 480px; }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(34, 182, 201, 0.2);
}

/* Chrome autofill paints fields white; keep them on the dark panel. */
.field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--panel-2) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

textarea { resize: vertical; min-height: 120px; }

.notice {
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 1.2em;
}

.notice-success {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid var(--ok);
  color: #8ce8c3;
}

.notice-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--danger);
  color: #f5a9a9;
}

.hint { font-size: 0.9em; color: var(--muted); }

/* Contact details block */

.contact-details {
  display: grid;
  gap: 10px;
  margin: 1.2em 0;
}

.contact-details a { font-weight: 600; }

/* Who it's for row */

.audience-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 1.5em;
}

.audience-row .card { text-align: center; }

/* Footer */

.site-footer {
  background: var(--edge);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9em;
  margin-top: 44px;
}

.site-footer .wrap {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer .footer-mark { opacity: 0.8; }

.site-footer .sep { color: var(--line); }

.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--teal); }

/* Discord
   ---------------------------------------------------------------------
   Blurple is Discord's, not ours, and their brand guidelines ask that the
   mark is not recoloured into a host site's palette - so this is the one
   place on the site that is deliberately off-palette. It is confined to the
   mark and the button; the footer link stays muted like its neighbours. */

.discord-mark { flex: none; vertical-align: -0.15em; }

/* Footer: inherits the muted grey of the links either side of it, so it
   reads as one more footer item rather than a badge. */
.site-footer .footer-discord {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: underline;
}
.site-footer .footer-discord .discord-mark { width: 16px; height: 16px; }

/* Contact page: the support call-out. Same shape as .card so it sits in the
   page's existing vocabulary, with the mark alongside rather than above. */
.discord-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: var(--panel);
  margin: 1.6em 0 2em;
}

.discord-card .discord-mark { color: #5865f2; margin-top: 2px; }
.discord-card h2 { margin: 0 0 0.4em; font-size: 1.25em; }
.discord-card p { margin: 0 0 0.8em; }
.discord-card-body { min-width: 0; }
.discord-card .muted-note { color: var(--muted); font-size: 0.92em; }

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #5865f2;
  color: #ffffff;
}
.btn-discord:hover { background: #4752c4; color: #ffffff; }
.btn-discord .discord-mark { color: #ffffff; }

/* Responsive: phones (cafe owners browse on phones) */

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .receipt { justify-self: center; }
  /* Tour stacks; the image always leads, whatever side it took on desktop. */
  .tour-row { grid-template-columns: 1fr; gap: 18px; }
  .tour-row.reverse .tour-media { order: 0; }
  /* Plans stack; the featured one keeps its ring but no longer needs to lead. */
  .plans { grid-template-columns: 1fr; }
  /* The Discord call-out stacks: its mark over its text. */
  .discord-card { flex-direction: column; gap: 12px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7em; }
  .site-header-inner { flex-direction: column; align-items: flex-start; }
  .hero .wrap { padding-top: 40px; padding-bottom: 40px; }
  .price-slip .receipt { width: 100%; max-width: 340px; }
}
