/*
 * demo42 "Connect · Two Rows" — the Connect page as a newsstand at night: partner issues on a
 * two-row shelf (rail) grouped by magazine, free titles on two lower shelves of smaller cards,
 * people in one row. Site chrome from site.css (#18171a, Lato); Bodoni Moda for mastheads and
 * names; a warm lamp light (DEPO yellow at low alpha) over each shelf. Rails: js/rail.js +
 * css/rail.css, recoloured here through --rail-*.
 */
.tr {
    --cream: #f4efe6;
    --soft: rgb(244 239 230 / 0.64);
    --faint: rgb(244 239 230 / 0.12);
    --gold: #ffb500;
    --lamp: rgb(255 181 0 / 0.07);
    --serif: "Bodoni Moda", "Didot", Georgia, serif;
    --gut: clamp(16px, 3.2vw, 48px);
    padding: 0 0 clamp(32px, 5vw, 72px);
    color: var(--cream);
    font-variant-numeric: lining-nums;
}
.tr a { color: inherit; text-decoration: none; }
.tr a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.tr img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tr-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 700 11px/1 "Lato", sans-serif; letter-spacing: 0.26em; text-transform: uppercase; color: var(--soft); }
.tr-kicker span { color: var(--gold); }
.tr-badge { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 4px 7px 3px; border-radius: 3px; background: rgb(18 17 20 / 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--gold); font: 700 9px/1.2 "Lato", sans-serif; letter-spacing: 0.18em; text-transform: uppercase; }
.tr-badge--free { color: var(--cream); }
.tr-badge--creator { color: #8ee09f; }

/* ── banner: the shop window ────────────────────────────────────────────────────────────── */
.tr-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(28px, 5vw, 88px);
    padding: clamp(36px, 5vw, 72px) var(--gut) clamp(48px, 6vw, 96px);
}
.tr-kicker span:only-child, .tr-banner .tr-kicker span { padding: 4px 8px; border: 1px solid rgb(255 181 0 / 0.45); border-radius: 999px; letter-spacing: 0.2em; }
.tr-banner__title { margin: 0 0 26px; font: 500 clamp(46px, 6.2vw, 104px)/0.96 var(--serif); letter-spacing: -0.02em; }
.tr-banner__title em { font-style: italic; color: var(--gold); }
.tr-banner__lede { max-width: 46ch; margin: 0 0 34px; font: 300 clamp(17px, 1.25vw, 20px)/1.6 "Lato", sans-serif; color: var(--soft); }
.tr-banner__nav { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--faint); }
.tr-banner__nav li { flex: 1 1 140px; border-bottom: 1px solid var(--faint); }
.tr-banner__nav a { display: flex; align-items: baseline; gap: 10px; padding: 16px 16px 16px 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); transition: color 0.3s ease; }
.tr-banner__nav b { font: 500 34px/1 var(--serif); letter-spacing: 0; color: var(--cream); }
.tr-banner__nav a:hover { color: var(--gold); }

.tr-window {
    position: relative;
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 14px;
    margin: 0;
    padding: clamp(18px, 2vw, 28px);
    border: 1px solid var(--faint);
    border-radius: 4px;
    background: radial-gradient(120% 70% at 50% 0%, rgb(255 181 0 / 0.14), transparent 62%), rgb(18 17 20 / 0.42);
    box-shadow: inset 0 1px 0 rgb(255 220 150 / 0.12);
}
.tr-window::before { content: ""; position: absolute; top: 0; left: 18%; right: 18%; height: 1px; background: linear-gradient(90deg, transparent, rgb(255 200 90 / 0.8), transparent); }
.tr-window__main { aspect-ratio: 4 / 5; overflow: hidden; box-shadow: 0 40px 70px -36px rgb(0 0 0 / 0.95); }
.tr-window__side { display: grid; grid-template-rows: 1fr 1fr; gap: 14px; }
.tr-window__side img { box-shadow: 0 30px 50px -30px rgb(0 0 0 / 0.9); filter: brightness(0.82); }
.tr-window__cap { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding-top: 4px; font: italic 500 17px/1.3 var(--serif); color: var(--cream); }
.tr-window__cap span { font: 700 10px/1 "Lato", sans-serif; font-style: normal; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }

/* ── shelves ────────────────────────────────────────────────────────────────────────────── */
.tr-sec { position: relative; padding: clamp(40px, 5vw, 72px) 0 clamp(24px, 3vw, 40px); }
.tr-sec::before { content: ""; position: absolute; inset: 0 0 auto; height: 420px; z-index: -1; background: radial-gradient(60% 100% at 30% 0%, var(--lamp), transparent 70%); pointer-events: none; }
.tr-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; column-gap: clamp(20px, 3vw, 48px); margin: 0 var(--gut) clamp(20px, 2.4vw, 32px); padding-bottom: 18px; border-bottom: 1px solid var(--faint); }
.tr-head .tr-kicker { grid-column: 1 / -1; }
.tr-h2 { margin: 0; font: 500 clamp(44px, 5vw, 80px)/0.9 var(--serif); letter-spacing: -0.02em; }
.tr-head__lede { max-width: 50ch; margin: 0 0 6px; color: var(--soft); line-height: 1.5; }
.tr-head__lede b { color: var(--cream); font-weight: 700; }
.tr-all { margin-bottom: 8px; padding: 10px 18px; border: 1px solid var(--faint); border-radius: 999px; font: 700 12px/1 "Lato", sans-serif; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; transition: border-color 0.3s ease, color 0.3s ease; }
.tr-all::after { content: " →"; letter-spacing: 0; }
.tr-all:hover { border-color: var(--gold); color: var(--gold); }

