:root {
  --site-paper: #F5F0E9;
  --site-paper-2: #EFE8DE;
  --site-ink: #2B2620;
  --site-rust: #A9542C;
  --site-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.58' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html {
  background: var(--site-paper);
}

body {
  background-color: var(--site-paper) !important;
  background-image: linear-gradient(rgba(245, 240, 233, .955), rgba(245, 240, 233, .955)), var(--site-noise) !important;
  background-attachment: fixed, fixed !important;
  background-size: auto, 280px 280px !important;
}

/* Keep texture in the page surface instead of laying it over screenshots and text. */
body::before,
body::after {
  display: none !important;
}

.home-main,
.site-page {
  background: transparent !important;
}

.site-page {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
}

.site-page--column {
  display: flex;
  flex-direction: column;
}

.site-page > .page-rails {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(1400px, calc(100% - 40px));
  pointer-events: none;
  transform: translateX(-50%);
}

.site-page > .page-rails::before,
.site-page > .page-rails::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(43, 38, 32, .13);
  content: "";
}

.site-page > .page-rails::before { left: 0; }
.site-page > .page-rails::after { right: 0; }

.site-page > header,
.site-page > main,
.site-page > section,
.site-page > footer {
  position: relative;
  z-index: 1;
}

/* Shared cream liquid-glass navigation. */
.site-header {
  z-index: 1100 !important;
  background: rgba(245, 240, 233, .9) !important;
  border-bottom-color: rgba(43, 38, 32, .1) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
  backdrop-filter: blur(14px) saturate(1.18);
}

.site-nav {
  max-width: 1400px !important;
}

.nav-login {
  margin-left: 4px;
  padding: 8px 14px;
  border: 1px solid rgba(43, 38, 32, .18);
  border-radius: 100px;
  background: rgba(255, 255, 255, .42);
  color: rgba(43, 38, 32, .78);
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.nav-login:hover {
  border-color: rgba(43, 38, 32, .32);
  background: rgba(255, 255, 255, .76);
  color: var(--site-ink);
}

.nav-login:focus-visible {
  outline: 2px solid var(--site-rust);
  outline-offset: 2px;
}

@media (min-width: 769px) {
  .site-page {
    padding-top: 71px;
  }

  .site-page .site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    transition: background .45s cubic-bezier(.22, .61, .36, 1), border-color .45s cubic-bezier(.22, .61, .36, 1), backdrop-filter .45s cubic-bezier(.22, .61, .36, 1);
  }

  .site-header .site-nav {
    border: 1px solid transparent;
    transition: max-width .45s cubic-bezier(.22, .61, .36, 1), margin .45s cubic-bezier(.22, .61, .36, 1), padding .45s cubic-bezier(.22, .61, .36, 1), gap .45s cubic-bezier(.22, .61, .36, 1), border-radius .45s cubic-bezier(.22, .61, .36, 1), background .45s cubic-bezier(.22, .61, .36, 1), border-color .45s cubic-bezier(.22, .61, .36, 1), box-shadow .45s cubic-bezier(.22, .61, .36, 1);
  }

  .site-header.is-pill {
    background: rgba(245, 240, 233, 0) !important;
    border-bottom-color: transparent !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    pointer-events: none;
  }

  .site-header.is-pill .site-nav {
    max-width: 724px !important;
    margin: 10px auto 0;
    padding: 7px 9px 7px 20px;
    gap: 14px;
    border-color: rgba(43, 38, 32, .14);
    border-radius: 100px;
    background: rgba(245, 240, 233, .62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58), 0 16px 44px rgba(43, 38, 32, .14);
    -webkit-backdrop-filter: blur(18px) saturate(1.42);
    backdrop-filter: blur(18px) saturate(1.42);
    pointer-events: auto;
  }

  .site-header.is-pill .nav-links { gap: 2px; }
  .site-header.is-pill .nav-cta { padding: 8px 16px; }
}

