:root {
  --bg: #0f2a24;
  --bg-card: #17362e;
  --paper: #f7f4ec;
  --ink: #14221c;
  --muted: #4d5f57;
  --accent: #1f6b45;
  --accent-soft: #7dcea0;
  --line: #d7d0c0;
  --header-ink: #f4f7f5;
  --danger: #9b2c2c;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew", Tahoma, sans-serif;
  background:
    radial-gradient(circle at top left, #1c4a3d 0%, transparent 40%),
    var(--bg);
  color: var(--header-ink);
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header,
.site-footer {
  padding: 1.25rem 1.5rem;
}

.site-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--header-ink);
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav a {
  color: var(--accent-soft);
}

.site-main {
  flex: 1;
  width: min(52rem, 100%);
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}

.site-disclaimer {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #c5d4ce;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1rem;
  direction: ltr;
}

a.lang-switch-btn,
a.lang-switch-btn:link,
a.lang-switch-btn:visited {
  display: inline-block;
  color: #f4f7f5;
  -webkit-text-fill-color: #f4f7f5;
  background: #1c4a3d;
  border: 2px solid #7dcea0;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

a.lang-switch-btn:hover,
a.lang-switch-btn:focus-visible {
  text-decoration: none;
  background: #245c4c;
  border-color: #fff;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

a.lang-switch-btn.is-active,
a.lang-switch-btn.is-active:link,
a.lang-switch-btn.is-active:visited {
  background: var(--accent);
  border-color: #b7ecc9;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.paper {
  background: var(--paper);
  color: var(--ink);
  border-radius: 1.1rem;
  padding: 2rem 1.6rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.paper a {
  color: var(--accent);
}

.paper a.button,
.paper a.button:link,
.paper a.button:visited,
.paper a.button:hover,
.paper a.button:active {
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-decoration: none;
}

.hero h1,
.paper h1,
.paper h2 {
  line-height: 1.2;
  color: #10231c;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.paper h2 {
  margin: 1.75rem 0 0.7rem;
  font-size: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}

.lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.meeting-meta {
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.meeting-meta div,
.faq > div {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.faq dt {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: #10231c;
}

dd {
  margin: 0.3rem 0 0;
  line-height: 1.55;
}

.paper p,
.faq dd {
  line-height: 1.6;
}

.meeting-video {
  margin: 1.15rem 0 0.35rem;
}

.meeting-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.9rem;
  overflow: hidden;
  background: #10231c;
  border: 1px solid #cfc6b4;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 16px 36px rgba(16, 35, 28, 0.16);
}

.meeting-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.fine-print {
  color: var(--muted);
  font-size: 0.92rem;
}

.button,
.button-secondary {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
}

.button {
  background: var(--accent);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.email-manager-cta {
  margin: 1.35rem 0 1.1rem;
}

.paper a.button-email-manager,
.paper a.button-email-manager:link,
.paper a.button-email-manager:visited,
.paper a.button-email-manager:hover,
.paper a.button-email-manager:active {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 1.18rem;
  line-height: 1.3;
  padding: 1.05rem 1.2rem;
  background: #f0b429;
  color: #1a1404;
  -webkit-text-fill-color: #1a1404;
  box-shadow: 0 0 0 4px rgba(240, 180, 41, 0.38), 0 12px 28px rgba(0, 0, 0, 0.18);
  animation: email-cta-pulse 1.7s ease-in-out infinite;
}

.paper a.button-email-manager:hover {
  filter: brightness(1.05);
}

@keyframes email-cta-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(240, 180, 41, 0.38), 0 12px 28px rgba(0, 0, 0, 0.18);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(240, 180, 41, 0.18), 0 14px 32px rgba(0, 0, 0, 0.22);
  }
}

.button-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.notice {
  background: #e7f4ea;
  border: 1px solid #b7d8c1;
  border-radius: 0.8rem;
  padding: 0.9rem 1rem;
  margin: 1rem 0 1.25rem;
}

.field {
  margin-bottom: 1.1rem;
}

label,
.label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.hint {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

input[type="text"],
input:not([type]),
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c9c2b3;
  border-radius: 0.55rem;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}

.house-number-input {
  max-width: 9.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
}

input[readonly] {
  background: #f6f3ec;
  color: var(--ink);
}

#house-section[hidden],
#signer-fields[hidden],
#entity-field[hidden],
#title-field[hidden],
.field-error[hidden] {
  display: none;
}

.verification-code {
  max-width: 12rem;
  text-align: center;
  font-size: 1.7rem;
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
}

.field-error {
  display: block;
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.submit-error {
  font-weight: 600;
  margin: 0.85rem 0 0.55rem;
}

.submit-error[hidden] {
  display: none;
}

.signature-wrap {
  border: 1px solid #c9c2b3;
  border-radius: 0.55rem;
  background: #fff;
  overflow: hidden;
}

#signature-pad {
  display: block;
  width: 100%;
  height: 180px;
  touch-action: none;
  cursor: crosshair;
}

.signature-actions {
  margin: 0.6rem 0 0;
}

.text-link {
  font-weight: 700;
}

a.share-highlight,
.paper a.share-highlight {
  display: inline-block;
  max-width: 100%;
  padding: 0.7rem 0.9rem;
  border: 3px solid #1f6b45;
  border-radius: 0.4rem;
  text-decoration: none;
  animation: share-frame 2.4s linear infinite;
}

a.share-highlight:hover,
.paper a.share-highlight:hover {
  text-decoration: none;
}

@keyframes share-frame {
  0% { border-color: #1f6b45; box-shadow: 0 0 0 0 rgba(31, 107, 69, 0.35); }
  25% { border-color: #d4a017; box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.28); }
  50% { border-color: #1d6fa8; box-shadow: 0 0 0 3px rgba(29, 111, 168, 0.28); }
  75% { border-color: #c45c26; box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.28); }
  100% { border-color: #1f6b45; box-shadow: 0 0 0 0 rgba(31, 107, 69, 0.35); }
}

.sign-preview-card {
  padding: 1.25rem 0.7rem 1.5rem;
}

.pdf-sign-stage {
  position: relative;
  background: #fff;
  border: 1px solid #c9c2b3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: visible;
}

.pdf-sign-stage img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.pdf-sign-hotspot {
  position: absolute;
  border: 0;
  padding: 3.5rem 0.25rem 0.75rem;
  margin: -3.5rem 0 0;
  box-sizing: content-box;
  min-height: 2.75rem;
  background: transparent;
  cursor: pointer;
  z-index: 3;
  -webkit-tap-highlight-color: rgba(229, 57, 53, 0.25);
  touch-action: manipulation;
}

.pdf-sign-callout {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: #e53935;
  animation: pdf-sign-bounce 1.15s ease-in-out infinite;
}

.pdf-sign-label {
  font-weight: 800;
  font-size: clamp(0.88rem, 3vw, 1.08rem);
  line-height: 1.15;
  white-space: nowrap;
  text-shadow:
    0 0 4px #fff,
    0 0 10px #fff,
    1px 1px 0 #fff;
}

.pdf-sign-arrow {
  width: 2.35rem;
  height: 3.1rem;
  margin: 0.1rem 1.6rem 0 0;
}

.pdf-sign-arrow .shaft {
  stroke: #e53935;
  stroke-width: 6;
  fill: none;
  stroke-linecap: round;
}

.pdf-sign-arrow .head {
  fill: #e53935;
}

.pdf-sign-hotspot.is-signing .pdf-sign-callout {
  animation: none;
  opacity: 0.45;
}

@keyframes pdf-sign-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

@media (prefers-reduced-motion: reduce) {
  a.share-highlight,
  .paper a.share-highlight {
    animation: none;
    border-color: #d4a017;
  }

  .paper a.button-email-manager {
    animation: none;
  }

  .pdf-sign-callout {
    animation: none;
  }
}

.site-footer {
  color: #b7c7c1;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: var(--accent-soft);
}

@media (max-width: 640px) {
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .paper {
    padding: 1.4rem 1.1rem;
  }
}
