/* ================================================================
   Mister1920 Creator Submit — Stylesheet
   Heritage / apothecary aesthetic
   Mobile-first, single breakpoint at 640 px
   ================================================================ */

/* ---- Design Tokens ---- */
:root {
  --cream:        #F7F3EC;
  --cream-mid:    #EDE8DF;
  --cream-dark:   #E2DAD0;
  --green:        #2C5545;
  --green-mid:    #3A6B56;
  --green-dark:   #1E3D31;
  --brown:        #8B6A37;
  --brown-light:  #B38D5B;
  --text:         #2A2118;
  --text-muted:   #6B5F4F;
  --border:       #D4C9B5;
  --error:        #7A1F1F;
  --error-bg:     #FBF0F0;
  --success-bg:   #EEF5F1;
  --white:        #FFFFFF;

  --font-serif:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:    'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius:       4px;
  --radius-lg:    6px;
  --shadow:       0 2px 12px rgba(42, 33, 24, 0.07);
  --shadow-lg:    0 4px 24px rgba(42, 33, 24, 0.11);

  --width:        720px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================================================================
   HERO BANNER IMAGES
   ================================================================ */

.site-header {
  line-height: 0; /* removes phantom gap below inline img */
}

.hero-img {
  display: block;
  width: 100%;
  height: 340px;       /* capped — prevents banners from dominating the page */
  object-fit: cover;
  object-position: center;
}

.hero-img--bottom {
  margin-top: 3rem;
}

@media (max-width: 639px) {
  .hero-img {
    height: 200px;     /* smaller on mobile */
  }
}

/* ================================================================
   LAYOUT
   ================================================================ */

.main { flex: 1; padding: 2rem 1rem 4rem; }

.container {
  max-width: var(--width);
  margin: 0 auto;
}

/* ================================================================
   INTRO SECTION
   ================================================================ */

.intro {
  text-align: center;
  padding: 2.25rem 0 1.75rem;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 1.5rem;
  line-height: 1.75;
}

.ornament {
  color: var(--brown);
  font-size: 0.7rem;
  letter-spacing: 0.5em;
}

/* ================================================================
   FORM SECTIONS
   ================================================================ */

.submission-form { margin-top: 1rem; }

.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.section-legend {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green-dark);
  display: block;
  width: 100%;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

/* ================================================================
   FORM ROWS & GROUPS
   ================================================================ */

.form-row { margin-bottom: 1.25rem; }
.form-row:last-child { margin-bottom: 0; }

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group { display: flex; flex-direction: column; }

/* ================================================================
   LABELS
   ================================================================ */

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.req  { color: var(--brown); }
.opt  { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.78rem; color: var(--text-muted); }

/* ================================================================
   INPUTS
   ================================================================ */

.form-input,
.form-textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(44, 85, 69, 0.15);
  background: var(--white);
}

.form-input.is-error,
.form-textarea.is-error {
  border-color: var(--error);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Prefix @ wrapper */
.input-affix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-affix {
  position: absolute;
  left: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
  font-size: 1rem;
}

.form-input.has-affix { padding-left: 1.7rem; }

/* Hints & errors */
.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.field-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.3rem;
  display: block;
  min-height: 1em;
  line-height: 1.4;
}

/* ================================================================
   FILE DROP ZONES
   ================================================================ */

.drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.is-over {
  border-color: var(--green);
  background: rgba(44, 85, 69, 0.04);
  outline: none;
}

.drop-zone.has-files {
  border-style: solid;
  border-color: var(--green);
}

/* The actual <input type="file"> — invisible overlay */
.drop-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop-body {
  padding: 2rem 1.5rem;
  text-align: center;
  pointer-events: none;
  user-select: none;
}

.drop-icon { font-size: 2rem; margin-bottom: 0.4rem; }

.drop-cta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.drop-link {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
}

.drop-formats {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ================================================================
   FILE LIST
   ================================================================ */

.file-list {
  list-style: none;
  padding: 0 0.75rem 0.75rem;
  display: none; /* shown via JS class */
}

.file-list.is-visible { display: block; }

.file-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.file-item.is-invalid {
  border-color: var(--error);
  background: var(--error-bg);
}

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

.file-item.is-invalid .file-name { color: var(--error); }

.file-size {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.file-item.is-invalid .file-size { color: var(--error); }

.file-remove {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.1s;
}

.file-remove:hover { opacity: 1; }

/* ================================================================
   USAGE RIGHTS SECTION
   ================================================================ */

.rights-section { border-color: var(--brown-light); }

.rights-box {
  background: var(--cream);
  border-left: 3px solid var(--brown);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.25rem;
}

.rights-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.rights-list {
  list-style: none;
  padding: 0;
}

.rights-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.2rem 0 0.2rem 1.25rem;
  position: relative;
  line-height: 1.5;
}

.rights-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--brown);
}

/* ---- Custom Checkbox ---- */
.checkbox-row { margin-top: 0.5rem; }

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

/* Hide native checkbox */
.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Styled replacement */
.checkbox-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 2px;
}

.checkbox-input:checked + .checkbox-box {
  background: var(--green);
  border-color: var(--green);
}

.checkbox-input:checked + .checkbox-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid var(--white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.checkbox-input:focus-visible + .checkbox-box {
  box-shadow: 0 0 0 3px rgba(44, 85, 69, 0.25);
  outline: none;
}

.checkbox-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.55;
}

/* ================================================================
   PROGRESS CARD
   ================================================================ */

.progress-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
}

.progress-track {
  height: 8px;
  background: var(--cream-mid);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--green-dark), var(--green-mid));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.progress-note {
  font-size: 0.77rem;
  color: var(--text-muted);
}

/* ================================================================
   SUBMIT BUTTON
   ================================================================ */

.form-footer { margin-bottom: 1.5rem; }

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 2rem;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
}

.btn-submit:hover:not(:disabled) { background: var(--green-mid); }
.btn-submit:active:not(:disabled) { transform: translateY(1px); }

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ================================================================
   RESULT CARDS (success / error)
   ================================================================ */

.result-card {
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.result-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.result-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.result-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 460px;
  margin: 0 auto;
}

/* Success */
.success-card {
  background: var(--success-bg);
  border: 1px solid var(--green);
}

.success-card .result-icon {
  background: var(--green);
  color: var(--white);
}

.success-card .result-title { color: var(--green-dark); }

/* Error */
.error-card {
  background: var(--error-bg);
  border: 1px solid var(--error);
}

.error-card .result-icon {
  background: var(--error);
  color: var(--white);
  font-size: 1.2rem;
}

.error-card .result-title { color: var(--error); }

/* ================================================================
   FOOTER
   ================================================================ */

.site-footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.78rem;
}

.site-footer a {
  color: var(--brown-light);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.footer-contact { margin-top: 0.3rem; }

/* ================================================================
   RESPONSIVE — 640 px+
   ================================================================ */

@media (max-width: 639px) {
  .form-row.two-col {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 1.25rem 1.1rem;
  }

  .logo-name { font-size: 1.35rem; }
  .logo-year { font-size: 1rem; }
}
