/* ==========================================================================
   StampDock Official Website — Shared Design System
   Aesthetic: Tactile macOS Stationery & Seal-Maker Studio
   Zero external dependencies · 47 Languages + Native RTL · Print-ready
   ========================================================================== */

:root {
  /* Archival Paper & Studio Surfaces */
  --bg-paper: #FAF8F5;
  --bg-parchment: #F3EFE7;
  --bg-parchment-deep: #EAE3D5;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(250, 248, 245, 0.86);
  --bg-ink-surface: #17191C;
  --bg-ink-elevated: #21252B;

  /* Ink & Typography Colors (WCAG AA+ contrast) */
  --ink: #17191C;
  --ink-secondary: #3A3F48;
  --ink-muted: #5F6673;
  --ink-subtle: #7A818E;
  --ink-on-dark: #F7F5F0;
  --ink-on-dark-muted: #B6BCCA;

  /* Seal Vermilion, Antique Gold, macOS Cobalt & Privacy Emerald */
  --vermilion: #C8372D;
  --vermilion-deep: #A62820;
  --vermilion-soft: #FCF0EE;
  --vermilion-border: #F2C9C5;

  --gold: #B88A44;
  --gold-deep: #8F672A;
  --gold-soft: #FBF6EA;
  --gold-border: #E7D5B4;

  --cobalt: #155DFC;
  --cobalt-deep: #1248C8;
  --cobalt-soft: #EEF4FF;
  --cobalt-border: #C7DBFF;

  --emerald: #0F766E;
  --emerald-soft: #ECF8F6;
  --emerald-border: #BCE3DC;

  /* Hairlines & Borders */
  --border: #E5DED2;
  --border-strong: #D3C8B7;
  --border-subtle: #EFEAE0;

  /* Shadows — tactile stationery elevation */
  --shadow-xs: 0 1px 2px rgba(23, 25, 28, 0.04);
  --shadow-sm: 0 2px 6px rgba(23, 25, 28, 0.05), 0 1px 2px rgba(23, 25, 28, 0.04);
  --shadow-md: 0 10px 28px -6px rgba(23, 25, 28, 0.08), 0 2px 8px -2px rgba(23, 25, 28, 0.04);
  --shadow-lg: 0 24px 56px -14px rgba(23, 25, 28, 0.13), 0 6px 18px -6px rgba(23, 25, 28, 0.06);
  --shadow-window: 0 26px 64px -18px rgba(23, 25, 28, 0.16), 0 0 0 1px rgba(23, 25, 28, 0.07);

  /* Typography Stacks (Offline-first macOS & 47-Language Script Support) */
  --font-display: "New York", "Iowan Old Style", "Songti SC", "STSong", "PingFang TC", "Hiragino Mincho ProN", "Apple SD Gothic Neo", "Geeza Pro", "Arial Hebrew", "Kohinoor Devanagari", "Thonburi", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Arabic", "PingFang SC", "PingFang TC", "Hiragino Sans", "Apple SD Gothic Neo", "Geeza Pro", "Arial Hebrew", "Kohinoor Devanagari", "Thonburi", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radii & Spacing */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  --header-height: 68px;
  --container-max: 1160px;
  --container-narrow: 860px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-med: 280ms;
}

/* --------------------------------------------------------------------------
   Base Reset, Multi-Script & RTL Typography Helpers
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-paper);
  color: var(--ink);
}

/* Preserve cursive ligatures in Arabic & Urdu (never break with tracking) */
:lang(ar),
:lang(ur),
:lang(ar) *,
:lang(ur) * {
  letter-spacing: 0 !important;
}

:lang(ar) .hero-title,
:lang(ar) .section-title,
:lang(ar) .legal-title,
:lang(ar) .legal-article h2,
:lang(ar) .workflow-title,
:lang(ar) .cta-band-title,
:lang(ur) .hero-title,
:lang(ur) .section-title,
:lang(ur) .legal-title,
:lang(ur) .legal-article h2,
:lang(ur) .workflow-title,
:lang(ur) .cta-band-title {
  font-family: var(--font-sans);
  line-height: 1.38;
}

:lang(he) .hero-title,
:lang(he) .section-title,
:lang(he) .legal-title,
:lang(he) .legal-article h2 {
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}

