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

:root {
  --ink: #1a1a1a;
  --paper: #f6f3ed;
  --accent: #c45d3e;
  --accent-hover: #a8482d;
  --muted: #8a8377;
  --border: #d9d4ca;
  --field-bg: #fffdf9;
  --success-bg: #e8f0e4;
  --success-text: #3a6b2a;
}

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

body {
  font-family: 'Instrument Sans', sans-serif;
  background-color: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
  z-index: 999;
}

/* --- Nav --- */
.nav {
  width: 100%;
  max-width: 620px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0;
}

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* --- Page --- */
.page {
  width: 100%;
  max-width: 620px;
  padding: 4rem 1.5rem 3rem;
  animation: fadeUp 0.8s ease-out both;
}

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

/* --- Header --- */
.header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.header .tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 100px;
  padding: 0.3em 1em;
  margin-bottom: 1.25rem;
}

.header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.header p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

.divider {
  width: 48px;
  height: 2px;
  background: var(--border);
  margin: 0 auto 3rem;
  border: none;
}

/* --- Form --- */
.form-wrap {
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

.info-box {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

.field {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

label .optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 93, 62, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* --- Checkboxes & Radios --- */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.checkbox-group label,
.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  font-size: 0.92rem;
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

/* --- Conditional sections --- */
.conditional {
  display: none;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

.conditional.visible {
  display: block;
}

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

.conditional-inner {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

/* --- Guidelines tooltip --- */
.guidelines-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}

.guidelines-link:hover {
  text-decoration-style: solid;
}

.guidelines-info {
  display: none;
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--muted);
  animation: slideDown 0.3s ease-out;
}

.guidelines-info.visible {
  display: block;
}

/* --- Nudge --- */
.nudge {
  display: none;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  animation: slideDown 0.3s ease-out;
}

.nudge.visible {
  display: block;
}

.nudge strong {
  color: var(--ink);
}

/* --- Submit --- */
button[type="submit"] {
  width: 100%;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.1s;
}

button[type="submit"]:hover {
  background: var(--accent-hover);
}

button[type="submit"]:active {
  transform: scale(0.985);
}

/* --- Success --- */
.success-msg {
  display: none;
  text-align: center;
  padding: 2rem;
  background: var(--success-bg);
  border-radius: 12px;
  animation: fadeUp 0.5s ease-out both;
}

.success-msg .check {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.success-msg h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--success-text);
  margin-bottom: 0.4rem;
}

.success-msg p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* --- Footer --- */
footer {
  margin-top: auto;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

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

/* --- Validation errors --- */
.error-msg {
  display: none;
  color: #c0392b;
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

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

.field.error input,
.field.error textarea {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

/* --- Content pages (FAQ, About, Contact) --- */
.content-section {
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

.content-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.content-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1rem;
}

.content-section p:last-child {
  margin-bottom: 0;
}

.content-section a {
  color: var(--accent);
  text-decoration: none;
}

.content-section a:hover {
  text-decoration: underline;
}

.faq-item {
  margin-bottom: 2rem;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item h2 {
  margin-bottom: 0.5rem;
}

.contact-email {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  margin-top: 0.5rem;
  transition: background 0.2s, color 0.2s;
}

.contact-email:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 480px) {
  .page {
    padding: 2.5rem 1rem 2rem;
  }
  .form-wrap,
  .content-section {
    padding: 1.75rem 1.25rem;
  }
  .nav {
    padding: 1rem 1rem 0;
  }
  .nav-links {
    gap: 1rem;
  }
}
