/* ==========================================================================
   Layout system E — STUDIO
   --------------------------------------------------------------------------
   Used by: elenapetrova ($390, personal folio)
   Reference: a printed artist's monograph. Big margins, plates, an index of
   works, and almost no interface at all.

   WHAT MAKES THIS DIFFERENT FROM THE OTHER FOUR
     · a caption UNDER each image in small italic, like a plate list
     · an index table of works — rows, not cards
     · one enormous plate at the top, then a two-up, then a wide one
     · type sits in a narrow measure with a wide margin, never full width
     · hairline rules only. NO cards, NO shadows, NO rounded corners on media.
     · the only layout that is not selling anything above the fold

   Requires core.css.
   ========================================================================== */

.st-page {
  width: min(1120px, 100% - 52px);
  margin-inline: auto;
}

.st-measure {
  width: min(600px, 100% - 52px);
  margin-inline: auto;
}

/* ---------------------------------------------------------------- opening */
.st-open {
  padding: clamp(56px, 10vw, 132px) 0 clamp(38px, 6vw, 70px);
  display: grid;
  gap: clamp(26px, 4vw, 56px);
}

@media (min-width: 860px) {
  .st-open { grid-template-columns: 1.35fr 1fr; align-items: end; }
}

.st-open h1 {
  font-size: clamp(2.2rem, 5.8vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.038em;
  max-width: 15ch;
  margin-bottom: 0;
}

.st-intro {
  font-size: clamp(1.02rem, 1.7vw, 1.16rem);
  line-height: 1.62;
  color: var(--d-muted);
  max-width: 34ch;
  margin: 0;
}

.st-intro strong { color: var(--d-ink); font-weight: 600; }

.st-rule {
  height: 1px;
  background: var(--d-line);
  border: 0;
  margin: clamp(34px, 5vw, 62px) 0;
}

/* ------------------------------------------------------------------ plates */
.st-plate { margin: 0 0 clamp(30px, 5vw, 56px); }

.st-plate-img {
  background:
    radial-gradient(ellipse at 42% 34%,
      color-mix(in srgb, var(--d-accent) 26%, var(--d-surface)),
      var(--d-surface) 74%);
  display: grid;
  place-items: center;
  font-family: var(--d-font);
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  color: color-mix(in srgb, var(--d-ink) 30%, transparent);
}

/* Plate proportions vary on purpose — a monograph never uses one crop. */
.st-plate-hero .st-plate-img { aspect-ratio: 16 / 9; }
.st-plate-tall .st-plate-img { aspect-ratio: 3 / 4; }
.st-plate-wide .st-plate-img { aspect-ratio: 21 / 9; }
.st-plate-sq .st-plate-img { aspect-ratio: 1 / 1; }

.st-cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  margin-top: 11px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--d-muted);
}

.st-cap b { font-style: normal; font-weight: 600; color: var(--d-ink); }

/* the two-up and one-wide rhythm */
.st-plates {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
}

@media (min-width: 760px) {
  .st-plates-2 { grid-template-columns: 1fr 1fr; }
  /* the second plate is offset downward, so the pair reads as a spread */
  .st-plates-2 > :nth-child(2) { margin-top: clamp(20px, 6vw, 76px); }
}

/* ------------------------------------------------------- index of works */
.st-index {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.st-index th {
  font-family: var(--d-sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--d-muted);
  text-align: left;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--d-ink);
}

.st-index td {
  padding: 15px 0;
  border-bottom: 1px solid var(--d-line);
  vertical-align: baseline;
}

.st-index td:first-child { font-family: var(--d-font); font-size: 1.05rem; }
.st-index td:last-child { text-align: right; white-space: nowrap; }

.st-index tr { transition: background-color 0.2s ease; }
.st-index tbody tr:hover { background: color-mix(in srgb, var(--d-ink) 3%, transparent); }

.st-index .st-sold { color: var(--d-muted); font-style: italic; }

/* ------------------------------------------------------------- the margin */
/* a side note in the outer margin, the way a monograph prints one */
.st-margin-note {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--d-muted);
  border-top: 1px solid var(--d-line);
  padding-top: 14px;
  max-width: 30ch;
}

@media (min-width: 900px) {
  .st-with-margin {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: clamp(28px, 5vw, 72px);
    align-items: start;
  }
}

/* ------------------------------------------------------------------ words */
.st-quote {
  font-family: var(--d-font);
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: -0.025em;
  max-width: 24ch;
  margin: 0;
}

.st-quote cite {
  display: block;
  margin-top: 18px;
  font-family: var(--d-sans);
  font-style: normal;
  font-size: 0.83rem;
  color: var(--d-muted);
}

.st-facts {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--d-line);
  border-bottom: 1px solid var(--d-line);
  padding: clamp(20px, 3vw, 30px) 0;
  margin: clamp(34px, 5vw, 54px) 0;
}

.st-facts div b {
  display: block;
  font-family: var(--d-font);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.st-facts div span {
  font-size: 0.84rem;
  color: var(--d-muted);
  line-height: 1.45;
  display: block;
  margin-top: 5px;
}

/* --------------------------------------------------------------- the links */
.st-links {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--d-line);
}

.st-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--d-line);
  text-decoration: none;
  font-family: var(--d-font);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  letter-spacing: -0.015em;
  transition: padding-left 0.26s cubic-bezier(0.16, 0.84, 0.28, 1),
              color 0.26s ease;
}

.st-link:hover { padding-left: 12px; color: var(--d-accent); }

.st-link span {
  font-family: var(--d-sans);
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--d-muted);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .st-page, .st-measure { width: min(100% - 36px, 100%); }
  .st-index td:nth-child(3), .st-index th:nth-child(3) { display: none; }
}
