/*
 * Viryn Studio v0.6.6 — Atelier Pass II: Evidence of Hands
 * Shared craft layer. Keeps each room distinct while aligning the handwork.
 */

.atelier-page {
  --atelier-brass: #d7ad5f;
  --atelier-brass-soft: rgba(215, 173, 95, .28);
  --atelier-ink-shadow: rgba(18, 11, 8, .34);
}

/* One dependable action grammar across the flagship, frameworks, and Edition. */
.atelier-page :is(a.button, button.button, a.pill, button.pill, a.signal-button, button.signal-button) {
  min-height: 46px;
  padding: .72rem 1.05rem;
  border-radius: .58rem;
  line-height: 1.12;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
  transition: transform 160ms ease, box-shadow 180ms ease, filter 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.atelier-page :is(a.button, button.button, a.pill, button.pill, a.signal-button, button.signal-button):hover {
  transform: translateY(-2px);
}

.atelier-page :is(a.button, button.button, a.pill, button.pill, a.signal-button, button.signal-button):active {
  transform: translateY(0);
}

.atelier-page :is(.button-small, .pill-small) {
  min-height: 40px;
  padding: .58rem .82rem;
}

.atelier-page :is(.button-row, .action-row, .signal-actions, .l-hero-actions) {
  align-items: stretch;
  gap: .72rem;
}

.atelier-page :is(.button-row, .action-row, .signal-actions, .l-hero-actions) > :is(.button, .pill, .signal-button) {
  min-width: 11rem;
}

/* The painted work should read like mounted objects, not compressed thumbnails. */
.atelier-page :is(.atelier-hero-art, .framework-card-art, .preview-surface, .edition-visual, .g-hero-painting, .l-hero-painting, .atelier-table-stage, .atelier-commons-painting) img {
  image-rendering: auto;
  filter: saturate(1.035) contrast(1.025);
}

.atelier-page :is(.atelier-hero-art, .framework-card-art, .preview-surface, .edition-visual, .g-hero-painting, .l-hero-painting, .atelier-table-stage, .atelier-commons-painting) {
  isolation: isolate;
}

/* Brass corners: a restrained, repeatable signature rather than scattered geometry. */
.atelier-page :is(.atelier-hero-art, .edition-feature, .framework-card, .portfolio-card, .g-program-card, .l-resource-card, .resource-card, .order-ticket)::before,
.atelier-page :is(.atelier-hero-art, .edition-feature, .framework-card, .portfolio-card, .g-program-card, .l-resource-card, .resource-card, .order-ticket)::after {
  pointer-events: none;
}

.atelier-page :is(.framework-card, .portfolio-card, .g-program-card, .l-resource-card, .resource-card) {
  position: relative;
}

.atelier-page :is(.framework-card, .portfolio-card, .g-program-card, .l-resource-card, .resource-card)::before {
  position: absolute;
  top: .62rem;
  right: .62rem;
  z-index: 8;
  width: .44rem;
  height: .44rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: var(--atelier-brass);
  box-shadow: 0 2px 6px var(--atelier-ink-shadow), inset 0 1px rgba(255,255,255,.45);
  content: "";
  opacity: .9;
}

/* A hand-drawn rule used only at major thresholds. */
.atelier-hand-rule {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: min(18rem, 70%);
  margin: 1.15rem 0 0;
  color: var(--atelier-brass);
}

.atelier-hand-rule::before,
.atelier-hand-rule::after {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor 22%, currentColor 78%, transparent);
  content: "";
  opacity: .66;
}

.atelier-hand-rule span {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  font-size: .8rem;
  transform: rotate(-6deg);
}

/* Notes are treated as working scraps: useful, legible, and deliberately sparse. */
.atelier-scrap {
  position: relative;
  max-width: 31rem;
  padding: 1rem 1.15rem 1rem 1.25rem;
  border: 1px solid rgba(129, 88, 44, .32);
  border-radius: .25rem .55rem .35rem .65rem;
  background: linear-gradient(155deg, #f2dfbd, #d9bb87);
  color: #2d1c12;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  font-family: Georgia, serif;
  font-size: .96rem;
  font-style: italic;
  line-height: 1.45;
  transform: rotate(-.55deg);
}

.atelier-scrap::before {
  position: absolute;
  top: -.42rem;
  left: 50%;
  width: 3.2rem;
  height: .85rem;
  background: rgba(236, 220, 184, .68);
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
  content: "";
  transform: translateX(-50%) rotate(1.5deg);
}

.atelier-scrap strong {
  display: block;
  margin-bottom: .2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .67rem;
  font-style: normal;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.atelier-coda {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  max-width: 52rem;
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  color: inherit;
  font-family: Georgia, serif;
  font-size: clamp(.98rem, 1.7vw, 1.15rem);
  font-style: italic;
  text-align: center;
  opacity: .78;
}

.atelier-coda::before,
.atelier-coda::after {
  width: clamp(2.5rem, 9vw, 7rem);
  height: 1px;
  background: currentColor;
  content: "";
  opacity: .24;
}

/* Keep overlay copy and utility cards from fighting for the same pixels. */
.g-hero-painting > figcaption {
  right: 14.5rem !important;
}

.g-hero-painting .g-impact-float {
  top: 1.25rem !important;
  right: 1.25rem !important;
  bottom: auto !important;
}

.atelier-table-stage .order-ticket {
  top: 12% !important;
  right: 6% !important;
  bottom: auto !important;
}

.atelier-table-stage .stage-caption {
  right: auto !important;
  bottom: 1.2rem !important;
  left: 1.35rem !important;
  max-width: min(56%, 24rem) !important;
  padding: .45rem .6rem;
  border-radius: .35rem;
  background: rgba(25, 13, 7, .68);
  color: #f7e8cd !important;
  backdrop-filter: blur(6px);
}

/* Commons toolkit: printed matter, not floating rectangles. */
.commons-site .toolkit-art {
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 76% 18%, color-mix(in srgb, var(--sun) 24%, transparent), transparent 12rem),
    linear-gradient(145deg, color-mix(in srgb, var(--clay) 28%, var(--surface)), var(--surface-soft));
  box-shadow: var(--shadow);
}

.commons-site .toolkit-art::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(8deg, transparent 0 18px, color-mix(in srgb, var(--ink) 3%, transparent) 19px 20px);
  content: "";
  opacity: .48;
}

