:root {
  --paper: #efe9dc;
  --paper-light: #f8f4ea;
  --ink: #171815;
  --ink-soft: #30332d;
  --muted: #6f7068;
  --line: rgba(23, 24, 21, 0.18);
  --green: #39745b;
  --blue: #38658c;
  --coral: #d85e43;
  --amber: #d79b42;
  --white: #fffdf7;
  --display: "Baskerville", "Songti SC", "STSong", serif;
  --sans: "Avenir Next", "Futura", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 78% 6%, rgba(216, 94, 67, 0.18), transparent 26rem),
    linear-gradient(135deg, var(--paper-light), var(--paper));
}
button, input { font: inherit; }
a { color: inherit; }
.page-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(rgba(23, 24, 21, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 21, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000 10%, transparent 92%);
}
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 12px; align-items: center; font-weight: 700; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  background: var(--ink);
  font-family: var(--display);
  font-size: 22px;
}
.header-meta, .home-link { color: var(--muted); font-size: 13px; letter-spacing: .06em; text-decoration: none; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(57,116,91,.13); }
.public-main { padding: 72px 0 0; }
.public-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 70px; align-items: end; min-height: 590px; }
.kicker { margin: 0 0 24px; color: var(--coral); font-size: 12px; font-weight: 800; letter-spacing: .2em; }
h1, h2, h3, p { text-wrap: balance; }
h1 { margin: 0; font: 700 clamp(56px, 7.5vw, 104px)/.92 var(--display); letter-spacing: -.065em; }
h1 em { color: var(--coral); font-weight: 400; }
.lede { max-width: 620px; margin: 36px 0 0; color: var(--ink-soft); font-size: clamp(17px, 2vw, 21px); line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 42px; }
.button { display: inline-flex; justify-content: space-between; align-items: center; gap: 28px; min-width: 210px; padding: 16px 18px; border: 1px solid currentColor; text-decoration: none; font-size: 14px; font-weight: 700; }
.button-primary { color: var(--white); background: var(--ink); border-color: var(--ink); }
.button-light { color: var(--ink); background: var(--white); border-color: var(--white); }
.button span { transition: transform .2s ease; }
.button:hover span { transform: translate(3px, -3px); }
.text-link { color: var(--muted); font-size: 14px; text-underline-offset: 5px; }
.identity-card { padding: 22px; border: 1px solid var(--line); background: rgba(255,253,247,.62); box-shadow: 0 28px 80px rgba(66,49,28,.12); }
.portrait { display: grid; aspect-ratio: 4/4.8; place-items: center; margin-bottom: 26px; color: var(--paper); background: linear-gradient(145deg, var(--coral), #7f3023); overflow: hidden; }
.portrait span { font: italic 180px/.8 var(--display); transform: translateY(12px); opacity: .84; }
.identity-label { color: var(--muted); font-size: 11px; letter-spacing: .18em; }
.identity-state { font: 25px/1.35 var(--display); }
.identity-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.identity-stats div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.identity-stats dt { color: var(--muted); font-size: 11px; }
.identity-stats dd { margin: 7px 0 0; font-size: 12px; font-weight: 700; }
.project-section { padding: 150px 0 110px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 42px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0 0 24px; font: 52px/1 var(--display); letter-spacing: -.045em; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.story { position: relative; min-height: 360px; padding: 28px; overflow: hidden; color: inherit; text-decoration: none; transition: background-color .25s ease, transform .25s ease; }
.story + .story { border-left: 1px solid var(--line); }
.story:hover { background: rgba(255,253,247,.5); transform: translateY(-5px); }
.story:focus-visible { z-index: 1; outline: 3px solid var(--coral); outline-offset: -3px; }
.story::after { position: absolute; right: -42px; bottom: -78px; width: 210px; height: 210px; border-radius: 50%; content: ""; opacity: .23; }
.story-green::after { background: var(--green); }
.story-coral::after { background: var(--coral); }
.story-blue::after { background: var(--blue); }
.story-index { font: italic 72px/1 var(--display); color: rgba(23,24,21,.17); }
.story h3 { margin: 72px 0 14px; font: 42px/1 var(--display); }
.story p { max-width: 270px; color: var(--muted); line-height: 1.7; }
.story-tag { position: absolute; bottom: 25px; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.gateway-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding: 70px; color: var(--white); background: var(--ink); }
.eyebrow-number { color: var(--amber); font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.gateway-strip h2 { max-width: 480px; margin: 28px 0 0; font: 56px/1 var(--display); letter-spacing: -.05em; }
.gateway-copy { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.gateway-copy p { margin: 0 0 34px; color: rgba(255,253,247,.66); line-height: 1.8; }
.site-footer { display: flex; justify-content: space-between; padding: 34px 0; color: var(--muted); font-size: 12px; }

/* Private directory */
.private-page { color: var(--white); background: var(--ink); }
.private-page .page-noise { opacity: .18; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); }
.private-header { border-color: rgba(255,255,255,.15); }
.brand-light .brand-mark { color: var(--ink); background: var(--paper); }
.private-page .home-link { color: rgba(255,255,255,.6); }
.private-main { padding: 72px 0 100px; }
.private-hero { display: grid; grid-template-columns: 1fr minmax(360px, .64fr); gap: 70px; align-items: end; padding-bottom: 76px; }
.private-hero h1 { font-size: clamp(58px, 8vw, 98px); }
.private-hero h1 em { color: var(--amber); }
.route-console { padding: 26px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.045); }
.route-status { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; min-height: 92px; }
.route-pulse { width: 11px; height: 11px; margin-top: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 6px rgba(215,155,66,.12); }
.route-status[data-route-state="local"] .route-pulse { background: #72c095; box-shadow: 0 0 0 6px rgba(114,192,149,.13); }
.route-status[data-route-state="public"] .route-pulse { background: #73a9dc; box-shadow: 0 0 0 6px rgba(115,169,220,.13); }
.route-caption { display: block; margin-bottom: 5px; color: rgba(255,255,255,.43); font-size: 10px; letter-spacing: .16em; }
.route-status strong { font: 26px/1.1 var(--display); }
.route-status p { margin: 8px 0 0; color: rgba(255,255,255,.52); font-size: 12px; line-height: 1.55; }
.route-switcher { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 0 0; padding: 4px; border: 1px solid rgba(255,255,255,.16); }
.route-switcher legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.route-switcher label { cursor: pointer; }
.route-switcher input { position: absolute; opacity: 0; pointer-events: none; }
.route-switcher span { display: block; padding: 10px; text-align: center; color: rgba(255,255,255,.55); font-size: 12px; transition: .2s ease; }
.route-switcher input:checked + span { color: var(--ink); background: var(--paper); }
.route-switcher input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.service-group + .service-group { margin-top: 72px; }
.group-heading { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.15); }
.group-heading h2 { margin: 0; font: 36px/1 var(--display); }
.group-heading span { color: rgba(255,255,255,.36); font-size: 10px; letter-spacing: .15em; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid rgba(255,255,255,.15); }
.service-card { position: relative; display: flex; min-height: 410px; flex-direction: column; padding: 25px; border-right: 1px solid rgba(255,255,255,.15); border-bottom: 1px solid rgba(255,255,255,.15); animation: card-in .52s both; animation-delay: calc(var(--reveal-order) * 55ms); }
.service-card::before { position: absolute; inset: 0; pointer-events: none; content: ""; opacity: 0; background: radial-gradient(circle at 90% 8%, var(--card-accent), transparent 36%); transition: opacity .25s ease; }
.service-card:hover::before { opacity: .17; }
.accent-green { --card-accent: var(--green); }
.accent-blue { --card-accent: var(--blue); }
.accent-coral { --card-accent: var(--coral); }
.accent-amber { --card-accent: var(--amber); }
.accent-ink { --card-accent: #fff; }
.service-topline { display: flex; justify-content: space-between; align-items: center; }
.service-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.22); }
.service-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.service-category { color: rgba(255,255,255,.4); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.service-copy { margin: 35px 0 28px; }
.service-copy h3 { margin: 0; font: 35px/1 var(--display); letter-spacing: -.03em; }
.service-copy p { min-height: 46px; margin: 12px 0 0; color: rgba(255,255,255,.48); font-size: 13px; line-height: 1.65; }
.address-list { display: grid; gap: 9px; margin-top: auto; }
.address-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 9px; align-items: center; }
.address-row span { color: rgba(255,255,255,.36); font-size: 10px; }
.address-row code { overflow: hidden; color: rgba(255,255,255,.71); font: 11px/1.4 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.service-actions { margin-top: 22px; }
.smart-open { display: flex; width: 100%; justify-content: space-between; padding: 13px 14px; color: var(--ink); border: 0; background: var(--paper); cursor: pointer; font-size: 12px; font-weight: 800; }
.manual-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 7px; }
.manual-open { padding: 9px 6px; color: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.15); background: transparent; cursor: pointer; font-size: 10px; }
.manual-open:hover, .manual-open:focus-visible { color: var(--white); border-color: rgba(255,255,255,.55); }
.smart-open:focus-visible, .button:focus-visible, .home-link:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.private-footer { color: rgba(255,255,255,.4); border-top: 1px solid rgba(255,255,255,.15); }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 340px; padding: 14px 16px; color: var(--ink); background: var(--paper); box-shadow: 0 20px 50px rgba(0,0,0,.3); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.reveal { animation: reveal .7s both; }
.delay-1 { animation-delay: .12s; }
.delay-2 { animation-delay: .22s; }
@keyframes reveal { from { opacity: 0; transform: translateY(18px); } }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 900px) {
  .public-hero, .private-hero { grid-template-columns: 1fr; }
  .public-hero { min-height: auto; }
  .identity-card { width: min(430px, 100%); }
  .story-grid, .service-grid { grid-template-columns: 1fr 1fr; }
  .story:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .gateway-strip { grid-template-columns: 1fr; gap: 36px; padding: 48px; }
  .private-hero { align-items: start; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 72px; }
  .header-meta { display: none; }
  .public-main, .private-main { padding-top: 44px; }
  h1 { font-size: 51px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .identity-card { padding: 16px; }
  .portrait { aspect-ratio: 4/3.4; }
  .portrait span { font-size: 130px; }
  .project-section { padding: 100px 0 72px; }
  .section-heading h2 { font-size: 38px; }
  .story-grid, .service-grid { grid-template-columns: 1fr; }
  .story + .story { border-top: 1px solid var(--line); border-left: 0; }
  .story:last-child { grid-column: auto; }
  .gateway-strip { margin-inline: -12px; padding: 34px 24px; }
  .gateway-strip h2 { font-size: 42px; }
  .private-hero h1 { font-size: 56px; }
  .route-console { padding: 18px; }
  .service-card { min-height: 390px; }
  .site-footer { gap: 12px; flex-direction: column; }
}

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