/* Keep emails, file extensions, millimeter specs & version numbers LTR in RTL */
.ltr-isolate {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Mirror directional arrows cleanly in RTL */
[dir="rtl"] .dir-flip {
  display: inline-block;
  transform: scaleX(-1);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.68;
  color: var(--ink);
  background-color: var(--bg-paper);
  background-image:
    radial-gradient(ellipse 80% 45% at 50% -6%, rgba(200, 55, 45, 0.045), transparent 62%),
    radial-gradient(ellipse 60% 40% at 88% 8%, rgba(184, 138, 68, 0.055), transparent 60%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  position: relative;
}

/* Subtle tactile cotton-paper grain atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.026;
  background-image: url("../assets/paper-grain.svg");
  background-size: 240px 240px;
}

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

a {
  color: var(--vermilion-deep);
  text-decoration: none;
  transition: color var(--dur-fast) ease, opacity var(--dur-fast) ease;
}

a:hover {
  color: var(--vermilion);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link for keyboard accessibility */
.skip-link {
  position: absolute;
  top: -120px;
  inset-inline-start: 16px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: top var(--dur-fast) ease;
}

.skip-link:focus {
  top: 12px;
  color: #FFFFFF;
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

/* --------------------------------------------------------------------------
   Layout Containers & Section Primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: 88px;
  position: relative;
}

.section--compact {
  padding-block: 56px;
}

.section--tinted {
  background-color: var(--bg-parchment);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--dark {
  background-color: var(--bg-ink-surface);
  color: var(--ink-on-dark);
}

.section--dark .section-lead,
.section--dark .muted {
  color: var(--ink-on-dark-muted);
}

.section-header {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-header--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--vermilion-deep);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 0 0 3px var(--vermilion-soft);
  flex-shrink: 0;
}

.eyebrow--gold {
  color: var(--gold-deep);
}

.eyebrow--gold::before {
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.eyebrow--cobalt {
  color: var(--cobalt-deep);
}

.eyebrow--cobalt::before {
  background: var(--cobalt);
  box-shadow: 0 0 0 3px var(--cobalt-soft);
}

.section-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.65rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.section--dark .section-title {
  color: var(--ink-on-dark);
}

.section-lead {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--ink-secondary);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.muted {
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Sticky Frosted macOS Header & Mobile Drawer
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(229, 222, 210, 0.82);
  transition: box-shadow var(--dur-med) ease, border-color var(--dur-med) ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px -12px rgba(23, 25, 28, 0.12);
  border-bottom-color: var(--border-strong);
}

.site-header .container {
  max-width: 1260px;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: 0;
  flex: 0 1 auto;
}

.brand:hover {
  color: var(--ink);
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(21, 93, 252, 0.22);
  flex-shrink: 0;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
  max-width: 176px;
}

.brand-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-link {
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.835rem;
  font-weight: 500;
  line-height: 1.22;
  color: var(--ink-secondary);
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.nav-link:hover {
  color: var(--ink);
  background-color: rgba(23, 25, 28, 0.05);
}

.nav-link.is-active {
  color: var(--vermilion-deep);
  background-color: var(--vermilion-soft);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-cta {
  max-width: 164px;
  padding: 7px 11px;
  font-size: 0.82rem;
  line-height: 1.18;
  overflow-wrap: normal;
  word-break: normal;
}

/* 47-Language Searchable macOS Picker Popover */
.lang-picker {
  position: relative;
}

.lang-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  max-width: 156px;
  box-shadow: var(--shadow-xs);
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.lang-trigger:hover,
.lang-picker.is-open .lang-trigger {
  background: var(--bg-parchment);
  border-color: #BFB3A0;
}

.lang-trigger-globe {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--vermilion-deep);
}

.lang-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-trigger-caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--ink-muted);
  transition: transform var(--dur-fast) ease;
}

.lang-picker.is-open .lang-trigger-caret {
  transform: rotate(180deg);
}

.lang-popover {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: 312px;
  max-width: calc(100vw - 24px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  overflow: hidden;
}

.lang-picker.is-open .lang-popover {
  display: flex;
  flex-direction: column;
}

.lang-popover-head {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-paper);
}

.lang-search {
  width: 100%;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 0.85rem;
  color: var(--ink);
}

.lang-search:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(21, 93, 252, 0.14);
}

.lang-system-wrap {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.lang-system-btn {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  text-align: start;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease;
}

.lang-system-btn:hover {
  background: var(--bg-parchment);
}

.lang-system-btn.is-active {
  background: var(--vermilion-soft);
}

.lang-system-title {
  display: block;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink);
}

