/* ============================================================
   Asobi Tools — Component Library
   One calm system. The tool is the hero; everything else whispers.
   ============================================================ */

/* ---- Layout ---- */
.container { max-width: var(--w-content); margin-inline: auto; padding-inline: var(--sp-4); }
.container-tool { max-width: var(--w-tool); margin-inline: auto; padding-inline: var(--sp-4); }
.stack > * + * { margin-top: var(--sp-4); }

/* ---- Wordmark: asobi.tools — type-only, accent dot ---- */
.wordmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.35rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark .dot { color: var(--accent); }
.wordmark .tld { color: var(--ink-2); font-weight: 500; }

/* ---- Header / footer ---- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); padding: var(--sp-4) 0;
}
.site-header nav { display: flex; gap: var(--sp-4); }
.site-header nav a { color: var(--ink-2); text-decoration: none; font-size: var(--text-sm); }
.site-header nav a:hover { color: var(--ink); }
.site-footer {
  margin-top: var(--sp-8); padding: var(--sp-6) 0; border-top: 1px solid var(--line);
  color: var(--ink-2); font-size: var(--text-sm);
}

/* ---- Trust strip: three claims, all architecturally true ---- */
.trust-strip {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  font-size: var(--text-sm); color: var(--ink-2);
  margin: var(--sp-3) 0 var(--sp-5);
}
.trust-strip span { display: inline-flex; align-items: center; gap: 6px; }
.trust-strip .check { color: var(--ok); font-weight: 700; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 var(--text-md)/1 var(--font-body);
  padding: 14px 22px; border-radius: var(--r-control);
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--speed), border-color var(--speed), color var(--speed), transform var(--speed);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-2); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn-sm { padding: 9px 14px; font-size: var(--text-sm); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---- Forms ---- */
.field { display: grid; gap: 6px; }
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.field .help { font-size: var(--text-xs); color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; font: 400 var(--text-md)/1.3 var(--font-body);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-control);
  padding: 12px 14px; transition: border-color var(--speed);
}
.input:hover { border-color: var(--ink-2); }
.input:focus { border-color: var(--accent); outline: none; }
.input[aria-invalid="true"] { border-color: var(--error); }
.field .error-msg { font-size: var(--text-xs); color: var(--error); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-sm); color: var(--ink-2); }
.checkbox input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }

/* ---- Tool card: the hero ---- */
.tool-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow-2);
  padding: var(--sp-6);
}
@media (max-width: 600px) { .tool-card { padding: var(--sp-4); border-radius: 14px; } }
.tool-card .tool-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---- Drop zone ---- */
.dropzone {
  display: grid; place-items: center; gap: var(--sp-2); text-align: center;
  padding: var(--sp-7) var(--sp-4);
  border: 2px dashed var(--line-strong); border-radius: var(--r-card);
  background: var(--surface-2); color: var(--ink-2);
  cursor: pointer; transition: border-color var(--speed), background var(--speed);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.dropzone .big { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); color: var(--ink); }

/* ---- Labor illusion: visible work, the ONE permitted animation ---- */
.progress-steps { display: grid; gap: var(--sp-2); font-size: var(--text-sm); }
.progress-steps .step { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.progress-steps .step.done { color: var(--ink); }
.progress-steps .step.done .tick { color: var(--ok); }
.progress-steps .step.active .tick { color: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---- Artifact bar: download FIRST, transport second, disclosure under ---- */
.artifact-bar { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.artifact-bar .actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.artifact-bar .disclosure { font-size: var(--text-xs); color: var(--ink-2); max-width: 52ch; }

/* Email transport inline form (appears when "Email it" is chosen) */
.email-inline { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.email-inline .input { flex: 1 1 240px; }

/* ---- Success moment ---- */
.success {
  display: flex; align-items: center; gap: 10px;
  background: var(--ok-soft); color: var(--ok);
  border-radius: var(--r-control); padding: 12px 16px;
  font-weight: 600; font-size: var(--text-sm);
}

/* ---- Chips / vertical rail ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-sm); color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 7px 14px; text-decoration: none;
  transition: border-color var(--speed), background var(--speed);
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.rail { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.rail-title { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: var(--sp-2); }

/* ---- FAQ: <details open> so crawlers read everything ---- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: var(--sp-4) 0; }
.faq summary {
  font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg);
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { margin-top: var(--sp-2); color: var(--ink-2); max-width: 65ch; }

/* ---- Steps (how it works) ---- */
.steps { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.steps .step-card .n {
  font-family: var(--font-display); font-weight: 700; color: var(--accent);
  font-size: var(--text-xl); margin-bottom: var(--sp-1);
}
.steps .step-card p { color: var(--ink-2); font-size: var(--text-sm); margin: 0; }

/* ---- Quiet artifact mark (goes on PDFs/emails, shown here for reference) ---- */
.artifact-mark {
  font-size: var(--text-xs); color: var(--ink-2);
  border-top: 1px solid var(--line); padding-top: var(--sp-2);
}
.artifact-mark b { color: var(--ink); font-weight: 600; }

/* ---- Swatch/specimen helpers (design-system page only) ---- */
.ds-section { margin: var(--sp-8) 0; }
.ds-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.swatch { border-radius: var(--r-control); border: 1px solid var(--line); overflow: hidden; font-size: var(--text-xs); }
.swatch .c { height: 56px; }
.swatch .l { padding: 8px 10px; background: var(--surface); color: var(--ink-2); }
