/* Paper desk scene for the conversation home.
   The photo stays atmospheric; all reading surfaces remain opaque paper. */

:root {
  color-scheme: light;
  --canvas: #e7decc;
  --canvas-deep: #eee5d4;
  --paper: #f4ecdc;
  --paper-soft: #f8f2e5;
  --ink: #25241c;
  --ink-soft: #4c4739;
  --muted: #716856;
  --faint: #988d76;
  --line: #c9bda5;
  --line-strong: #9d8e70;
  --accent: #a8522d;
  --accent-deep: #884024;
  --ink-green: #2f4335;
  --ink-green-deep: #213128;
  --font: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --display: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --kai: "Kaiti SC", "KaiTi", "STKaiti", "FangSong", cursive;
  --paper-fiber:
    radial-gradient(circle at 15% 18%, rgba(102, 81, 53, .055) 0 1px, transparent 1.5px),
    repeating-linear-gradient(8deg, transparent 0 23px, rgba(107, 88, 58, .022) 24px, transparent 25px);
}

html,
body {
  background: var(--canvas);
}

body {
  color: var(--ink);
  font-family: var(--font);
}

.app-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: 272px minmax(0, 1fr) 382px;
}

.winter-scene-layer {
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(244, 239, 230, .16), rgba(26, 31, 28, .08)),
    linear-gradient(90deg, rgba(234, 227, 214, .18), transparent 34% 72%, rgba(30, 34, 29, .06)),
    url("./assets/winter-detective.png") 66% 46% / cover no-repeat;
  filter: saturate(.72) contrast(.9) brightness(.9);
}

body.sxm-winter-on .winter-scene-layer {
  opacity: 1;
}

.main {
  position: relative;
  background:
    linear-gradient(180deg, rgba(240, 234, 223, .5), rgba(231, 222, 206, .66)),
    radial-gradient(ellipse at 50% 12%, rgba(255, 252, 244, .2), transparent 44%);
  box-shadow:
    inset 22px 0 34px -36px rgba(64, 50, 29, .4),
    inset -22px 0 34px -36px rgba(64, 50, 29, .3);
  backdrop-filter: blur(2px) saturate(.8);
}

.topbar {
  background:
    linear-gradient(180deg, rgba(245, 240, 230, .9), rgba(237, 230, 218, .78));
  border-bottom-color: rgba(125, 111, 87, .24);
  box-shadow: inset 0 -1px rgba(255, 255, 255, .4);
  backdrop-filter: blur(12px) saturate(.84);
}

.topbar::after {
  background: linear-gradient(90deg, transparent, rgba(129, 113, 84, .3) 18%, rgba(129, 113, 84, .3) 82%, transparent);
}

.topbar-kicker {
  color: #837966;
}

.topbar-name {
  color: #24241c;
}

.topbar-actions > .top-article {
  color: #f7f1e5;
  background: var(--ink-green);
  border-color: var(--ink-green-deep);
  box-shadow: 1px 2px 0 rgba(54, 45, 30, .12);
}

.topbar-actions > .top-article:hover,
.topbar-actions > .top-article.active {
  color: #fffaf0;
  background: #3b5141;
  box-shadow: 2px 4px 0 rgba(54, 45, 30, .14);
}

.topbar-actions > .top-call {
  color: #8b4428;
  background: rgba(250, 246, 236, .78);
  border-color: rgba(168, 82, 45, .62);
  box-shadow: 1px 2px 0 rgba(59, 49, 31, .08);
}

.topbar-actions > .top-call:hover {
  color: #66331f;
  background: #fff8ec;
}

.sidebar {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .2), transparent 25% 76%, rgba(76, 64, 43, .055)),
    var(--paper-fiber),
    linear-gradient(180deg, #f0e9d9, #e8dfce);
  border-right-color: rgba(132, 119, 96, .25);
  box-shadow: inset -1px 0 rgba(255, 255, 255, .5);
}

.brand-name {
  color: #24241c;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.welcome {
  width: min(820px, calc(100% - 48px));
  padding: 68px 0 300px;
}

.welcome-glow {
  display: none;
}

.welcome-paper {
  position: relative;
  isolation: isolate;
  width: min(680px, 100%);
  min-height: 304px;
  margin: 20px auto 0;
  padding: 62px 58px 34px;
  color: var(--ink);
  text-align: center;
  background: none;
  border: 0;
  box-shadow: none;
}

