:root {
  --ink: #1e1b18;
  --muted: #766a5a;
  --line: rgba(177, 148, 105, 0.28);
  --paper: #f5f0e8;
  --surface: rgba(255, 251, 245, 0.94);
  --surface-strong: #fffaf3;
  --accent: #b08a56;
  --accent-dark: #8f6b3c;
  --accent-ink: #251a10;
  --success-bg: #eef4ec;
  --success-ink: #2e6240;
  --error-bg: #fbefec;
  --error-ink: #9f4136;
  --shadow: 0 24px 70px rgba(40, 25, 11, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(201, 170, 125, 0.2), transparent 28%),
    linear-gradient(180deg, #eee4d6 0%, #f6f0e8 34%, #f7f2eb 100%);
}

.privacy-body {
  background: linear-gradient(180deg, #eee4d6 0%, #f6f0e8 40%, #f7f2eb 100%);
}

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

a {
  color: var(--accent-dark);
}

.page {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 43vh;
  display: flex;
  align-items: flex-end;
  padding: 44px clamp(18px, 6vw, 84px) 76px;
  overflow: hidden;
  background: #2f2a23;
}

.lang-switch {
  position: absolute;
  top: 26px;
  right: clamp(18px, 5vw, 52px);
  z-index: 2;
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 240, 220, 0.26);
  border-radius: 999px;
  background: rgba(39, 29, 18, 0.48);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(18, 11, 6, 0.18);
}

.lang-switch__button {
  min-width: 54px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 247, 236, 0.84);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.lang-switch__button:hover {
  transform: translateY(-1px);
}

.lang-switch__button.is-active {
  background: linear-gradient(180deg, rgba(223, 190, 140, 0.95), rgba(177, 136, 78, 0.95));
  color: #25170b;
}

.hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(25, 20, 15, 0.2), rgba(25, 20, 15, 0.78)),
    url("https://optim.tildacdn.biz/tild6639-3333-4738-b762-373438663536/-/format/webp/02_SUN_HILLS_view2_W.jpg.webp") center/cover;
  transform: scale(1.02);
}

.hero__content {
  position: relative;
  max-width: 880px;
  color: #fff7ef;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(46px, 8vw, 92px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: 0;
  max-width: 780px;
  text-wrap: balance;
}

.workspace {
  width: min(720px, calc(100% - 32px));
  margin: -42px auto 64px;
  position: relative;
}

