/* ==========================================================================
   Contact inner page (/contact.html) — small hero banner, statement sentence
   (left) beside the contact form card (right). Solid canvas, no gradients.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero banner — solid canvas-soft, left-aligned title + subtitle
   -------------------------------------------------------------------------- */

.ct-banner {
  padding: calc(var(--space-huge) * 2) var(--space-huge) var(--space-huge);
  background-color: var(--c-canvas-soft);
  border-bottom: 1px solid var(--c-hairline);
}

.ct-banner__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 72em;
  margin: 0 auto;
}

/* Breadcrumb trail above title — code-sm (mirrors projects/blog breadcrumb) */
.ct-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-code);
  font-size: 15px;      /* code-sm */
  font-weight: 400;
  line-height: 1.45;
  color: var(--c-text-muted);
}

/* Separator between crumbs */
.ct-breadcrumb li + li::before {
  content: "/";
  margin-right: var(--space-sm);
}

.ct-breadcrumb a {
  color: var(--c-text-secondary);
  text-decoration: none;
}

.ct-breadcrumb a:hover,
.ct-breadcrumb a:focus-visible {
  color: var(--c-text-primary);
}

/* Current page crumb */
.ct-breadcrumb [aria-current="page"] {
  color: var(--c-accent-strong);
}

/* Page title — display-xxl */
.ct-banner__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 48px;      /* display-xxl */
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1.2px;
  color: var(--c-text-primary);
}

/* Leading underscore — sparing accent (screenshot "_Contacts" cue) */
.ct-banner__mark {
  color: var(--c-accent-strong);
}

/* Subtitle — body-lg */
.ct-banner__subtitle {
  max-width: 40em;
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;      /* body-lg */
  font-weight: 360;
  line-height: 1.55;
  color: var(--c-text-secondary);
}

/* --------------------------------------------------------------------------
   Two-column layout — statement left, form card right
   -------------------------------------------------------------------------- */

.ct-main {
  padding: var(--space-huge);
  background-color: var(--c-canvas);
}

.ct-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30em);
  align-items: start;
  gap: var(--space-huge);
  max-width: 72em;
  margin: 0 auto;
}

/* Statement sentence — display-xxl, sticks below fixed header on desktop */
.ct-statement {
  position: sticky;
  top: calc(var(--space-huge) + var(--space-xxl));
  max-width: 12em;
  margin: 0;
  padding-top: var(--space-xxl);
  font-family: var(--font-display);
  font-size: 48px;      /* display-xxl */
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1.2px;
  color: var(--c-text-primary);
}

/* --------------------------------------------------------------------------
   Form card — card-light / card-dark (via active-mode semantic vars)
   -------------------------------------------------------------------------- */

.ct-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-xxl);
  background-color: var(--c-canvas-soft);
  color: var(--c-text-primary);
  border: 1px solid var(--c-hairline);
  border-radius: var(--rounded-lg);
}

/* Card title — display-md */
.ct-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;      /* display-md */
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

/* Card subtitle — body-sm */
.ct-card__subtitle {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;      /* body-sm */
  font-weight: 360;
  line-height: 1.45;
  color: var(--c-text-secondary);
}

.ct-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

/* Label stacked above its input */
.ct-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Field label — body-sm */
.ct-field label {
  font-family: var(--font-body);
  font-size: 14px;      /* body-sm */
  font-weight: 360;
  line-height: 1.45;
  color: var(--c-text-secondary);
}

/* Inputs — text-input-light / text-input-dark */
.ct-field input,
.ct-field textarea {
  width: 100%;
  min-height: 44px;     /* tap target */
  box-sizing: border-box;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: 16px;      /* body-md (also prevents iOS zoom on focus) */
  font-weight: 360;
  line-height: 1.5;
  color: var(--c-text-primary);
  border: 1px solid var(--c-hairline);
  border-radius: var(--rounded-sm);
}

