﻿@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Cormorant+Garamond:wght@600;700&family=IBM+Plex+Mono:wght@400;600&display=swap");

:root {
  --bg: #f5f2e8;
  --bg-soft: #eef3e7;
  --paper: rgba(255, 252, 245, 0.88);
  --paper-strong: #fffdf8;
  --ink: #182117;
  --muted: #62705f;
  --line: rgba(77, 101, 74, 0.14);
  --line-strong: rgba(59, 84, 55, 0.22);
  --brand: #356f3d;
  --brand-strong: #1f4f29;
  --gold: #d7b26a;
  --gold-soft: rgba(215, 178, 106, 0.14);
  --success: #eef6ea;
  --shadow: 0 24px 60px rgba(32, 52, 29, 0.12);
  --shadow-soft: 0 14px 30px rgba(32, 52, 29, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(215, 178, 106, 0.2), transparent 26%),
    radial-gradient(circle at top right, rgba(60, 114, 67, 0.15), transparent 24%),
    linear-gradient(180deg, #f7f3e8 0%, #eff4ea 50%, #eef2e8 100%);
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.52), transparent 0 22%),
    radial-gradient(circle at 85% 14%, rgba(215, 178, 106, 0.14), transparent 0 18%),
    linear-gradient(130deg, rgba(34, 75, 41, 0.03), rgba(215, 178, 106, 0.02));
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 18px auto 72px;
  padding: 0 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 30px;
  color: #f8f6ef;
  background:
    linear-gradient(135deg, rgba(16, 41, 20, 0.92), rgba(43, 94, 51, 0.88) 48%, rgba(86, 129, 80, 0.84) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  box-shadow: 0 28px 80px rgba(18, 37, 20, 0.28);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  width: 360px;
  height: 360px;
  top: -160px;
  right: -80px;
  background: radial-gradient(circle, rgba(231, 204, 143, 0.26), rgba(231, 204, 143, 0));
}

.hero::after {
  width: 240px;
  height: 240px;
  bottom: -120px;
  left: -60px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  font: 700 12px/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 246, 239, 0.82);
}

.hero h1 {
  margin: 0;
  font: 700 clamp(42px, 6vw, 62px)/0.95 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0;
  max-width: 700px;
  font-size: 19px;
  line-height: 1.55;
  color: rgba(247, 245, 238, 0.88);
}

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

.hero-point {
  min-height: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(250, 247, 240, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-start;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-chip {
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 247, 224, 0.16);
  border: 1px solid rgba(233, 211, 160, 0.34);
  color: #fff5dc;
  font: 700 12px/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-cardline {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-cardline:last-of-type {
  border-bottom: none;
}

.hero-cardline span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 246, 239, 0.62);
}

.hero-cardline strong {
  font-size: 18px;
  line-height: 1.35;
  color: #fffdf8;
}

.hero-emblem {
  margin-top: auto;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(231, 204, 143, 0.32), rgba(231, 204, 143, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.hero-emblem span {
  font: 700 28px/1 "Cormorant Garamond", Georgia, serif;
  color: #fff2d1;
}

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

.tab {
  position: relative;
  border: 1px solid rgba(61, 84, 58, 0.1);
  background: rgba(255, 251, 244, 0.76);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 15px 18px;
  font-weight: 800;
  color: #31412f;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  box-shadow: var(--shadow-soft);
}

.tab:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 89, 52, 0.22);
}

.tab.active {
  color: #faf7f0;
  border-color: rgba(250, 241, 219, 0.16);
  background: linear-gradient(135deg, #2f6637, #4d8353 68%, #73936a);
  box-shadow: 0 16px 34px rgba(41, 71, 39, 0.24);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card {
  margin-top: 18px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(85, 103, 81, 0.12);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(255, 252, 247, 0.84));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.section-kicker {
  margin: 0 0 8px;
  font: 700 12px/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6c7d67;
}

.card h2 {
  margin: 0;
  font: 700 clamp(28px, 3.3vw, 38px)/1.02 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.03em;
}

.auto-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(57, 86, 52, 0.12);
  background: linear-gradient(180deg, rgba(244, 239, 228, 0.96), rgba(240, 247, 236, 0.92));
  color: #31412d;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.info-ribbon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.info-ribbon span,
.section-note {
  color: var(--muted);
  line-height: 1.6;
}

.info-ribbon span {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(242, 246, 237, 0.88), rgba(255, 251, 243, 0.76));
  border: 1px solid rgba(91, 114, 87, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.section-note {
  margin: 18px 0 22px;
  font-size: 15px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: #273022;
}

input,
select,
button,
textarea {
  font: 500 14px/1.35 "Manrope", "Segoe UI", sans-serif;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(104, 122, 99, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 249, 244, 0.94));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 52px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(43, 78, 47, 0.72) 50%),
    linear-gradient(135deg, rgba(43, 78, 47, 0.72) 50%, transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 249, 244, 0.94));
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px),
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
  cursor: pointer;
}

