/* The Workshop — page styles. Load after /mallacore-assets/style.css. */

.ws [data-theme="play"]    { --accent: #c48a2c; --accent-ink: #7a5210; --tint: #f3e6c6; }
.ws [data-theme="learn"]   { --accent: #1a94b8; --accent-ink: #0b5f78; --tint: #d9edf2; }
.ws [data-theme="reflect"] { --accent: #55825a; --accent-ink: #2f5236; --tint: #dde9d8; }

/* ---------------------------------------------------------------- Hero --- */
.ws-hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 0;
}
.ws-crumbs {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/1.5 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
}
.ws-crumbs a { color: var(--slate); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.ws-crumbs a:hover { color: var(--ink); border-color: currentColor; }
.ws-crumbs [aria-current] { color: var(--ink); }
.ws-crumbs .sep { color: #a9b6b9; }

.ws-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  margin-top: clamp(40px, 5vw, 72px);
}
.ws-hero h1 {
  font-size: clamp(60px, 7.6vw, 116px);
  line-height: .95;
  letter-spacing: -.068em;
  font-weight: 600;
  margin: 0 0 32px;
}
.ws-hero h1 .brand-dot { color: var(--cyan); }
.ws-lede {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.65;
  color: #2f434c;
  max-width: 30em;
}
.ws-sign {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}
.ws-sign img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 5px var(--paper), 0 0 0 6px var(--line);
}
.ws-sign strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.ws-sign span {
  display: block;
  margin-top: 2px;
  font: 500 11px/1.5 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate);
}

.ws-hero-art {
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid #1d3d4a;
  border-radius: 7px;
  box-shadow: 0 24px 60px rgba(11, 32, 44, .18), 0 2px 6px rgba(11, 32, 44, .08);
}
.ws-hero-art img { display: block; width: 100%; height: auto; }

/* contents strip */
.ws-contents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--line);
}
.ws-contents a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px 16px;
  padding: 26px 28px 30px;
  border-left: 1px solid var(--line);
  transition: background .25s ease;
}
.ws-contents a:first-child { border-left: 0; padding-left: 0; }
.ws-contents a:hover { background: #fff; }
.ws-contents a:first-child:hover { background: transparent; }
.ws-contents .k {
  grid-column: 1 / -1;
  font: 500 11px/1.5 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.ws-contents .k::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0;
}
.ws-contents strong { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.ws-contents .arr { font-size: 18px; color: var(--slate); transition: transform .25s ease, color .25s; }
.ws-contents a:hover .arr { transform: translateY(3px); color: var(--ink); }

/* ------------------------------------------------------------ Workbench --- */
.ws-bench { padding: clamp(80px, 9vw, 128px) 0 clamp(48px, 6vw, 80px); }
.ws-bench-head {
  display: grid;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--ink);
}
.ws-bench-head h2 { font-size: clamp(40px, 4.6vw, 64px); line-height: 1; letter-spacing: -.06em; }
.ws-project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
  padding: clamp(56px, 7vw, 96px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.ws-project:last-child { border-bottom: 0; }
.ws-project:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ws-project:nth-of-type(even) .ws-plate { order: -1; }

.ws-index {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  font: 500 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ws-index .n { color: var(--slate); }
.ws-index .rule { width: 36px; height: 1px; background: var(--accent); }
.ws-index .k { color: var(--accent-ink); }
.ws-project h3 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.06;
  letter-spacing: -.05em;
  font-weight: 600;
  margin-bottom: 20px;
}
.ws-desc {
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.65;
  color: #33474f;
  max-width: 27em;
  margin-bottom: 34px;
}

.ws-stage {
  margin: 0 0 14px;
  color: var(--accent-ink);
  font: 500 12px/1.5 var(--mono);
  letter-spacing: .045em;
}
.ws-note { max-width: 35em; }
.ws-note summary {
  width: fit-content;
  min-height: 44px;
  padding: 9px 2px;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}
.ws-note summary:hover { color: var(--accent-ink); }
.ws-note summary:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; }
.ws-note p {
  margin: 5px 0 0;
  padding: 3px 0 3px 15px;
  border-left: 2px solid var(--accent);
  color: var(--slate);
  font-size: 16px;
  line-height: 1.6;
}
.ws-close { padding-block: 0 52px; }

.ws-plate {
  margin: 0;
  overflow: hidden;
  background: var(--tint);
  border: 1px solid var(--premium-line, #d5e1e3);
  border-radius: 7px;
  box-shadow: 0 10px 34px rgba(11, 32, 44, .08), 0 1px 3px rgba(11, 32, 44, .05);
}
.ws-plate img { display: block; width: 100%; height: auto; }
.ws-plate figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  background: #fff;
  border-top: 1px solid var(--premium-line, #d5e1e3);
  font: 500 11px/1.45 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
}
.ws-plate figcaption b { font-weight: 500; color: var(--accent-ink); }

/* --------------------------------------------------------------- Motion --- */
@media (prefers-reduced-motion: no-preference) {
  .ws-plate { transition: transform .35s ease, box-shadow .35s ease; }
  .ws-plate img { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
  @media (hover: hover) {
    .ws-project:hover .ws-plate { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(11, 32, 44, .12), 0 2px 6px rgba(11, 32, 44, .06); }
    .ws-project:hover .ws-plate img { transform: scale(1.015); }
  }
  @supports (animation-timeline: view()) {
    .ws-plate, .ws-project-copy {
      animation: ws-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 42%;
    }
  }
}
@keyframes ws-rise {
  from { opacity: .4; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------- Responsive --- */
@media (max-width: 1100px) {
  .ws-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .ws-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .ws-hero-art { max-width: 680px; }
  .ws-contents { grid-template-columns: minmax(0, 1fr); }
  .ws-contents a, .ws-contents a:first-child { border-left: 0; border-bottom: 1px solid var(--line); padding: 22px 0; }
  .ws-contents a:last-child { border-bottom: 0; }
  .ws-contents a:hover { background: transparent; }
  .ws-bench-head { grid-template-columns: minmax(0, 1fr); }
  .ws-project, .ws-project:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ws-project .ws-plate { order: -1; max-width: 720px; }
}
@media (max-width: 600px) {
  .ws-hero { padding-top: 28px; }
  .ws-hero h1 { font-size: clamp(52px, 15vw, 72px); margin-bottom: 24px; }
  .ws-lede { font-size: 18px; }
  .ws-hero-art { border-radius: 5px; }
  .ws-bench-head { padding-bottom: 28px; }
  .ws-project { padding: 48px 0; }
  .ws-project h3 { font-size: 32px; }
  .ws-plate figcaption { flex-direction: column; gap: 2px; padding: 10px 14px; }
}