.lang-system-btn.is-active .lang-system-title {
  color: var(--vermilion-deep);
}

.lang-system-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 2px;
  line-height: 1.38;
}

.lang-options {
  max-height: 292px;
  overflow-y: auto;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-option {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: start;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--ink);
  transition: background-color var(--dur-fast) ease;
}

.lang-option:hover {
  background: var(--bg-parchment);
}

.lang-option.is-active {
  background: var(--vermilion-soft);
  color: var(--vermilion-deep);
  font-weight: 650;
}

.lang-option-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.lang-option-native {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-option-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lang-option-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-subtle);
  direction: ltr;
  unicode-bidi: isolate;
}

.lang-option-rtl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: var(--gold-deep);
}

.lang-option-check {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--vermilion);
  flex-shrink: 0;
}

.lang-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

/* Mobile Nav Trigger */
.nav-toggle {
  display: none;
  appearance: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--bg-parchment);
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 990;
  background: rgba(250, 248, 245, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  padding: 16px 24px 24px;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-list .nav-link {
  padding: 11px 14px;
  font-size: 1rem;
  display: block;
}

/* --------------------------------------------------------------------------
   Buttons, Pills & Trust Badges
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  white-space: normal;
  max-width: 100%;
  overflow-wrap: break-word;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease,
    color var(--dur-fast) ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-lg {
  padding: 13px 24px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.84rem;
  border-radius: 8px;
}

.btn-primary {
  background: var(--vermilion);
  color: #FFFFFF;
  border-color: var(--vermilion-deep);
  box-shadow: 0 2px 6px rgba(200, 55, 45, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-primary:hover {
  background: var(--vermilion-deep);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(166, 40, 32, 0.28);
  transform: translateY(-1px);
}

.btn-cobalt {
  background: var(--cobalt);
  color: #FFFFFF;
  border-color: var(--cobalt-deep);
  box-shadow: 0 2px 6px rgba(21, 93, 252, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-cobalt:hover {
  background: var(--cobalt-deep);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(18, 72, 200, 0.28);
  transform: translateY(-1px);
}

.btn-ink {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn-ink:hover {
  background: #2A2E35;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-parchment);
  color: var(--ink);
  border-color: #BFB3A0;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(23, 25, 28, 0.05);
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 550;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink-secondary);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.pill--vermilion {
  background: var(--vermilion-soft);
  border-color: var(--vermilion-border);
  color: var(--vermilion-deep);
}

.pill--gold {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--gold-deep);
}

.pill--cobalt {
  background: var(--cobalt-soft);
  border-color: var(--cobalt-border);
  color: var(--cobalt-deep);
}

.pill--emerald {
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
  color: var(--emerald);
}

/* --------------------------------------------------------------------------
   Flagship Hero Section
   -------------------------------------------------------------------------- */

.hero {
  padding-top: 56px;
  padding-bottom: 76px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  align-items: center;
  gap: 48px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.hero-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.3vw, 3.45rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.028em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.hero-title .accent-ink {
  color: var(--vermilion);
}

.hero-subtitle {
  margin: 0 0 28px;
  font-size: 1.1rem;
  line-height: 1.72;
  color: var(--ink-secondary);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
}

.trust-dot--gold {
  background: var(--gold);
}

.trust-dot--cobalt {
  background: var(--cobalt);
}

.trust-dot--vermilion {
  background: var(--vermilion);
}

/* --------------------------------------------------------------------------
   Interactive Stamp & Seal Studio Widget (#stamp-playground)
   -------------------------------------------------------------------------- */

.studio-widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  position: relative;
  min-width: 0;
}

.studio-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #FBF9F6 0%, #F4F0E8 100%);
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.window-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.window-dot--close { background: #E96960; }
.window-dot--min   { background: #F0BC4D; }
.window-dot--max   { background: #62C354; }

.studio-window-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
  letter-spacing: 0.01em;
  text-align: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-spec-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.studio-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 24px 28px;
  background-color: #FCFBF8;
  background-image:
    radial-gradient(circle, rgba(23, 25, 28, 0.11) 1px, transparent 1px);
  background-size: 18px 18px;
  border-bottom: 1px solid var(--border);
  min-height: 296px;
}

/* Subtle drafting corner calibration ticks */
.studio-stage::before,
.studio-stage::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(184, 138, 68, 0.45);
  border-style: solid;
  pointer-events: none;
}

.studio-stage::before {
  top: 14px;
  inset-inline-start: 14px;
  border-width: 0;
  border-top-width: 1.5px;
  border-inline-start-width: 1.5px;
}

.studio-stage::after {
  bottom: 14px;
  inset-inline-end: 14px;
  border-width: 0;
  border-bottom-width: 1.5px;
  border-inline-end-width: 1.5px;
}

.studio-canvas-wrap {
  position: relative;
  width: 244px;
  height: 244px;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  transition: transform 220ms var(--ease-out);
}

.studio-canvas-wrap:hover {
  transform: scale(1.015);
}

.studio-canvas-wrap.is-stamping {
  animation: stampPress 340ms var(--ease-out);
}

@keyframes stampPress {
  0%   { transform: scale(1.06) rotate(-1.5deg); }
  45%  { transform: scale(0.95) rotate(0.4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.studio-canvas {
  width: 244px;
  height: 244px;
  display: block;
}

.studio-stage-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding-inline: 14px;
  padding-bottom: 4px;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.studio-stage-meta [data-pg-style-readout] {
  font-weight: 600;
  color: var(--ink-secondary);
  flex-shrink: 0;
}

[dir="rtl"] .studio-stage-meta .mono {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-secondary);
}

.studio-press-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: break-word;
}

.studio-controls {
  padding: 18px 20px 20px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.studio-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 6px;
}

/* Style segmented picker */
.studio-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--bg-parchment);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%;
}

.studio-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-secondary);
  cursor: pointer;
  min-width: 0;
  overflow-wrap: anywhere;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.studio-seg-btn:hover {
  color: var(--ink);
}

