:root {
  color-scheme: light;
  --bg: #f4efe6;
  --bg-accent: radial-gradient(circle at top, rgba(255, 255, 255, 0.9), transparent 55%);
  --card-bg: rgba(255, 252, 246, 0.82);
  --card-border: rgba(112, 90, 62, 0.14);
  --text-main: #201812;
  --text-muted: #5d4d3f;
  --button-bg: #201812;
  --button-text: #f9f4ed;
  --input-bg: rgba(255, 255, 255, 0.72);
  --input-border: rgba(112, 90, 62, 0.18);
  --shadow: 0 24px 80px rgba(84, 53, 17, 0.12);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --bg-accent: radial-gradient(circle at top, rgba(77, 94, 125, 0.35), transparent 50%);
  --card-bg: rgba(19, 23, 30, 0.82);
  --card-border: rgba(201, 212, 235, 0.12);
  --text-main: #eef2fb;
  --text-muted: #a7b1c5;
  --button-bg: #eef2fb;
  --button-text: #10131a;
  --input-bg: rgba(9, 12, 18, 0.6);
  --input-border: rgba(201, 212, 235, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    var(--bg-accent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 28%),
    var(--bg);
  color: var(--text-main);
  transition: background-color 220ms ease, color 220ms ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero-card {
  width: min(760px, 100%);
  padding: 32px;
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.description {
  margin: 18px 0 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.contact-form {
  display: grid;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.95rem;
  font-weight: 700;
}

.field--full {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text-main);
  background: var(--input-bg);
  outline: none;
  transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 150px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--text-main);
  transform: translateY(-1px);
}

.theme-toggle,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 700;
  color: var(--button-text);
  background: var(--button-bg);
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.theme-toggle:hover,
.submit-button:hover {
  transform: translateY(-1px);
}

.theme-toggle:active,
.submit-button:active {
  transform: translateY(0);
  opacity: 0.92;
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: inset 7px -4px 0 0 rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .theme-toggle__icon {
  box-shadow:
    inset 0 0 0 3px rgba(16, 19, 26, 0.72),
    0 0 0 3px currentColor;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-note {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .hero-card {
    padding: 24px;
    border-radius: 24px;
  }

  .hero-actions,
  .form-footer {
    justify-content: stretch;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 3.1rem);
  }

  .theme-toggle,
  .submit-button {
    width: 100%;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
