@font-face {
  font-family: "Fira Sans";
  src: url("assets/fonts/FiraSans/FiraSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fira Sans";
  src: url("assets/fonts/FiraSans/FiraSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fira Sans";
  src: url("assets/fonts/FiraSans/FiraSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fira Sans";
  src: url("assets/fonts/FiraSans/FiraSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fontjek";
  src: url("assets/fonts/Fontjek.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --base: #adb19f;
  --base-light: #bec2b3;
  --base-deep: #9ca18e;
  --accent: #5f7258;
  --forest: #223d13;
  --ink: #050505;
  --text: #2b3d1f;
  --muted: #536147;
  --paper: #fbfaf6;
  --gold: #d1a547;
  --danger: #c3262d;
  --line: rgba(43, 61, 31, 0.28);
  --shadow: 0 28px 70px rgba(5, 5, 5, 0.12);
  --pattern: url("assets/images/ogawa-editorial-pattern.svg");
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Fira Sans", Arial, sans-serif;
  --signature: "Fontjek", "Fira Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--base);
  background-image: var(--pattern);
  background-repeat: repeat;
  background-size: 360px 360px;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

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

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--ink);
  color: var(--base);
}

.noscript {
  padding: 16px;
  border-bottom: 1px solid var(--danger);
  background: var(--paper);
  color: var(--danger);
}

.shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.4vw, 30px);
}

.panel {
  border: 1px solid var(--ink);
  border-radius: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow);
}

h1,
h2,
p {
  margin-top: 0;
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 1010px);
  min-height: calc(100vh - clamp(28px, 4.8vw, 60px));
  padding: clamp(28px, 7vw, 80px);
  overflow: hidden;
  background: var(--paper);
}

.panel::after {
  content: "";
  position: absolute;
  width: 210px;
  aspect-ratio: 1;
  right: -88px;
  top: 130px;
  border: 1px solid rgba(43, 61, 31, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.form-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 836px;
  margin-bottom: clamp(42px, 8vh, 96px);
}

.form-brand img {
  width: clamp(132px, 18vw, 214px);
  height: auto;
}

.form-brand span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.progress {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  max-width: 836px;
  margin-bottom: 34px;
}

.progress__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.progress h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.06;
}

.progress__bar {
  height: 12px;
  padding: 2px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: rgba(173, 177, 159, 0.28);
  overflow: hidden;
}

.progress__bar span {
  display: block;
  width: 14.285%;
  height: 100%;
  border-radius: 999px;
  background: var(--forest);
  transition: width 300ms var(--ease);
}

form {
  position: relative;
  z-index: 1;
  max-width: 836px;
}

.step {
  display: none;
  min-height: 360px;
  margin: 0;
  padding: 0;
  border: 0;
}

.step.is-active {
  display: grid;
  align-content: start;
  gap: 18px;
  animation: step-in 320ms var(--ease) both;
}

legend {
  margin-bottom: 26px;
  color: var(--text);
  font-size: clamp(25px, 3.2vw, 44px);
  font-weight: 800;
  line-height: 1.08;
}

.legend-secondary {
  margin-top: 20px;
  margin-bottom: 14px;
  font-size: clamp(18px, 2vw, 24px);
}

label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--text);
  padding: 15px 16px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: rgba(83, 97, 71, 0.68);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(95, 114, 88, 0.18);
}

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

.field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.choice-grid label,
.check {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 220ms var(--ease),
    border-color 220ms var(--ease),
    background 220ms var(--ease);
}

.choice-grid label:hover,
.check:hover {
  transform: translateY(-2px);
  border-color: var(--forest);
  background: rgba(173, 177, 159, 0.18);
}

.choice-grid input,
.check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--forest);
}

.form-error {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--forest);
  border-radius: 999px;
  background: var(--forest);
  color: #ffffff;
  padding: 0 24px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 220ms var(--ease),
    background 220ms var(--ease),
    border-color 220ms var(--ease),
    color 220ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent);
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.button--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.button--ghost:hover {
  border-color: var(--forest);
  background: rgba(173, 177, 159, 0.22);
  color: var(--text);
}

[data-submit],
[data-back] {
  display: none;
}

.success {
  position: relative;
  z-index: 1;
  max-width: 680px;
  border: 1px solid var(--ink);
  border-radius: 30px;
  padding: clamp(24px, 4vw, 44px);
  background-color: var(--base-light);
  background-image: var(--pattern);
  box-shadow: var(--shadow);
}

.success span {
  color: var(--forest);
  font-weight: 800;
}

.success h2 {
  margin: 18px 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 800;
  line-height: 1;
}

.success p {
  color: var(--text);
  line-height: 1.6;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .panel {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 10px;
    gap: 10px;
  }

  .panel {
    border-radius: 22px;
    padding: 22px;
  }

  .form-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 46px;
  }

  .choice-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column-reverse;
  }

  .button {
    width: 100%;
  }

  .step {
    min-height: 380px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