.studio-seg-btn.is-active {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(23, 25, 28, 0.1), 0 0 0 1px rgba(23, 25, 28, 0.04);
}

/* Ink Swatches */
.studio-swatches {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.studio-swatch {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px rgba(23, 25, 28, 0.18);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.studio-swatch:hover {
  transform: scale(1.1);
}

.studio-swatch.is-active {
  box-shadow: 0 0 0 2px var(--ink);
  transform: scale(1.08);
}

/* Aging toggle switch */
.studio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-secondary);
  user-select: none;
}

.studio-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.studio-switch {
  width: 38px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  position: relative;
  transition: background-color var(--dur-fast) ease;
  flex-shrink: 0;
}

.studio-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(23, 25, 28, 0.24);
  transition: transform var(--dur-fast) var(--ease-out);
}

.studio-toggle input:checked + .studio-switch {
  background: var(--vermilion);
}

.studio-toggle input:checked + .studio-switch::after {
  transform: translateX(16px);
}

[dir="rtl"] .studio-toggle input:checked + .studio-switch::after {
  transform: translateX(-16px);
}

.studio-toggle input:focus-visible + .studio-switch {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

/* Text inputs */
.studio-inputs {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
}

.studio-field {
  min-width: 0;
}

.studio-input {
  width: 100%;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #FCFBF9;
  font-size: 0.85rem;
  color: var(--ink);
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.studio-input:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(21, 93, 252, 0.14);
}

.studio-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.studio-action-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-paper);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.studio-action-btn:hover {
  background: var(--bg-parchment);
  border-color: var(--border-strong);
  color: var(--ink);
}

.studio-action-btn--accent {
  background: var(--vermilion-soft);
  border-color: var(--vermilion-border);
  color: var(--vermilion-deep);
}

.studio-action-btn--accent:hover {
  background: #F9E1DE;
  color: var(--vermilion-deep);
}

