/* =========================================================================
   AccelGLO DYK — DYK Global Campaign 2027
   Design tokens
   Color   : Ink #16213A (deep indigo-navy) / Paper #EFEFE7 (stone-white)
             Spark #C9971F (muted gold accent) / Field #145C52 (deep teal)
             Text #1E2233 / Line #CBC7BA / Danger #A3402F
   Type    : "Fraunces" (display serif, headings — carries curiosity/inquiry
             personality) + "Public Sans" (body/form — clean civic legibility)
   Layout  : Full-bleed ink hero band, single-column paper form card,
             numbered sections (the form itself is a real sequence, so the
             numbering is informational, not decorative), left accent rule
             per section instead of repeated card/shadow chrome.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,500&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink:        #16213A;
  --ink-soft:   #223057;
  --paper:      #EFEFE7;
  --card:       #FBFBF7;
  --spark:      #C9971F;
  --spark-deep: #9C7513;
  --field:      #145C52;
  --text:       #1E2233;
  --text-mute:  #565C6E;
  --line:       #CBC7BA;
  --danger:     #A3402F;
  --focus:      #4C6FD6;
  --radius:     3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(165deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: #F4F2EA;
  padding: 4.5rem 1.5rem 5.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  /* one deliberate motion-free graphic moment: an abstract inquiry mark,
     built from a dot + open arc, not a literal repeated icon */
  content: "";
  position: absolute;
  right: -6%;
  top: -18%;
  width: 460px;
  height: 460px;
  border: 2px solid rgba(201, 151, 31, 0.28);
  border-radius: 42% 58% 61% 39% / 46% 40% 60% 54%;
  pointer-events: none;
}

.hero .eyebrow-org {
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: #C7CBDC;
  margin: 0 0 0.6rem;
}

.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin: 0 0 0.5rem;
  max-width: 15ch;
}

.hero .tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--spark);
  margin: 0 0 1.1rem;
}

.hero p.lede {
  max-width: 58ch;
  color: #DADDEA;
  margin: 0;
}

/* ---------- Form shell ---------- */
.form-wrap {
  max-width: 760px;
  margin: -3rem auto 4rem;
  padding: 0 1.25rem;
  position: relative;
}

form.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0 1rem;
}

section.field-group {
  padding: 1.9rem 2.1rem;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--line);
}

section.field-group:last-of-type { border-bottom: none; }

section.field-group:hover,
section.field-group:focus-within {
  border-left-color: var(--spark);
  background: rgba(201, 151, 31, 0.035);
}

.field-group h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.3rem;
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
}

.field-group h2 .num {
  color: var(--spark-deep);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.field-group .hint {
  color: var(--text-mute);
  font-size: 0.88rem;
  margin: 0 0 0.9rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0.9rem 0 0.35rem;
}

label .req { color: var(--danger); margin-left: 0.15rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.62rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--text);
}

textarea { resize: vertical; min-height: 5.5rem; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(76, 111, 214, 0.18);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.radio-set, .check-set {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.radio-set label, .check-set label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}

.radio-set input, .check-set input {
  margin-top: 0.2rem;
  accent-color: var(--field);
}

/* ---------- Photo upload frame ---------- */
.photo-frame {
  width: 132px;
  height: 160px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-mute);
  padding: 0.5rem;
  cursor: pointer;
  background: #fff;
  overflow: hidden;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame:hover { border-color: var(--spark); }

/* ---------- Repeatable tables ---------- */
table.repeat-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.6rem;
  font-size: 0.9rem;
}
table.repeat-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-mute);
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0.5rem;
}
table.repeat-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #E4E1D5;
  vertical-align: top;
}
table.repeat-table input { padding: 0.42rem 0.55rem; font-size: 0.9rem; }

.row-actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; }

button.add-row, button.remove-row {
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--field);
  color: var(--field);
  background: transparent;
  border-radius: var(--radius);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}
button.add-row:hover { background: rgba(20, 92, 82, 0.08); }

button.remove-row {
  border-color: var(--danger);
  color: var(--danger);
  padding: 0.3rem 0.6rem;
}
button.remove-row:hover { background: rgba(163, 64, 47, 0.08); }

/* ---------- Percentage disclosure ---------- */
.pct-row { display: flex; align-items: center; gap: 0.75rem; }
.pct-row input[type="number"] { width: 6.5rem; }
.pct-total {
  margin-top: 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.pct-total.ok { color: var(--field); }
.pct-total.bad { color: var(--danger); }

/* ---------- File upload rows ---------- */
.upload-slot {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-top: 0.6rem;
  background: #fff;
}
.upload-slot .file-list { font-size: 0.85rem; color: var(--text-mute); margin-top: 0.5rem; }

/* ---------- Declaration sections ---------- */
.declaration-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-mute);
  line-height: 1.6;
}
.declaration-block p { margin: 0 0 0.8rem; }
.declaration-block p:last-child { margin-bottom: 0; }

.tick-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-top: 1px solid #E4E1D5;
}
.tick-row:first-of-type { border-top: none; }
.tick-row .section-label {
  font-weight: 700;
  color: var(--ink);
  min-width: 5.2rem;
}

/* ---------- Submit ---------- */
.submit-bar {
  padding: 1.6rem 2.1rem 2.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

button.submit-btn {
  background: var(--spark);
  color: var(--ink);
  border: none;
  font-family: 'Public Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  cursor: pointer;
}
button.submit-btn:hover { background: var(--spark-deep); color: #fff; }
button.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.submit-note { font-size: 0.85rem; color: var(--text-mute); }

footer.form-footer {
  max-width: 760px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
  color: var(--text-mute);
  font-size: 0.82rem;
  text-align: center;
}

.error-msg {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 0.3rem;
  display: none;
}
.error-msg.show { display: block; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
