/* Целый мир — общий стиль: старинный пергамент, сепия, бордовые кнопки с золотой каймой */
:root {
  --paper: #f3e6cf;
  --paper-2: #ead8b8;
  --card: rgba(251, 244, 230, 0.78);
  --ink: #3d2a1e;
  --soft: #765d49;
  --line: #ccb08a;
  --gold: #a9834a;
  --gold-2: #c9a46a;
  --wine: #7a1d22;
  --wine-2: #5c1317;
  --display: "Kurale", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Old Standard TT", "Lora", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
body {
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(255, 250, 238, 0.9), transparent 70%),
    radial-gradient(40% 30% at 0% 60%, rgba(201, 164, 106, 0.18), transparent 70%),
    radial-gradient(40% 30% at 100% 80%, rgba(201, 164, 106, 0.18), transparent 70%),
    var(--paper);
  min-height: 100%;
}
/* лёгкая фактура бумаги */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .2 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--wine); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.side { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1080px; margin: 0 auto; }

/* шапка */
.top { padding-block: 18px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 64px; height: 64px; flex: 0 0 auto; }
.brand b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; letter-spacing: .01em; }
.brand small { display: block; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--soft); margin-top: 4px; }
.btn-line {
  font: inherit; font-size: 15px; color: var(--ink); text-decoration: none; cursor: pointer;
  border: 1px solid var(--gold); border-radius: 10px; padding: 8px 16px; background: rgba(255, 250, 238, .6);
  box-shadow: inset 0 0 0 3px rgba(255, 250, 238, .6), inset 0 0 0 4px rgba(169, 131, 74, .35);
}
.btn-line:hover { background: #fff8ea; }

/* типографика */
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ink); margin: 0; text-wrap: balance; line-height: 1.12; }
h1 { font-size: clamp(36px, 6vw, 60px); }
h2 { font-size: clamp(30px, 4.6vw, 44px); }
h3 { font-size: 24px; font-weight: 400; }
.lead { font-style: italic; color: var(--soft); margin: 0; max-width: 46ch; }
.eyebrow { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }

/* орнамент-разделитель */
.divider { display: flex; align-items: center; gap: 12px; color: var(--gold); width: min(320px, 80%); margin-inline: auto; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.divider svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* бордовая кнопка */
.btn {
  font: inherit; font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: .01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; text-decoration: none;
  color: #fbf0de; background: linear-gradient(180deg, #8c2a2c, var(--wine) 55%, var(--wine-2));
  border: 1px solid var(--gold-2); border-radius: 16px; padding: 12px 30px;
  box-shadow: inset 0 0 0 3px var(--wine), inset 0 0 0 4px rgba(233, 199, 140, .7), 0 6px 18px rgba(92, 19, 23, .25);
  transition: transform .2s, filter .2s, opacity .2s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .45; filter: grayscale(.4); transform: none; }

/* рамка-карточка */
.frame {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: inset 0 0 0 6px rgba(251, 244, 230, .9), inset 0 0 0 7px rgba(169, 131, 74, .45), 0 10px 40px rgba(110, 80, 50, .12);
}
.frame::before, .frame::after {
  content: "✦"; position: absolute; color: var(--gold); font-size: 14px; line-height: 1;
}
.frame::before { top: -8px; left: 50%; transform: translateX(-50%); background: var(--paper); padding: 0 6px; }
.frame::after { bottom: -8px; left: 50%; transform: translateX(-50%); background: var(--paper); padding: 0 6px; }

/* поля */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--soft); min-width: 0; }
input[type=date], input[type=text], input[type=tel], input[type=email], textarea {
  font: inherit; font-size: 17px; color: var(--ink); background: rgba(255, 251, 242, .9);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; width: 100%; min-width: 0;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 106, .25); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--soft); line-height: 1.45; text-align: left; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--wine); flex: 0 0 auto; }