/* the rails: quiet glass edge zones, a hairline progress with "Column 03–08 / 15" */
.tr-rail {
    --rail-pad: var(--gut);
    --rail-gap: clamp(10px, 1vw, 16px);
    --rail-ui: var(--cream);
    --rail-ui-bg: rgb(18 17 20 / 0.42);
    --rail-ui-rest: 0.22;
    --rail-fade: rgb(18 17 20 / 0.55);
    --rail-line: rgb(244 239 230 / 0.1);
    --rail-thumb: rgb(255 181 0 / 0.7);
    --rail-bar-h: 44px;
}
.tr-rail .rail__track { padding-block: 4px 0; }
.tr-rail .rail__bar { padding-top: 14px; height: var(--rail-bar-h); }
.tr-rail .rail__pos { color: var(--soft); font-size: 11px; }
.tr-rail .rail__pos::before { content: "Column "; letter-spacing: 0.2em; text-transform: uppercase; }
.tr-rail .rail__edge { width: clamp(48px, 7vw, 110px); }
.tr-rail .rail__chev { width: 44px; height: 44px; border: 1px solid rgb(244 239 230 / 0.16); }

/* PARTNERS: two rows of covers, grouped by magazine */
.tr-rail--partners { --rail-card: clamp(150px, 13.5vw, 212px); }
.tr-issue { position: relative; display: block; }
.tr-issue__cover { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: #222126; box-shadow: 0 22px 36px -24px rgb(0 0 0 / 0.95); }
.tr-issue__cover img { transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease; filter: brightness(0.9); }
.tr-issue:hover img, .tr-issue:focus-visible img { transform: scale(1.04); filter: none; }
.tr-issue .tr-badge { opacity: 0; transition: opacity 0.3s ease; }
.tr-issue__no { position: absolute; left: 10px; bottom: 9px; font: 700 10px/1 "Lato", sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream); text-shadow: 0 1px 8px rgb(0 0 0 / 0.8); opacity: 0; transform: translateY(4px); transition: opacity 0.3s ease, transform 0.3s ease; }
.tr-issue:hover .tr-badge, .tr-issue:focus-visible .tr-badge, .tr-issue:hover .tr-issue__no, .tr-issue:focus-visible .tr-issue__no { opacity: 1; transform: none; }
/* a magazine starts: a gold hairline over the cover and the name plate */
.tr-issue--first .tr-issue__cover::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 2; height: 2px; background: var(--gold); }
.tr-plate {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: calc(100% - 16px);
    padding: 8px 10px 7px;
    border-left: 2px solid var(--gold);
    background: rgb(18 17 20 / 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}
.tr-plate b { font: 600 17px/1 var(--serif); color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-plate i { font: 400 9px/1.2 "Lato", sans-serif; font-style: normal; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.tr-issue--first:hover .tr-issue__no { opacity: 0; }

/* FREE: two rows of smaller, compact cards — a thumbnail and the title beside it */
.tr-rail--free { --rail-card: clamp(250px, 21vw, 300px); }
.tr-free { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: end; gap: 0 16px; padding: 10px; border: 1px solid var(--faint); border-radius: 3px; background: rgb(18 17 20 / 0.38); transition: border-color 0.3s ease, background 0.3s ease; }
.tr-free:hover, .tr-free:focus-visible { border-color: rgb(255 181 0 / 0.4); background: rgb(18 17 20 / 0.6); }
.tr-free__pic { position: relative; grid-row: 1 / 4; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 2px; background: #222126; }
.tr-free__pic img { filter: saturate(0.7) brightness(0.85); transition: filter 0.5s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tr-free:hover img, .tr-free:focus-visible img { filter: none; transform: scale(1.05); }
.tr-free .tr-badge { position: static; justify-self: start; align-self: start; margin-bottom: auto; }
.tr-free__name { display: block; font: 500 20px/1.1 var(--serif); }
.tr-free__city { display: block; margin: 6px 0 4px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--soft); }

/* People: one row */
.tr-rail--people { --rail-card: clamp(200px, 17vw, 270px); --rail-gap: clamp(12px, 1.4vw, 22px); }
.tr-person { display: block; }
.tr-person__pic { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; margin-bottom: 14px; border-radius: 2px; background: #222126; box-shadow: 0 30px 50px -32px rgb(0 0 0 / 0.95); }
.tr-person__pic img { transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tr-person:hover img, .tr-person:focus-visible img { transform: scale(1.04); }
.tr-person .tr-badge { left: 8px; right: auto; }
.tr-person__name { display: block; font: 500 clamp(20px, 1.6vw, 24px)/1.1 var(--serif); transition: color 0.3s ease; }
.tr-person:hover .tr-person__name { color: var(--gold); }
.tr-person__role { display: block; margin-top: 6px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); }

/* ── responsive ─────────────────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .tr-banner { grid-template-columns: 1fr; }
    .tr-head { grid-template-columns: 1fr auto; }
    .tr-head__lede { grid-column: 1 / -1; grid-row: 3; margin-top: 12px; }
}
@media (max-width: 560px) {
    .tr-window { grid-template-columns: 1.5fr 1fr; gap: 8px; padding: 12px; }
    .tr-window__side { gap: 8px; }
    .tr-rail--partners { --rail-card: 138px; }
    .tr-rail--free { --rail-card: 236px; }
    .tr-free { grid-template-columns: 76px minmax(0, 1fr); gap: 0 12px; }
    .tr-rail--people { --rail-card: 190px; }
    .tr-plate { padding: 6px 8px 5px; left: 6px; bottom: 6px; }
    .tr-plate b { font-size: 14px; }
    .tr-plate i { font-size: 8px; letter-spacing: 0.1em; }
}
@media (hover: none) {
    .tr-issue .tr-badge { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .tr *, .tr *::before, .tr *::after { transition: none !important; }
}