/* Day Mode input surface: colors-light.canvas */
[data-theme="light"] .ct-field input,
[data-theme="light"] .ct-field textarea {
  background-color: var(--c-canvas);
}

/* Dark Mode input surface: colors-dark.canvas-soft */
[data-theme="dark"] .ct-field input,
[data-theme="dark"] .ct-field textarea {
  background-color: var(--c-canvas-soft);
}

.ct-field textarea {
  min-height: 9em;
  resize: vertical;
}

/* Hover — stronger hairline */
.ct-field input:hover,
.ct-field textarea:hover {
  border-color: var(--c-hairline-strong);
}

/* Focus — accent border + ring for keyboard users */
.ct-field input:focus-visible,
.ct-field textarea:focus-visible {
  border-color: var(--c-accent);
  outline: 2px solid var(--c-accent-strong);
  outline-offset: var(--space-xxs);
}

/* Server-rejected field */
.ct-field [aria-invalid="true"] {
  border-color: var(--c-text-primary);
}

/* Submit — global CTA, aligned left; only button-element resets added */
.ct-form__submit {
  align-self: flex-start;
  margin-top: var(--space-sm);
  cursor: pointer;
}

.ct-form__submit:disabled {
  cursor: progress;
  opacity: 0.6;
}

/* Status line — body-sm, accent rule on success */
.ct-status {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: 14px;      /* body-sm */
  font-weight: 360;
  line-height: 1.45;
  color: var(--c-text-primary);
  border: 1px solid var(--c-hairline);
  border-radius: var(--rounded-sm);
}

.ct-status[data-state="success"] {
  border-left: var(--space-xs) solid var(--c-accent);
}

.ct-status[data-state="error"] {
  border-left: var(--space-xs) solid var(--c-text-primary);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Large tablet: tighter padding, smaller display type */
@media (max-width: 1024px) {
  .ct-banner {
    padding: calc(var(--space-huge) * 2) var(--space-xxl) var(--space-huge);
  }

  .ct-banner__title,
  .ct-statement {
    font-size: 36px;    /* display-xl */
    line-height: 1.15;
    letter-spacing: -0.8px;
  }

  .ct-main {
    padding: var(--space-huge) var(--space-xxl);
  }

  .ct-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26em);
    gap: var(--space-xxl);
  }
}

/* Small tablet: statement stacks above the card */
@media (max-width: 768px) {
  .ct-banner {
    padding-top: calc(var(--space-huge) * 2 + var(--space-xxl));
  }

  .ct-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ct-statement {
    position: static;
    max-width: none;
    padding-top: 0;
    font-size: 28px;    /* display-lg */
    line-height: 1.2;
    letter-spacing: -0.5px;
  }
}

/* Mobile: single column, smaller type and spacing */
@media (max-width: 480px) {
  .ct-banner {
    padding: calc(var(--space-huge) * 2 + var(--space-lg)) var(--space-lg) var(--space-xxl);
  }

  .ct-banner__title {
    font-size: 22px;    /* display-md */
    line-height: 1.25;
    letter-spacing: -0.3px;
  }

  .ct-banner__subtitle {
    font-size: 16px;    /* body-md */
    line-height: 1.5;
  }

  /* Extra bottom space keeps the card clear of Back to Top icon */
  .ct-main {
    padding: var(--space-xxl) var(--space-lg) calc(var(--space-huge) + var(--space-lg));
  }

  .ct-layout {
    gap: var(--space-xl);
  }

  .ct-statement {
    font-size: 22px;    /* display-md */
    line-height: 1.25;
    letter-spacing: -0.3px;
  }

  .ct-card {
    padding: var(--space-lg);
  }

  .ct-form {
    margin-top: var(--space-md);
    gap: var(--space-md);
  }

  /* Global mobile rule: CTA full-width */
  .ct-form__submit {
    align-self: stretch;
  }
}