.welcome-paper::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(164deg, rgba(255, 255, 255, .54), transparent 34%),
    radial-gradient(ellipse at 9% 82%, rgba(106, 83, 51, .1), transparent 28%),
    radial-gradient(ellipse at 87% 17%, rgba(106, 83, 51, .075), transparent 30%),
    var(--paper-fiber),
    #ede4d2;
  background-blend-mode: soft-light, multiply, multiply, normal, normal;
  border: 1px solid rgba(129, 114, 89, .56);
  content: "";
}

.welcome-paper::before {
  clip-path: polygon(
    .8% 5%, 6% 3.5%, 13% 4.8%, 21% 2.6%, 31% 4%, 42% 2%, 54% 3.5%,
    65% 1.8%, 76% 3.8%, 88% 2%, 99% 4%, 98.6% 18%, 99.4% 35%, 98.4% 53%,
    99.2% 70%, 98.2% 87%, 98.8% 96%, 90% 97%, 79% 95.8%, 67% 98%,
    55% 96.4%, 43% 98%, 31% 96.2%, 19% 97.5%, 7% 96%, 1.2% 94%,
    .7% 78%, 1.5% 62%, .6% 46%, 1.2% 29%, .4% 15%
  );
  box-shadow:
    inset 0 0 38px rgba(97, 76, 45, .08),
    0 18px 34px rgba(64, 50, 31, .16);
  content: "";
}

@supports not (background-blend-mode: soft-light) {
  .welcome-paper::before {
    background: #ede4d2;
  }
}

.welcome-paper {
  background:
  background: none;
}

.welcome-paper-back {
  position: absolute;
  inset: 8px -6px 0 8px;
  z-index: -2;
  background:
    var(--paper-fiber),
    #d8ccb8;
  border: 1px solid rgba(126, 112, 87, .4);
  box-shadow: 0 14px 25px rgba(68, 53, 33, .12);
  clip-path: polygon(
    .6% 2%, 12% 1%, 25% 2.5%, 38% 1%, 52% 2.2%, 67% .8%, 82% 2%,
    99% 1%, 98.7% 19%, 99.4% 39%, 98.5% 59%, 99.2% 80%, 98.6% 98%,
    83% 97%, 67% 98.5%, 51% 97%, 34% 98.4%, 17% 97%, 1% 98%,
    .5% 80%, 1.3% 61%, .4% 42%, 1% 22%
  );
  transform: rotate(.5deg);
}

.welcome-paper-tape {
  position: absolute;
  z-index: 3;
  width: 88px;
  height: 20px;
  opacity: .68;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .13) 0 2px, transparent 2px 4px),
    rgba(197, 177, 137, .7);
  box-shadow: 0 1px 2px rgba(75, 57, 31, .12);
  mix-blend-mode: multiply;
  transform: rotate(-39deg);
}

.welcome-paper-tape-left {
  right: -42px;
  bottom: 48px;
}

.welcome-paper-tape-right {
  right: 43px;
  top: -13px;
  width: 70px;
  transform: rotate(2deg);
}

.welcome-paper-stamp {
  position: absolute;
  top: 35px;
  right: 38px;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: rgba(86, 75, 56, .56);
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 7px/1.5 Georgia, serif;
  letter-spacing: .15em;
  transform: rotate(10deg);
}

.welcome-paper-stamp::before {
  position: absolute;
  inset: 7px;
  border: 1px dashed currentColor;
  border-radius: 50%;
  content: "";
}

.welcome-paper-index {
  position: absolute;
  top: 70px;
  left: 50%;
  color: #9c917c;
  font-size: 8px;
  letter-spacing: .12em;
  transform: translateX(-50%);
}

.welcome-paper .hero-avatar {
  position: absolute;
  top: -43px;
  left: 50%;
  width: 76px;
  height: 76px;
  margin: 0;
  overflow: visible;
  border: 5px solid #f8f3e8;
  border-radius: 4px;
  background: #f5eddf;
  box-shadow:
    0 6px 14px rgba(64, 49, 30, .26),
    0 0 0 1px rgba(132, 117, 92, .55);
  transform: translateX(-50%) rotate(1deg);
  animation: none;
}

.welcome-paper .hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 1px;
  object-fit: cover;
  object-position: center 30%;
}

