@font-face {
  font-family: "Cal Sans";
  src: url("/assets/fonts/cal-sans-latin.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight-latin.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

@font-face {
  font-family: "DM Mono";
  src: url("/assets/fonts/dm-mono-regular-latin.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --ink: #141413;
  --paper: #f9f9f9;
  --paper-2: #f0efed;
  --white: #ffffff;
  --accent: #ff935d;
  --accent-strong: #ff712a;
  --line: #d8d7d4;
  --muted: #707379;
  --surface: #1d1f20;
  --display: "Cal Sans", Arial, sans-serif;
  --body: "Inter Tight", Arial, sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--paper); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { color: var(--ink); background: var(--accent); }

.hub-body { min-height: 100vh; overflow-x: hidden; }
.hub-header { height: 80px; padding: 0 40px; display: grid; grid-template-columns: 170px 1fr 170px; align-items: center; border-bottom: 1px solid var(--line); background: var(--white); }
.hub-logo { width: 119px; display: block; }
.hub-logo img { width: 100%; height: auto; }
.hub-nav { display: flex; align-items: center; justify-content: center; gap: clamp(34px, 4.2vw, 66px); }
.hub-nav a { position: relative; color: #3c3c3a; font-size: 15px; line-height: 24px; text-decoration: none; }
.hub-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--accent); transition: right .2s ease; }
.hub-nav a:hover::after { right: 0; }
.header-state { justify-self: end; display: flex; align-items: center; gap: 9px; color: #3f403f; font-size: 14px; }
.header-state span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.header-lock { justify-self: end; height: 48px; padding: 0 16px; display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: var(--white); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .2s ease, color .2s ease; }
.header-lock img { width: 16px; height: 16px; filter: invert(1); }
.header-lock:hover { background: var(--accent); color: var(--ink); }
.header-lock:hover img { filter: none; }

.hub-workspace { min-height: calc(100vh - 80px); display: grid; grid-template-columns: 322px minmax(0, 1fr); }
.hub-rail { min-height: calc(100vh - 80px); padding: 70px 40px 36px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.rail-title { margin: 0 0 10px; font-family: var(--display); font-size: 26px; line-height: 1; letter-spacing: .01em; }
.rail-state { margin: 0; display: flex; align-items: center; gap: 10px; color: #5d5e5d; font-size: 16px; }
.rail-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.rail-index { margin-top: 52px; padding-top: 38px; border-top: 1px solid var(--line); }
.rail-index span { display: block; font-size: 14px; }
.rail-index strong { display: block; margin-top: 24px; color: var(--accent-strong); font-family: var(--display); font-size: clamp(108px, 10.5vw, 158px); font-weight: 400; line-height: .82; letter-spacing: -.04em; }
.rail-details { margin: auto 0 0; padding: 30px 0 0; border-top: 2px solid var(--accent); }
.rail-details div + div { margin-top: 20px; }
.rail-details dt { margin-bottom: 5px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.rail-details dd { margin: 0; font-size: 14px; }

.catalog-stage { padding: 68px 40px 34px 56px; }
.catalog-heading { display: grid; grid-template-columns: minmax(0, 1fr) 248px; align-items: end; gap: 40px; }
.section-kicker { display: none; margin: 0 0 14px; color: var(--accent-strong); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.catalog-heading h1, .login-intro h1 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: .01em; }
.catalog-heading h1 { font-size: clamp(58px, 5.8vw, 84px); line-height: .98; }
.catalog-subtitle { margin: 18px 0 0; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; }
.primary-action { height: 60px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: var(--white); font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.primary-action img { width: 19px; height: 19px; filter: invert(1); }
.primary-action:hover { background: var(--accent); color: var(--ink); transform: translateY(-2px); }
.primary-action:hover img { filter: none; }
.primary-action:focus-visible, .header-lock:focus-visible, .password-control:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; }
.accent-rule { height: 2px; margin: 34px 0 28px; background: var(--accent); }
.catalog-description { max-width: 760px; margin: 0 0 30px; color: #454644; font-size: 16px; line-height: 1.5; }
.demo-preview { position: relative; height: clamp(360px, 39vw, 490px); display: block; overflow: hidden; border-radius: 4px; background: var(--ink); }
.demo-preview > img { width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: grayscale(1) invert(1) brightness(.64) contrast(1.42); opacity: .92; transform: scale(1.14); transition: filter .45s ease, transform .45s ease; }
.demo-preview::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.15); border-radius: inherit; pointer-events: none; }
.demo-preview:hover > img { filter: grayscale(1) invert(1) brightness(.76) contrast(1.34); transform: scale(1.16); }
.preview-label { position: absolute; top: 22px; left: 22px; padding: 10px 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.22); border-radius: 4px; background: rgba(20,20,19,.78); color: var(--white); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.preview-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.demo-facts { margin: 34px 0 0; padding: 22px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--accent); }
.demo-facts div { padding: 0 26px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 22px; border-right: 1px solid var(--accent); }
.demo-facts div:first-child { padding-left: 0; }
.demo-facts div:last-child { padding-right: 0; border-right: 0; }
.demo-facts dt { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.demo-facts dd { margin: 0; font-size: 14px; }

.login-stage { padding: 68px 40px 34px 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 430px); grid-template-rows: auto; column-gap: 62px; align-content: center; }
.login-intro { align-self: end; }
.login-intro .section-kicker { display: block; }
.login-intro h1 { font-size: clamp(64px, 6.4vw, 92px); line-height: .94; }
.login-intro > p:last-child { max-width: 600px; margin: 26px 0 0; color: #555654; font-size: 18px; line-height: 1.5; }
.login-form-panel { align-self: end; padding-top: 6px; }
.login-form-heading { padding: 0 0 25px; border-bottom: 2px solid var(--accent); }
.login-form-heading span { display: block; margin-bottom: 10px; font-family: var(--display); font-size: 28px; }
.login-form-heading p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.login-form-panel form { margin-top: 27px; }
.login-form-panel label { display: block; margin-bottom: 9px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.password-control { height: 58px; padding: 0 8px 0 16px; display: flex; align-items: center; border: 1px solid #aeadab; border-radius: 4px; background: var(--white); }
.password-control input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; }
.password-control input::placeholder { color: #92928f; }
.password-control button { height: 38px; padding: 0 10px; border: 0; background: transparent; color: #555654; font-size: 12px; font-weight: 500; cursor: pointer; }
.password-control button:hover { color: var(--accent-strong); }
.form-error { min-height: 21px; margin: 8px 0 3px; color: #be3e31; font-size: 12px; }
.login-submit { width: 100%; border: 0; }
.login-submit:disabled { opacity: .55; cursor: wait; transform: none; }
.privacy-note { margin: 18px 0 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.privacy-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.login-preview { grid-column: 1 / -1; min-height: 280px; margin: 56px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 270px; overflow: hidden; border-radius: 4px; background: var(--ink); color: var(--white); }
.preview-image-wrap { min-width: 0; overflow: hidden; }
.preview-image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: grayscale(1) invert(1) brightness(.62) contrast(1.4); opacity: .9; transform: scale(1.1); }
.login-preview figcaption { padding: 32px 28px; display: flex; flex-direction: column; justify-content: flex-end; border-left: 1px solid #383a3a; }
.login-preview figcaption span { color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.login-preview figcaption strong { margin-top: 16px; font-family: var(--display); font-size: 28px; font-weight: 400; line-height: 1.05; }
.login-preview figcaption small { margin-top: 10px; color: #b8bab8; font-size: 13px; line-height: 1.4; }

@media (max-width: 1100px) {
  .hub-header { grid-template-columns: 150px 1fr 150px; padding: 0 28px; }
  .hub-nav { gap: 26px; }
  .hub-workspace { grid-template-columns: 260px minmax(0, 1fr); }
  .hub-rail { padding: 54px 28px 30px; }
  .catalog-stage, .login-stage { padding-left: 40px; padding-right: 28px; }
  .catalog-heading { grid-template-columns: minmax(0, 1fr) 210px; }
  .demo-facts div { padding: 0 14px; gap: 12px; }
  .login-stage { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; }
}

@media (max-width: 860px) {
  .hub-header { height: 68px; grid-template-columns: 1fr auto; }
  .hub-nav { display: none; }
  .hub-logo { width: 104px; }
  .hub-workspace { min-height: calc(100vh - 68px); display: block; }
  .hub-rail { min-height: auto; padding: 34px 24px 28px; display: grid; grid-template-columns: 1fr auto; align-items: start; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-index { margin: 0; padding: 0 0 0 30px; border: 0; border-left: 1px solid var(--line); text-align: right; }
  .rail-index strong { margin-top: 12px; font-size: 74px; }
  .rail-details { display: none; }
  .catalog-stage { padding: 42px 24px 30px; }
  .catalog-heading { grid-template-columns: 1fr; gap: 28px; }
  .section-kicker { display: block; }
  .catalog-heading h1 { font-size: clamp(48px, 11vw, 70px); }
  .catalog-subtitle { font-size: 24px; }
  .open-demo { width: min(100%, 280px); }
  .demo-preview { height: min(56vw, 430px); min-height: 300px; }
  .demo-facts { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .demo-facts div { padding: 0 20px; }
  .demo-facts div:nth-child(2) { border-right: 0; }
  .demo-facts div:nth-child(3) { padding-left: 0; }
  .login-stage { padding: 42px 24px 30px; display: block; }
  .login-intro h1 { font-size: clamp(58px, 13vw, 82px); }
  .login-form-panel { max-width: 520px; margin-top: 44px; }
  .login-preview { margin-top: 48px; }
}

@media (max-width: 560px) {
  .hub-header { padding: 0 16px; }
  .header-state { font-size: 12px; }
  .header-lock { width: 48px; padding: 0; justify-content: center; }
  .header-lock span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hub-rail { padding: 28px 18px 24px; }
  .rail-title { font-size: 23px; }
  .rail-state { font-size: 14px; }
  .rail-index span { font-size: 11px; }
  .rail-index strong { font-size: 62px; }
  .catalog-stage, .login-stage { padding: 36px 18px 24px; }
  .catalog-heading h1 { font-size: 47px; }
  .catalog-subtitle { font-size: 21px; }
  .primary-action { width: 100%; }
  .accent-rule { margin: 28px 0 22px; }
  .catalog-description { font-size: 15px; }
  .demo-preview { height: 64vw; min-height: 230px; }
  .preview-label { top: 12px; left: 12px; }
  .demo-facts { grid-template-columns: 1fr; }
  .demo-facts div { padding: 0 0 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .demo-facts div:last-child { padding-bottom: 0; border-bottom: 0; }
  .login-intro h1 { font-size: 56px; }
  .login-intro > p:last-child { font-size: 16px; }
  .login-preview { min-height: 0; grid-template-columns: 1fr; }
  .preview-image-wrap { height: 210px; }
  .login-preview figcaption { padding: 24px 20px; border-top: 1px solid #383a3a; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* Shared catalog: keep the existing Moat8 typography and access layout. */
.directory-heading { grid-template-columns: 1fr; }
.directory-heading h1 { font-size: clamp(48px, 5.2vw, 76px); }
.directory-heading .catalog-subtitle { font-size: clamp(20px, 2vw, 28px); }
.directory-list { border-top: 1px solid var(--line); }
.directory-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) 180px; gap: 26px; align-items: center; padding: 30px 0; border-bottom: 1px solid var(--line); }
.directory-number { align-self: start; padding-top: 4px; color: var(--accent-strong); font-family: var(--mono); font-size: 14px; }
.directory-category { margin: 0 0 10px; color: var(--muted); font-family: var(--mono); font-size: 10px; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase; }
.directory-content h2 { margin: 0; font-family: var(--display); font-size: 32px; font-weight: 400; line-height: 1.1; }
.directory-content > p:last-child { max-width: 580px; margin: 12px 0 0; color: #555654; font-size: 15px; line-height: 1.5; }
.directory-item .primary-action { width: 100%; height: 52px; padding: 0 18px; gap: 12px; }
.directory-actions { display: grid; gap: 12px; }
.secondary-action { display: block; text-align: center; font-size: 14px; text-underline-offset: 4px; }
.secondary-action:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.directory-note { margin: 24px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
@media (max-width: 1100px) and (min-width: 861px) {
  .directory-item { grid-template-columns: 30px minmax(0, 1fr); gap: 18px; }
  .directory-item > .primary-action, .directory-actions { grid-column: 2; width: 180px; }
}
@media (max-width: 600px) {
  .directory-item { grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding: 26px 0; }
  .directory-item > .primary-action, .directory-actions { grid-column: 2; width: 100%; }
  .directory-content h2 { font-size: 28px; }
}
