/* rupertpos.com landing page (signed-out root, landing/index.html.erb).
   Colors are Rupert's own appearance tokens, copied from
   web/app/assets/tailwind/application.css so the site looks like the app:
   light = Herbal (the default appearance), dark = Rupert Dark, chosen by the
   visitor's system setting. Change colors here only, in these two blocks.
   Research basis is documented with the app tokens (blue-green hues preferred,
   low saturation reads calm, one hue at strong lightness contrast). */
:root {
  color-scheme: light;
  --page: #e6efea;        /* oat: page background */
  --band: #dce8e2;        /* cream: alternate section band */
  --card: #fbfdfc;        /* paper: cards and panels */
  --tint: #dfebe5;        /* haze: tiles, chips */
  --line: #cddad3;        /* fog: dividers, card edges */
  --edge: #778a86;        /* control borders, 3:1 on card */
  --ink: #17353a;         /* primary text */
  --ink-2: #36504f;       /* mocha: secondary text */
  --ink-3: #47605f;       /* taupe: labels */
  --accent: #0e6f72;      /* olive: links, primary buttons, focus */
  --accent-ink: #0b585a;  /* olive-deep: accent text on tints */
  --on-accent: #ffffff;
  --bezel: #17353a;       /* phone frame around the phone screenshot */
  --shadow: 23 53 58;
  --radius-control: 12px;
  --radius-card: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-display: "New York", ui-serif, "Iowan Old Style", "Cardo", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #111514;
    --band: #1a1f1e;
    --card: #1b2120;
    --tint: #232b29;
    --line: #2b3331;
    --edge: #6f7d7a;
    --ink: #eaf0ef;
    --ink-2: #b7c3c1;
    --ink-3: #97a5a2;
    --accent: #5fa39b;
    --accent-ink: #8fcbc3;
    --on-accent: #0c1413;
    --bezel: #2b3331;
    --shadow: 0 0 0;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.015em; }
h1 { font-size: clamp(38px, 5.2vw, 62px); line-height: 1.06; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.14; max-width: 22ch; }
h3 { font-size: 17px; font-weight: 600; line-height: 1.3; }
p { margin: 0; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent-ink); margin-bottom: 12px; }
.note { font-size: 13px; color: var(--ink-3); }
.section-lead { margin-top: 16px; max-width: 62ch; font-size: 17px; color: var(--ink-2); }
.link { display: inline-block; margin-top: 20px; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 20px;
  border: 1px solid var(--accent); border-radius: var(--radius-control);
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.button:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.button.quiet { background: transparent; color: var(--accent-ink); border-color: var(--edge); }
.button.quiet:hover { background: var(--tint); }
.button.small { min-height: 38px; padding: 6px 14px; font-size: 14px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -0.01em; }
.mark { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.mark.small { width: 22px; height: 22px; margin-right: 8px; vertical-align: -6px; }
.links { display: flex; align-items: center; gap: 22px; }
.links a:not(.button) { color: var(--ink-2); font-size: 15px; text-decoration: none; }
.links a:not(.button):hover { color: var(--ink); }
.links a { white-space: nowrap; }

/* Hero: headline and pitch over a wide product screenshot. */
.hero { padding-top: 80px; padding-bottom: 88px; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; }
.hero-copy .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.lead { max-width: 54ch; font-size: 19px; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 12px; }

/* Product screenshots: a hairline frame and a soft ink-tinted shadow, swapped for the
   dark capture when the visitor's system is dark. */
.shot { display: block; overflow: hidden; border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--card);
  box-shadow: 0 1px 2px rgb(var(--shadow) / .06), 0 28px 60px -28px rgb(var(--shadow) / .35); }
.shot img { display: block; width: 100%; height: auto; }
.hero-shot { position: relative; margin: 56px 0 0; padding-right: 72px; }
.hero-shot .phone { position: absolute; right: 0; bottom: -36px; width: 21%; max-width: 230px; border-radius: 28px; border: 6px solid var(--bezel); }
.hero-shot figcaption { margin-top: 18px; }

/* Sections */
.section { padding-top: 96px; padding-bottom: 96px; }
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 96px 0; }

