/* Shared site foundation for CASUX institutional standards and research website */
:root {
  --bg: #f5efe6;
  --surface: #fff9ef;
  --panel: #ffffff;
  --text: #261a13;
  --muted: #6f5b4b;
  --border: #d8c6ad;
  --primary: #7a3524;
  --accent: #b6813b;
  --accent-soft: #ead9bb;
  --ink-soft: #4a3728;
  --shadow: 0 18px 50px rgba(38, 26, 19, 0.08);
  --shadow-soft: 0 8px 24px rgba(38, 26, 19, 0.06);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --page-pad: clamp(18px, 2.5vw, 32px);
  --page-max: 1180px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 44px;
  --space-8: 64px;
  --space-9: 88px;
  --font-display: 'Space Grotesk', 'IBM Plex Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', 'Noto Sans SC', system-ui, sans-serif;
  --line-tight: 1.14;
  --line-base: 1.65;
  --line-loose: 1.85;
  --focus: 0 0 0 4px color-mix(in srgb, var(--accent) 24%, transparent);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--line-base);
  letter-spacing: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(182, 129, 59, 0.13), transparent 24%),
    radial-gradient(circle at top right, rgba(122, 53, 36, 0.08), transparent 28%),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 72%, #ffffff 28%));
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

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

a:hover {
  text-decoration: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.skip-link:focus {
  top: 16px;
}

.site-shell {
  width: min(var(--page-max), calc(100% - var(--page-pad) * 2));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.header-inner {
  width: min(var(--page-max), calc(100% - var(--page-pad) * 2));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  color: var(--text);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 90%, #ffffff 10%), color-mix(in srgb, var(--accent) 72%, #ffffff 28%));
  color: var(--surface);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
  flex: none;
}

.brand-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-name strong {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand-name span {
  font-size: 0.84rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav button,
.pill,
.btn,
.form-submit,
.tag {
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-nav a {
  padding: 10px 14px;
  color: var(--ink-soft);
}

.site-nav a[aria-current='page'] {
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
  color: var(--primary);
}

.site-nav a:hover,
.site-nav button:hover,
.btn:hover,
.form-submit:hover,
.pill:hover,
.tag:hover {
  transform: translateY(-1px);
}

.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, #ffffff 18%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.locale-switch button {
  min-width: 44px;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.locale-switch button[aria-pressed='true'] {
  color: var(--surface);
  background: var(--primary);
}

main {
  display: block;
}

.page {
  padding: clamp(28px, 4vw, 48px) 0 var(--space-9);
}

.stack {
  display: grid;
  gap: var(--space-5);
}

.section {
  padding: var(--space-8) 0;
}

.section.compact {
  padding: var(--space-6) 0;
}

.section + .section {
  border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.section-head {
  display: grid;
  gap: 12px;
  max-width: 62rem;
  margin-bottom: var(--space-6);
}

.kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
}

.kicker::before,
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: color-mix(in srgb, var(--primary) 54%, transparent);
}

h1,
h2,
h3,
.section-title,
.hero h1,
.display-title {
  margin: 0;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

h1,
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: var(--line-tight);
  max-width: 12ch;
}

h2,
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  line-height: 1.18;
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 1.2vw, 1.35rem);
  line-height: 1.22;
}

p {
  margin: 0;
  color: var(--ink-soft);
}

.lead {
  font-size: clamp(1.03rem, 1.1vw, 1.16rem);
  max-width: 60ch;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
}

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

.hero,
.masthead {
  position: relative;
  overflow: clip;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, #ffffff 12%), var(--panel));
  box-shadow: var(--shadow);
}

.hero {
  padding: clamp(24px, 4vw, 40px);
}

.hero-grid {
  display: grid;
  gap: var(--space-7);
  align-items: end;
}

.hero-copy {
  display: grid;
  gap: var(--space-4);
  max-width: 48rem;
}

.hero-actions,
.action-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn,
.form-submit,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.btn.primary,
.form-submit {
  background: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 88%, #000000 12%);
  color: var(--surface);
}

.btn.ghost,
.pill.ghost {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.hero-panel,
.card,
.note,
.form-card,
.detail-card,
.quote-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  padding: var(--space-5);
}

.hero-stats,
.stats,
.info-grid,
.card-grid,
.resource-grid,
.link-grid,
.collection-grid,
.topic-grid {
  display: grid;
  gap: 16px;
}

.hero-stats,
.stats {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.stat,
.card,
.note,
.detail-card,
.quote-card,
.form-card {
  padding: var(--space-5);
}

.stat {
  display: grid;
  gap: 6px;
  min-height: 110px;
}

.stat strong {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.stat span,
.card p,
.note p,
.detail-card p,
.quote-card p,
.resource-meta,
.meta,
.small {
  color: var(--muted);
}

.card-grid,
.collection-grid,
.resource-grid,
.topic-grid,
.link-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.card,
.note,
.detail-card,
.quote-card,
.form-card,
.resource-row,
.ledger-row {
  display: grid;
  gap: 14px;
}

.card h3,
.detail-card h3 {
  max-width: 22ch;
}

.card-list,
.detail-list,
.check-list,
.meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.card-list li,
.detail-list li,
.meta-list li,
.check-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink-soft);
}

.card-list li::before,
.detail-list li::before,
.check-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: 0.55em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 78%, var(--surface));
  flex: none;
}