.welcome-paper .hero-avatar small {
  position: absolute;
  right: -13px;
  bottom: -18px;
  left: -13px;
  display: grid;
  height: 20px;
  place-items: center;
  color: #5b5748;
  background: #e7dcc8;
  border: 1px solid #b5a68c;
  font: 9px/1 var(--font);
  letter-spacing: .1em;
  white-space: nowrap;
}

.welcome-paper .welcome-time {
  margin: 0 0 7px;
  color: #8b4c2c;
  font-family: var(--kai);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: none;
}

.welcome-paper h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  color: #22221b;
  background: none;
  filter: none;
  font-family: var(--display);
  font-size: clamp(34px, 3.1vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.025em;
  -webkit-text-fill-color: currentColor;
}

.welcome-paper h1 > span {
  position: relative;
  width: 68px;
  height: 1px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, transparent, #8a816c);
}

.welcome-paper h1 > span:last-child {
  background: linear-gradient(90deg, #8a816c, transparent);
}

.welcome-paper h1 > span::after {
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  background: #8a816c;
  border-radius: 50%;
  content: "";
}

.welcome-paper h1 > span:first-child::after {
  right: -1px;
}

.welcome-paper h1 > span:last-child::after {
  left: -1px;
}

.welcome-paper .welcome-lead {
  margin: 13px 0 0;
  color: #544d3e;
  font-size: 13px;
  line-height: 1.9;
}

.welcome-paper .welcome-lead b {
  margin-bottom: 8px;
  color: #373328;
  font-size: 13.5px;
  font-weight: 700;
}

.welcome-paper .welcome-lead span {
  max-width: 490px;
  color: #625846;
  line-height: 1.95;
}

.welcome > .breakthrough-rail {
  width: min(760px, 100%);
  margin-top: 18px;
}

.welcome > .home-recruit-banner,
.welcome > .main-feature-showcase,
.welcome > .starter-list,
.welcome > .skill-shelf {
  width: min(760px, 100%);
}

.welcome > .home-recruit-banner {
  margin-top: 12px;
}

.welcome > .main-feature-showcase {
  margin-top: 16px;
}

.welcome > .main-feature-showcase .main-feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.welcome > .main-feature-showcase .main-feature-primary,
.welcome > .main-feature-showcase .autonomy-feature-primary {
  grid-column: auto !important;
  grid-row: auto !important;
  min-height: 0 !important;
}

.welcome > .main-feature-showcase .main-feature-card {
  min-height: 62px;
  padding: 8px 11px;
}

.welcome > .main-feature-showcase .main-feature-card p,
.welcome > .main-feature-showcase .main-feature-flow {
  display: none !important;
}

.welcome > .main-feature-showcase .main-feature-card .main-feature-copy > small {
  order: 2;
  font-size: 8.5px;
}

.welcome > .main-feature-showcase .main-feature-card .main-feature-copy > b {
  order: 1;
  color: #2f2d24;
  font-size: 13px;
}

.welcome > .main-feature-showcase .autonomy-feature-primary .main-feature-icon {
  color: #4d4637;
  background: rgba(255, 252, 244, .72) !important;
  border: 1px solid #9d8e70;
  box-shadow: none;
}

.composer-zone {
  z-index: 8;
}

.composer-zone::before {
  background: linear-gradient(180deg, rgba(234, 226, 211, 0), rgba(234, 226, 211, .9) 26%, var(--canvas) 66%);
}

.composer {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(241, 233, 219, .84)),
    var(--paper-fiber),
    #f1e9da;
}

@media (max-width: 1360px) {
  .app-shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome {
    width: min(100% - 28px, 760px);
    padding-top: 48px;
  }

  .welcome-paper {
    padding: 62px 24px 30px;
  }

  .welcome-paper-stamp {
    right: 20px;
    width: 62px;
    height: 62px;
  }
}

@media (max-width: 640px) {
  .welcome-paper h1 {
    flex-wrap: wrap;
    gap: 10px;
    font-size: clamp(29px, 9vw, 38px);
  }

  .welcome-paper h1 > span {
    width: 38px;
  }

  .welcome > .main-feature-showcase .main-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-paper *,
  .welcome-paper *::before,
  .welcome-paper *::after {
    animation: none !important;
  }
}
