/* Tri-Motion booking inquiry form — dark theme only.
   Brand colours (white + Tri-Motion yellow on black, from the logo) live in
   the custom properties below. */
:root {
  --ink: #f4f4f1;           /* main text */
  --ink-soft: #d2d2d6;
  --paper: #0a0a0b;         /* page background */
  --header: #000000;
  --card: #141417;
  --field: #0e0e10;         /* input background */
  --line: #29292f;
  --line-strong: #4a4a53;
  --muted: #a2a2ad;
  --accent: #d5c727;        /* Tri-Motion yellow */
  --accent-hover: #e6d83c;
  --on-accent: #0a0a0b;     /* text on yellow */
  --accent-tint: rgba(213, 199, 39, 0.12);
  --error: #ff7b72;
  --error-tint: rgba(255, 123, 114, 0.1);
  --success: #5fd38d;
  --focus: #7cb7ff;
  --radius: 10px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ------------------------------------------------------------ header */

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}

.site-header {
  background: var(--header);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.brand img {
  display: block;
  height: auto;
}
.brand-mark {
  width: 51px;
}
.brand-wordmark {
  width: 183px;
}
@media (max-width: 400px) {
  .brand-wordmark {
    width: 140px;
  }
}
.header-tag {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ------------------------------------------------------------ layout */

.layout {
  padding-top: 24px;
  padding-bottom: 48px;
}
main:focus {
  outline: none;
}

.toc {
  display: none;
}

@media (min-width: 1024px) {
  .layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding-top: 40px;
  }
  .toc {
    display: block;
    position: sticky;
    top: 24px;
    font-size: 0.9rem;
  }
  .toc-title {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid var(--line);
  }
  .toc a {
    display: block;
    padding: 6px 12px;
    margin-left: -2px;
    border-left: 2px solid transparent;
    color: var(--muted);
    text-decoration: none;
  }
  .toc a:hover {
    color: var(--ink);
  }
  .toc a[aria-current='true'] {
    color: var(--ink);
    font-weight: 600;
    border-left-color: var(--accent);
  }
}

/* ------------------------------------------------------------ intro */

.intro {
  margin-bottom: 20px;
}
.eyebrow {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.lead {
  margin: 0 0 12px;
  max-width: 62ch;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.req-legend {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.req {
  color: var(--accent);
  font-weight: 700;
}

/* ------------------------------------------------------------ cards */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: 16px;
}
@media (min-width: 600px) {
  .card {
    padding: 28px 28px;
  }
}
.card > h2 {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1.2rem;
  line-height: 1.3;
}
.section-note,
.note {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
}

/* ------------------------------------------------------------ fields */

.field {
  margin: 0 0 20px;
}
.field:last-child,
.conditional:last-child > .field:last-child {
  margin-bottom: 0;
}
fieldset.field {
  border: 0;
  padding: 0;
  min-width: 0;
}
.field > label,
legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  font-weight: 600;
  line-height: 1.35;
}
.legend-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9rem;
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='date'],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
}
textarea {
  min-height: 112px;
  resize: vertical;
}
select {
  appearance: none;
  padding-right: 40px;
  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' fill='none' stroke='%23f4f4f1' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
input[type='date'] {
  max-width: 240px;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-soft);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  border-color: var(--focus);
}

input[type='file'] {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.95rem;
}
input[type='file']::file-selector-button {
  margin-right: 12px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.hint {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* radio / checkbox groups */
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field);
  cursor: pointer;
  line-height: 1.3;
  max-width: 100%;
}
.option:hover {
  border-color: var(--ink-soft);
}
.option input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.option input:focus-visible {
  outline: none;
}

/* conditional blocks */
.conditional {
  margin: -8px 0 20px;
  padding: 16px 0 0 14px;
  border-left: 3px solid var(--line);
}
.conditional.gated {
  margin-top: 0;
  padding: 0;
  border-left: 0;
}

/* errors */
.error {
  margin: 6px 0 0;
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 600;
}
.error:empty {
  display: none;
}
.error::before {
  content: '⚠ ';
}
.field.has-error input:not([type='radio']):not([type='checkbox']),
.field.has-error select,
.field.has-error textarea {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}
fieldset.field.has-error .option {
  border-color: var(--error);
}

.form-status {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--error);
  background: var(--error-tint);
  color: var(--error);
  font-weight: 600;
}
.form-status:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.form-status ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-weight: 400;
}
.form-status a {
  color: var(--error);
}

/* honeypot — off-screen, not display:none (some bots skip hidden inputs) */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------ send */

.footer-note {
  margin-bottom: 20px;
}
.footer-note p {
  margin: 0 0 6px;
}
.turnstile {
  margin-bottom: 20px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  min-width: 200px;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-primary[disabled] {
  cursor: progress;
  opacity: 0.85;
}
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
}
@media (max-width: 480px) {
  .actions .btn {
    width: 100%;
  }
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(10, 10, 11, 0.35);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.is-sending .spinner {
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.draft-note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ------------------------------------------------------------ confirmation */

.confirmation {
  border-top: 4px solid var(--success);
}
.confirmation:focus {
  outline: none;
}
.confirmation h2 {
  color: var(--success);
}
.reference {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.1em;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 32px;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer p {
  margin: 0;
}

/* ------------------------------------------------------------ live hints */

.counter {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}
.counter.at-limit {
  color: var(--error);
  font-weight: 600;
}
.suggestion {
  color: var(--ink-soft);
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.link-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
