@font-face {
  font-family: 'Golos Text';
  src: url('/assets/workshop/fonts/golos-text.ttf') format('truetype');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --base: #19161e;
  --postcard: #251f2a;
  --surface: #201c25;
  --rule: #4a3e46;
  --ink: #ffedce;
  --text: #e4d7ce;
  --accent: #ffb64d;
  --font: 'Golos Text', system-ui, sans-serif;
  --gutter: clamp(16px, 4.45vw, 64px);
  background: var(--base);
  color: var(--text);
  font: 16px/1.5 var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a:hover { text-decoration: underline; }

.intro {
  --intro-inset: clamp(24px, 6.4vw, 168px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  min-height: 100svh;
  overflow: hidden;
  background: var(--postcard);
}
.workshop-link {
  justify-self: start;
  margin: clamp(18px, 3.5vh, 48px) var(--intro-inset) 0;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.intro::after {
  content: '';
  height: 5px;
  background: repeating-linear-gradient(135deg, #cb8e54 0 8px, #41313c 8px 14px, #877586 14px 20px, #41313c 20px 27px);
}
.postcard-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}
.postcard-art img {
  position: absolute;
  right: 0;
  width: 125%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: right 42%;
}
.postcard-art::after {
  position: absolute;
  inset: 0;
  content: '';
  background:
    radial-gradient(ellipse 65% 75% at 5% 12%, var(--postcard) 49%, transparent 85%),
    radial-gradient(ellipse 72% 85% at 10% 57%, #251f2af5 20%, #251f2ae6 39%, #251f2aa6 56%, #251f2a42 74%, transparent 90%);
}
.postcard-copy {
  width: min(37vw, 680px);
  margin-left: var(--intro-inset);
  padding-block: clamp(28px, 5vh, 80px) clamp(48px, 10vh, 140px);
  color: var(--ink);
}
.intro h1 img { width: min(100%, 29vw, 600px); height: auto; }
.postcard-copy p { margin: clamp(18px, 2.6vh, 36px) 0 clamp(24px, 3.6vh, 46px); max-width: 31ch; font-size: clamp(19px, 1.75vw, 33px); line-height: 1.4; }
.telegram-button {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  max-width: 100%;
  padding: 14px 23px;
  border-radius: 6px;
  background: var(--accent);
  color: #241d29;
  font-size: clamp(17px, 1.45vw, 20px);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.telegram-button svg { flex: none; }
.telegram-button:hover { background: #ffc779; text-decoration: none; }

.scroll-cue {
  position: absolute;
  bottom: 16px;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 52px;
  height: 66px;
  border: 1px solid #ffb64d80;
  border-radius: 26px;
  color: var(--accent);
  background: var(--postcard);
}
.scroll-cue:is(:hover, :focus-visible) { color: var(--ink); border-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue svg, .scroll-wheel { animation: scroll-down 2s ease-in-out infinite; }
  .scroll-cue svg { --travel: 4px; }
  .scroll-wheel { --travel: 7px; }
  @keyframes scroll-down {
    0%, 75%, 100% { transform: translateY(0); }
    40% { transform: translateY(var(--travel)); }
  }
}

.details { border-block: 1px solid var(--rule); background: var(--surface); }
.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 612px) minmax(280px, 465px);
  grid-template-areas: 'intro sample' 'caption sample' 'chat sample';
  grid-template-rows: repeat(3, auto);
  justify-content: space-between;
  align-content: center;
  align-items: center;
  gap: 22px clamp(28px, 5vw, 68px);
  max-width: 1440px;
  margin-inline: auto;
  padding: 56px max(var(--gutter), 8.3%) 60px;
}
.details-intro { grid-area: intro; }
.details h2, .details h3 { margin-bottom: 14px; color: var(--ink); line-height: 1.18; }
.details h2 { font-size: clamp(32px, 3.35vw, 48px); }
.details h3 { font-size: clamp(27px, 2.3vw, 33px); }
.details-intro p { font-size: clamp(18px, 1.53vw, 22px); }
.sample-caption { grid-area: caption; font-size: clamp(17px, 1.4vw, 20px); }
.chat { grid-area: chat; border-top: 1px solid var(--rule); padding-top: 27px; font-size: clamp(18px, 1.4vw, 20px); }
.chat p { overflow-wrap: anywhere; }
.chat > code {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1ch;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 4px;
  background: #2b2430;
  color: var(--ink);
  font: 500 clamp(14px, 1.18vw, 17px)/1.5 ui-monospace, Consolas, monospace;
}
.chat > code a { text-decoration: none; }
.chat > code a:hover { text-decoration: underline; }
.chat-note { margin-top: 16px; font-size: clamp(16px, 1.18vw, 17px); }
.chat-note code { font-size: .88em; }

.sample {
  grid-area: sample;
  justify-self: center;
  width: min(100%, 360px);
  padding: clamp(12px, 1.45vw, 21px);
  border-radius: 12px;
  background: #17212b;
}
.message { overflow: hidden; border-radius: 10px; background: #202c39; color: #e4e9ef; }
.message > img { width: 100%; height: auto; }
.message-body { padding: 12px 12px 10px; font-size: 14px; line-height: 1.33; }
.message ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.message li, .message-share { display: flex; align-items: start; gap: 6px; }
.message-body img { flex: none; object-fit: contain; }
.message li span img { display: inline-block; margin-left: 4px; vertical-align: middle; }
.message .message-services, .message-share { margin-top: 12px; color: #82bded; }
.message-services li:last-child { color: inherit; }
.message-services li:last-child span { color: #e4e9ef; }
.message time { display: block; margin-top: 5px; color: #a0afc1; font-size: 11px; text-align: right; }

footer {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin-inline: auto;
  padding: 19px max(var(--gutter), 5%);
  font-weight: 600;
}
footer img { height: auto; }
footer a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }

@media (max-width: 740px), (max-width: 1024px) and (orientation: portrait) {
  .intro { grid-template-rows: auto auto 1fr auto auto; min-height: auto; }
  .workshop-link { margin: 10px var(--intro-inset); padding-block: 5px; }
  .postcard-art { position: relative; inset: auto; height: min(64vw, 42svh); }
  .postcard-art img { width: 190%; object-position: right 38%; }
  .postcard-art::after { background: linear-gradient(0deg, var(--postcard), transparent 17%); }
  .postcard-copy { width: auto; margin-inline: var(--intro-inset); padding-block: 8px 12px; }
  .scroll-cue { position: static; margin-bottom: 10px; }
  .intro h1 img { width: clamp(210px, 56vw, 320px); }
  .postcard-copy p { margin: 14px 0 20px; }
  .telegram-button { padding-inline: 18px; }
}
@media (max-width: 740px) {
  .details-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'intro' 'sample' 'caption' 'chat';
    grid-template-rows: auto;
    padding: 32px max(var(--gutter), 5.65%) 38px;
  }
  .sample { max-width: 326px; }
  footer img { width: 112px; }
}