.form {
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 34px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel.disabled {
  opacity: 0.52;
  pointer-events: none;
}

.panel__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.step {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  border: 1px solid rgba(176, 138, 86, 0.35);
  background: rgba(176, 138, 86, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
}

h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.panel__head p,
.muted,
.hint,
small {
  color: var(--muted);
}

.panel__head p {
  margin-top: 7px;
  line-height: 1.55;
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 14px;
}

#agentFields {
  margin-top: 14px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field > span,
.field__head > span {
  font-size: 13px;
  font-weight: 600;
  color: #4a3f33;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #cf6d60;
  box-shadow: 0 0 0 4px rgba(207, 109, 96, 0.12);
}

.field__error {
  display: none;
  font-size: 12px;
  line-height: 1.4;
  color: var(--error-ink);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  text-align: right;
  flex: 0 0 auto;
}

.field.has-error .field__error {
  display: block;
}

input,
select,
textarea {
  min-height: 56px;
  width: 100%;
  border: 1px solid rgba(159, 135, 102, 0.3);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0 16px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

textarea {
  min-height: 152px;
  padding: 16px;
  resize: vertical;
}

input::placeholder {
  color: #a19484;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(176, 138, 86, 0.16);
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: #cf6d60;
}

.button {
  min-height: 56px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 22px;
  background: linear-gradient(180deg, #d3b17d 0%, #b28a55 100%);
  color: #fffaf1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 160ms ease, filter 160ms ease, background-color 160ms ease;
}

.button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button--secondary {
  background: linear-gradient(180deg, #c79a66 0%, #a97542 100%);
}

.button--ghost {
  border-color: rgba(176, 138, 86, 0.45);
  background: transparent;
  color: var(--accent-dark);
}

.button--ghost:hover {
  background: rgba(176, 138, 86, 0.08);
}

.button--wide {
  margin-top: 8px;
}

.result {
  display: grid;
  gap: 16px;
  padding: 18px;
  margin-top: 16px;
  border: 1px solid rgba(176, 138, 86, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(251, 247, 239, 0.92), rgba(245, 236, 223, 0.92));
}

.result strong,
.result small {
  display: block;
  margin-top: 4px;
}

.pending-meta {
  color: var(--accent-dark);
  font-weight: 600;
}

.subsection-head {
  margin: 8px 0 16px;
}

.subsection-head h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.subsection-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 18px;
  color: #4b4035;
  line-height: 1.5;
}

.check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.actions {
  display: grid;
  gap: 10px;
}

.hint {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.notice {
  border-radius: 8px;
  padding: 18px;
  background: var(--success-bg);
  color: var(--success-ink);
  border: 1px solid rgba(46, 98, 64, 0.16);
  font-weight: 700;
  line-height: 1.5;
}

#agentNotFound {
  margin-top: 22px;
}

.notice.error {
  background: var(--error-bg);
  color: var(--error-ink);
  border-color: rgba(159, 65, 54, 0.18);
}

.hidden {
  display: none !important;
}

.text-page {
  width: min(820px, calc(100% - 32px));
  margin: 60px auto;
  padding: 32px;
  background: rgba(255, 251, 245, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.text-page h1 {
  color: var(--ink);
  font-size: 48px;
  margin-bottom: 18px;
}

.text-page p {
  line-height: 1.7;
  margin-bottom: 12px;
}

.privacy-page {
  min-height: 100vh;
}

.success-screen {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.success-screen__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 21, 15, 0.76);
  backdrop-filter: blur(10px);
}

.success-screen__dialog {
  position: relative;
  width: min(720px, calc(100% - 32px));
  padding: clamp(28px, 5vw, 40px);
  border: 1px solid rgba(218, 189, 145, 0.24);
  border-radius: 8px;
  background: rgba(255, 251, 245, 0.97);
  box-shadow: 0 30px 90px rgba(21, 13, 7, 0.3);
  text-align: center;
}

.success-screen__dialog h2 {
  margin: 0 0 14px;
}

.success-screen__dialog p {
  margin: 0 0 26px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  white-space: pre-line;
}

.hero--policy {
  min-height: 34vh;
  padding-bottom: 62px;
}

.policy-kicker {
  margin-bottom: 14px;
  color: #ead5b0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.privacy-layout {
  width: min(1120px, calc(100% - 32px));
  margin: -36px auto 64px;
}

.privacy-card {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 251, 245, 0.97);
  box-shadow: var(--shadow);
}

.policy-meta {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-card h2 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 30px;
}

.privacy-card p {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.7;
  color: #352d26;
}

.policy-list {
  margin: 0 0 14px 0;
  padding-left: 20px;
  color: #352d26;
}

.policy-list li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.help-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  background: linear-gradient(180deg, #c79a66 0%, #a97542 100%);
  color: #fffaf1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 18px 38px rgba(64, 41, 18, 0.26);
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.help-button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 20, 12, 0.58);
  backdrop-filter: blur(8px);
}

.modal__dialog {
  position: relative;
  width: min(640px, calc(100% - 24px));
  margin: 40px auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 250, 243, 0.98);
  box-shadow: 0 28px 80px rgba(28, 16, 7, 0.28);
}

.modal__head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal__close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(176, 138, 86, 0.12);
  color: var(--accent-dark);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transform: rotate(45deg);
}

.modal__close:hover {
  background: rgba(176, 138, 86, 0.2);
}

@media (max-width: 760px) {
  .hero {
    min-height: 36vh;
    padding-bottom: 68px;
  }

  .lang-switch {
    top: 16px;
    right: 12px;
  }

  .workspace {
    width: min(100% - 20px, 720px);
    margin-top: -28px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  h2 {
    font-size: 30px;
  }

  .help-button {
    right: 12px;
    bottom: 12px;
  }

  .modal__dialog {
    margin: 18px auto;
    padding: 18px;
  }

  .privacy-layout {
    width: min(100% - 20px, 1120px);
    margin-top: -20px;
  }

  .privacy-card h2 {
    font-size: 28px;
  }
}
