/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #0B1F3A;
  --navy-mid:    #13304F;
  --navy-light:  #1B4570;
  --gold:        #C9A24F;
  --gold-light:  #E8C87A;
  --gold-pale:   #FDF6E3;
  --white:       #FFFFFF;
  --off-white:   #F7F8FB;
  --surface:     #FFFFFF;
  --border:      #E5E9F0;
  --text:        #111827;
  --text-mid:    #374151;
  --text-muted:  #6B7280;
  --text-light:  #9CA3AF;
  --success:     #059669;
  --error:       #DC2626;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --shadow-card: 0 2px 8px rgba(11,31,58,.06), 0 0 0 1px rgba(11,31,58,.04);
  --transition:  0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--off-white);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── HEADER ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  display: block;
  width: 134px;
  height: 30px;
  background-color: var(--navy);
  -webkit-mask: url('../img/fg-logo.png') no-repeat left center / contain;
          mask: url('../img/fg-logo.png') no-repeat left center / contain;
}

.logo-divider {
  display: block;
  width: 1px;
  height: 18px;
  background: var(--border);
}

.logo-sub {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ─── HEADER CTA BUTTONS ─────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
  cursor: pointer;
}

.header-btn svg {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  transition: stroke var(--transition);
}

.header-btn:hover {
  border-color: var(--navy-light);
  color: var(--navy);
  background: var(--off-white);
  transform: translateY(-1px);
}

.header-btn:hover svg { stroke: var(--navy); }

.header-btn--primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(11, 31, 58, 0.2);
}

.header-btn--primary svg { stroke: #FFFFFF; }

.header-btn--primary:hover {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(11, 31, 58, 0.3);
}

.header-btn--primary:hover svg { stroke: #FFFFFF; }

/* ─── HERO ──────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(145deg, #07182E 0%, #0D2B4E 40%, #1A3A6A 75%, #112444 100%);
  padding: 110px 32px 120px;
  text-align: center;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-orb--1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(201,162,79,.18) 0%, transparent 65%);
  top: -200px; right: -150px;
  animation: orbFloat 12s ease-in-out infinite;
}

.hero-orb--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(27,69,112,.6) 0%, transparent 70%);
  bottom: -100px; left: -80px;
  animation: orbFloat 15s ease-in-out infinite reverse;
}

.hero-orb--3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(201,162,79,.10) 0%, transparent 70%);
  top: 30%; left: 15%;
  animation: orbFloat 10s ease-in-out infinite 3s;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.04); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  background: rgba(201,162,79,.12);
  border: 1px solid rgba(201,162,79,.25);
  padding: 6px 16px;
  border-radius: 100px;
}

.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-title--accent {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  font-weight: 400;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.4;
  animation: scrollBounce 2.4s ease-in-out infinite;
}

.hero-scroll-cue svg {
  width: 22px; height: 22px;
  stroke: white;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 0.7; }
}

/* ─── CATEGORIES SECTION ─────────────────────────────────── */
.categories-section {
  padding: 80px 32px 100px;
  background: var(--off-white);
}

.section-container {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 56px;
}

/* Grid: 3 across top, 2 centered bottom */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.category-card:nth-child(1) { grid-column: 1 / 3; }
.category-card:nth-child(2) { grid-column: 3 / 5; }
.category-card:nth-child(3) { grid-column: 5 / 7; }
.category-card:nth-child(4) { grid-column: 2 / 4; }
.category-card:nth-child(5) { grid-column: 4 / 6; }

.category-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.5s ease both;
}

.category-card:nth-child(1) { animation-delay: 0.05s; }
.category-card:nth-child(2) { animation-delay: 0.10s; }
.category-card:nth-child(3) { animation-delay: 0.15s; }
.category-card:nth-child(4) { animation-delay: 0.20s; }
.category-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.category-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(135deg, rgba(201,162,79,.06) 0%, transparent 60%);
  transition: opacity var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}

.category-card:hover::after { opacity: 1; }

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

.card-icon-wrap {
  width: 54px; height: 54px;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.category-card:hover .card-icon-wrap {
  transform: scale(1.08) rotate(-2deg);
}

.card-icon {
  width: 26px; height: 26px;
  stroke: var(--card-color);
}

.card-body { flex: 1; }

.card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.card-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-light);
  transition: color var(--transition);
}

.category-card:hover .card-cta { color: var(--gold); }