/* --------------------------------------------------------------------------
   Metrics Strip & Bento Feature Showcase
   -------------------------------------------------------------------------- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 52px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-xs);
  min-width: 0;
  overflow-wrap: anywhere;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
}

.stat-value--vermilion { color: var(--vermilion); }
.stat-value--gold      { color: var(--gold-deep); }
.stat-value--cobalt    { color: var(--cobalt); }
.stat-value--emerald   { color: var(--emerald); }

.stat-label {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

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

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) ease, border-color var(--dur-med) ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.bento-card--wide {
  grid-column: span 2;
}

.bento-card--featured {
  background: linear-gradient(155deg, #FFFFFF 0%, #FBF6EC 100%);
  border-color: var(--gold-border);
}

.bento-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--vermilion-soft);
  color: var(--vermilion-deep);
  border: 1px solid var(--vermilion-border);
  flex-shrink: 0;
}

.bento-icon--gold {
  background: var(--gold-soft);
  color: var(--gold-deep);
  border-color: var(--gold-border);
}

.bento-icon--cobalt {
  background: var(--cobalt-soft);
  color: var(--cobalt-deep);
  border-color: var(--cobalt-border);
}

.bento-icon--emerald {
  background: var(--emerald-soft);
  color: var(--emerald);
  border-color: var(--emerald-border);
}

.bento-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.bento-desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.66;
  color: var(--ink-secondary);
}

.bento-meta {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* --------------------------------------------------------------------------
   Document Signing & Stamping Workflows (4-Card Grid)
   -------------------------------------------------------------------------- */

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.workflow-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) ease;
}

.workflow-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.workflow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workflow-step {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--vermilion-deep);
  background: var(--vermilion-soft);
  border: 1px solid var(--vermilion-border);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.workflow-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.workflow-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.68;
  color: var(--ink-secondary);
}

.workflow-specs {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-parchment);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Export Powerhouse & Local-First Privacy Architecture
   -------------------------------------------------------------------------- */

.split-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.panel-card--privacy {
  background: linear-gradient(160deg, #FFFFFF 0%, #F1F8F6 100%);
  border-color: var(--emerald-border);
}

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

.format-tile {
  padding: 12px 12px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-paper);
  border: 1px solid var(--border);
  text-align: start;
  min-width: 0;
  overflow-wrap: anywhere;
}

.format-ext {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.format-note {
  font-size: 0.76rem;
  color: var(--ink-muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.check-list li {
  position: relative;
  padding-inline-start: 26px;
  font-size: 0.94rem;
  line-height: 1.58;
  color: var(--ink-secondary);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.check-list--vermilion li::before {
  background: var(--vermilion-soft);
  color: var(--vermilion-deep);
  border-color: var(--vermilion-border);
}

/* --------------------------------------------------------------------------
   Pricing & Plans Section
   -------------------------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
  align-items: stretch;
}

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

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

.pricing-strike {
  font-size: 0.95rem;
  color: var(--ink-subtle);
  text-decoration: line-through;
  font-weight: 500;
}

.pricing-subprice {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--emerald);
  margin-top: -8px;
}

.pricing-secondary-bar {
  margin-top: 18px;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
  min-width: 0;
  overflow-wrap: anywhere;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pricing-card--featured {
  border: 2px solid var(--vermilion);
  box-shadow: var(--shadow-md);
  background: linear-gradient(180deg, #FFFDFC 0%, #FFFFFF 36%);
}

.pricing-card--gold {
  border: 1.5px solid var(--gold);
  background: linear-gradient(180deg, #FDF9F0 0%, #FFFFFF 42%);
}

.pricing-badge {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--vermilion);
  color: #FFFFFF;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.pricing-badge--gold {
  background: var(--gold-deep);
}

.pricing-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.pricing-period {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.pricing-desc {
  margin: 0;
  font-size: 0.9125rem;
  color: var(--ink-secondary);
  line-height: 1.58;
}

.pricing-divider {
  height: 1px;
  background: var(--border-subtle);
  border: 0;
  margin: 2px 0;
}

.pricing-cta {
  margin-top: auto;
  padding-top: 8px;
}

.pricing-cta .btn {
  width: 100%;
}

.pricing-footnote {
  margin-top: 26px;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Global 47 Languages Strip
   -------------------------------------------------------------------------- */

.lang-showcase {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-xs);
  min-width: 0;
  overflow-wrap: anywhere;
}

.lang-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.lang-pill {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--bg-paper);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.lang-pill--rtl {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--gold-deep);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   FAQ Accordion (Native <details> enhanced)
   -------------------------------------------------------------------------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 840px;
  margin-inline: auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.faq-item[open] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--ink);
  user-select: none;
  overflow-wrap: anywhere;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-parchment);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink-secondary);
  flex-shrink: 0;
  transition: transform var(--dur-fast) ease, background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.faq-item[open] .faq-question::after {
  content: "−";
  background: var(--vermilion-soft);
  border-color: var(--vermilion-border);
  color: var(--vermilion-deep);
}

.faq-answer {
  padding: 0 24px 22px;
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}

