/* =========================================================
   ENABLE — Corporate Order Portal
   Stylesheet
   Edit the CSS variables below to re-brand the site.
========================================================= */

:root {
  /* ---- Brand colors (edit these to re-skin the site) ---- */
  --color-primary: #141871;      /* Primary brand color */
  --color-primary-dark: #000000; /* Hover / active shade of primary */
  --color-secondary: #d97a1f;    /* Secondary brand / accent color */
  --color-text: #000000;         /* Main text color */
  --color-text-muted: #5b6572;   /* Secondary text color */
  --color-background: #f4f6f8;   /* Page background color */
  --color-surface: #ffffff;      /* Card / surface background */
  --color-border: #e0e4e9;       /* Default border color */
  --color-error: #c0392b;        /* Error / validation color */
  --color-success: #1f8a4d;      /* Success color */

  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);

  --max-width: 1100px;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============== HEADER ============== */

.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  border-radius: 8px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-mark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.brand-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ============== HERO ============== */

.hero {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 56px 0 48px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-text {
  margin: 0;
  max-width: 640px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}

/* ============== MAIN / CARD ============== */

.main-content {
  padding: 40px 24px 64px;
}

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  max-width: 760px;
  margin: 0 auto;
}

.card-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}

.card-subtitle {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.required-mark {
  color: var(--color-error);
}

.optional-mark {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 13px;
}

/* ============== FORM ============== */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group-full {
  grid-column: 1 / -1;
}

label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.15);
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: var(--color-error);
}

input.invalid:focus,
select.invalid:focus,
textarea.invalid:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.error-message {
  display: block;
  min-height: 18px;
  font-size: 13px;
  color: var(--color-error);
  margin-top: 4px;
}

/* ---- Brand checklist ---- */

.checkbox-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.checkbox-fieldset legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  padding: 0;
  margin-bottom: 10px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  background-color: var(--color-surface);
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.checkbox-option-other {
  grid-column: 1 / -1;
}

.brand-other-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  color: var(--color-text);
}

.brand-other-input:disabled {
  background-color: var(--color-background);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.checkbox-grid.invalid {
  border-color: var(--color-error);
}

/* ---- Field hint (helper text above a textarea) ---- */

.field-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 0 0 8px;
  line-height: 1.6;
}

.field-hint strong {
  color: var(--color-text);
  font-weight: 600;
}

/* Honeypot field — must stay visually hidden but present in the DOM */
.honeypot-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
}

.form-alert-error {
  background-color: #fdecea;
  border: 1px solid #f5c6c0;
  color: var(--color-error);
}

.form-actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}

/* ============== BUTTONS ============== */

.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  opacity: 0.9;
}

/* ============== SUCCESS STATE ============== */

.success-card {
  text-align: center;
  padding: 48px 32px;
}

.success-icon {
  width: 56px;
  height: 56px;
  line-height: 56px;
  border-radius: 50%;
  background-color: var(--color-success);
  color: #ffffff;
  font-size: 28px;
  margin: 0 auto 20px;
}

.success-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.success-card p {
  margin: 0 0 8px;
  color: var(--color-text-muted);
}

.order-id-display {
  font-weight: 700;
  color: var(--color-text);
  margin-top: 14px !important;
  margin-bottom: 24px !important;
}

/* ============== FOOTER ============== */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}

.site-footer p {
  margin: 4px 0;
}

/* ============== RESPONSIVE ============== */

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px 20px;
  }

  .hero {
    padding: 40px 0 36px;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .btn {
    width: 100%;
  }
}