.card-arrow {
  width: 16px; height: 16px;
  fill: var(--navy-light);
  transition: fill var(--transition), transform var(--transition);
}

.category-card:hover .card-arrow {
  fill: var(--gold);
  transform: translateX(4px);
}

/* ─── FORM SECTION ───────────────────────────────────────── */
.form-section {
  background: var(--off-white);
  padding: 0 32px 100px;
  transition: opacity var(--transition);
}

.form-section[aria-hidden="true"] { display: none; }

.form-container {
  max-width: 800px;
  margin: 0 auto;
  animation: formSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes formSlideIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nav / Breadcrumb */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--transition);
}

.back-btn svg { width: 16px; height: 16px; transition: transform var(--transition); }
.back-btn:hover { border-color: var(--navy); color: var(--navy); }
.back-btn:hover svg { transform: translateX(-3px); }

.form-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.bc-sep { opacity: 0.5; }
.bc-current { font-weight: 600; color: var(--navy); }

.copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 11px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.copy-link-btn:hover {
  background: var(--off-white);
  border-color: var(--navy-light);
  color: var(--navy);
}

.copy-link-btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.copy-link-btn:hover svg { transform: rotate(-8deg); }

.copy-link-btn.copied {
  color: var(--success);
  border-color: rgba(5, 150, 105, 0.4);
  background: rgba(5, 150, 105, 0.06);
}

.copy-link-btn.copied svg { transform: none; }

/* Form Header */
.form-header {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.form-header-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-header-icon svg { width: 28px; height: 28px; }

.form-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.form-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Form Card */
#supportForm {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

/* Form Layout */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Asymmetric two-column row. Used when the first column holds a
   short fixed-width value (Unit #, ZIP, room number) and the second
   holds free text that needs breathing room. Without this override
   the Unit # input would inherit a 50% desktop column it doesn't
   need, while the Resident-name label next to it wraps to two lines
   — visibly lopsided. Collapses to a single column on mobile via
   the existing ≤640px `.form-row { grid-template-columns: 1fr }`
   rule, which this override is paired with below. */
.form-row-split {
  grid-template-columns: minmax(120px, 200px) 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group:last-child { margin-bottom: 0; }

/* Restore the gap below the final category field so it doesn't butt
   up against the Priority Level section. The :last-child rule above
   zeros out the bottom margin, which is fine when a form-group is
   the last thing in a standalone section — but inside #dynamicFields
   it collapses the intended breathing room before Priority / Submit.
   We belt-and-suspenders this: restore margin on the last child AND
   push margin-top onto the Priority block so the gap is guaranteed. */
#dynamicFields > .form-group:last-child,
#dynamicFields > .form-row:last-child .form-group { margin-bottom: 20px; }
#dynamicFields:not(:empty) + #confidentialGroup,
#dynamicFields:not(:empty) + #confidentialGroup + #priorityGroup,
#dynamicFields:not(:empty) ~ #priorityGroup { margin-top: 20px; }

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-mid);
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.required { color: var(--error); font-size: 0.8rem; }

.optional {
  font-size: 0.775rem;
  font-weight: 400;
  color: var(--text-light);
}

.label-hint {
  font-size: 0.775rem;
  font-weight: 400;
  color: var(--text-light);
  margin-left: auto;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,79,.15);
}

.form-input.invalid,
.form-select.invalid,
.form-textarea.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

/* Valid state — live feedback on blur. Green border + inline checkmark
   on text-style inputs. Selects skip the icon (dropdown arrow is there);
   textareas skip the icon (would collide with wrapped content). */
.form-input.valid,
.form-select.valid,
.form-textarea.valid {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5,150,105,.10);
}

/* The background-image check is applied only to text-type inputs. Date
   inputs render a native calendar button at the right edge that would
   collide with the checkmark, so we intentionally exclude them. */