.faq-answer p {
  margin: 0;
}

.faq-answer p + p {
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   CTA & Support Band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  align-items: center;
  gap: 32px;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset-inline-end: -36px;
  bottom: -44px;
  width: 210px;
  height: 210px;
  background: url("../assets/brand-seal.svg") no-repeat center / contain;
  opacity: 0.08;
  pointer-events: none;
}

.cta-band-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  font-weight: 700;
  line-height: 1.24;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.cta-band-desc {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-secondary);
  max-width: 58ch;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Unified Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-parchment);
  border-top: 1px solid var(--border-strong);
  padding: 56px 0 36px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.footer-tagline {
  margin: 14px 0 16px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 38ch;
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.footer-contact:hover {
  border-color: var(--vermilion-border);
  color: var(--vermilion-deep);
}

.footer-heading {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.footer-links a:hover {
  color: var(--vermilion-deep);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.825rem;
  color: var(--ink-muted);
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.footer-bottom-links a {
  color: var(--ink-muted);
}

.footer-bottom-links a:hover {
  color: var(--vermilion-deep);
}

/* --------------------------------------------------------------------------
   Legal Pages System (Privacy Policy & Terms of Service)
   -------------------------------------------------------------------------- */

.legal-hero {
  padding: 52px 0 36px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(243, 239, 231, 0.48) 0%, rgba(250, 248, 245, 0) 100%);
}

.legal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.legal-breadcrumb a {
  color: var(--ink-muted);
}

.legal-breadcrumb a:hover {
  color: var(--vermilion-deep);
}

.legal-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.legal-subtitle {
  margin: 0 0 22px;
  font-size: 1.05rem;
  line-height: 1.68;
  color: var(--ink-secondary);
  max-width: 68ch;
}

.legal-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
}

.legal-meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.legal-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* At-a-Glance Summary Card */
.legal-summary-wrap {
  padding-top: 32px;
}

.legal-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--vermilion);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  overflow-wrap: anywhere;
}

.legal-summary-card--emerald {
  border-inline-start-color: var(--emerald);
}

.legal-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.legal-summary-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.legal-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 26px;
}

.summary-point {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.summary-point strong {
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}

/* Two-Column Editorial Layout with Sticky Sidebar TOC */
.legal-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 48px;
  padding: 40px 0 64px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  box-shadow: var(--shadow-xs);
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
}

.toc-title {
  margin: 0 0 12px;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  display: block;
  padding: 7px 10px;
  border-radius: 7px;
  border-inline-start: 2px solid transparent;
  font-size: 0.845rem;
  line-height: 1.42;
  color: var(--ink-secondary);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.toc-link:hover {
  background: var(--bg-paper);
  color: var(--ink);
}

.toc-link.is-active {
  background: var(--vermilion-soft);
  border-inline-start-color: var(--vermilion);
  color: var(--vermilion-deep);
  font-weight: 650;
}

/* Readable 72ch Legal Editorial Article */
.legal-article {
  max-width: 72ch;
  min-width: 0;
}

.legal-section {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
}

.legal-article h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.legal-article h3 {
  margin: 22px 0 10px;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.legal-article p {
  margin: 0 0 14px;
  font-size: 0.975rem;
  line-height: 1.78;
  color: var(--ink-secondary);
}

.legal-article p:last-child {
  margin-bottom: 0;
}

.legal-article ul,
.legal-article ol {
  margin: 0 0 16px;
  padding-inline-start: 22px;
  color: var(--ink-secondary);
}

.legal-article li {
  margin-bottom: 8px;
  font-size: 0.965rem;
  line-height: 1.72;
}

.legal-article li strong {
  color: var(--ink);
}

.legal-article code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-parchment);
  border: 1px solid var(--border);
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Styled Tables inside Legal Pages */
.legal-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-xs);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: start;
}

.legal-table th {
  background: var(--bg-parchment);
  color: var(--ink);
  font-weight: 650;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border-strong);
  text-align: start;
  line-height: 1.4;
  vertical-align: bottom;
  overflow-wrap: break-word;
}

.legal-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--ink-secondary);
  vertical-align: top;
  line-height: 1.56;
  overflow-wrap: break-word;
}

.legal-table td code,
.legal-table th code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

/* Callout Boxes */
.callout {
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-parchment);
  font-size: 0.935rem;
  line-height: 1.68;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}