.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 56px; align-items: center; margin-top: 88px; }
.feature.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); }
.feature.flip .feature-copy { order: 2; }
.feature-name { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 600; color: var(--accent-ink); }
.feature h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -0.01em; }
.feature-copy > p:not(.feature-name) { margin-top: 12px; color: var(--ink-2); font-size: 16px; }
.feature ul { margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 15px; color: var(--ink-2); }
.feature li { padding: 4px 0 4px 18px; position: relative; }
.feature li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--tint); }
.icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.day { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: day; }
.day li { position: relative; padding: 28px 22px 0 0; border-top: 2px solid var(--line); }
.day li::before {
  content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--page); border: 2px solid var(--accent);
}
.day .step { display: block; font-size: 13px; font-weight: 600; color: var(--accent-ink); margin-bottom: 6px; }
.day p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }

.connect { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.logos li {
  display: flex; align-items: center; min-height: 64px; padding: 0 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-control);
  font-weight: 600; color: var(--ink);
}

.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }
.plan > p:not(.note) { color: var(--ink-2); font-size: 15px; }
.plan .button { margin-top: auto; }
.plan .note { margin-bottom: 12px; }
.plan.featured { border: 2px solid var(--accent); padding: 27px; }
.badge { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--accent-ink); background: var(--tint); border-radius: 999px; padding: 4px 12px; }
.price { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.price small { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }

.trust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.trust p { color: var(--ink-2); font-size: 17px; }
.trust .note { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.trust .link { margin-right: 24px; }
.pricing-terms { margin-top: 20px; }
.pricing-terms a, .faq details a { color: inherit; text-decoration: underline; }

.faq h2 { margin-bottom: 28px; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 60px; font-weight: 600; font-size: 17px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--accent); }
details[open] summary::after { content: "−"; }
details p { max-width: 72ch; padding-bottom: 20px; color: var(--ink-2); }

.closing { text-align: center; padding-top: 24px; padding-bottom: 112px; }
.closing h2 { margin: 0 auto; }
.closing p { margin: 12px 0 24px; color: var(--ink-2); font-size: 17px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; max-width: 640px; }
.foot-id { display: flex; flex-direction: column; gap: 6px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

a:focus-visible, summary:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 20; background: var(--card); color: var(--ink); padding: 12px 16px; border-radius: var(--radius-control); }

/* Closing call to action: create an account or ask for a demo, centred. */
.closing .actions { justify-content: center; margin: 0 0 16px; }
.closing .note { margin: 0; font-size: 14px; }
.closing .note a { color: inherit; }

/* Side by side, a plan without a badge starts its heading level with the badged ones. */
@media (min-width: 861px) {
  .plan > h3:first-child { margin-top: 38px; }
}

/* The footer rule spans the content column, not the side gutters. */
.foot { position: relative; border-top: 0; }
.foot::before { content: ""; position: absolute; top: 0; left: 32px; right: 32px; border-top: 1px solid var(--line); }

@media (max-width: 1040px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; margin-top: 64px; }
  .feature.flip .feature-copy { order: 0; }
  .feature-copy { max-width: 60ch; }
  .day { grid-template-columns: 1fr; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
  .day li { border-top: 0; padding: 0 0 28px 28px; }
  .day li::before { top: 4px; left: -8px; }
}
@media (max-width: 860px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .links { gap: 14px; }
  .links .optional { display: none; }
  .hero-copy, .connect, .trust { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { gap: 20px; }
  .hero { padding-top: 48px; padding-bottom: 72px; }
  .hero-shot { margin-top: 40px; padding-right: 40px; }
  .hero-shot .phone { width: 26%; border-width: 4px; border-radius: 20px; bottom: -28px; }
  .hero-shot figcaption { margin-top: 44px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .band { padding: 64px 0; }
  .pricing { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero-shot { padding-right: 24px; }
  .hero-shot .phone { width: 28%; border-radius: 16px; }
  .hero-shot figcaption { margin-top: 18px; padding-right: 32%; }
  .lead { font-size: 17px; }
  .actions .button { flex: 1 1 auto; }
  .brand { font-size: 18px; }
  .links a[href$="/login"] { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}

/* Phones: keep the header on one line down to 320px. Sign in and Start free never wrap;
   Pricing steps aside only on the narrowest screens. */
@media (max-width: 860px) {
  .foot::before { left: 20px; right: 20px; }
}
@media (max-width: 560px) {
  .nav { gap: 12px; }
  .brand { gap: 8px; }
  .links { gap: 12px; }
  .links a { white-space: nowrap; }
  .links .button.small { padding: 6px 12px; }
}
@media (max-width: 350px) {
  .links a[href="#pricing"] { display: none; }
}
