/* IPSI Anonymous Data Submission Portal
   Palette (APPROXIMATION — confirm against Exponent's actual brand guide):
   --teal-deep:    #00707A  (primary brand teal)
   --teal-bright:  #0097A9  (accent teal, links/hover)
   --purple-accent:#5C2D91  (secondary accent, CTAs)
   --purple-soft:  #7B3F99
   --navy-ink:     #1C2B33  (body text)
   --slate-muted:  #5A6B72  (secondary text)
   --bg-light:     #F6F9FA  (page background)
*/

:root {
  --teal-deep: #00707A;
  --teal-bright: #0097A9;
  --purple-accent: #5C2D91;
  --purple-soft: #7B3F99;
  --navy-ink: #1C2B33;
  --slate-muted: #5A6B72;
  --bg-light: #F6F9FA;
  --border-soft: #E1E8EA;
  --success-green: #1E7A4D;
  --error-red: #B3261E;
  --radius: 10px;
  --shadow-card: 0 8px 30px rgba(14, 44, 51, 0.10);
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--navy-ink);
  background: var(--bg-light);
  line-height: 1.55;
}

/* ---------- Header ---------- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-soft);
  padding: 18px 32px;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}
.header-tag {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--teal-deep);
  border-left: 1px solid var(--border-soft);
  padding-left: 20px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  background-image: url('./assets/exponent-bg.png');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 48, 54, 0.92) 0%, rgba(0, 68, 76, 0.85) 45%, rgba(74, 32, 110, 0.80) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 32px;
  color: #ffffff;
}
.hero-content h1 {
  margin: 0 0 16px 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero-sub {
  margin: 0;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 760px;
}

/* ---------- Main / Card ---------- */
.main-content {
  max-width: 820px;
  margin: -48px auto 64px auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  padding: 40px;
}

.card h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--navy-ink);
}

.form-help {
  color: var(--slate-muted);
  font-size: 0.95rem;
  margin-top: -8px;
  margin-bottom: 24px;
}

/* ---------- State banners ---------- */
.state-banner {
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 8px;
}
.state-banner strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.state-banner p { margin: 0; }
.state-error {
  background: #FDEDEC;
  border: 1px solid rgba(179, 38, 30, 0.25);
  color: #7A1C16;
}
.state-success {
  background: #EAF7F0;
  border: 1px solid rgba(30, 122, 77, 0.25);
  color: #114E31;
}
.state-banner a { color: inherit; font-weight: 600; }

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px dashed var(--teal-bright);
  border-radius: var(--radius);
  background: #F3FBFC;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover,
.dropzone:focus-visible,
.dropzone.drag-over {
  border-color: var(--purple-accent);
  background: #F8F3FB;
  outline: none;
}
.dropzone-icon {
  color: var(--teal-bright);
  margin-bottom: 8px;
}
.dropzone-text {
  margin: 4px 0 0 0;
  color: var(--navy-ink);
}
.browse-link {
  color: var(--purple-accent);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}
.selected-file-name {
  margin-top: 14px;
  font-weight: 600;
  color: var(--teal-deep);
  word-break: break-all;
}

.inline-error {
  color: var(--error-red);
  font-size: 0.92rem;
  margin: 12px 2px 0 2px;
}

/* ---------- Submit button ---------- */
.submit-btn {
  margin-top: 28px;
  width: 100%;
  padding: 15px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal-deep), var(--purple-accent));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.submit-btn:hover:not(:disabled) { filter: brightness(1.07); }
.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Results area ---------- */
.results-area:empty { margin: 0; }
.results-area {
  margin-top: 24px;
}
.result-success {
  background: #EAF7F0;
  border: 1px solid rgba(30, 122, 77, 0.3);
  border-radius: var(--radius);
  padding: 24px;
  color: #114E31;
}
.result-success .check {
  font-size: 1.6rem;
  margin-right: 8px;
}
.result-success h3 { margin: 0 0 6px 0; font-size: 1.1rem; }
.result-success p { margin: 0; }

.result-errors {
  background: #FDEDEC;
  border: 1px solid rgba(179, 38, 30, 0.25);
  border-radius: var(--radius);
  padding: 24px;
  color: #7A1C16;
}
.result-errors h3 { margin: 0 0 10px 0; font-size: 1.05rem; }
.result-errors ul {
  margin: 0;
  padding-left: 20px;
}
.result-errors li { margin-bottom: 6px; }

.result-network-error {
  background: #FDEDEC;
  border: 1px solid rgba(179, 38, 30, 0.25);
  border-radius: var(--radius);
  padding: 24px;
  color: #7A1C16;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  color: var(--slate-muted);
  font-size: 0.85rem;
  padding: 24px 16px 40px 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .hero-content h1 { font-size: 1.6rem; }
  .card { padding: 28px 20px; }
  .header-tag { font-size: 0.85rem; padding-left: 12px; }
  .brand-logo { height: 26px; }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .main-content { max-width: 90%; }
}
