/*
 * contact.css — Page-specific styles for contact.html
 * Jules Editorial Site
 * Imports: css/style.css (global tokens + shared components)
 */

/* ═══════════════════════════════════════════════
   PAGE HEADER
═══════════════════════════════════════════════ */

.contact-page-header {
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(2.5rem, 5vw, 4rem);
  position: relative;
}

/* Red left-accent bar */
.contact-page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--red-primary) 0%, transparent 60%);
}

.contact-kicker {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--red-primary);
  margin-bottom: 1rem;
}

.contact-headline {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-black);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  color: var(--text-emphasis);
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

.contact-subhead {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--text-secondary);
  font-style: italic;
  line-height: var(--leading-headline);
}


/* ═══════════════════════════════════════════════
   TWO-COLUMN CONTACT LAYOUT
═══════════════════════════════════════════════ */

.contact-main {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.contact-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: flex-start;
}

/* Stack: sidebar above form on mobile */
@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .contact-form-col { order: 2; }
  .contact-sidebar  { order: 1; }
}


/* ═══════════════════════════════════════════════
   FORM — BASE STRUCTURE
═══════════════════════════════════════════════ */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

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

.form-label {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  letter-spacing: var(--tracking-ui);
}

.form-required {
  color: var(--red-primary);
  margin-left: 0.15em;
}


/* ═══════════════════════════════════════════════
   FORM — INPUTS
═══════════════════════════════════════════════ */

.form-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: var(--leading-ui);
  transition: border-color var(--dur-fast) var(--ease-out-expo),
              box-shadow var(--dur-fast) var(--ease-out-expo),
              background var(--dur-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-faint);
}

.form-input:hover {
  border-color: var(--border-2);
  background: var(--bg-highlight);
}

.form-input:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px var(--red-faint);
  background: var(--bg-elevated);
}

.form-input--error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15) !important;
}

.form-input--valid {
  border-color: var(--success);
}

/* Select specific — show arrow */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6B73' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Textarea */
.form-textarea {
  resize: vertical;
  min-height: 160px;
  line-height: var(--leading-body);
}


/* ═══════════════════════════════════════════════
   FORM — VALIDATION ERRORS
═══════════════════════════════════════════════ */

.form-error {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: #F47777; /* Lighter red for readability on dark bg */
  min-height: 1em;
  display: block;
}


/* ═══════════════════════════════════════════════
   FORM — GDPR CONSENT
═══════════════════════════════════════════════ */

.form-group--consent {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  margin-top: var(--space-1);
}

.form-checkbox-label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  cursor: pointer;
}

.form-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.15em;
  accent-color: var(--red-primary);
  cursor: pointer;
  /* Custom styling for browsers that support it */
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-2);
  border-radius: 3px;
  transition: border-color var(--dur-fast), background var(--dur-fast);
  position: relative;
}

.form-checkbox:checked {
  background: var(--red-primary);
  border-color: var(--red-primary);
}

.form-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.form-checkbox:focus-visible {
  outline: 2px solid var(--red-primary);
  outline-offset: 2px;
}

.form-checkbox-text {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
}

.form-checkbox-text a {
  color: var(--red-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.form-checkbox-text a:hover {
  color: var(--red-bright);
}


/* ═══════════════════════════════════════════════
   FORM — SUBMIT BUTTON
═══════════════════════════════════════════════ */

.form-submit {
  align-self: flex-start;
  background: var(--red-primary);
  color: var(--text-emphasis);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.9rem 2.5rem;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast) var(--ease-out-expo),
              transform var(--dur-fast) var(--ease-out-expo),
              box-shadow var(--dur-fast);
}

.form-submit:hover:not(:disabled) {
  background: var(--red-bright);
  transform: translateY(-1px);
  box-shadow: var(--glow-red);
}

.form-submit:active:not(:disabled) {
  transform: translateY(0);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-submit:focus-visible {
  outline: 2px solid var(--red-primary);
  outline-offset: 3px;
}

/* Animated border ring on hover */
.form-submit::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--red-primary);
  border-radius: calc(var(--radius-sm) + 4px);
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.form-submit:hover::after {
  opacity: 1;
}


/* ═══════════════════════════════════════════════
   FORM — SUCCESS / ERROR FEEDBACK
═══════════════════════════════════════════════ */

.form-feedback {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.form-feedback--success {
  background: rgba(46, 125, 50, 0.12);
  border: 1px solid rgba(46, 125, 50, 0.35);
  color: #81C784; /* Light green, legible on dark bg */
}

.form-feedback--error {
  background: rgba(198, 40, 40, 0.12);
  border: 1px solid rgba(198, 40, 40, 0.35);
  color: #F47777;
}

.form-feedback--error a {
  color: inherit;
  text-decoration: underline;
}


/* ═══════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════ */

.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  /* Sticky on desktop — stays in view while form scrolls */
  position: sticky;
  top: calc(var(--nav-height) + var(--space-4));
}

@media (max-width: 768px) {
  .contact-sidebar {
    position: static;
  }
}

.contact-info-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  position: relative;
}

.contact-info-block--direct {
  border-top-color: var(--gold-primary);
  border-top-width: 2px;
}

.contact-info-icon {
  color: var(--red-primary);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
}

.contact-info-heading {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-emphasis);
  letter-spacing: var(--tracking-ui);
  margin-bottom: 0.4em;
}

.contact-info-text {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
}

.contact-direct-email {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--gold-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  word-break: break-all;
}

.contact-direct-email:hover {
  color: var(--text-emphasis);
}


/* ═══════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .form-input,
  .form-submit,
  .form-checkbox,
  .contact-info-block {
    transition-duration: 0.01ms !important;
  }
}
