/* AiSE site-wide design system: tokens, base, header, buttons, footer, shared inner-page components. */
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('/assets/fonts/source-serif-4-latin-wght-normal.woff2') format('woff2'); font-style: normal; font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/ibm-plex-mono-latin.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }

:root {
  /* Palette, derived from the AiSE Private AI deck */
  --paper: #F7F5F0;
  --surface: #FFFFFF;
  --subtle: #EFECE4;
  --ink: #14211F;
  --text-muted: #43524E;
  --text-soft: #67746F;
  --teal: #1D6F66;
  --teal-dark: #15564F;
  --teal-soft: #E3EEEB;
  --orange: #B5561F;
  --slate: #3A5A78;
  --plum: #6B4A78;
  --moss: #517B3B;
  --stone: #5E6672;
  --forest: #24403C;
  --border: #DDD8CC;
  --border-strong: #C2BBAB;
  --dark: #0F1D1B;
  --dark-line: rgba(255, 255, 255, .12);

  /* Legacy aliases used by inner pages */
  --bg-primary: var(--paper);
  --bg-surface: var(--surface);
  --bg-subtle: var(--subtle);
  --text-main: var(--ink);
  --brand: var(--ink);
  --accent: var(--teal);
  --accent-hover: var(--teal-dark);
  --accent-soft: var(--teal-soft);

  --radius: 6px;
  --radius-sm: 4px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 31, .06);
  --shadow-lg: 0 24px 48px -24px rgba(20, 33, 31, .28);
  --ring: 0 0 0 3px rgba(29, 111, 102, .35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --page: min(1180px, calc(100vw - 48px));
  --header-h: 72px;

  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--paper); color: var(--ink); line-height: 1.55; }
body, button, a, input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--teal); color: #fff; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.012em; }

.page-shell { width: var(--page); margin-inline: auto; }
.section { position: relative; padding: 104px 0; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }
.skip-link:focus { top: 12px; }

