/* Spresso look. To re-theme, change the colours and fonts in this block only. */
:root {
  --bg: #f7f2e8;             /* oat: page background */
  --surface: #ffffff;        /* panels and inputs */
  --surface-2: #efe7d8;
  --line: #e0d4c1;
  --text: #2b2118;           /* dark roast: main text */
  --muted: #65564a;          /* secondary text (still high contrast) */
  --green: #2f6b4f;          /* main colour: buttons, card */
  --green-dark: #24543e;
  --sage: #cfe6c8;           /* light green highlight */
  --cocoa: #8a5a3b;          /* brown accent */
  --on-green: #ffffff;
  --ok: #2f6b4f;
  --free: #8a5a3b;
  --warn: #f2a541;
  --bad: #c8453b;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 26px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(60% 40% at 105% -5%, rgba(207, 230, 200, 0.9), transparent 70%),
    radial-gradient(50% 35% at -10% 100%, rgba(232, 200, 168, 0.55), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

main { max-width: 460px; margin: 0 auto; padding: 24px 20px 56px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
/* The Spresso logo, drawn from brand/mark.svg and brand/wordmark.svg in any colour */
.mark, .wordmark {
  display: inline-block;
  background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}
.mark { --src: url(/img/mark.svg); aspect-ratio: 436 / 545; height: 1em; }
.wordmark { --src: url(/img/wordmark.svg); aspect-ratio: 696 / 118; height: 0.42em; }
.logo {
  margin: 0; display: flex; align-items: center; gap: 10px;
  font-size: 40px; color: var(--green);
}
.tag {
  font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--green); background: var(--sage); padding: 7px 13px; border-radius: 999px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 10vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 14px;
}
h1 em {
  font-style: normal; color: var(--green);
  background: linear-gradient(transparent 62%, var(--sage) 62%);
  padding: 0 2px;
}
.lead { color: var(--muted); margin: 0 0 26px; font-size: 18px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.steps b {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px;
  background: var(--sage); color: var(--green);
}

/* Panels and forms */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 18px;
  box-shadow: 0 18px 40px -28px rgba(43, 33, 24, 0.45);
}

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
  width: 100%;
  height: 58px;
  font: inherit;
  font-size: 18px;
  padding: 0 18px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fffdf9;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select {
  width: 100%; height: 58px; font: inherit; font-size: 18px; padding: 0 14px;
  border-radius: 16px; border: 2px solid var(--line); background: #fffdf9; color: var(--text); outline: none;
}
select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(47, 107, 79, 0.15); }
.birthday { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.field .opt { font-weight: 500; color: var(--muted); }
.field .help { display: block; font-size: 15px; font-weight: 400; color: var(--muted); margin: 6px 0 0; }

/* Perk banner on the card page */
.perk {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px; margin-bottom: 18px;
  border-radius: 20px; background: var(--cocoa); color: #fff; font-weight: 700; font-size: 18px; line-height: 1.35;
}
.perk .emoji { font-size: 30px; line-height: 1; }
.perk small { display: block; font-weight: 500; font-size: 15px; opacity: 0.9; }
.perk.green { background: var(--green); }

input::placeholder { color: #9a8b7d; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(47, 107, 79, 0.15); }

.consent {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: 16px;
  background: var(--bg); border: 2px solid var(--line);
  margin: 4px 0 18px; font-size: 16px; line-height: 1.45; cursor: pointer;
}
.consent input { width: 26px; height: 26px; margin: 0; accent-color: var(--green); flex: none; }

button, .button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 60px;
  font: inherit; font-size: 18px; font-weight: 700;
  padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--green); color: var(--on-green);
  cursor: pointer; text-decoration: none;
  box-shadow: 0 10px 20px -12px rgba(47, 107, 79, 0.8);
  transition: transform 0.1s, background 0.15s;
}
button:hover, .button:hover { background: var(--green-dark); }
button:active, .button:active { transform: scale(0.98); }
button:disabled { opacity: 0.6; }
button svg, .button svg { width: 22px; height: 22px; flex: none; }
.button.wallet { background: #000; color: #fff; box-shadow: none; }
.button.secondary, button.secondary { background: transparent; color: var(--text); border: 2px solid var(--line); box-shadow: none; }

.error { color: var(--bad); font-size: 16px; font-weight: 600; min-height: 22px; margin: 0 0 12px; }
.small { font-size: 15px; color: var(--muted); }
.small a { color: var(--green); font-weight: 600; }
.center { text-align: center; }

/* The stamp card */
.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  color: var(--on-green);
  background:
    radial-gradient(70% 60% at 105% -10%, rgba(207, 230, 200, 0.45), transparent 65%),
    radial-gradient(50% 50% at -10% 110%, rgba(138, 90, 59, 0.55), transparent 70%),
    var(--green);
  box-shadow: 0 26px 50px -24px rgba(36, 84, 62, 0.75);
}
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; position: relative; }
.card-head .logo { color: var(--bg); font-size: 34px; }
.card-head .who { text-align: right; font-size: 14px; opacity: 0.85; }
.card-head .who b { display: block; font-size: 19px; opacity: 1; }

/* Big faint cup in the corner of the card */
.card::after {
  content: ""; position: absolute; right: -36px; bottom: -40px;
  width: 210px; aspect-ratio: 436 / 545;
  background: rgba(255, 255, 255, 0.07);
  -webkit-mask: url(/img/mark.svg) center / contain no-repeat;
  mask: url(/img/mark.svg) center / contain no-repeat;
  pointer-events: none;
}
.card > * { position: relative; z-index: 1; }

/* Stamps look like real ink stamps: a little tilt each, and they thump in */
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.stamp {
  --r: 0deg;
  aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  color: var(--green);
}
.stamp .mark { height: 62%; }
.stamp.on {
  background: var(--bg); border: 0;
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 5px rgba(47, 107, 79, 0.35);
  transform: rotate(var(--r));
  animation: thump 0.45s cubic-bezier(.2, .9, .3, 1.3) both;
}
.stamp.next { border-style: solid; border-color: rgba(255, 255, 255, 0.75); animation: breathe 1.8s ease-in-out infinite; }
.stamp.free {
  border: 0; background: var(--cocoa); color: var(--bg);
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  transform: rotate(-8deg);
}
@keyframes thump {
  0% { transform: scale(1.9) rotate(var(--r)); opacity: 0; }
  60% { transform: scale(0.92) rotate(var(--r)); opacity: 1; }
  100% { transform: scale(1) rotate(var(--r)); }
}
@keyframes breathe { 50% { transform: scale(1.07); } }

.progress { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 16px; }
.progress b { font-family: var(--font-display); font-size: 32px; letter-spacing: -0.02em; }
.progress #reward { font-weight: 600; text-align: right; }

.qr-wrap { background: #fff; border-radius: 20px; padding: 18px; margin: 18px auto 0; max-width: 260px; }
.qr-wrap svg { display: block; width: 100%; height: auto; }
.qr-note { color: var(--muted); font-size: 14px; font-weight: 700; text-align: center; margin: 10px 0 0; }

/* Preview card on the sign-up page */
.preview { transform: rotate(-3deg); margin: 0 6px 30px; }
.preview .stamps { margin-bottom: 0; }

.note {
  display: flex; gap: 10px; align-items: center;
  background: var(--sage); color: var(--green-dark);
  border-radius: 16px; padding: 12px 16px; font-size: 16px; font-weight: 600; margin: 0 0 24px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
