/* Cannoisseur Solventless Processing -- lead-capture visual mockup
 * (PROCESS-01A).
 *
 * This is a separate, isolated customer-facing projection, not a
 * shared stylesheet with projects/customer-signup/app/. Per the
 * packet's own instruction ("reuse visual language, not unnecessary
 * coupling") and architecture/customer-visual-language.md, the token
 * values and component patterns below are faithfully reapplied from
 * that canonical reference rather than imported across project
 * boundaries -- projects/customer-signup/app/ is never modified or
 * linked to by this file.
 */

/* ==========================================================================
   1. TOKENS -- palette, typography roles, spacing, geometry, primitives
   (values match the canonical customer-visual-language reference)
   ========================================================================== */

:root {
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --paper: #ffffff;
  --line: #0a0a0a;
  --muted: #5a5a5a;
  --hairline: #dddddd;
  --panel-tint: #f2f2f2;

  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --fs-brand: 1.05rem;
  --fs-display: clamp(2rem, 8vw, 2.75rem);
  --fs-section: 0.95rem;
  --fs-ui: 1rem;
  --fs-micro: 0.65rem;
  --fs-body: 0.85rem;

  --content-gutter: 20px;
  --content-max: 560px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 14px;
  --space-4: 20px;
  --space-5: 32px;
  --space-6: 48px;

  --border-thin: 1px;
  --border-strong: 2px;
  --control-height: 48px;
  --cut: 14px;
  --cut-sm: 8px;
  --cut-lg: 40px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

body {
  display: flex;
  flex-direction: column;
}

/* --- reusable button primitive -------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--fs-ui);
  font-weight: 700;
  letter-spacing: 0.03em;
  border: var(--border-strong) solid var(--ink);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn:disabled { opacity: 0.6; cursor: default; }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--ink-soft); }

.btn--outline { background: var(--paper); color: var(--ink); }
.btn--outline:hover { background: var(--panel-tint); }

/* --- Brand bar -------------------------------------------------------------
 * Flat rectangle, matching the canonical masthead doctrine: no skew or
 * diagonal treatment on page-level chrome, ever. */
.brand-bar {
  background: var(--paper);
  padding: var(--space-5) var(--content-gutter);
  text-align: center;
}

.brand-mark-frame {
  display: inline-block;
  background: var(--ink);
  padding: var(--space-2) var(--space-4);
}

.brand-mark {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: 0.22em;
  font-size: var(--fs-brand);
  color: var(--paper);
}

/* --- App shell / screens -------------------------------------------------- */

.app {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 0 var(--space-6);
}

.screen[hidden] { display: none; }
.screen-success { position: relative; }

/* --- Hero band --------------------------------------------------------------
 * Full-bleed black section, flat rectangle -- cut-corner geometry stays
 * component-level only (buttons, pills), never on a page/section band. */
.hero-band {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-5) 0 var(--space-6);
  text-align: center;
}
.hero-band--arrival { padding: var(--space-5) 0 var(--space-6); }

.hero-band__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-gutter);
}

.hero-band .headline { color: var(--paper); }
.hero-band .subhead { color: #cfcfcf; }

.destination-section {
  padding: var(--space-5) var(--content-gutter) 0;
}
.destination-section--form { padding-top: var(--space-4); }

.headline {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: var(--fs-display);
  letter-spacing: 0.01em;
  margin: 0 0 var(--space-2);
  line-height: 1.05;
}

.subhead {
  font-size: var(--fs-ui);
  color: var(--muted);
  margin: 0;
}

/* --- Sandbox / non-production indicator ------------------------------------ */
.sandbox-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px dashed #bbb;
  padding: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-4);
}
.sandbox-indicator__dot {
  width: 6px;
  height: 6px;
  background: var(--muted);
  flex-shrink: 0;
}

/* --- Form ------------------------------------------------------------------- */

.field-group {
  border: none;
  padding: 0 0 var(--space-4);
  margin: 0;
}

.field-group legend {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-section);
  letter-spacing: 0.08em;
  padding: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-2);
  box-sizing: border-box;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%);
}

@media (min-width: 768px) {
  .field-group legend { min-height: 36px; }
}

