@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

:root {
  --green: #006837;
  --green-dark: #024a2b;
  --green-deep: #013a22;
  --mint: #daeee1;
  --paper: #f5f9f6;
  --ink: #12291d;
  --ink-soft: #46594e;
  --sun: #f5c518;
  --line: #c9ddd0;
  --white: #ffffff;
  --display: "Bricolage", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); letter-spacing: -0.02em; max-width: 22ch; }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--green); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: var(--green-dark); color: var(--white); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 700 1.3rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--mint); text-decoration: none; font-size: 0.95rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.nav .nav-cta { color: var(--green-deep); background: var(--sun); font-weight: 600; }
.nav .nav-cta:hover { color: var(--green-deep); background: #ffd84a; }
@media (max-width: 760px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px; border-radius: 12px;
  font: 600 1rem/1.2 var(--body); text-decoration: none; text-align: center;
  border: 2px solid transparent;
}
.btn-sun { background: var(--sun); color: var(--green-deep); }
.btn-sun:hover { background: #ffd84a; }
.btn-line { color: var(--white); border-color: rgba(218, 238, 225, 0.5); }
.btn-line:hover { border-color: var(--mint); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); }
.btn-line-dark { color: var(--green-dark); border-color: var(--green); background: var(--white); }
.btn-line-dark:hover { background: var(--mint); }

/* Hero */
.hero {
  position: relative;
  background: var(--green-dark);
  color: var(--white);
  padding: 56px 0 96px;
  overflow: hidden;
}
/* the wave from the logo, as the hero's lower edge */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 64px;
  background: var(--paper);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64V40C180 4 330 0 520 26s360 38 520 6c70-14 120-20 160-20v52z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64V40C180 4 330 0 520 26s360 38 520 6c70-14 120-20 160-20v52z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.hero-in { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(2.1rem, 1.1rem + 4.2vw, 4rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.02;
  max-width: 15ch;
}
.lead { margin-top: 22px; font-size: 1.125rem; color: var(--mint); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.operators { list-style: none; display: flex; gap: 10px; padding: 0; margin: 34px 0 0; }
.operators img { width: 40px; height: 40px; border-radius: 10px; background: var(--white); padding: 3px; }

/* The exchange slip: the page's one memorable object */
.slip {
  margin: 0; position: relative;
  background: var(--white); color: var(--ink);
  border-radius: 16px 16px 0 0;
  padding: 22px 22px 26px;
  box-shadow: 0 30px 60px -30px rgba(0, 20, 10, 0.6);
  transform: rotate(1.5deg);
  max-width: 400px; justify-self: end; width: 100%;
}
.slip::after { /* torn receipt edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background:
    linear-gradient(135deg, var(--white) 50%, transparent 50%) 0 0 / 14px 10px repeat-x,
    linear-gradient(225deg, var(--white) 50%, transparent 50%) 0 0 / 14px 10px repeat-x;
}
.slip-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 2px dashed var(--line); }
.slip-title { font: 700 1.2rem/1.2 var(--display); }
.slip-tag { font-size: 0.8rem; color: var(--ink-soft); background: var(--mint); padding: 3px 10px; border-radius: 99px; }
.slip-steps { list-style: none; margin: 14px 0 0; padding: 0; }
.slip-steps li {
  position: relative; display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0 8px 28px; font-size: 0.97rem;
}
.slip-steps li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 16px; height: 16px; border-radius: 50%;
}
.slip-steps li.ok::before {
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.slip-steps li.now { font-weight: 600; }
.slip-steps li.now::before { border: 3px solid var(--sun); background: var(--white); animation: pulse 1.8s ease-out infinite; }
.slip-steps time { color: var(--ink-soft); font-size: 0.85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.slip-code { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--paper); }
.slip-code p { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 10px; }
.slip figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--ink-soft); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 197, 24, 0.6); }
  100% { box-shadow: 0 0 0 9px rgba(245, 197, 24, 0); }
}

.digits { display: flex; gap: 8px; }
.digits b {
  display: grid; place-items: center;
  width: 46px; height: 54px; border-radius: 10px;
  background: var(--sun); color: var(--green-deep);
  font: 800 1.7rem/1 var(--display); font-variant-numeric: tabular-nums;
}
.digits-sm { gap: 5px; margin-bottom: 18px; }
.digits-sm b { width: 32px; height: 40px; font-size: 1.2rem; border-radius: 8px; }

/* Sections */
.who, .how, .services, .download { padding: 80px 0; }
.who h2, .how h2, .services h2, .download h2 { margin-bottom: 40px; }

.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.who-item { border-top: 3px solid var(--green); padding-top: 18px; }
.who-item h3 { margin-bottom: 10px; }
.who-item p { color: var(--ink-soft); }

.how { background: var(--white); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; position: relative; }
.steps li { counter-increment: step; position: relative; padding-top: 72px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--mint); color: var(--green-dark);
  font: 800 1.4rem/1 var(--display);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 26px; left: 64px; right: -16px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--ink-soft); }

.svc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; margin: 0; }
.svc-item { padding: 24px 0 24px 24px; border-bottom: 1px solid var(--line); position: relative; }
.svc-item::before { content: ""; position: absolute; left: 0; top: 30px; width: 8px; height: 24px; border-radius: 4px; background: var(--c); }
.svc-booster { --c: #d63a2f; }
.svc-rescue { --c: #7b4bc4; }
.svc-sale { --c: var(--green); }
.svc-mini { --c: #2a7ab8; }
.svc dt { font: 700 1.5rem/1.2 var(--display); letter-spacing: -0.015em; }
.svc dd { margin: 8px 0 0; color: var(--ink-soft); max-width: 46ch; }

.security { background: var(--green-deep); color: var(--white); padding: 88px 0; }
.security h2 { margin-bottom: 48px; }
.sec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; align-items: start; }
.sec-item h3 { margin-bottom: 10px; color: var(--white); }
.sec-item p { color: var(--mint); font-size: 1rem; }

.download-note { color: var(--ink-soft); max-width: 62ch; margin: -20px 0 36px; }
.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.app {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; display: flex; flex-direction: column; align-items: flex-start;
}
.app img { border-radius: 14px; margin-bottom: 18px; }
.app > p { color: var(--ink-soft); margin-top: 6px; }
.app .btn { margin-top: 22px; width: 100%; }
.app-meta { margin-top: 12px; font-size: 0.9rem; color: var(--ink-soft); }
.app-meta.is-stale { color: #8a5a00; }
.app-alt { margin-top: 6px; font-size: 0.9rem; color: var(--ink-soft); }
.download-hint { margin-top: 24px; color: var(--ink-soft); font-size: 0.95rem; }

.contact { background: var(--mint); padding: 64px 0; }
.contact-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.contact h2 { margin: 0; }
.contact p { color: var(--ink-soft); flex: 1 1 220px; }

.foot { background: var(--green-dark); color: var(--mint); padding: 32px 0; font-size: 0.95rem; }
.foot-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.brand-sm { font-size: 1.1rem; color: var(--white); }
.brand-sm img { border-radius: 7px; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--white); }

/* Legal page */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 2.8rem); letter-spacing: -0.03em; margin-bottom: 12px; }
.legal h2 { font-size: 1.35rem; margin: 40px 0 10px; }
.legal p + p { margin-top: 10px; }
.legal p { color: var(--ink-soft); }
.todo { background: #fff3c4; color: #5c4400; padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* Responsive */
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; gap: 48px; }
  .slip { justify-self: start; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps li:nth-child(2)::after { display: none; }
  .sec-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .hero { padding: 40px 0 80px; }
  .who, .how, .services, .download { padding: 56px 0; }
  .security { padding: 64px 0; }
  .who h2, .how h2, .services h2, .download h2, .security h2 { margin-bottom: 28px; }
  .who-grid, .svc, .apps, .sec-grid { grid-template-columns: 1fr; }
  .who-grid { gap: 28px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 28px 68px; min-height: 52px; }
  .steps li::after { display: none; }
  .steps li:not(:last-child)::after {
    display: block; top: 60px; left: 25px; right: auto; bottom: 6px; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--line) 0 8px, transparent 8px 14px);
  }
  .hero-actions .btn { flex: 1 1 100%; }
  .slip { transform: none; }
  .digits b { width: 42px; height: 50px; }
  .app { padding: 22px; }
  .contact-in .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slip-steps li.now::before { animation: none; }
}
