:root {
  color-scheme: dark;
  --ink: #11100e;
  --ink-2: #171512;
  --charcoal: #24211d;
  --ivory: #f4efe4;
  --ivory-2: #e8ddcc;
  --muted: #9f9484;
  --copper: #b8875d;
  --copper-soft: #d9b68c;
  --line-dark: rgba(244, 239, 228, 0.16);
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 0%, rgba(184, 135, 93, 0.14), transparent 34rem),
    linear-gradient(135deg, var(--ink), var(--ink-2));
  color: var(--ivory);
  font-family: var(--body);
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--copper-soft);
  outline-offset: 4px;
}

.demo-shell {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(244, 239, 228, 0.12);
  background: rgba(17, 16, 14, 0.86);
  backdrop-filter: blur(18px);
}

.demo-shell-inner {
  width: min(100% - (var(--gutter) * 2), var(--max));
  min-height: 76px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
}

.demo-brand {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.demo-brand-mark {
  width: 34px;
  height: 34px;
  color: var(--copper-soft);
}

.demo-brand-mark:not([data-saitora-core]) svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.demo-brand-text {
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.2em;
}

.demo-shell-label {
  justify-self: center;
  min-width: 0;
  color: rgba(244, 239, 228, 0.62);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.demo-shell-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.demo-shell-link {
  color: rgba(244, 239, 228, 0.76);
  font-size: 0.88rem;
  font-weight: 760;
  transition: color 180ms ease;
}

.demo-shell-link:hover,
.demo-shell-link:focus-visible {
  color: var(--copper-soft);
}

.demo-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.demo-language-switcher button {
  position: relative;
  min-height: 32px;
  background: transparent;
  color: rgba(244, 239, 228, 0.62);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.demo-language-switcher button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: var(--copper-soft);
  opacity: 0;
  transform: scaleX(0.42);
  transition: opacity 180ms ease, transform 220ms var(--ease);
}

.demo-language-switcher button:hover,
.demo-language-switcher button:focus-visible,
.demo-language-switcher button.is-active {
  color: var(--copper-soft);
}

.demo-language-switcher button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.demo-main {
  width: min(100% - (var(--gutter) * 2), var(--max));
  margin-inline: auto;
  padding: clamp(48px, 8vw, 94px) 0 clamp(58px, 9vw, 104px);
}

.demo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.96fr);
  gap: clamp(34px, 6vw, 82px);
  align-items: end;
}

.demo-product {
  margin: 0 0 14px;
  color: var(--copper-soft);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.demo-hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--display);
  font-size: 5.9rem;
  font-weight: 500;
  line-height: 0.94;
}

.demo-purpose {
  margin: 22px 0 0;
  color: rgba(244, 239, 228, 0.82);
  font-size: 1.16rem;
  font-weight: 760;
}

.demo-intro {
  max-width: 54ch;
  margin: 18px 0 0;
  color: rgba(244, 239, 228, 0.72);
  line-height: 1.72;
}

.demo-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.demo-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(217, 182, 140, 0.68);
  font-size: 0.9rem;
  font-weight: 850;
  transition: background 180ms ease, color 180ms ease, transform 220ms var(--ease);
}

.demo-button-primary {
  background: var(--copper-soft);
  color: var(--ink);
  border-color: var(--copper-soft);
}

.demo-button-secondary {
  background: rgba(244, 239, 228, 0.045);
  color: var(--ivory);
}

.demo-button:hover,
.demo-button:focus-visible {
  transform: translateY(-1px);
}

.demo-brief {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(244, 239, 228, 0.16);
  background:
    linear-gradient(145deg, rgba(217, 182, 140, 0.09), transparent 48%),
    rgba(244, 239, 228, 0.04);
}

.demo-brief span,
.demo-section-kicker,
.demo-zone span {
  color: var(--copper-soft);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.demo-brief p {
  margin: 12px 0 0;
  color: rgba(244, 239, 228, 0.74);
}

.demo-section {
  margin-top: clamp(46px, 7vw, 82px);
}

.demo-section-heading {
  max-width: 680px;
  margin-bottom: 24px;
}

.demo-section-heading h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 3.15rem;
  font-weight: 500;
  line-height: 1;
}

.demo-zone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(244, 239, 228, 0.14);
  border-left: 1px solid rgba(244, 239, 228, 0.14);
}

.demo-zone {
  min-width: 0;
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(22px, 3vw, 32px);
  border-right: 1px solid rgba(244, 239, 228, 0.14);
  border-bottom: 1px solid rgba(244, 239, 228, 0.14);
  background: rgba(244, 239, 228, 0.035);
}

.demo-zone h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.74rem;
  font-weight: 500;
  line-height: 1.08;
}

.demo-zone p {
  margin: 0;
  color: rgba(244, 239, 228, 0.7);
  line-height: 1.68;
}

.demo-contract {
  display: grid;
  grid-template-columns: minmax(220px, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
  padding-top: clamp(42px, 7vw, 76px);
  border-top: 1px solid rgba(217, 182, 140, 0.28);
}

.demo-contract-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-contract-list li {
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid rgba(244, 239, 228, 0.12);
  color: rgba(244, 239, 228, 0.72);
}

@media (max-width: 920px) {
  .demo-shell-inner {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 16px 0;
    gap: 12px;
  }

  .demo-shell-label,
  .demo-shell-actions {
    justify-self: start;
  }

  .demo-shell-actions {
    flex-wrap: wrap;
  }

  .demo-hero,
  .demo-contract {
    grid-template-columns: 1fr;
  }

  .demo-hero h1 {
    font-size: 4.25rem;
  }

  .demo-section-heading h2 {
    font-size: 2.55rem;
  }

  .demo-zone-grid {
    grid-template-columns: 1fr;
  }

  .demo-zone {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  :root {
    --gutter: 18px;
  }

  .demo-shell-inner {
    min-height: auto;
  }

  .demo-shell-actions {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .demo-language-switcher {
    width: 100%;
  }

  .demo-hero h1 {
    font-size: 3.05rem;
  }

  .demo-button,
  .demo-hero-actions {
    width: 100%;
  }
}

/* Living Core in the demo shell */
.demo-shell .saitora-motion-toggle { --lc-toggle-line: rgba(244, 239, 228, 0.22); color: rgba(244, 239, 228, 0.76); font-size: 0.8rem; }
.demo-shell .saitora-motion-toggle:hover { border-color: var(--copper-soft); color: var(--copper-soft); }
html:not(.js-enabled) .demo-shell .saitora-motion-toggle { display: none; }
@media (max-width: 720px) { .demo-shell .saitora-motion-toggle [data-label] { display: none; } .demo-shell .saitora-motion-toggle { padding: 8px 10px; } }

/* HIM shell: the Saitora frame around every demo uses the site palette; the demo content keeps its own brand */
.demo-shell { background: rgba(11, 23, 48, 0.9); border-bottom-color: rgba(185, 167, 255, 0.16); }
.demo-brand-text, .demo-shell-link { color: #ffffff; }
.demo-shell-link:hover, .demo-shell-link:focus-visible { color: #b9a7ff; }
.demo-shell-label { color: rgba(217, 215, 240, 0.6); }
.demo-language-switcher button { color: #d9d7f0; }
.demo-language-switcher button[aria-pressed="true"], .demo-language-switcher button.is-active { color: #fff; background: #1b2e52; border-color: #3a5080; }
