/* Qadrly landing — colours from the client's logo (brand/qadrly_logo.jpg): a forest-green wordmark and a gold heart
   on cream. Tokens mirror shared/theme/tokens.ts: forest for structure, cream for the page, turquoise = done,
   gold = the one thing to do. Self-hosted Commissioner; no build step, no third-party requests. */

@font-face { font-family: Commissioner; src: url('assets/fonts/Commissioner-400.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: Commissioner; src: url('assets/fonts/Commissioner-600.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: Commissioner; src: url('assets/fonts/Commissioner-700.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: Commissioner; src: url('assets/fonts/Commissioner-800.woff') format('woff'); font-weight: 800; font-display: swap; }

:root {
  --forest: #0a4a32;
  --forest-dark: #073826;
  --forest-soft: #e4efe8;
  --cream: #fbf7f0;
  --turquoise: #23948f;
  --turquoise-tint: #e1f2f1;
  /* Turquoise for small text on white: the brand turquoise is 3.7:1 there, this is 5.9:1 (WCAG AA). */
  --turquoise-text: #1a6e6a;
  --gold: #f5ae44;
  --gold-light: #f8c26e;
  --gold-text: #7a4e00;
  --ink: #16261f;
  --muted: #566760;
  --line: #e5dfd3;
  --radius: 12px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
/* Section links stop below the sticky header instead of under it. */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: Commissioner, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--cream); line-height: 1.55; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- header: sticky, frosted cream; a hairline appears once the page has scrolled (.scrolled, set by the script) */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 247, 240, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .top { background: var(--cream); } }
.top.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(10, 74, 50, 0.06); }
.top-bar { display: flex; align-items: center; gap: 22px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 800; font-size: 1.35rem; color: var(--forest); text-decoration: none; letter-spacing: -0.01em; }
.brand img { height: 36px; width: auto; }
.menu { display: flex; gap: 22px; align-items: center; font-size: 0.95rem; }
.menu a { text-decoration: none; color: var(--muted); }
.menu a:hover { color: var(--forest); }
.burger { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: 1rem; border: 2px solid transparent; transition: background 0.15s; }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-light); }
.btn-quiet { border-color: var(--forest); color: var(--forest); background: transparent; }
.btn-quiet:hover { background: var(--forest-soft); }
.btn-small { padding: 9px 16px; font-size: 0.92rem; }

/* Phones: logo, the start button and ☰. The menu drops down under the header, full width, with big tap targets;
   «Kirish» closes it as a button. Without JavaScript the links simply wrap under the bar. */
@media (max-width: 760px) {
  .top-bar { gap: 10px; padding-block: 10px; }
  .brand img { height: 30px; }
  .btn-small { padding: 8px 12px; font-size: 0.88rem; }
  html.js .burger { display: inline-grid; place-content: center; gap: 5px; width: 44px; height: 44px; margin-right: -8px; padding: 0;
    border: 0; border-radius: 8px; background: transparent; color: var(--forest); cursor: pointer; }
  .burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
  .top.open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .top.open .burger span:nth-child(2) { opacity: 0; }
  .top.open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  html.js .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px var(--gutter) 20px; background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(10, 74, 50, 0.10); font-size: 1.05rem; }
  html.js .top.open .menu { display: flex; }
  html.js .menu a { padding: 14px 2px; color: var(--ink); border-bottom: 1px solid var(--line); }
  html.js .menu a.menu-login { margin-top: 16px; padding: 12px; border: 2px solid var(--forest); border-radius: 8px;
    text-align: center; font-weight: 700; color: var(--forest); }
  html:not(.js) .top-bar { flex-wrap: wrap; }
}
/* The smallest phones (320 px): the start button stays in the hero and the menu, not in the bar. */
@media (max-width: 359px) { .top-cta { display: none; } }
@media (prefers-reduced-motion: reduce) { .top, .burger span { transition: none; } }