.field-group label:not(.toggle-option) {
  display: block;
  font-size: var(--fs-body);
  color: var(--muted);
  margin: var(--space-3) 0 var(--space-1);
}
.field-group label:not(.toggle-option):first-of-type { margin-top: 0; }

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"],
.field-group select,
.field-group textarea {
  display: block;
  width: 100%;
  font-size: var(--fs-ui);
  padding: 0 var(--space-2);
  border: var(--border-thin) solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"],
.field-group select {
  height: var(--control-height);
}
/* Textarea is a genuinely new control (no precedent in the reference
 * form): fixed control-height doesn't apply to a multi-line field, so
 * it instead gets a comfortable min-height plus the same border/font
 * treatment as every other text-like control, kept deliberately small
 * per the packet's "one small optional note field" constraint. */
.field-group textarea {
  min-height: 64px;
  max-height: 160px;
  padding: var(--space-2);
  resize: vertical;
  line-height: 1.4;
}
.field-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230a0a0a' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-2) center;
  background-size: 12px 8px;
  padding-right: calc(var(--space-2) + 20px);
}
.field-group input:focus-visible,
.field-group select:focus-visible,
.field-group textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 1px;
}

.field-error {
  font-size: 0.82rem;
  font-weight: 600;
  margin: var(--space-2) 0 0;
  min-height: 1em;
}
.field-error:not(:empty)::before { content: '! '; }

.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Reused as a single-select radio pill group for Processing Interest --
 * same visual grammar as the canonical toggle-option chip (border,
 * padding, checked inversion), just backed by radio inputs instead of
 * checkboxes so only one interest is selectable at a time. */
.toggle-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: var(--border-strong) solid var(--line);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}
.toggle-option input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
}
.toggle-option:has(input:checked) {
  background: var(--ink);
  color: var(--paper);
}
.toggle-option:has(input:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.consent-copy {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.5;
  margin: var(--space-2) 0 var(--space-4);
}

.success-copy {
  font-size: var(--fs-body);
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 var(--space-5);
}

.submit-error {
  font-size: 0.9rem;
  font-weight: 600;
  border: var(--border-strong) solid var(--ink);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}
.submit-error::before { content: '! '; }

.submit-button { margin-top: var(--space-4); }

/* --- Success / arrival + continuation --------------------------------------- */

.continuation-heading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-section);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 var(--space-4);
  text-align: center;
}

.continuation-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.continuation-button {
  position: relative;
  padding: var(--space-4);
  font-size: var(--fs-ui);
  font-weight: 600;
  background: var(--paper);
  color: var(--ink);
  border: var(--border-strong) solid var(--ink);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  text-align: left;
}
.continuation-button:hover { background: var(--panel-tint); }
.continuation-button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.continuation-button:disabled { opacity: 0.6; cursor: default; }

/* Marks a destination that doesn't exist yet (e.g. a future Request/
 * Reserve a Processing Window booking flow) so it never reads as an
 * equally-live action -- same dashed-border + corner-tag convention as
 * the canonical reference's R&D preview button. */
.continuation-button--preview {
  border-style: dashed;
  padding-top: 22px;
}
.preview-tag {
  position: absolute;
  top: var(--space-1);
  right: var(--space-3);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.continuation-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: var(--space-2);
  text-align: center;
  /* This page has no intermediate `.continuation-group` wrapper (only
   * one flat action list), so the note is a direct flex child of
   * `.continuation-actions` itself. Without a full-width flex-basis it
   * would sit beside the last button once the row layout kicks in at
   * 1024px, instead of on its own line beneath every action. */
  flex: 1 1 100%;
}

/* --- Footer ------------------------------------------------------------------ */
.site-footer {
  display: flex;
  justify-content: center;
  padding: var(--space-6) var(--content-gutter);
}

.footer-shield {
  display: inline-flex;
  color: var(--muted);
}
.footer-shield svg {
  width: 28px;
  height: 28px;
}
.footer-shield path,
.footer-shield line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.footer-shield:hover,
.footer-shield:focus-visible {
  color: var(--ink);
}
.footer-shield:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

/* --- Responsive composition --------------------------------------------------
 * Same breakpoint values as the canonical reference. Below 1024px this
 * page stays a single column by design -- five short field groups read
 * cleanly as one column even at desktop width, and a QR-driven mobile
 * audience should never see a form built primarily for a wide screen. */

@media (min-width: 640px) {
  :root { --content-gutter: 40px; --content-max: 640px; }
}

@media (min-width: 768px) {
  :root { --content-gutter: 56px; }
  .brand-bar { padding: calc(var(--space-5) + var(--space-1)) var(--content-gutter); }
}

@media (min-width: 1024px) {
  :root { --content-max: 760px; --content-gutter: 72px; }
  .destination-section--form { max-width: 640px; margin: 0 auto; }
  .destination-section { max-width: 640px; margin: 0 auto; }

  .continuation-actions { flex-direction: row; flex-wrap: wrap; }
  .continuation-button { flex: 1 1 260px; }
}

@media (min-width: 1280px) {
  .headline { font-size: 3.25rem; }
}
