/* -----------------------------------------------------------------------
   Tokens
----------------------------------------------------------------------- */
:root {
  --ink:            #12241D;
  --paper:          #F3F6F4;
  --card:           #FFFFFF;
  --accent:         #0F5C46;
  --accent-bright:  #4C9A73;
  --accent-tint:    #E7F0EA;
  --line:           #DEE5E1;
  --line-soft:      #EBEFED;
  --muted:          #5C6B65;
  --muted-soft:     #8A968F;
  --error:          #B3261E;
  --error-tint:     #FBEAE9;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body:    "Inter", "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", monospace;

  --radius-lg: 18px;
  --radius-md: 10px;
  --radius-sm: 7px;

  --shadow-card: 0 1px 2px rgba(18, 36, 29, 0.04), 0 20px 40px -20px rgba(18, 36, 29, 0.18);
}

/* -----------------------------------------------------------------------
   Reset & base
----------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Faint dot-grid backdrop, evokes a store blueprint / schematic */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(18, 36, 29, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, black 0%, transparent 75%);
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 72px 24px 56px;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
}

/* -----------------------------------------------------------------------
   Hero
----------------------------------------------------------------------- */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid rgba(15, 92, 70, 0.14);
  padding: 7px 14px;
  border-radius: 999px;
  margin: 0 0 24px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  flex: none;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 5.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  color: var(--ink);
}

.lede {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

/* -----------------------------------------------------------------------
   Ticket-style form card
----------------------------------------------------------------------- */
.ticket {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ticket-stub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--ink);
  color: #EAF2ED;
}

.ticket-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  color: #B9D3C6;
}

.ticket-id {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #7FBC9C;
}

.ticket-body {
  padding: 36px 28px 32px;
}

@media (min-width: 560px) {
  .ticket-stub { padding: 16px 40px; }
  .ticket-body { padding: 44px 40px 40px; }
}

/* -----------------------------------------------------------------------
   Success / error banners
----------------------------------------------------------------------- */
.success-message {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--accent-tint);
  border: 1px solid rgba(15, 92, 70, 0.18);
  color: var(--accent);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 28px;
  font-size: 14.5px;
  line-height: 1.55;
}

.success-message p { margin: 0px;}

.success-message strong { color: var(--ink); }

.success-message[hidden],
.form-error-banner[hidden] {
  display: none;
}

.success-icon {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 1px;
  color: var(--accent);
}

.form-error-banner {
  background: var(--error-tint);
  border: 1px solid rgba(179, 38, 30, 0.2);
  color: var(--error);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}

/* -----------------------------------------------------------------------
   Form fields
----------------------------------------------------------------------- */
.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}

.req { color: var(--accent); font-weight: 600; }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: #FCFDFC;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-soft);
}

textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.55;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #C4D2CC;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(15, 92, 70, 0.12);
}

.select-wrap {
  position: relative;
}

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* Invalid state */
.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--error);
  background: #FFFBFA;
}

.field.invalid input:focus,
.field.invalid select:focus,
.field.invalid textarea:focus {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}

.field-error {
  display: none;
  font-size: 12.5px;
  color: var(--error);
  margin: 7px 0 0;
  line-height: 1.4;
}

.field.invalid .field-error {
  display: block;
}

/* -----------------------------------------------------------------------
   Submit button
----------------------------------------------------------------------- */
.submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-top: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.submit-btn:hover {
  background: #0C4B39;
}

.submit-btn:active {
  transform: translateY(1px);
}

.submit-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 92, 70, 0.28);
}

.submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.btn-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
}

.submit-btn.loading .btn-spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

.submit-btn.loading .btn-text {
  opacity: 0.85;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* -----------------------------------------------------------------------
   Footnote
----------------------------------------------------------------------- */
.footnote {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-soft);
  margin: 22px 0 0;
}

/* -----------------------------------------------------------------------
   Reduced motion
----------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .submit-btn, .btn-spinner, input, select, textarea {
    transition: none;
    animation: none;
  }
}

/* -----------------------------------------------------------------------
   Small screens
----------------------------------------------------------------------- */
@media (max-width: 420px) {
  .page { padding: 48px 16px 40px; }
  .eyebrow { font-size: 10px; padding: 6px 12px; white-space: normal; text-align: center; }
}