/* ---- hero: the real card on a Rishton plate */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-block: 40px 72px; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.05; letter-spacing: -0.03em; color: var(--forest); margin: 0 0 22px; font-weight: 800; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 30px; max-width: 34em; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .fine { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }
.plate { position: relative; aspect-ratio: 1; max-width: 520px; margin-left: auto; width: 100%; }
/* The plate: a forest-green rim with gold and white stripes (the logo's colours), drawn with gradients only. */
.plate::before { content: ''; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--cream) 0 47%, transparent 47.4%),
    radial-gradient(circle at 50% 50%, transparent 0 49%, var(--forest) 49.4% 50.6%, transparent 51%),
    repeating-conic-gradient(from 0deg, var(--forest) 0 6deg, #fff 6deg 9deg, var(--gold) 9deg 11deg, #fff 11deg 15deg),
    var(--forest);
  -webkit-mask: radial-gradient(circle, #000 70.5%, transparent 71%); mask: radial-gradient(circle, #000 70.5%, transparent 71%);
  box-shadow: 0 30px 60px rgba(10, 74, 50, 0.18); }
.plate::after { content: ''; position: absolute; inset: 23%; border-radius: 50%; border: 2px dashed rgba(10, 74, 50, 0.25); }
.plate img { position: absolute; width: 42%; height: auto; aspect-ratio: 9 / 16; left: 29%; top: 12%; border-radius: 10px; transform: rotate(-5deg); box-shadow: 0 24px 50px rgba(7, 56, 38, 0.35); z-index: 1; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-block-start: 16px; } .plate { margin: 0 auto; max-width: 400px; } }
/* Phones: the two hero buttons stack at the same full width. */
@media (max-width: 560px) { .hero .actions .btn { flex: 1 1 100%; } }

/* ---- sections */
section { padding: 72px 0; }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); color: var(--forest); letter-spacing: -0.02em; margin: 0 0 12px; line-height: 1.15; font-weight: 800; }
.section-lead { color: var(--muted); max-width: 40em; margin: 0 0 40px; font-size: 1.08rem; }
@media (max-width: 760px) { section { padding: 52px 0; } .section-lead { margin-bottom: 28px; } }

/* how it works — a real sequence, so numbered */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.steps li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 26px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--forest); color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 16px; }
.steps h3 { margin: 0 0 8px; font-size: 1.25rem; color: var(--ink); }
.steps p { margin: 0; color: var(--muted); }
.steps .when { display: inline-block; margin-top: 14px; font-size: 0.85rem; font-weight: 600; color: var(--turquoise-text); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* what HR stops doing */
.contrast { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.pairs h3 { margin: 0 0 14px; font-size: 1.1rem; }
.pairs ul { margin: 0; padding-left: 20px; color: var(--muted); }
.pairs li { margin-bottom: 10px; }
.pairs .after h3 { color: var(--turquoise-text); }
@media (max-width: 760px) { .pairs { grid-template-columns: 1fr; gap: 28px; } }

/* tariffs */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tier { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; display: flex; flex-direction: column; }
.tier h3 { margin: 0 0 4px; color: var(--forest); font-size: 1.25rem; }
.tier .size { font-weight: 700; margin: 6px 0 14px; }
.tier ul { margin: 0 0 18px; padding-left: 18px; color: var(--muted); font-size: 0.95rem; flex: 1; }
.tier.highlight { border: 2px solid var(--forest); }
.note { margin-top: 18px; font-size: 0.92rem; color: var(--muted); }
@media (max-width: 960px) { .tiers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tiers { grid-template-columns: 1fr; } }

/* shops band */
.shops { background: var(--forest); color: var(--cream); border-radius: 20px; padding: 48px clamp(24px, 5vw, 56px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.shops h2 { color: #fff; margin: 0 0 10px; font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.02em; }
.shops p { margin: 0; color: #cfe3d7; }
.shops .btn-primary { justify-self: end; }
@media (max-width: 760px) { .shops { grid-template-columns: 1fr; } .shops .btn-primary { justify-self: stretch; } }

/* footer */
footer { padding: 48px 0 56px; color: var(--muted); font-size: 0.95rem; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; }
.foot a { color: var(--forest); }
.slogan { font-weight: 600; color: var(--forest); }