.form-input.valid:not([type="date"]):not([type="time"]):not([type="datetime-local"]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23059669'%3E%3Cpath fill-rule='evenodd' d='M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B7280'%3E%3Cpath fill-rule='evenodd' d='M5.22 8.22a.75.75 0 011.06 0L10 11.94l3.72-3.72a.75.75 0 111.06 1.06l-4.25 4.25a.75.75 0 01-1.06 0L5.22 9.28a.75.75 0 010-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

/* Auto-grow textareas: min-height sets the starting size, max-height caps
   the grow-to size so a 2,000-character rant can't take over the viewport,
   and JS sets inline height = scrollHeight on every input. resize:none
   because the drag handle would fight with auto-grow — the textarea now
   self-sizes perfectly without user intervention. Beyond max-height the
   textarea becomes internally scrollable. */
.form-textarea {
  resize: none;
  min-height: 140px;
  max-height: 520px;
  overflow-y: auto;
}

.textarea-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.char-counter {
  font-size: 0.775rem;
  color: var(--text-light);
  margin-left: auto;
  transition: color 140ms ease;
}
/* Tip into warning color once the user is within 15% of the cap so it's
   visible but not alarming. Red only hits the actual maxlength ceiling. */
.char-counter--warn { color: #D97706; font-weight: 600; }

.field-error {
  font-size: 0.8rem;
  color: var(--error);
  display: none;
}

.field-error.visible { display: block; }

/* Priority Selector */
.priority-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.priority-option { cursor: pointer; }

.priority-option input[type="radio"] { display: none; }

.priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  background: var(--off-white);
  color: var(--text-mid);
}

.priority-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.priority-pill--low    .priority-dot { background: #6B7280; }
.priority-pill--normal .priority-dot { background: #2563EB; }
.priority-pill--high   .priority-dot { background: #D97706; }
.priority-pill--urgent .priority-dot { background: #DC2626; }

.priority-option input:checked + .priority-pill--low    { background: #F3F4F6; border-color: #6B7280; color: #374151; }
.priority-option input:checked + .priority-pill--normal { background: #EFF6FF; border-color: #2563EB; color: #1D4ED8; }
.priority-option input:checked + .priority-pill--high   { background: #FFFBEB; border-color: #D97706; color: #92400E; }
.priority-option input:checked + .priority-pill--urgent { background: #FEF2F2; border-color: #DC2626; color: #991B1B; }

/* Tactile bump — plays every time a radio flips to :checked, because the
   newly-checked pill matches the selector and re-triggers the animation.
   The previously-checked pill doesn't replay (it loses the :checked state
   and therefore the animation rule). Normal is default-checked, so it
   bumps once on page load — a subtle welcome nudge toward the widget. */
.priority-option input:checked + .priority-pill {
  animation: priorityBump 140ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes priorityBump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Respect reduced-motion preference — skip the bump entirely. */
@media (prefers-reduced-motion: reduce) {
  .priority-option input:checked + .priority-pill { animation: none; }
}

.priority-pill:hover { opacity: 0.85; transform: translateY(-1px); }

/* File Upload Zone
   The zone is a <label for="fileInput"> — tapping anywhere in it opens
   the native file picker. On iOS, this is the only reliable way to
   invoke the picker on a first tap (a programmatic .click() on a button
   often gets blocked as an indirect gesture). */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--off-white);
  position: relative;
  display: block; /* label defaults to inline */
  /* Kill iOS tap highlight so the whole zone doesn't flash on touch. */
  -webkit-tap-highlight-color: transparent;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--gold);
  background: var(--gold-pale);
}

/* Visually hide the native input without display:none — keeps it
   focusable for keyboard users and accessible to screen readers. */
.upload-input-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Keyboard focus on the hidden input surfaces a ring on the label
   itself so keyboard-only users can tell it's focused. */
.upload-input-sr:focus-visible + .upload-inner {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

.upload-inner { pointer-events: none; }

.upload-icon {
  width: 48px; height: 48px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.upload-icon svg {
  width: 22px; height: 22px;
  stroke: var(--text-muted);
}

.upload-text {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 4px;
}

/* "browse" affordance inside the label. Now just a <span> — the
   <label> itself handles the click, so no button semantics needed. */
.upload-browse {
  color: var(--navy-light);
  font-weight: 600;
  text-decoration: underline;
}
.upload-zone:hover .upload-browse { color: var(--gold); }

/* Desktop vs mobile copy swap. Mobile devices don't drag-and-drop, so
   "Drag & drop or browse" reads weird. We show a shorter "Tap to add"
   on narrow viewports and on touch devices without hover. */
.upload-text-mobile { display: none; }
@media (max-width: 600px), (hover: none) and (pointer: coarse) {
  .upload-text-desktop { display: none; }
  .upload-text-mobile  { display: inline; }
  .upload-zone { padding: 28px 16px; }
}

.upload-hint {
  font-size: 0.775rem;
  color: var(--text-light);
}

/* File List */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  animation: fileIn 0.2s ease both;
}

@keyframes fileIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.file-item-icon { width: 20px; height: 20px; flex-shrink: 0; }

.file-item-name { flex: 1; color: var(--text-mid); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file-item-size { color: var(--text-light); white-space: nowrap; }

.file-item-remove {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  transition: all var(--transition);
  flex-shrink: 0;
}

.file-item-remove:hover { color: var(--error); background: #FEE2E2; }
.file-item-remove svg { width: 14px; height: 14px; }

/* HR Confidential Checkbox */
.confidential-toggle { margin-top: 4px; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkbox-custom {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition);
  position: relative;
  background: var(--white);
}

.checkbox-label input:checked + .checkbox-custom {
  background: var(--navy);
  border-color: var(--navy);
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px; top: 2px;
  width: 6px; height: 10px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checkbox-text strong { font-size: 0.9rem; color: var(--text); }
.checkbox-text span   { font-size: 0.825rem; color: var(--text-muted); }

/* Form Actions */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

.form-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-note svg { width: 14px; height: 14px; fill: var(--text-light); flex-shrink: 0; }

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 28px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(11,31,58,.35);
  letter-spacing: 0.01em;
}

.submit-btn:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11,31,58,.4);
}

.submit-btn:active { transform: translateY(0); }

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-default { display: flex; align-items: center; gap: 8px; }
.btn-default svg { width: 18px; height: 18px; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Error Banner */
.submit-error {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: #991B1B;
}

.submit-error svg { width: 18px; height: 18px; fill: #DC2626; flex-shrink: 0; }

/* ─── SUCCESS STATE ──────────────────────────────────────── */
.success-state {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  animation: formSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.success-check {
  width: 80px; height: 80px;
  margin: 0 auto 28px;
}

.success-check svg { width: 80px; height: 80px; }

.success-circle {
  stroke: var(--gold);
  stroke-width: 2;
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  animation: circleDraw 0.6s ease-out 0.1s both;
}

.success-tick {
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: tickDraw 0.4s ease-out 0.6s both;
}

@keyframes circleDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes tickDraw {
  to { stroke-dashoffset: 0; }
}

.success-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

/* The pill IS a <button> now, but its look is preserved exactly — same
   gold-pale background, same 1.5px border, same 100px radius, same
   padding. inline-flex is used so the new copy-icon aligns with the
   baseline of the text; visually identical to the old inline-block box. */
.success-ticket {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold-pale);
  border: 1.5px solid rgba(201,162,79,.3);
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 20px 8px 24px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
  position: relative;
}

.success-ticket strong { color: var(--gold); font-weight: 700; }

.success-ticket:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201,162,79,.18);
}

.success-ticket:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,162,79,.35);
}

.success-ticket:active { transform: translateY(0); }

/* The trailing icon sits inside the pill at 60% opacity so it reads as
   a subtle affordance, not a button-within-a-button. Brightens on hover. */
.success-ticket-icon {
  width: 14px;
  height: 14px;
  stroke: var(--gold);
  opacity: 0.6;
  transition: opacity 140ms ease;
  flex-shrink: 0;
}

.success-ticket:hover .success-ticket-icon { opacity: 1; }

/* Check icon is layered on top of the copy icon — only visible while
   the .copied state is active. Positioned absolutely so the pill
   doesn't resize when the swap happens. */
.success-ticket-check {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  width: 14px;
  height: 14px;
  color: #059669;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.success-ticket.copied {
  background: #ECFDF5;
  border-color: rgba(5, 150, 105, 0.35);
}

.success-ticket.copied .success-ticket-icon {
  opacity: 0;
}

.success-ticket.copied .success-ticket-check {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.success-msg {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 440px;
  margin: 0 auto 32px;
}

.success-msg strong { color: var(--text); }

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-new {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-new:hover { background: var(--navy-mid); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text-mid);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-outline:hover { border-color: var(--navy); color: var(--navy); }

/* ─── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  padding: 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(255,255,255,.8);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,.4);
}

/* ─── MARKETING FORM-TYPE PICKER ─────────────────────────── */
.mkt-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.mkt-type-card {
  cursor: pointer;
  position: relative;
}

.mkt-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mkt-type-inner {
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px 16px;
  text-align: left;
  height: 100%;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mkt-type-card:hover .mkt-type-inner {
  border-color: #D97706;
  background: #FFFDF5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217,119,6,.08);
}

.mkt-type-card input:checked + .mkt-type-inner {
  border-color: #D97706;
  background: #FFFBEB;
  box-shadow: 0 0 0 3px rgba(217,119,6,.15);
}

.mkt-type-card input:checked + .mkt-type-inner .mkt-type-check {
  opacity: 1;
  transform: scale(1);
}

.mkt-type-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #FFFBEB;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.mkt-type-icon svg {
  width: 20px; height: 20px;
  stroke: #D97706;
}

.mkt-type-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.mkt-type-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.mkt-type-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #D97706;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all var(--transition);
}

.mkt-type-check svg {
  width: 13px; height: 13px;
  fill: white;
}

@media (max-width: 640px) {
  .mkt-type-grid { grid-template-columns: 1fr; }
}

/* ─── HANDBOOK ASSISTANT CTA (HR form) ───────────────────── */
.handbook-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF9 100%);
  border: 1.5px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.handbook-cta::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

.handbook-cta-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid rgba(5, 150, 105, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #059669;
}

.handbook-cta-icon svg { width: 22px; height: 22px; }

.handbook-cta-body { flex: 1; min-width: 0; }

.handbook-cta-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #064E3B;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.handbook-cta-desc {
  font-size: 0.825rem;
  color: #047857;
  line-height: 1.5;
}

.handbook-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #059669;
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.825rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.handbook-cta-btn:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.handbook-cta-btn svg { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .handbook-cta {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .handbook-cta-btn { width: 100%; justify-content: center; }
}

/* ─── CHECKBOX PILL GROUPS ───────────────────────────────── */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chk-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  background: var(--white);
  transition: all var(--transition);
  user-select: none;
}

.chk-pill:hover { border-color: var(--navy-light); color: var(--navy); }

.chk-pill input[type="checkbox"] {
  margin: 0;
  accent-color: #D97706;
  cursor: pointer;
  width: 15px; height: 15px;
}

.chk-pill:has(input:checked) {
  background: #FFFBEB;
  border-color: #D97706;
  color: #92400E;
  font-weight: 600;
}

/* ─── MARKETING SUBFORM + MONTH BLOCK ────────────────────── */
.mkt-subform {
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  animation: subformIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes subformIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.month-block {
  background: #FEFDFB;
  border: 1px solid var(--border);
  border-left: 3px solid #D97706;
  border-radius: var(--radius-md);
  padding: 18px 20px 4px;
  margin-bottom: 14px;
}

.month-block-head {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #D97706;
  margin-bottom: 14px;
}

/* ─── DYNAMIC FIELD HELPERS ──────────────────────────────── */
.form-section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0 24px;
}

.form-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 16px;
  margin-top: 4px;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-card:nth-child(1),
  .category-card:nth-child(2),
  .category-card:nth-child(3),
  .category-card:nth-child(4),
  .category-card:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  /* Header collapses to icon-only across the entire mobile range.
     Between 481–640px the previous layout overflowed: logo+"Support
     Center"+3 text buttons intrinsically needed ~600px but the viewport
     gave ~460px, and body{overflow-x:hidden} silently clipped the Admin
     button off the right edge. Hiding the text labels and sub-logo
     here keeps everything on-screen on phones in landscape, foldables,
     and narrow tablet split-views. */
  .header-inner { padding: 0 16px; gap: 12px; }
  .logo-mark { width: 108px; height: 24px; }
  .logo { gap: 10px; flex-shrink: 0; }
  .logo-divider, .logo-sub { display: none; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .header-btn span { display: none; }
  .header-btn { padding: 8px 10px; }
  .header-btn svg { width: 16px; height: 16px; }

  .hero { padding: 80px 20px 90px; }
  .categories-section { padding: 56px 20px 72px; }
  .category-grid { grid-template-columns: 1fr; }
  .form-section { padding: 0 20px 72px; }
  #supportForm { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-header { flex-direction: column; align-items: flex-start; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .submit-btn { justify-content: center; width: 100%; }
  .priority-grid { gap: 8px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .form-nav { flex-direction: column; align-items: flex-start; }
  .success-state { padding: 48px 24px; }
  .header-inner { padding: 0 14px; }
  .logo-mark { width: 96px; height: 22px; }
}
