/* ---- Design tokens (Modernist system: flat, architectural, Archivo type, 2px rules, 0 radius) ---- */
:root {
  --color-bg: #f3f2f2;
  --color-surface: #ffffff;
  --color-text: #201e1d;
  --color-divider: color-mix(in srgb, #201e1d 18%, transparent);
  --color-accent: #ec3013;
  --color-accent-600: #c72710;
  --color-accent-400: #f15a3f;

  --color-neutral-100: #f8f4f4;
  --color-neutral-200: #eeeaea;
  --color-neutral-300: #ddd8d8;
  --color-neutral-400: #c2bcbc;
  --color-neutral-500: #9b9797;
  --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;
  --color-neutral-900: #201e1d;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .08);
  --shadow-md: 0 3px 10px rgba(0, 0, 0, .10);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .16);

  --font-heading: "Archivo", sans-serif;
  --font-heading-weight: 700;
  --font-body: "Archivo", sans-serif;

  --radius: 0;
}

html[data-theme="dark"] {
  --color-bg: #1c1a19;
  --color-surface: #262423;
  --color-text: #f3f2f2;
  --color-divider: color-mix(in srgb, #f3f2f2 35%, transparent);
  --color-neutral-100: #2d2b2b;
  --color-neutral-200: #383535;
  --color-neutral-300: #444141;
  --color-neutral-400: #605d5d;
  --color-neutral-500: #7d7979;
  --color-neutral-600: #9b9797;
  --color-neutral-700: #bab6b6;
  --color-neutral-800: #d7d3d3;
  --color-neutral-900: #f8f4f4;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 3px 10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--color-bg);
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  transition: background .15s, color .15s;
}

a {
  color: var(--color-accent);
}
a:hover {
  color: var(--color-accent-600);
}
html[data-theme="dark"] a:hover {
  color: var(--color-accent-400);
}

/* ---- Layout ---- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nav {
  display: flex;
  align-items: center;
  padding: 24px clamp(20px, 5vw, 72px);
}

.logo {
  height: 44px;
  width: auto;
  margin-right: auto;
}
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: block; }

.main {
  flex: 1;
  display: flex;
  align-items: center;
}
.main-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px clamp(20px, 5vw, 72px);
  width: 100%;
}
.hero {
  max-width: 640px;
}
.hero h1 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: clamp(36px, 5.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero-body {
  font-size: 17px;
  line-height: 1.6;
  max-width: 52ch;
  margin: 24px 0 0;
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
}

.hero-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
  max-width: 480px;
}
.hero-form .input {
  flex: 1;
  min-width: 220px;
}

.success-card {
  margin-top: 32px;
  padding: 16px;
  border: 2px solid var(--color-divider);
  max-width: 480px;
}
.success-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 16px;
}
.success-body {
  margin: 6px 0 0;
  font-size: 14px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

.footer {
  border-top: 2px solid var(--color-divider);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  text-decoration: none;
  font-size: 13px;
}

/* ---- Buttons ---- */
.btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-600);
  border-color: var(--color-accent-600);
}
.btn-secondary {
  background: transparent;
  border-color: var(--color-divider);
  color: var(--color-text);
}
.btn-secondary:hover {
  border-color: var(--color-neutral-500);
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  width: 38px;
  height: 38px;
}

/* ---- Inputs / fields ---- */
.input {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 12px;
  border: 2px solid var(--color-divider);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
}
.input::placeholder {
  color: color-mix(in srgb, var(--color-text) 45%, transparent);
}
.input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
}
.field .input,
.field textarea {
  width: 100%;
}
.other-text {
  margin-top: 10px;
  min-height: 72px;
  resize: vertical;
  font-family: var(--font-body);
}

.radio-group {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}
.radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.radio .dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--color-divider);
  border-radius: 50%;
  position: relative;
}
.radio input[type="radio"]:checked + .dot {
  border-color: var(--color-accent);
}
.radio input[type="radio"]:checked + .dot::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border-radius: 50%;
  background: var(--color-accent);
}
.radio input[type="radio"]:focus-visible + .dot {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---- Dialog ---- */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.dialog-backdrop[hidden] {
  display: none;
}
.dialog {
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.dialog-title {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.dialog-body {
  font-size: 14px;
  margin-top: -12px;
}
.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dialog-error {
  font-size: 13px;
  color: var(--color-accent);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 420px) {
  .dialog-grid {
    grid-template-columns: 1fr;
  }
}
