/* Public intake / ToS — matches aresai.kz landing (Onest, steel accent, dark) */

:root {
  --ares-bg: #0a0a09;
  --ares-surface: #141413;
  --ares-surface-raised: #1a1a18;
  --ares-line: rgba(201, 195, 185, 0.16);
  --ares-steel: #c9c3b9;
  --ares-bright: #ece8e1;
  --ares-text: #f1efeb;
  --ares-muted: #a19b92;
  --ares-error: #e2a9a1;
  --ares-success: #86efac;
}

.intake-page {
  background: var(--ares-bg);
  color: var(--ares-text);
  min-height: 100vh;
  font-family: "Onest", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.intake-page ::selection {
  background: var(--ares-steel);
  color: var(--ares-bg);
}

/* —— Top nav (landing chrome) —— */
.intake-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(10, 10, 9, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ares-line);
}

.intake-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.55);
  text-decoration: none;
  transition: background 0.2s ease;
}

.intake-nav-brand:hover {
  background: rgba(0, 0, 0, 0.75);
}

.intake-nav-brand img {
  height: 1.25rem;
  width: auto;
  display: block;
}

.intake-nav-brand span {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ares-text);
}

.intake-nav-back {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ares-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.intake-nav-back:hover {
  color: var(--ares-text);
  border-color: var(--ares-line);
}

/* —— Layout —— */
.intake-wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  width: 100%;
  box-sizing: border-box;
}

.intake-wrap--wide {
  max-width: 56rem;
}

.intake-wrap,
.intake-card,
.intake-product-block,
.intake-deliverable-row,
.intake-instance-block {
  max-width: 100%;
  box-sizing: border-box;
}

.intake-page-heading {
  margin-bottom: 1.75rem;
}

.intake-page-heading h1 {
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ares-text);
  line-height: 1.15;
}

.intake-page-heading p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ares-muted);
  max-width: 42ch;
}

.mono-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ares-muted);
}

/* —— Cards —— */
.intake-card {
  background: var(--ares-surface);
  border: 1px solid var(--ares-line);
  border-radius: 10px;
  padding: 1.25rem;
}

.intake-card + .intake-card,
.intake-wrap > .intake-card {
  margin-bottom: 1rem;
}

.intake-section-title {
  font-size: 0.6875rem;
  font-weight: 500;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ares-muted);
  margin-bottom: 0.875rem;
}

.intake-section-title.mb-0 {
  margin-bottom: 0;
}

/* —— Form controls —— */
.intake-label,
.field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ares-text);
}

.intake-input,
.intake-textarea,
.intake-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--ares-line);
  background: var(--ares-surface-raised);
  color: var(--ares-text);
  padding: 0.7rem 0.9rem;
  font-size: 0.925rem;
  line-height: 1.4;
  font-family: inherit;
  outline: none;
  transition: outline 0.15s ease;
}

.intake-input::placeholder,
.intake-textarea::placeholder {
  color: #7f7a72;
}

.intake-input:focus,
.intake-textarea:focus,
.intake-select:focus {
  outline: 2px solid var(--ares-steel);
  outline-offset: -1px;
}

.intake-textarea {
  resize: vertical;
  min-height: 5rem;
}

/* —— Buttons —— */
.intake-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(180deg, #f2efe9 0%, #c9c3b9 100%);
  color: #0c0c0b;
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: inherit;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.intake-btn-primary:hover:not(:disabled) {
  filter: brightness(1.07);
}

.intake-btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.intake-btn-primary:disabled {
  opacity: 0.45;
  filter: none;
  cursor: not-allowed;
}

.intake-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(201, 195, 185, 0.45);
  background: rgba(10, 10, 9, 0.35);
  color: var(--ares-text);
  font-weight: 500;
  font-size: 0.8125rem;
  font-family: inherit;
  padding: 0.5rem 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.intake-btn-secondary:hover {
  border-color: var(--ares-bright);
  background: rgba(20, 20, 19, 0.6);
}

/* —— PDF panel —— */
.intake-pdf-panel {
  padding: 1.25rem;
}

.intake-pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.intake-pdf-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.intake-pdf-frame-wrap {
  border: 1px solid var(--ares-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ares-surface-raised);
  height: min(70vh, 640px);
}

.intake-pdf-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* —— Checkbox —— */
.intake-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ares-text);
}

.intake-checkbox-row input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--ares-steel);
  flex-shrink: 0;
}

/* —— Hints & errors —— */
.intake-hint {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ares-muted);
  margin-top: 0.35rem;
}

.intake-hint a {
  color: var(--ares-steel);
  text-decoration: underline;
}

.intake-error {
  font-size: 0.875rem;
  color: var(--ares-error);
  min-height: 1.25rem;
}

