*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0e0c0a;
  --paper: #f5f0e8;
  --cream: #ede7d9;
  --accent: #c0392b;
  --gold: #b5862a;
  --muted: #7a7060;
  --border: #cfc5b0;
  --input-bg: #faf7f2;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  background: var(--ink);
  color: var(--paper);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.02) 40px,
    rgba(255,255,255,0.02) 41px
  );
}
.header-badge {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  margin-bottom: 1.2rem;
}
header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.8rem;
}
header h1 em {
  font-style: italic;
  color: var(--gold);
}
header p {
  max-width: 560px;
  margin: 0 auto;
  opacity: 0.65;
  font-size: 0.95rem;
  padding: 0 1rem;
}
.header-divider {
  width: 48px; height: 1px;
  background: var(--gold);
  margin: 1.6rem auto 0;
}

@media(max-width: 768px) {
  header {
    padding: 2.5rem 1.5rem 2rem;
  }
  .header-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.9rem;
    margin-bottom: 1rem;
  }
  header p {
    font-size: 0.9rem;
    padding: 0;
  }
}

@media(max-width: 480px) {
  header {
    padding: 1.5rem 1rem;
  }
  .header-badge {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    padding: 0.2rem 0.7rem;
    margin-bottom: 0.8rem;
  }
  header p {
    font-size: 0.82rem;
    max-width: 100%;
  }
  .header-divider {
    margin: 1.2rem auto 0;
  }
}

/* ── LAYOUT ── */
.form-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ── CONTACT STRIP ── */
.contact-strip {
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 8px rgba(14, 12, 10, 0.08);
}
.contact-strip h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-style: italic;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.2rem; }

@media(max-width: 768px) {
  .form-wrapper {
    padding: 2rem 1rem 4rem;
  }
  .contact-strip {
    padding: 1.5rem 1.5rem 1.2rem;
  }
  .grid-2 { grid-template-columns: 1fr; gap: 1rem; }
  .grid-3 { grid-template-columns: 1fr; gap: 1rem; }
}

@media(max-width: 480px) {
  .form-wrapper {
    padding: 1.5rem 0.75rem 3rem;
  }
  .contact-strip {
    padding: 1.25rem 1rem 1rem;
    margin-bottom: 2rem;
  }
  .contact-strip h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
  }
  .grid-2, .grid-3 { 
    grid-template-columns: 1fr; 
    gap: 1.2rem;
  }
  .field {
    margin-bottom: 0;
    width: 100%;
  }
  header {
    padding: 2rem 1rem 1.5rem;
  }
  header h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
  header p {
    font-size: 0.87rem;
  }
  .form-wrapper {
    padding: 1.5rem 1rem 3rem;
  }
  .contact-strip {
    padding: 1.25rem 1rem 1rem;
  }
  .contact-strip h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  .grid-2, .grid-3 { gap: 0.8rem; }
}

/* ── SECTION ── */
.section {
  margin-bottom: 3rem;
  animation: fadeUp 0.5s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.section-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  min-width: 2.5rem;
  flex-shrink: 0;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
}
.section-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
  letter-spacing: 0.03em;
  width: 100%;
}

@media(max-width: 768px) {
  .section {
    margin-bottom: 2.5rem;
  }
  .section-header {
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
  }
  .section-title {
    font-size: 1.15rem;
  }
  .section-desc {
    font-size: 0.77rem;
    margin-top: 0.15rem;
  }
}

@media(max-width: 480px) {
  .section {
    margin-bottom: 2.5rem;
  }
  .section-header {
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    align-items: flex-start;
  }
  .section-number {
    font-size: 1.8rem;
    margin-top: 0.2rem;
  }
  .section-title {
    font-size: 1rem;
    line-height: 1.3;
  }
  .section-desc {
    font-size: 0.7rem;
    margin-top: 0.25rem;
    line-height: 1.4;
  }
}

/* ── FIELD ── */
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.field label .req { color: var(--accent); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.93rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-radius: 2px;
  appearance: none;
  box-sizing: border-box;
  display: block;
}

@media(max-width: 768px) {
  .field {
    margin-bottom: 1.25rem;
    display: block;
    width: 100%;
  }
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 0.9rem;
    padding: 0.7rem 0.85rem;
  }
}

@media(max-width: 480px) {
  .field {
    margin-bottom: 1.5rem;
    display: block;
    width: 100% !important;
  }
  .field label {
    font-size: 0.7rem;
    margin-bottom: 0.6rem;
    letter-spacing: 0.06em;
  }
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 0.9rem;
    padding: 0.75rem 0.85rem;
    width: 100%;
  }
  textarea {
    min-height: 100px;
  }
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(181,134,42,0.12);
}
textarea { resize: vertical; min-height: 90px; }
select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7060' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.2rem; }

