/* Stroyka signpost — the whole visual system for four small pages.
 *
 * Palette is the landing site's, so the three surfaces a person can meet
 * (ad -> getstroyka.com -> this page) do not each invent their own look.
 * Values copied from stroyka-landing/tailwind.config.ts, not approximated.
 */

:root {
  --bone: #e3dcc9;
  --bone-deep: #d4cbb4;
  --ink: #2e261c;
  --ink-soft: #4a4033;
  --ink-muted: #7a6e5b;
  --forest: #4b5f4e;
  --deep: #34453a;
  --sage: #8aaa91;
  --danger: #a0492f;
  --ok: #22c55e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bone);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px max(16px, env(safe-area-inset-left, 0px))
    calc(24px + env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-right, 0px));
}

main {
  width: 100%;
  max-width: 420px;
}

.card {
  background: #fff;
  border: 1px solid rgba(46, 38, 28, 0.1);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 1px 2px rgba(46, 38, 28, 0.04),
    0 12px 32px rgba(46, 38, 28, 0.06);
}

.mark {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
  font-weight: 600;
  margin: 0 0 14px;
}

h1 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

p { margin: 0 0 14px; color: var(--ink-soft); }
p.sub { font-size: 14px; color: var(--ink-muted); }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 18px 0 6px;
}

input[type="password"] {
  width: 100%;
  font-size: 16px; /* 16px or iOS Safari zooms the page on focus */
  padding: 12px 14px;
  border: 1px solid rgba(46, 38, 28, 0.18);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

input[type="password"]:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(75, 95, 78, 0.15);
}

.hint {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 6px;
}

.count { font-variant-numeric: tabular-nums; font-weight: 600; }
.count.met { color: var(--ok); }

button {
  width: 100%;
  margin-top: 22px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--forest);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

button:hover:not(:disabled) { background: var(--deep); }
button:disabled { opacity: 0.45; cursor: default; }

.store {
  display: block;
  margin-top: 10px;
  padding: 13px 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid rgba(46, 38, 28, 0.14);
  border-radius: 12px;
}

.store:hover { background: var(--bone-deep); }

.msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.msg.error {
  color: var(--danger);
  background: rgba(160, 73, 47, 0.08);
  border: 1px solid rgba(160, 73, 47, 0.2);
}

.done .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 24px;
  line-height: 44px;
  text-align: center;
  margin-bottom: 14px;
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

/* The intro step's single button. Same treatment as the form's submit — the
   two are the same action seen at different moments, so they must not look
   like different kinds of thing. */
#start { margin-top: 20px; }

/* Labels open the form, so the first one must not double-space away from the
   button that revealed it. */
#form label:first-of-type { margin-top: 4px; }