/* Login gate shared by every main-site page. */
.login-gate {
  width: min(430px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 24px;
  background: rgba(250, 248, 245, .86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 28px 90px rgba(43, 38, 32, .28);
  color: var(--site-ink);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  backdrop-filter: blur(24px) saturate(1.35);
}

.login-gate[open] { animation: loginGateThemeIn .22s cubic-bezier(.22, .61, .36, 1); }
.login-gate::backdrop { background: rgba(43, 38, 32, .34); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.login-gate-card { padding: 30px; }
.login-gate-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-gate-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 1px solid rgba(43, 38, 32, .14); border-radius: 50%; background: rgba(255, 255, 255, .68); box-shadow: inset 0 1px 0 #fff, 0 8px 24px rgba(43, 38, 32, .08); }
.login-gate-mark img { display: block; width: 24px; height: 24px; }
.login-gate-kicker { margin: 0 0 2px; color: var(--site-rust); font-size: 10.5px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.login-gate h2 { margin: 0; font-family: var(--font-sans) !important; font-size: 26px; font-weight: 650 !important; line-height: 1.05; letter-spacing: -.035em !important; }
.login-gate-copy { margin: 0 0 7px; color: rgba(43, 38, 32, .66); font-size: 14.5px; line-height: 1.55; }
.login-gate-access { margin: 0 0 20px; color: rgba(43, 38, 32, .66); font-size: 14px; line-height: 1.5; }
.login-gate-access a { color: var(--site-rust); font-weight: 700; text-underline-offset: 3px; }
.login-gate-label { display: block; margin-bottom: 8px; color: rgba(43, 38, 32, .72); font-size: 12px; font-weight: 700; }
.login-gate-input { width: 100%; height: 48px; padding: 0 15px; border: 1px solid rgba(43, 38, 32, .18); border-radius: 13px; outline: none; background: rgba(255, 255, 255, .76); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9); color: var(--site-ink); font: inherit; font-size: 18px; font-weight: 600; line-height: 1; letter-spacing: .12em; }
.login-gate-input:focus { border-color: var(--site-rust); box-shadow: 0 0 0 3px rgba(169, 84, 44, .12); }
.login-gate.is-error .login-gate-input { border-color: var(--site-rust); box-shadow: 0 0 0 3px rgba(169, 84, 44, .1); }
.login-gate-status { min-height: 20px; margin: 9px 0 2px; color: var(--site-rust); font-size: 12.5px; line-height: 1.4; }
.login-gate-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.login-gate-actions button { min-height: 42px; padding: 0 17px; border-radius: 100px; font: inherit; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; }
.login-gate-cancel { border: 1px solid rgba(43, 38, 32, .16); background: rgba(255, 255, 255, .42); color: rgba(43, 38, 32, .76); }
.login-gate-submit { border: 1px solid var(--site-ink); background: var(--site-ink); color: var(--site-paper); }
.login-gate-submit:hover { border-color: var(--site-rust); background: var(--site-rust); }
.login-gate-submit:disabled { opacity: .58; cursor: wait; }
@keyframes loginGateThemeIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* Homepage uses the same beige wash as the pushed cleaned branch. */
.hero-wash {
  background: linear-gradient(90deg, rgba(245, 240, 233, 0) 70%, rgba(245, 240, 233, .06) 84%, rgba(245, 240, 233, .2) 95%, rgba(245, 240, 233, .32) 100%), linear-gradient(180deg, rgba(245, 240, 233, 0) 70%, var(--site-paper) 100%), radial-gradient(36% 18% at 20% 18%, rgba(245, 240, 233, .94) 0%, rgba(245, 240, 233, .64) 54%, rgba(245, 240, 233, 0) 100%), radial-gradient(53% 64% at 26% 46%, rgba(245, 240, 233, .86) 0%, rgba(245, 240, 233, .62) 44%, rgba(245, 240, 233, .14) 72%, rgba(245, 240, 233, 0) 100%), linear-gradient(90deg, rgba(245, 240, 233, .3) 0%, rgba(245, 240, 233, .2) 40%, rgba(245, 240, 233, .055) 66%, rgba(245, 240, 233, 0) 84%) !important;
}

/* Security page: current typography, colored grain panels, and glass surfaces. */
.security-page h1,
.security-page h2,
.security-page h3,
.blog-page h1,
.blog-page h2,
.blog-page h3 {
  font-family: var(--font-sans) !important;
}

.security-page #security-overview {
  position: relative;
  max-width: 1400px !important;
  isolation: isolate;
}

.security-page #security-overview::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(circle, rgba(43, 38, 32, .06) 1px, transparent 1px), radial-gradient(circle, rgba(51, 80, 125, .08) 1.5px, transparent 1.7px);
  background-position: 0 0, 64px 64px;
  background-size: 32px 32px, 128px 128px;
  opacity: .72;
  content: "";
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

.security-page #security-overview > div { max-width: 1020px !important; }
.security-page #security-overview h1 { max-width: 14em; font-size: clamp(44px, 5.55vw, 76px) !important; font-weight: 400 !important; line-height: 1.01 !important; letter-spacing: -.045em !important; }

.security-page .arch-section,
.security-page #compliance {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(132deg, #D9E7EE 0%, #DFDCEE 48%, #E9D9CF 100%) !important;
}

.security-page #compliance {
  background: linear-gradient(135deg, #DCE7DE 0%, #E5E1D4 52%, #E8D9D2 100%) !important;
}

.security-page .arch-section::before,
.security-page #compliance::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: var(--site-noise);
  background-size: 220px 220px;
  content: "";
  mix-blend-mode: soft-light;
  opacity: .3;
  pointer-events: none;
}