.eyebrow { display: block; margin: 0 0 16px; color: var(--teal); font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Header ---------- */
.site-header { position: fixed; z-index: 60; top: 0; left: 0; width: 100%; border-bottom: 1px solid var(--border); background: rgba(247, 245, 240, .94); backdrop-filter: saturate(160%) blur(10px); }
.nav-shell { display: flex; align-items: center; gap: 32px; width: var(--page); height: var(--header-h); margin: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-logo { display: block; width: 36px; height: 36px; flex: 0 0 auto; }
.brand-text { display: grid; gap: 4px; line-height: 1; }
.brand-name { font-family: var(--font-serif); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.brand-tag { font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft); }
.desktop-nav { display: flex; gap: 28px; margin-left: auto; }
.desktop-nav a { position: relative; padding: 6px 0; color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color .15s ease; }
.desktop-nav a:hover, .desktop-nav a.is-active, .desktop-nav a[aria-current="page"] { color: var(--ink); }
.desktop-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.desktop-nav a:hover::after, .desktop-nav a.is-active::after, .desktop-nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius-sm); background: var(--teal); color: #fff; font-size: 13.5px; font-weight: 600; transition: background .15s ease; }
.nav-cta:hover { background: var(--teal-dark); }
.menu-button { display: none; width: 44px; height: 44px; margin-left: auto; padding: 0; position: relative; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); align-items: center; justify-content: center; cursor: pointer; }
.menu-button span { position: absolute; width: 18px; height: 1.5px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.menu-button span:first-child { transform: translateY(-5px); }
.menu-button span:last-child { transform: translateY(5px); }
.menu-button.is-open span:first-child { transform: rotate(45deg); }
.menu-button.is-open span:nth-child(2) { opacity: 0; }
.menu-button.is-open span:last-child { transform: rotate(-45deg); }
.mobile-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; padding: 8px 24px 20px; border-bottom: 1px solid var(--border); background: var(--paper); box-shadow: var(--shadow-lg); }
.mobile-nav[hidden] { display: none !important; }
.mobile-nav:not([hidden]) { display: block; }
.mobile-nav > a { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 500; }
.mobile-nav .mobile-cta { margin-top: 16px; justify-content: center; border: 0; border-radius: var(--radius-sm); background: var(--teal); color: #fff; font-weight: 600; }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.button svg { transition: transform .15s ease; }
.button:hover svg { transform: translateX(3px); }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover, .button-primary:focus-visible { background: var(--teal-dark); }
.button-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.button-secondary:hover, .button-secondary:focus-visible { background: var(--ink); color: #fff; }
.scroll-top-btn { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease, background .15s ease, color .15s ease; cursor: pointer; }
.scroll-top-btn:hover { background: var(--ink); color: #fff; }
.scroll-top-btn.is-visible { opacity: 1; visibility: visible; }

/* ---------- Inner pages ---------- */
.hero { position: relative; background: var(--paper); }
.hero-inner { display: grid; grid-template-columns: 1.06fr .94fr; gap: 64px; align-items: center; min-height: 600px; padding: 152px 0 88px; }
.hero-copy { max-width: 620px; }
.hero h1 { margin: 0; font-size: clamp(40px, 5vw, 60px); line-height: 1.06; }
.hero h1 span { color: var(--teal); }
.hero-lede { margin: 22px 0 0; max-width: 540px; color: var(--text-muted); font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-panel { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.hero-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--text-soft); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.hero-panel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.hero-steps { display: grid; margin: 0; padding: 0; list-style: none; }
.hero-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--border); }
.hero-steps li:first-child { border-top: 0; padding-top: 0; }
.hero-steps li > span { color: var(--teal); font-family: var(--font-serif); font-size: 20px; font-weight: 600; }
.hero-steps strong { display: block; font-size: 15px; font-weight: 600; }
.hero-steps p { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.hero-panel-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 12px; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 56px; align-items: end; margin-bottom: 56px; }
.section-heading h2 { margin: 0; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.1; }
.section-heading > p { margin: 0; color: var(--text-muted); font-size: 16px; line-height: 1.7; }
.panel-label { margin: 0 0 12px; color: var(--teal); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.inner-page .hero-inner { min-height: 540px; padding-bottom: 76px; }
.inner-page .hero-panel { max-width: 560px; justify-self: end; width: 100%; }
.page-detail-section { background: var(--surface); border-block: 1px solid var(--border); }
.page-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); }
.page-card { min-width: 0; padding: 30px; background: var(--surface); }
.page-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--teal-soft); color: var(--teal); }
.page-card .panel-label { margin-top: 22px; }
.page-card h3 { margin: 0; font-size: 22px; line-height: 1.25; }
.page-card p { margin: 12px 0 0; color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.page-card strong { color: var(--ink); font-weight: 600; }
.module-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.module-tags span { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); font-size: 12px; }
.product-tags { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.page-step-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.page-step { padding: 24px 22px 0 0; }
.page-step + .page-step { padding-left: 22px; border-left: 1px solid var(--border); }
.page-step > span { color: var(--teal); font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.page-step h3 { margin: 12px 0 0; font-size: 19px; }
.page-step p { margin: 8px 0 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.65; }
.page-cta { padding: 76px 0; background: var(--subtle); border-top: 1px solid var(--border); }
.page-cta-inner { display: flex; justify-content: space-between; align-items: end; gap: 36px; }
.page-cta h2 { max-width: 620px; margin: 0; font-size: clamp(30px, 4vw, 42px); line-height: 1.1; }
.page-cta p:not(.eyebrow) { max-width: 510px; margin: 14px 0 0; color: var(--text-muted); line-height: 1.7; }
.page-cta .button { flex: 0 0 auto; }
.directory-section { min-height: 560px; padding-top: 156px; background: var(--paper); }
.directory-heading { max-width: 720px; }
.directory-heading h1 { margin: 0; font-size: clamp(38px, 5vw, 56px); line-height: 1.06; }
.directory-heading h1 span { color: var(--teal); }
.directory-heading > p:last-child { max-width: 620px; margin: 20px 0 0; color: var(--text-muted); font-size: 17px; line-height: 1.7; }
.logo-directory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.logo-entry { display: grid; justify-items: center; gap: 12px; min-width: 0; }
.logo-placeholder { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 112px; padding: 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-soft); }
.logo-placeholder-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--teal); font-family: var(--font-mono); font-size: 11px; }
.logo-placeholder-word { color: var(--text-soft); font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; }
.logo-entry-name { color: var(--text-muted); font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer { padding-top: 72px; background: var(--dark); color: #fff; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: rgba(255, 255, 255, .55); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 48px; padding-bottom: 56px; }
.footer-grid h3 { margin: 0 0 18px; color: rgba(255, 255, 255, .5); font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.footer-grid > div:not(.footer-brand) a, .footer-grid > div:not(.footer-brand) p { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; color: rgba(255, 255, 255, .72); font-size: 14.5px; line-height: 1.6; }
.footer-grid > div:not(.footer-brand) a { transition: color .15s ease; }
.footer-grid a:hover { color: #fff; }
.footer-brand > p { max-width: 300px; margin: 18px 0 16px; color: rgba(255, 255, 255, .6); font-size: 14.5px; line-height: 1.6; }
.footer-brand > span { color: rgba(255, 255, 255, .45); font-size: 13px; }
.footer-location-button { display: inline-flex !important; width: max-content; gap: 8px !important; padding-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .4); }
.footer-bottom { display: flex; justify-content: space-between; padding: 22px 0 28px; border-top: 1px solid var(--dark-line); color: rgba(255, 255, 255, .5); font-size: 13px; }
.footer-bottom div { display: flex; gap: 24px; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Reveal ---------- */
body.reveal-ready [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
body.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .desktop-nav, .nav-cta { display: none; }
  .menu-button { display: flex; }
}
@media (max-width: 1040px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding: 132px 0 72px; }
  .hero-panel { max-width: 520px; }
  .page-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-step-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .page-step:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  :root { --page: calc(100vw - 32px); --header-h: 64px; }
  .section { padding: 72px 0; }
  .mobile-nav { padding-inline: 16px; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .inner-page .hero-inner { min-height: 0; padding-bottom: 64px; }
  .inner-page .hero-panel { justify-self: stretch; }
  .page-card-grid, .page-step-grid { grid-template-columns: 1fr; }
  .logo-directory { grid-template-columns: 1fr 1fr; gap: 16px 10px; margin-top: 32px; }
  .logo-placeholder { min-height: 90px; padding: 12px; }
  .page-step, .page-step + .page-step { padding: 20px 0 0; border-left: 0; }
  .page-cta-inner { flex-direction: column; align-items: flex-start; }
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 14px; }
}