/* ── RANKED ITEMS ── */
.ranked-list { display: flex; flex-direction: column; gap: 0.7rem; }
.ranked-item { display: flex; align-items: stretch; gap: 0.75rem; }
.rank-badge {
  width: 28px; height: 28px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 2px;
  min-width: 28px;
}
.ranked-item input { flex: 1; }

@media(max-width: 768px) {
  .ranked-list { gap: 0.8rem; }
  .ranked-item { gap: 0.7rem; align-items: center; }
}

@media(max-width: 480px) {
  .ranked-list { gap: 1rem; }
  .ranked-item { 
    gap: 0.8rem; 
    align-items: center;
    width: 100%;
  }
  .rank-badge {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    min-width: 30px;
  }
  .ranked-item input {
    padding: 0.75rem 0.85rem !important;
  }
}

/* ── HINT ── */
.hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.3rem;
  font-style: italic;
}

@media(max-width: 480px) {
  .hint {
    font-size: 0.7rem;
    margin-top: 0.25rem;
  }
}

/* ── RADIO / CHECKBOX ── */
.radio-group, .check-group {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-top: 0.3rem;
}
.radio-group label, .check-group label {
  display: flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--border);
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s;
  border-radius: 2px;
  white-space: nowrap;
}
.radio-group label:hover, .check-group label:hover {
  background: var(--cream);
  border-color: var(--gold);
}
.radio-group input[type="radio"],
.check-group input[type="checkbox"] {
  width: auto; border: none; padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

@media(max-width: 768px) {
  .radio-group label, .check-group label {
    font-size: 0.78rem;
    padding: 0.45rem 0.75rem;
  }
}

@media(max-width: 480px) {
  .radio-group, .check-group {
    gap: 0.6rem;
    margin-top: 0.5rem;
    flex-direction: column;
  }
  .radio-group label, .check-group label {
    font-size: 0.76rem;
    padding: 0.6rem 0.8rem;
    white-space: normal;
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
  }
  .radio-group input[type="radio"],
  .check-group input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
  }
}

/* ── SIGNOFF ── */
.signoff-block {
  background: var(--ink);
  color: var(--paper);
  padding: 2rem 2rem 2rem;
  margin-top: 3rem;
  box-shadow: 0 2px 8px rgba(14, 12, 10, 0.1);
}
.signoff-block h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.signoff-block p { font-size: 0.85rem; opacity: 0.65; margin-bottom: 1.2rem; }
.signoff-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.signoff-row .field { flex: 1; min-width: 200px; }
.signoff-row .field label { color: rgba(245,240,232,0.55); }
.signoff-row input { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); color: var(--paper); }
.signoff-row input:focus { border-color: var(--gold); }

@media(max-width: 768px) {
  .signoff-block {
    padding: 1.75rem 1.5rem;
    margin-top: 2.5rem;
  }
  .signoff-block h3 {
    font-size: 1rem;
  }
}

@media(max-width: 480px) {
  .signoff-block {
    padding: 1.5rem 1rem;
    margin-top: 2rem;
  }
  .signoff-block h3 {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
  }
  .signoff-block p { 
    font-size: 0.75rem; 
    margin-bottom: 1rem;
    line-height: 1.4;
  }
  .signoff-row { 
    flex-direction: column; 
    gap: 1rem;
  }
  .signoff-row .field { 
    flex: 1; 
    min-width: 100%;
    width: 100%;
  }
  .signoff-row .field label { 
    color: rgba(245,240,232,0.6);
    font-size: 0.7rem;
  }
  .signoff-row input {
    padding: 0.75rem 0.85rem;
  }
}

/* ── SUBMIT ── */
.submit-area { text-align: center; margin-top: 2.5rem; }
.btn-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1rem 3.5rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  border-radius: 2px;
}
.btn-submit:hover { background: #a93226; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.submit-note { font-size: 0.75rem; color: var(--muted); margin-top: 0.9rem; }

@media(max-width: 768px) {
  .submit-area { margin-top: 2.25rem; }
  .btn-submit {
    font-size: 0.8rem;
    padding: 0.9rem 3rem;
  }
  .submit-note { font-size: 0.7rem; margin-top: 0.75rem; }
}

@media(max-width: 480px) {
  .submit-area { 
    margin-top: 2rem;
    padding: 0 1rem;
  }
  .btn-submit {
    font-size: 0.78rem;
    padding: 0.85rem 2.5rem;
    letter-spacing: 0.1em;
    width: 100%;
  }
  .submit-note { 
    font-size: 0.68rem; 
    margin-top: 0.8rem;
    line-height: 1.4;
  }
}

/* ── FOOTER ── */
footer {
  background: var(--cream);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}
footer strong { color: var(--ink); }

@media(max-width: 480px) {
  footer {
    padding: 1.5rem 1rem;
    font-size: 0.7rem;
  }
  footer a {
    word-break: break-word;
  }
}

/* ── SUCCESS MSG ── */
#success-msg {
  display: none;
  background: #1a3a1a;
  color: #b8e6b8;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  text-align: center;
  font-size: 1.1rem;
}