.callout-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.callout--info {
  background: var(--cobalt-soft);
  border-color: var(--cobalt-border);
}

.callout--info .callout-title {
  color: var(--cobalt-deep);
}

.callout--emerald {
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
}

.callout--emerald .callout-title {
  color: var(--emerald);
}

.callout--warn {
  background: var(--gold-soft);
  border-color: var(--gold-border);
}

.callout--warn .callout-title {
  color: var(--gold-deep);
}

.callout--legal {
  background: var(--vermilion-soft);
  border-color: var(--vermilion-border);
  border-inline-start: 4px solid var(--vermilion);
}

.callout--legal .callout-title {
  color: var(--vermilion-deep);
}

.legal-contact-box {
  margin-top: 24px;
  padding: 24px 26px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
  overflow-wrap: anywhere;
}

.legal-cross-nav {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Scroll Reveal (Progressive Enhancement — safe if JS off)
   -------------------------------------------------------------------------- */

html.has-js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}

html.has-js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.has-js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .studio-canvas-wrap.is-stamping {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 1280px) {
  .header-inner {
    gap: 10px;
  }

  .brand-wordmark {
    max-width: 148px;
  }

  .nav-link {
    padding: 5px 6px;
    font-size: 0.8rem;
  }

  .lang-trigger {
    max-width: 142px;
    font-size: 0.8rem;
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero-subtitle {
    max-width: 64ch;
  }

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

  .bento-card--wide {
    grid-column: span 2;
  }

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

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

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

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

  .cta-band {
    grid-template-columns: minmax(0, 1fr);
    padding: 36px 28px;
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .legal-toc {
    position: static;
    max-height: none;
  }

  .toc-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
  }
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-cta {
    display: none;
  }

  .split-panel,
  .workflow-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 62px;
  }

  .container {
    padding-inline: 18px;
  }

  .header-inner {
    gap: 8px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .brand-wordmark {
    min-width: 0;
    max-width: none;
  }

  .brand-name {
    font-size: 0.96rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-sub {
    display: none;
  }

  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .section {
    padding-block: 60px;
  }

  .hero {
    padding-top: 34px;
    padding-bottom: 52px;
  }

  .stats-strip,
  .bento-grid,
  .pricing-grid--3,
  .pricing-grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .bento-card--wide {
    grid-column: span 1;
  }

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

  .studio-inputs {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-canvas-wrap,
  .studio-canvas {
    width: 216px;
    height: 216px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .toc-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel-card,
  .workflow-card,
  .lang-showcase {
    padding: 20px;
  }

  .legal-summary-card {
    padding: 20px;
  }

  .faq-question {
    padding: 16px 18px;
  }

  .faq-answer {
    padding: 0 18px 18px;
  }

  .lang-trigger {
    max-width: 132px;
    padding: 6px 9px;
    font-size: 0.78rem;
    gap: 5px;
  }

  .lang-popover {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    inset-inline-start: 12px;
    inset-inline-end: 12px;
    width: auto;
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   Print Styles (Clean Legal Document & Page Printing)
   -------------------------------------------------------------------------- */

@media print {
  @page {
    margin: 18mm 16mm;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 10.5pt;
    line-height: 1.55;
  }

  body::before,
  .site-header,
  .mobile-drawer,
  .legal-toc,
  .legal-hero-actions,
  .legal-cross-nav,
  .lang-picker,
  .studio-widget,
  .cta-band,
  .site-footer {
    display: none !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .legal-hero {
    padding: 0 0 14pt;
    background: none;
    border-bottom: 1.5pt solid #222222;
  }

  .legal-layout {
    display: block;
    padding: 16pt 0 0;
  }

  .legal-article {
    max-width: 100%;
  }

  .legal-summary-card,
  .callout,
  .legal-contact-box {
    box-shadow: none;
    break-inside: avoid;
    background: #FFFFFF !important;
    border: 1pt solid #999999;
  }

  .legal-section {
    border-bottom: 0.5pt solid #CCCCCC;
    padding-bottom: 14pt;
    margin-bottom: 14pt;
  }

  .legal-article h2,
  .legal-article h3 {
    break-after: avoid;
    color: #000000;
  }

  .legal-table-wrap {
    overflow: visible;
    box-shadow: none;
    border: 0.75pt solid #666666;
  }

  .legal-table th {
    background: #F2F2F2 !important;
    color: #000000;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }
}