/* выбор способа связи */
.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 10px; }
.method {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; cursor: pointer; text-align: center;
  font: inherit; color: var(--ink); background: rgba(255, 251, 242, .75);
  border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, background .2s, box-shadow .2s;
}
.method svg { width: 26px; height: 26px; flex: 0 0 auto; color: var(--soft); }
.method b { display: block; font-family: var(--display); font-size: 19px; font-weight: 400; line-height: 1.1; }
.method small { display: block; font-size: 12px; color: var(--soft); }
.method:hover { border-color: var(--gold); }
.method[aria-pressed="true"] { border-color: var(--wine); background: #fff8ea; box-shadow: inset 0 0 0 1px var(--wine); }
.method[aria-pressed="true"] svg { color: var(--wine); }

.hint { font-size: 14px; color: var(--soft); font-style: italic; margin: 0; min-height: 1.5em; }
.err { color: var(--wine); font-size: 14px; margin: 0; }

footer.foot { text-align: center; font-size: 13px; color: var(--soft); padding-block: 36px 48px; }
footer.foot p { margin: 4px auto; max-width: 60ch; }

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

/* --- художественные детали --- */
/* золотые уголки-виньетки на рамках */
.frame {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23a9834a' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M4 40V12a8 8 0 0 1 8-8h28'/%3E%3Cpath d='M10 30c0-12 8-20 20-20' stroke-width='.7'/%3E%3Cpath d='M14 14c6 2 8 6 6 10-3 4-8 2-7-2 1-3 5-3 6 0'/%3E%3Ccircle cx='8' cy='8' r='1.6' fill='%23a9834a'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cg transform='scale(-1 1) translate(-60 0)' fill='none' stroke='%23a9834a' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M4 40V12a8 8 0 0 1 8-8h28'/%3E%3Cpath d='M10 30c0-12 8-20 20-20' stroke-width='.7'/%3E%3Cpath d='M14 14c6 2 8 6 6 10-3 4-8 2-7-2 1-3 5-3 6 0'/%3E%3Ccircle cx='8' cy='8' r='1.6' fill='%23a9834a'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cg transform='scale(1 -1) translate(0 -60)' fill='none' stroke='%23a9834a' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M4 40V12a8 8 0 0 1 8-8h28'/%3E%3Cpath d='M10 30c0-12 8-20 20-20' stroke-width='.7'/%3E%3Cpath d='M14 14c6 2 8 6 6 10-3 4-8 2-7-2 1-3 5-3 6 0'/%3E%3Ccircle cx='8' cy='8' r='1.6' fill='%23a9834a'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cg transform='scale(-1 -1) translate(-60 -60)' fill='none' stroke='%23a9834a' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M4 40V12a8 8 0 0 1 8-8h28'/%3E%3Cpath d='M10 30c0-12 8-20 20-20' stroke-width='.7'/%3E%3Cpath d='M14 14c6 2 8 6 6 10-3 4-8 2-7-2 1-3 5-3 6 0'/%3E%3Ccircle cx='8' cy='8' r='1.6' fill='%23a9834a'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px 10px, calc(100% - 10px) 10px, 10px calc(100% - 10px), calc(100% - 10px) calc(100% - 10px);
  background-size: 46px 46px;
}
/* обрывки старинного пергамента */
.frags { position: relative; }
.frag { position: absolute; pointer-events: none; z-index: 0; opacity: .82; filter: drop-shadow(0 6px 10px rgba(110, 80, 50, .18)); }
.frags > :not(.frag) { position: relative; z-index: 1; }
/* буквица */
.dropcap::first-letter { font-family: var(--display); float: left; font-size: 2.5em; line-height: .9; padding: 4px 8px 0 0; color: var(--wine); }
/* созвездие-разделитель */
.constellation { display: block; width: 140px; height: 28px; margin: 0 auto; color: var(--gold); }
@media (max-width: 900px) { .frag { opacity: .35; transform: scale(.6) !important; } }
@media (max-width: 600px) { .frag { display: none; } }
