/* ============================================================
 * Neurotype V2 — Start Your Journey Page Styles
 * Page-specific styles for start.html
 * All values use brand system tokens.
 * ========================================================== */

/* ---- Start hero ---- */
.start-hero {
  background-image: url('/assets/hero-start.jpg');
  background-size: cover;
  background-position: right center;
  background-color: var(--bg-secondary-translucent);
}

.start-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(35% 55% at 30% 45%, var(--bg-primary-heavy) 25%, transparent 100%);
}

.start-hero .section {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .start-hero::before {
    background: radial-gradient(ellipse 120% 110% at 25% 45%, var(--bg-primary-heavy) 35%, var(--bg-primary-light) 100%);
  }
}

/* ---- Two-column layout ---- */
.start-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-7);
  align-items: start;
}

@media (max-width: 768px) {
  .start-layout {
    grid-template-columns: 1fr;
  }
}

/* ---- Sidebar ---- */
.start-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 0;
}

.sidebar-item h3 {
  font-family: var(--font-heading);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.sidebar-item p {
  font-size: var(--text-caption);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

.sidebar-item p:last-child {
  margin-bottom: 0;
}

/* ---- Crisis links ---- */
.crisis-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.crisis-links a {
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--neurotype-accent-primary);
  text-decoration: none;
}

.crisis-links a:hover {
  color: var(--neurotype-accent-secondary);
}

.crisis-links-text {
  font-size: var(--text-caption);
  color: var(--text-secondary);
}

/* ---- Custom select dropdown ---- */
.custom-select {
  position: relative;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--text-primary);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-default), box-shadow var(--duration-fast) var(--ease-default);
  text-align: left;
}

.custom-select-trigger:hover {
  border-color: var(--neurotype-accent-primary);
}

.custom-select-trigger:focus-visible {
  outline: 2px solid var(--neurotype-accent-primary);
  outline-offset: 2px;
  border-color: var(--neurotype-accent-primary);
}

.custom-select-trigger[aria-expanded="true"] {
  border-color: var(--neurotype-accent-primary);
  box-shadow: 0 0 0 2px var(--neurotype-accent-subtle);
}

.custom-select-trigger[aria-expanded="true"] .custom-select-chevron {
  transform: rotate(180deg);
}

.custom-select-value.is-placeholder {
  color: var(--text-muted);
}

#contact-form .form-input::placeholder,
#contact-form .form-textarea::placeholder {
  color: var(--text-muted);
}

.custom-select-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--duration-fast) var(--ease-default);
}

.custom-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(30, 41, 59, 0.1);
  padding: var(--space-2) 0;
  list-style: none;
  margin: 0;
  max-height: none;
  overflow-y: visible;
}

.custom-select-menu.is-open {
  display: block;
}

.custom-select-option {
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-default);
}

.custom-select-option:hover,
.custom-select-option.is-focused {
  background: var(--neurotype-accent-subtle);
}

.custom-select-option.is-selected {
  color: var(--neurotype-accent-primary);
  font-weight: 500;
}

/* Error state */
.custom-select--error .custom-select-trigger {
  border-color: var(--color-error);
}

.custom-select--error .custom-select-trigger:focus-visible {
  box-shadow: 0 0 0 2px var(--color-error-subtle);
}

/* ---- Form extras (not in brand system) ---- */
.form-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

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

.form-fieldset > .form-label {
  margin-bottom: var(--space-3);
}

.form-legend {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-body);
  color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  cursor: pointer;
  margin-top: 2px;
  transition: background var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default);
  position: relative;
}

.checkbox-label input[type="checkbox"]:hover {
  border-color: var(--neurotype-accent-primary);
}

.checkbox-label input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--neurotype-accent-primary);
  box-shadow: 0 0 0 2px var(--neurotype-accent-subtle);
}

.checkbox-label input[type="checkbox"]:checked {
  background: var(--neurotype-accent-primary);
  border-color: var(--neurotype-accent-primary);
}

/* Error state for checkbox group */
.checkbox-group--error .checkbox-label input[type="checkbox"] {
  border-color: var(--color-error);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--text-on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-sublabel {
  font-size: var(--text-caption);
  color: var(--text-muted);
  display: block;
}

.privacy-check {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.privacy-check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  cursor: pointer;
  margin-top: 2px;
  transition: background var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default);
  position: relative;
}

.privacy-check input[type="checkbox"]:hover {
  border-color: var(--neurotype-accent-primary);
}

.privacy-check input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--neurotype-accent-primary);
  box-shadow: 0 0 0 2px var(--neurotype-accent-subtle);
}

.privacy-check input[type="checkbox"]:checked {
  background: var(--neurotype-accent-primary);
  border-color: var(--neurotype-accent-primary);
}

.privacy-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--text-on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.privacy-check label {
  flex: 1;
  font-size: var(--text-small);
  color: var(--text-secondary);
}

.privacy-check .form-error {
  width: 100%;
  flex-basis: 100%;
}

/* ---- Success state focus ring for inputs ---- */
.form-input--success:focus-visible,
.form-textarea--success:focus-visible {
  box-shadow: 0 0 0 2px var(--color-success-subtle);
}

/* ---- Success/error panels ---- */
.form-success[hidden],
.form-error-message[hidden] {
  display: none;
}

.form-success {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.form-success h2 {
  color: var(--color-success);
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  margin-bottom: var(--space-3);
}

.form-success p {
  color: var(--text-secondary);
  font-size: var(--text-body);
  line-height: 1.6;
  max-width: 36ch;
}
