/* Opus uses shared tokens with an editorial serif voice. */
.opus-page {
  --opus-code-paper: rgb(255 255 255 / .74);
}

/* The transparent print overlaps the headline on one continuous sheet of paper. */
.opus-print {
  --print-height: clamp(280px, 58svh, 660px);
  --print-apricot: #b57661;
  --print-rose: #aa6885;
  --print-lilac: #8a74a6;
  position: relative;
  display: grid;
  place-items: center;
  height: var(--print-height);
  margin-bottom: calc(-.26 * var(--print-height));
  overflow: hidden;
  color: var(--print-rose);
  pointer-events: none;
  user-select: none;
  mask-image: linear-gradient(to bottom, black 74%, transparent 100%);
}
.opus-print-proof {
  margin: 0;
  font: 600 clamp(12px, 3.45vw, 32px)/1.13 var(--font-mono);
}
.opus-print-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Broad, alternating feature rows echo the Swift reference. */
.language-features { position: relative; padding-block-end: clamp(72px, 9vw, 128px); }
.language-intro { max-width: 1120px; margin: 0 auto clamp(72px, 9vw, 128px); text-align: center; }
.eyebrow { margin: 0 0 20px; font-size: 16px; color: var(--opus-body-muted); }
.opus-page :where(main) h2 { margin: 0 0 24px; font-size: clamp(40px, 5vw, 64px); line-height: 1.07; font-weight: 400; letter-spacing: -.035em; text-wrap: balance; }
.language-intro > p:last-child, .source-inner > p { margin: 0; font-size: clamp(20px, 2vw, 24px); line-height: 1.55; color: var(--opus-body-muted); }
.language-intro h1, .language-intro .intro-slogan { margin: 0; font-size: clamp(32px, 3.8vw, 50px); line-height: 1.15; font-weight: 400; letter-spacing: -.035em; text-wrap: balance; }
.intro-wordmark { white-space: nowrap; }
.intro-brace { font-family: var(--font-mono); font-size: .8em; }
.language-intro .intro-slogan { margin-top: 24px; }
.intro-slogan + .source-links { margin-top: clamp(72px, 8vw, 96px); }

.language-intro .intro-slogan, .opus-page .source-inner h2 { margin-inline: auto; }
.feature h2::before {
  bottom: -.12em;
  height: .4em;
  background-image: url("../assets/images/opus-underline.png");
}
.feature:nth-of-type(even) h2::before, .source-inner h2::before { transform: scaleX(-1); }
.language-intro > p:last-child { max-width: 710px; margin: 32px auto 0; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: clamp(36px, 5vw, 80px); }
.feature + .feature { margin-top: clamp(80px, 10vw, 144px); }
.feature:nth-of-type(even) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.feature:nth-of-type(even) .feature-copy { order: 2; }
.feature-copy .eyebrow { margin-bottom: 14px; }
.feature h2 { margin: 0 0 22px; font-size: clamp(34px, 3.5vw, 46px); font-weight: 400; line-height: 1.1; letter-spacing: -.035em; text-wrap: balance; }
.feature-copy > p:not(.eyebrow) { margin: 0; font-size: 21px; line-height: 1.55; color: var(--opus-body-muted); }
.feature-copy > p + p:not(.eyebrow) { margin-top: 18px; }
.opus-page code { font-family: var(--font-mono); font-size: .78em; }
.opus-page main .liquid-glass {
  --glass-tint: var(--opus-code-paper);
  --glass-opacity: 100%;
  --glass-focus: var(--opus-rose);
}
.code-example {
  --glass-padding: 0;
  --glass-radius: 16px;
  display: block;
  place-items: stretch;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}
.code-example::before { content: none; }
.code-example::after { background-image: none; }
.code-example pre { margin: 0; padding: var(--code-block-padding); overflow-x: auto; font-family: var(--font-mono); font-size: var(--code-block-font-size); line-height: 1.85; tab-size: 4; }
.code-example pre code { font: inherit; }
.syntax-keyword { color: #ad3da4; }
.syntax-type { color: #703daa; }
.syntax-comment { color: #707f8c; }
.syntax-number { color: #272ad8; }
.code-example pre:focus-visible { outline: 2px solid var(--opus-rose); outline-offset: -5px; }

/* A quiet next step, with the prototype's current scope made explicit. */
.project-source { padding-block: clamp(72px, 9vw, 120px); }
.source-inner { max-width: 800px; text-align: center; }
.opus-page .source-inner h2 { margin-bottom: 72px; }
.source-links a:hover { color: var(--opus-rose); }
.source-links a:focus-visible { outline-color: var(--opus-rose); }
.opus-page .site-footer {
  --muted: var(--opus-body-muted);
  border-top: 1px solid color-mix(in srgb, var(--opus-body-muted) 45%, transparent);
}
.opus-page .site-footer a:is(:hover, :focus-visible) {
  color: var(--opus-rose);
  outline-color: currentColor;
}

@media (min-width: 761px) {
  .feature.feature-functions { grid-template-columns: minmax(420px, 1.2fr) minmax(0, 1fr); }
}

@media (orientation: landscape) {
  .language-intro .intro-slogan { margin-top: 8px; }
}

@media (max-width: 760px) {
  .feature, .feature:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature:nth-of-type(even) .feature-copy { order: initial; }
  .feature-copy > p:not(.eyebrow) { font-size: 20px; }
}

@media (max-width: 480px) {
  .opus-print { --print-height: clamp(270px, 86vw, 410px); }
}