.commons-site .toolkit-art .paper {
  border: 1px solid rgba(72, 57, 43, .2);
  background:
    linear-gradient(90deg, transparent 0 13%, rgba(190, 91, 72, .22) 13% 13.7%, transparent 13.7%),
    repeating-linear-gradient(180deg, #fffdf6 0 27px, #cad8d5 28px 29px);
  box-shadow: 0 18px 30px rgba(54, 40, 28, .18);
}

.commons-site .toolkit-art .paper::before {
  position: absolute;
  top: 1.2rem;
  left: 1.35rem;
  color: #684e40;
  font-family: Georgia, serif;
  font-size: .92rem;
  font-style: italic;
}

.commons-site .toolkit-art .paper-one::before { content: "Questions for the next visit"; }
.commons-site .toolkit-art .paper-two::before { content: "What helped today?"; }

.commons-site .toolkit-art .paper span {
  display: none;
}

.commons-site .toolkit-art .small-leaf {
  width: 2.2rem;
  height: 4.6rem;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, var(--sage), var(--moss));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  transform: rotate(31deg);
}

.commons-site .toolkit-art .small-leaf::after {
  position: absolute;
  top: .25rem;
  bottom: .25rem;
  left: 50%;
  width: 1px;
  background: rgba(255,255,255,.42);
  content: "";
  transform: rotate(-12deg);
}

/* Large editorial headlines should land without clipping beneath sticky headers. */
.commons-site .hero {
  scroll-margin-top: 8rem;
}

.commons-site .hero h1 {
  font-size: clamp(3rem, 6.25vw, 6rem);
  line-height: .97;
}

@media (max-width: 760px) {
  .atelier-page :is(.button-row, .action-row, .signal-actions, .l-hero-actions) > :is(.button, .pill, .signal-button) {
    width: 100%;
    min-width: 0;
  }

  .g-hero-painting {
    display: grid;
    min-height: 0 !important;
  }

  .g-hero-painting img {
    height: 330px !important;
    min-height: 330px !important;
  }

  .g-hero-painting > figcaption,
  .g-hero-painting .g-impact-float {
    position: static !important;
    margin: 0;
  }

  .g-hero-painting > figcaption {
    padding: 1rem 1.1rem .5rem;
    background: #1a120d;
  }

  .g-hero-painting .g-impact-float {
    width: auto !important;
    margin: .5rem 1rem 1rem;
  }

  .atelier-table-stage .order-ticket {
    top: auto !important;
    right: 1rem !important;
    bottom: 4.8rem !important;
    left: 1rem;
    width: auto !important;
    max-height: calc(100% - 7rem);
    overflow: auto;
  }

  .atelier-table-stage .stage-caption {
    right: 1rem !important;
    left: 1rem !important;
    max-width: none !important;
  }

  .atelier-coda::before,
  .atelier-coda::after {
    width: 2rem;
  }
}

/* Flagship working note fits the capability bridge without displacing its logic. */
.studio-flagship .capability-bridge .atelier-scrap {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: -.25rem;
}

/* The Commons' old sun-disc becomes a strip of translucent drafting tape. */
.commons-site .toolkit-art::before {
  top: 1.15rem !important;
  right: 1.55rem !important;
  width: 5.5rem !important;
  height: 1.05rem !important;
  border-radius: .08rem !important;
  background: rgba(238, 220, 178, .66) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  opacity: 1 !important;
  transform: rotate(4deg);
}

/* Give page codas a safe container edge on the full-bleed framework heroes. */
.gathering-site > main > section > .atelier-coda,
.ledger-site > main > section > .atelier-coda,
.signal-site > main > section > .atelier-coda {
  width: min(52rem, calc(100% - 2rem));
}

/* Small screen hero art should remain crisp without magnifying a narrow crop. */
@media (max-width: 760px) {
  .atelier-page :is(.atelier-hero-art, .g-hero-painting, .l-hero-painting, .atelier-commons-painting) img {
    object-position: center;
  }
}