.intake-gate {
  border: 1px solid rgba(226, 169, 161, 0.35);
  background: rgba(226, 169, 161, 0.08);
  color: var(--ares-error);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.intake-gate a {
  color: var(--ares-steel);
  text-decoration: underline;
}

/* —— Product blocks (intake form) —— */
.intake-product-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--ares-line);
  background: var(--ares-surface-raised);
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s, background 0.15s;
}

.intake-product-row:hover {
  border-color: rgba(201, 195, 185, 0.35);
}

.intake-product-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--ares-steel);
}

.intake-file-wrap {
  border: 1px dashed rgba(201, 195, 185, 0.28);
  border-radius: 10px;
  padding: 1rem;
  background: var(--ares-surface-raised);
}

.intake-file-wrap input[type="file"] {
  width: 100%;
  font-size: 0.875rem;
  color: var(--ares-text);
}

.intake-file-wrap input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(201, 195, 185, 0.45);
  background: transparent;
  color: var(--ares-text);
  font-weight: 500;
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
}

.intake-file-wrap input[type="file"]::file-selector-button:hover {
  border-color: var(--ares-bright);
}

.intake-product-block {
  background: var(--ares-surface);
  border: 1px solid var(--ares-line);
  border-radius: 10px;
  padding: 1.25rem;
}

.intake-product-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ares-line);
}

.intake-product-block-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ares-bright);
}

.intake-line-remove {
  border: none;
  background: transparent;
  color: var(--ares-error);
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-family: inherit;
}

.intake-deliverables {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intake-deliverable-row {
  border: 1px solid var(--ares-line);
  border-radius: 8px;
  padding: 0.75rem;
  background: var(--ares-surface-raised);
}

.intake-deliverable-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.625rem;
  cursor: pointer;
}

.intake-deliverable-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--ares-steel);
  margin-top: 0.15rem;
}

.intake-deliverable-name {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ares-text);
  min-width: 0;
  word-break: break-word;
}

.intake-deliverable-price {
  font-size: 0.8125rem;
  color: var(--ares-muted);
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  white-space: nowrap;
}

.intake-qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--ares-line);
  flex-wrap: wrap;
  width: 100%;
}

.intake-deliverable-subtotal {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--ares-steel);
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  white-space: nowrap;
}

.intake-instance-block {
  border: 1px solid var(--ares-line);
  border-radius: 8px;
  padding: 0.875rem;
  background: var(--ares-surface);
  margin-top: 0.75rem;
}

.intake-instance-block + .intake-instance-block {
  margin-top: 0.625rem;
}

.intake-instance-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ares-bright);
  margin-bottom: 0.75rem;
}

.intake-deliverable-options {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--ares-line);
  min-width: 0;
}

.intake-qty-stepper.hidden {
  display: none !important;
}

.intake-qty-btn {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  border: 1px solid var(--ares-line);
  background: var(--ares-surface-raised);
  color: var(--ares-steel);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.intake-qty-btn:hover {
  border-color: var(--ares-steel);
}

.intake-qty-value {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* —— Total bar —— */
.intake-total-bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  background: var(--ares-surface);
  border: 1px solid rgba(201, 195, 185, 0.35);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.intake-total-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ares-muted);
}

.intake-total-amount {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ares-bright);
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.intake-total-hint {
  font-size: 0.75rem;
  color: var(--ares-muted);
  margin-top: 0.5rem;
  line-height: 1.45;
}

/* —— Thanks page —— */
.intake-thanks-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
  padding: 2rem 1.25rem 4rem;
}

.intake-thanks {
  text-align: center;
  max-width: 28rem;
}

.intake-thanks-mark {
  height: 3rem;
  width: auto;
  margin: 0 auto 1.5rem;
  display: block;
}

.intake-thanks h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ares-success);
  margin-bottom: 0.75rem;
}

.intake-thanks p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ares-muted);
}

.intake-thanks .intake-order-ref {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--ares-muted);
  margin: 0.75rem 0 1.5rem;
}

/* —— Utility —— */
.hidden {
  display: none !important;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.intake-products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.intake-grid-2 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.intake-grid-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .intake-grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .intake-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 639px) {
  .intake-grid-3 {
    grid-template-columns: 1fr;
  }
}

.intake-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.intake-photo-item {
  position: relative;
  width: 5.5rem;
}

.intake-photo-item img {
  height: 5rem;
  width: 5rem;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--ares-line);
  display: block;
}

.intake-photo-item-name {
  font-size: 0.625rem;
  color: var(--ares-muted);
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 5rem;
}

.intake-photo-remove {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 9999px;
  border: 1px solid var(--ares-line);
  background: var(--ares-surface);
  color: var(--ares-error);
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.intake-photo-remove:hover {
  background: #7f2d2d;
  color: #fff;
  border-color: #7f2d2d;
}
