/* Visual enrichment — keeps brand tokens, adds atmosphere */
:root {
  --paper: #F4F1EA;
  --paper-deep: #EBE6DB;
  --card: #FBFAF6;
  --ink: #1A1C19;
  --ink-soft: #5C584F;
  --rule: #D8D2C6;
  --blueprint: #163A52;
  --blueprint-soft: #2A5A78;
  --stamp: #B42318;
  --accent-wash: rgba(22, 58, 82, 0.07);
  --stamp-wash: rgba(180, 35, 24, 0.08);
}

body.aismeta-site {
  background:
    radial-gradient(1200px 520px at 12% -10%, rgba(22, 58, 82, 0.10), transparent 60%),
    radial-gradient(900px 480px at 92% 8%, rgba(180, 35, 24, 0.07), transparent 55%),
    linear-gradient(180deg, #F7F4ED 0%, var(--paper) 28%, #F1ECE3 100%);
  background-attachment: fixed;
}

/* subtle blueprint grid behind hero only */
main > section:first-of-type,
#top + #root .min-h-screen > main > section:first-child {
  position: relative;
}

.min-h-screen.bg-paper {
  background: transparent !important;
}

header.sticky {
  background: rgba(244, 241, 234, 0.86) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Hero mock card glow */
.rounded-xl.border.border-rule.bg-card,
form.rounded-xl {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 18px 40px -28px rgba(26, 28, 25, 0.35);
}

/* Accent stripe on primary sections */
section[id] > .mx-auto,
#howto .mx-auto,
#example .mx-auto {
  position: relative;
}

/* Stamp badge pop */
header .rounded-md,
header [class*="ТЕСТ"],
header span.font-mono {
  letter-spacing: 0.14em;
}

/* Color the numbered facts */
[aria-label="Три факта о работе сервиса"] .font-mono,
section .font-mono.text-\[10\.5px\],
.font-mono.text-\[10px\] {
  color: var(--blueprint) !important;
}

/* Primary CTA richer — only filled stamp buttons */
a.bg-stamp,
button.bg-stamp,
button[type="submit"].bg-stamp,
form button[type="submit"] {
  background: linear-gradient(180deg, #C52B1F 0%, var(--stamp) 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px -12px rgba(180, 35, 24, 0.65);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
a.bg-stamp:hover,
button.bg-stamp:hover,
form button[type="submit"]:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(180, 35, 24, 0.75);
}

/* Outline CTA */
a.border-rule.inline-flex {
  background: rgba(251, 250, 246, 0.7);
}
a.border-rule.inline-flex:hover {
  border-color: var(--blueprint) !important;
  color: var(--blueprint) !important;
}

/* Cards tint */
.rounded-xl.border.border-rule {
  background: linear-gradient(165deg, #FFFdf8 0%, var(--card) 55%, #F3EEE4 100%);
  border-color: rgba(216, 210, 198, 0.95) !important;
}

/* Blueprint accent bar on left of feature cards in grids */
.grid .rounded-xl.border.border-rule {
  position: relative;
  overflow: hidden;
}
.grid .rounded-xl.border.border-rule::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--blueprint), var(--stamp));
  opacity: 0.85;
}

/* Example table header wash */
table thead {
  background: var(--accent-wash);
}

table tbody tr:hover td {
  background: rgba(22, 58, 82, 0.035);
}

/* FAQ buttons */
button[aria-expanded] {
  transition: color .15s ease;
}
button[aria-expanded]:hover {
  color: var(--blueprint);
}
button[aria-expanded="true"] {
  color: var(--blueprint);
}

/* Footer depth */
footer {
  background:
    linear-gradient(180deg, transparent, rgba(22, 58, 82, 0.04));
  border-top: 1px solid var(--rule);
}

/* Soft section separators */
main > section + section {
  position: relative;
}
main > section + section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1120px, calc(100% - 2rem));
  transform: translateX(-50%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}

/* Decorative corner marks on hero visual card */
@media (min-width: 768px) {
  .min-h-screen main > section:first-child .rounded-xl.border.border-rule {
    background-image:
      linear-gradient(165deg, #FFFdf8 0%, var(--card) 55%, #F3EEE4 100%),
      linear-gradient(rgba(22,58,82,0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(22,58,82,0.05) 1px, transparent 1px);
    background-size: auto, 22px 22px, 22px 22px;
    background-position: 0 0, 0 0, 0 0;
  }
}

/* Form focus glow already in base; enrich labels */
form label {
  letter-spacing: 0.01em;
}

/* Base44 scroll-reveal left blocks at opacity-0 without React.
   FAQ panels use opacity-0 WITHOUT translate-y-3 — leave those alone. */
.translate-y-3.opacity-0 {
  opacity: 1 !important;
  transform: none !important;
}