.security-page .arch-shell,
.security-page #compliance > .pad-shell {
  position: relative;
  z-index: 1;
  max-width: 1400px !important;
}

.security-page .arch-intro h2,
.security-page #memory-scopes-title,
.security-page #permission-proof h2,
.security-page #compliance h2 {
  font-weight: 500 !important;
  letter-spacing: -.035em !important;
}

.security-page .arch-stage,
.security-page .permission-demo,
.security-page .framework-card {
  border-color: rgba(255, 255, 255, .64) !important;
  background: rgba(250, 248, 244, .74) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 24px 58px -40px rgba(43, 38, 32, .5) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

.security-page #memory-boundaries > .pad-shell {
  position: relative;
  margin-top: clamp(30px, 4vw, 54px) !important;
  margin-bottom: clamp(30px, 4vw, 54px) !important;
  padding: clamp(38px, 5vw, 64px) clamp(24px, 4vw, 48px) !important;
  border: 1px solid rgba(43, 38, 32, .13);
  border-radius: 24px;
  background: rgba(245, 240, 233, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68), 0 24px 60px -48px rgba(43, 38, 32, .55);
}

/* Blog page: a useful current-state panel instead of a washed-out empty canvas. */
.blog-page .journal-main {
  position: relative;
  min-height: min(680px, calc(100vh - 71px));
  padding: clamp(52px, 7vw, 92px) 32px !important;
  overflow: hidden;
}

.blog-page .journal-main::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(43, 38, 32, .06) 1px, transparent 1px), radial-gradient(circle, rgba(51, 80, 125, .08) 1.5px, transparent 1.7px);
  background-position: 0 0, 64px 64px;
  background-size: 32px 32px, 128px 128px;
  content: "";
  pointer-events: none;
}

.journal-panel {
  position: relative;
  isolation: isolate;
  width: min(1080px, 100%);
  padding: clamp(44px, 7vw, 88px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 28px;
  background: linear-gradient(132deg, #C9DFE8 0%, #D8D9EA 48%, #E8D7CD 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 30px 78px -48px rgba(43, 38, 32, .6);
}

.journal-panel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: var(--site-noise);
  background-size: 190px 190px;
  content: "";
  mix-blend-mode: soft-light;
  opacity: .34;
}

.journal-panel::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(60% 90% at 10% 5%, rgba(255, 255, 255, .62), transparent 70%), radial-gradient(48% 80% at 94% 92%, rgba(51, 80, 125, .14), transparent 72%);
  content: "";
}

.journal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #8F4624;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.journal-kicker::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--site-rust);
  box-shadow: 0 0 0 4px rgba(169, 84, 44, .12);
  content: "";
}

.journal-panel h1 {
  margin-bottom: 20px !important;
  font-size: clamp(44px, 6vw, 76px) !important;
  font-weight: 400 !important;
  line-height: 1.01 !important;
  letter-spacing: -.048em !important;
}

.journal-panel > p {
  color: rgba(43, 38, 32, .7) !important;
  font-size: clamp(16px, 1.5vw, 18px) !important;
}

@media (max-width: 768px) {
  .site-page { padding-top: 0; }
  .site-page > .page-rails { display: none; }
  .site-header { position: relative !important; }
  .nav-links { background: rgba(245, 240, 233, .98) !important; }
  .nav-login { width: 100%; margin: 0; padding: 14px 2px; border: 0; border-top: 1px solid rgba(43, 38, 32, .08); border-radius: 0; background: transparent; text-align: left; }
  .login-gate-card { padding: 24px; }
  .security-page #security-overview h1 { font-size: clamp(38px, 11vw, 52px) !important; }
  .blog-page .journal-main { min-height: auto; padding: 40px 20px 64px !important; }
  .journal-panel { padding: 34px 24px; border-radius: 20px; }
  .journal-panel h1 { font-size: clamp(40px, 12vw, 56px) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .login-gate[open] { animation: none; }
}