select option {
  color: #1d261a;
  background: #fffdf8;
}

select optgroup {
  color: #426340;
  font-style: normal;
  font-weight: 800;
  background: #f5f2e8;
}

input::placeholder,
textarea::placeholder {
  color: #8a9584;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(66, 118, 73, 0.42);
  box-shadow:
    0 0 0 4px rgba(80, 130, 84, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

input[disabled] {
  color: #6e7868;
  background: linear-gradient(180deg, rgba(245, 247, 241, 0.96), rgba(240, 243, 238, 0.96));
}

.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

button {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 16px;
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button.primary {
  color: #fffaf2;
  background: linear-gradient(135deg, #2b6234, #467a48 68%, #5f9060);
  box-shadow: 0 14px 30px rgba(42, 84, 44, 0.24);
}

button.ghost {
  color: #28442e;
  background: linear-gradient(180deg, rgba(244, 248, 239, 0.96), rgba(235, 242, 230, 0.94));
  border: 1px solid rgba(108, 131, 102, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.result-box {
  margin-top: 16px;
  min-height: 74px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(77, 101, 74, 0.14);
  background: linear-gradient(180deg, #1f2b22, #182119);
  color: #eef8e9;
  font: 13px/1.55 "IBM Plex Mono", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.signature-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px dashed rgba(95, 121, 90, 0.28);
  background:
    linear-gradient(180deg, rgba(245, 248, 240, 0.96), rgba(253, 251, 245, 0.96)),
    repeating-linear-gradient(45deg, rgba(54, 91, 56, 0.02) 0 10px, rgba(215, 178, 106, 0.03) 10px 20px);
}

#signature-preview-image {
  display: none;
  max-width: 100%;
  max-height: 140px;
}

.signature-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 18, 12, 0.76);
  backdrop-filter: blur(12px);
}

.signature-modal.hidden {
  display: none;
}

.signature-modal-card {
  width: min(900px, 100%);
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 23, 18, 0.98), rgba(22, 31, 23, 0.96));
  color: #eef6ea;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.signature-modal-card h3 {
  margin: 0 0 14px;
  font: 700 30px/1.05 "Cormorant Garamond", Georgia, serif;
}

#signature-canvas {
  width: 100%;
  height: 320px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.03));
  touch-action: none;
  cursor: crosshair;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: 380px;
  padding: 13px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #243726, #1d2e1f);
  color: #f0f9eb;
  box-shadow: 0 18px 40px rgba(11, 24, 13, 0.34);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.25s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: linear-gradient(180deg, #793737, #5f2626);
}

@media (max-width: 1100px) {
  .hero-shell,
  .hero-points,
  .info-ribbon,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .container {
    margin-top: 12px;
    padding: 0 12px 28px;
  }

  input,
  select,
  textarea {
    padding: 13px 14px;
  }

  .hero,
  .card {
    border-radius: 24px;
  }

  .hero {
    padding: 22px;
  }

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

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .signature-modal-card {
    padding: 14px;
  }

  #signature-canvas {
    height: 260px;
  }
}