.ledger,
.resource-ledger,
.issue-map,
.timeline,
.form-layout {
  display: grid;
  gap: 16px;
}

.ledger-row,
.resource-row,
.timeline-step,
.contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 64%, transparent);
}

.ledger-row:first-child,
.resource-row:first-child,
.timeline-step:first-child,
.contact-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.ledger-row .index,
.resource-row .index,
.timeline-step .index,
.contact-row .index {
  color: var(--primary);
  font-weight: 700;
}

.badges,
.tags,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.pill {
  padding: 8px 12px;
  background: color-mix(in srgb, var(--surface) 72%, #ffffff 28%);
  border-color: color-mix(in srgb, var(--border) 82%, transparent);
  color: var(--ink-soft);
}

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

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 74%, transparent);
}

.help {
  font-size: 0.92rem;
  color: var(--muted);
}

.form-card {
  padding: clamp(20px, 3vw, 28px);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.responsive-table,
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.responsive-table th,
.responsive-table td,
table th,
table td {
  padding: 14px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 68%, transparent);
  text-align: left;
  vertical-align: top;
}

.responsive-table thead th,
table thead th {
  background: color-mix(in srgb, var(--surface) 80%, #ffffff 20%);
  color: var(--text);
  font-weight: 700;
}

.proof-band {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.proof-item {
  padding: 18px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 86%, #ffffff 14%);
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
}

.proof-item strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.site-footer {
  margin-top: var(--space-9);
  padding: var(--space-8) 0 var(--space-7);
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent), color-mix(in srgb, var(--surface) 94%, #ffffff 6%));
}

.footer-grid {
  width: min(var(--page-max), calc(100% - var(--page-pad) * 2));
  margin: 0 auto;
  display: grid;
  gap: var(--space-6);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
}

.footer-brand {
  display: grid;
  gap: 12px;
  max-width: 34rem;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.2;
}

.footer-links,
.footer-meta {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links a,
.footer-meta a,
.footer-nav a {
  color: var(--ink-soft);
}

.footer-links a:hover,
.footer-meta a:hover,
.footer-nav a:hover {
  color: var(--primary);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--border) 68%, transparent);
}

.motion-surface {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.motion-surface:hover {
  box-shadow: 0 22px 52px rgba(38, 26, 19, 0.1);
}

@media (max-width: 960px) {
  .header-inner,
  .footer-top,
  .ledger-row,
  .resource-row,
  .timeline-step,
  .contact-row,
  .hero-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    display: grid;
    justify-content: stretch;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .site-nav {
    gap: 6px;
  }

  .footer-top {
    gap: var(--space-6);
  }
}

@media (max-width: 720px) {
  .site-shell,
  .header-inner,
  .footer-grid {
    width: min(var(--page-max), calc(100% - 24px));
  }

  .page {
    padding-top: 22px;
  }

  .section,
  .section.compact {
    padding: 36px 0;
  }

  .hero {
    padding: 22px;
    border-radius: 24px;
  }

  .hero-panel,
  .card,
  .note,
  .detail-card,
  .quote-card,
  .form-card,
  .stat {
    padding: 18px;
  }

  .hero-actions,
  .action-row,
  .form-actions,
  .site-nav,
  .header-actions,
  .footer-nav {
    gap: 8px;
  }

  .btn,
  .form-submit,
  .pill,
  .tag,
  .site-nav a {
    padding: 10px 12px;
  }

  h1,
  .hero h1 {
    max-width: 14ch;
  }

  .responsive-table,
  table {
    min-width: 560px;
  }
}

@media (max-width: 480px) {
  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-name span {
    display: none;
  }

  .site-nav a {
    padding-inline: 10px;
  }

  .locale-switch button {
    min-width: 40px;
    padding: 8px 10px;
  }

  .hero {
    padding: 18px;
  }

  .section-head {
    margin-bottom: 24px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* runtime-stock-media-module */
.shpitto-stock-media {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.shpitto-stock-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0.75rem;
}
.shpitto-stock-media figcaption {
  margin: 0;
  color: var(--muted, #52606d);
  font-size: 0.95rem;
  line-height: 1.55;
}
.shpitto-stock-media--enterprise-proof {
  max-width: 42rem;
}
.proof-strip .shpitto-stock-media--enterprise-proof {
  margin-inline: auto;
}
.proof-strip .shpitto-stock-media--enterprise-proof img {
  aspect-ratio: 5 / 3;
  border-radius: 0.5rem;
  border: 1px solid var(--line, #e0e0e0);
}
.proof-strip .shpitto-stock-media--enterprise-proof figcaption {
  max-width: 52ch;
}
.enterprise-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(28rem, 68vh, 44rem);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.enterprise-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 27, 54, 0.78) 0%, rgba(7, 27, 54, 0.52) 42%, rgba(7, 27, 54, 0.18) 100%);
  z-index: 1;
}
.enterprise-hero .shell-inner,
.enterprise-hero .masthead-stack,
.enterprise-hero .enterprise-hero__content,
.enterprise-hero .enterprise-proof-row {
  position: relative;
  z-index: 2;
}
.enterprise-hero .enterprise-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  max-width: none;
}
.enterprise-hero .enterprise-hero__media .media-cover,
.enterprise-hero .enterprise-hero__media picture {
  width: 100%;
  height: 100%;
  display: block;
}
.enterprise-hero .enterprise-hero__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
  border: 0;
}
.enterprise-hero .enterprise-hero__content {
  max-width: 44rem;
  color: white;
}
.enterprise-hero .enterprise-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.enterprise-hero .enterprise-proof-row > * {
  backdrop-filter: blur(8px);
  background: rgba(7, 27, 54, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
}
.masthead--single-column .masthead-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
}
.masthead--single-column .panel,
.masthead--single-column .proof-panel {
  max-width: 44rem;
}
.detail-layout .shpitto-stock-media,
.detail-grid .shpitto-stock-media {
  max-width: 32rem;
}
@media (max-width: 48rem) {
  .shpitto-stock-media--enterprise-proof,
  .detail-layout .shpitto-stock-media,
  .detail-grid .shpitto-stock-media {
    max-width: 100%;
  }
}
.page-title--measure {
  max-width: 20ch;
}
.proof-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.proof-figure {
  margin: 0;
  overflow: hidden;
}
.proof-figure__image {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.proof-figure__caption {
  padding: var(--space-4, 1rem);
  color: var(--text-subtle, #525252);
  font-size: 0.95rem;
}
.section-row--capability {
  align-items: end;
  margin-bottom: 1rem;
}
.section-row--cta {
  flex-wrap: wrap;
  align-items: center;
}
.stack--measure {
  max-width: 47.5rem;
}
.cta-surface {
  background: var(--surface);
}
.stack--section-intro {
  margin-bottom: var(--space-5);
}