/* TG EVENTS MIDDLE - WP Coder build - CSS tab */
/* ============================================================
   ENDLESS EVENTS PAGE - middle section
   Sits between the parallax hero (fixed canvas at z-index -1)
   and the ENDLESS instant-quote widget.
   Theme: white, black, film grain, industrial minimalism.
   Accent: Tesla Blue #3E6AE1. Hard 2px corners. Helvetica.
   No blank lines inside this file (wpautop safety convention).
   ============================================================ */
.tgm-events {
    --tgm-bg: #ffffff;
    --tgm-text: #0b0b0b;
    --tgm-muted: #5f5f5f;
    --tgm-dim: #9a9a9a;
    --tgm-line: rgba(0, 0, 0, 0.12);
    --tgm-line-strong: rgba(0, 0, 0, 0.30);
    --tgm-blue: #3E6AE1;
    --tgm-blue-soft: rgba(62, 106, 225, 0.10);
    --tgm-font: "Haas Grot Text Trial", "Helvetica Neue", "Inter", -apple-system, Arial, sans-serif;
    --tgm-disp: "Haas Grot Disp Trial", "Haas Grot Text Trial", "Helvetica Neue", "Inter", -apple-system, Arial, sans-serif;
    --tgm-mono: "SF Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
    --tgm-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 2;
    background: var(--tgm-bg);
    color: var(--tgm-text);
    font-family: var(--tgm-font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: clip;
}
.tgm-events *, .tgm-events *::before, .tgm-events *::after { box-sizing: border-box; }
.tgm-events a { color: inherit; }
.tgm-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(72px, 11vw, 150px) clamp(20px, 4vw, 48px) 0;
}
/* ---------- Mono kicker label ---------- */
.tgm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--tgm-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--tgm-muted);
    margin-bottom: clamp(28px, 4vw, 52px);
}
.tgm-kicker-dot {
    width: 8px;
    height: 8px;
    background: var(--tgm-blue);
    flex: none;
    animation: tgm-blink 2.6s steps(1) infinite;
}
@keyframes tgm-blink {
    0%, 78%, 100% { opacity: 1; }
    82%, 88% { opacity: 0.25; }
}
/* ---------- Display typography ---------- */
.tgm-display {
    margin: 0;
    font-family: var(--tgm-disp);
    font-size: clamp(44px, 9.6vw, 124px);
    font-weight: 700;
    line-height: 0.94;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}
.tgm-display-sm { font-size: clamp(38px, 7vw, 92px); }
.tgm-display .tgm-blue { font-style: normal; color: var(--tgm-blue); }
.tgm-outline {
    color: transparent;
    -webkit-text-stroke: 2px var(--tgm-text);
    transition: color 0.5s var(--tgm-ease), -webkit-text-stroke-color 0.5s var(--tgm-ease);
}
.tgm-outline:hover {
    color: var(--tgm-blue);
    -webkit-text-stroke-color: var(--tgm-blue);
}
/* Line-mask reveal: each line slides up out of its own crop */
.tgm-line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.tgm-line-inner {
    display: inline-block;
    transform: translateY(115%);
    transition: transform 1.1s var(--tgm-ease);
    will-change: transform;
}
.tgm-in .tgm-line:nth-child(1) .tgm-line-inner { transition-delay: 0s; }
.tgm-in .tgm-line:nth-child(2) .tgm-line-inner { transition-delay: 0.09s; }
.tgm-in .tgm-line:nth-child(3) .tgm-line-inner { transition-delay: 0.18s; }
.tgm-in .tgm-line:nth-child(4) .tgm-line-inner { transition-delay: 0.27s; }
.tgm-in .tgm-line-inner { transform: translateY(0); }
/* ---------- Generic scroll reveal ---------- */
.tgm-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--tgm-ease), transform 0.9s var(--tgm-ease);
    will-change: opacity, transform;
}
.tgm-reveal.tgm-in { opacity: 1; transform: translateY(0); }
/* ---------- Manifesto header row: kicker + language toggle ---------- */
.tgm-manifesto-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: clamp(28px, 4vw, 52px);
}
.tgm-manifesto-top .tgm-kicker { margin-bottom: 0; }
.tgm-lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--tgm-mono);
}
.tgm-lang-btn {
    appearance: none;
    background: none;
    border: 1px solid transparent;
    border-radius: 2px;
    padding: 4px 8px;
    font-family: var(--tgm-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--tgm-dim);
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.tgm-lang-btn:hover { color: var(--tgm-text); }
.tgm-lang-btn.tgm-lang-active {
    color: var(--tgm-blue);
    border-color: var(--tgm-blue);
    background: var(--tgm-blue-soft);
}
.tgm-lang-btn:focus-visible { outline: 2px solid var(--tgm-blue); outline-offset: 2px; }
.tgm-lang-sep { color: var(--tgm-line-strong); font-size: 11px; }
/* ---------- Manifesto ---------- */
.tgm-manifesto-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-top: clamp(36px, 5vw, 64px);
    padding-top: 28px;
    border-top: 1px solid var(--tgm-line);
}
.tgm-sub {
    margin: 0;
    max-width: 46ch;
    font-size: clamp(15px, 1.6vw, 18px);
    color: var(--tgm-muted);
}
.tgm-stats {
    display: flex;
    gap: clamp(24px, 4vw, 56px);
    list-style: none;
    margin: 0;
    padding: 0;
}
.tgm-stats li { display: flex; flex-direction: column; gap: 2px; }
.tgm-stats strong {
    font-family: var(--tgm-disp);
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.tgm-stats span {
    font-family: var(--tgm-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--tgm-dim);
    white-space: nowrap;
}
/* ---------- LIFE / LOVE / MEDIA index ---------- */
.tgm-index { padding-bottom: 0; }
.tgm-index-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.tgm-index-hint {
    font-family: var(--tgm-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--tgm-dim);
}
.tgm-row {
    position: relative;
    display: grid;
    grid-template-columns: 3.2em 1fr auto 44px;
    align-items: center;
    gap: clamp(14px, 3vw, 36px);
    padding: clamp(22px, 3.4vw, 40px) clamp(10px, 1.6vw, 20px);
    border-top: 1px solid var(--tgm-line-strong);
    text-decoration: none;
    isolation: isolate;
    cursor: pointer;
}
.tgm-row:last-of-type { border-bottom: 1px solid var(--tgm-line-strong); }
.tgm-row::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #0b0b0b;
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 0.5s var(--tgm-ease);
    z-index: -1;
}
.tgm-row:hover::before, .tgm-row:focus-visible::before { transform: scaleY(1); transform-origin: bottom center; }
.tgm-row-idx {
    font-family: var(--tgm-mono);
    font-size: clamp(11px, 1.2vw, 13px);
    letter-spacing: 0.14em;
    color: var(--tgm-dim);
    transition: color 0.35s ease;
}
.tgm-row-word {
    font-family: var(--tgm-disp);
    font-size: clamp(42px, 7.6vw, 96px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    transition: color 0.35s ease, transform 0.5s var(--tgm-ease);
}
.tgm-row-tags {
    font-family: var(--tgm-mono);
    font-size: clamp(10px, 1.1vw, 12px);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tgm-muted);
    text-align: right;
    max-width: 30ch;
    transition: color 0.35s ease;
}
.tgm-row-arrow {
    width: 34px;
    height: 34px;
    border: 1px solid var(--tgm-line-strong);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.35s ease, background 0.35s ease, transform 0.5s var(--tgm-ease);
}
.tgm-row-arrow svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.4s var(--tgm-ease);
}
.tgm-row:hover .tgm-row-idx { color: var(--tgm-blue); }
.tgm-row:hover .tgm-row-word { color: #ffffff; transform: translateX(clamp(6px, 1.4vw, 18px)); }
.tgm-row:hover .tgm-row-tags { color: rgba(255, 255, 255, 0.72); }
.tgm-row:hover .tgm-row-arrow { border-color: var(--tgm-blue); background: var(--tgm-blue); color: #ffffff; transform: rotate(45deg); }
.tgm-row:focus-visible { outline: 2px solid var(--tgm-blue); outline-offset: -2px; }
.tgm-row:focus-visible .tgm-row-word { color: #ffffff; }
/* Floating image peek that trails the cursor over the index */
.tgm-peek {
    position: fixed;
    top: 0;
    left: 0;
    width: min(300px, 26vw);
    aspect-ratio: 3 / 4;
    z-index: 9990;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) rotate(-2deg);
    transition: opacity 0.35s ease, transform 0.5s var(--tgm-ease);
    overflow: hidden;
    background: #101010;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.tgm-peek.tgm-peek-on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
.tgm-peek img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.06);
    display: block;
}
.tgm-peek-caption {
    position: absolute;
    left: 10px;
    bottom: 8px;
    font-family: var(--tgm-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}
@media (hover: none), (pointer: coarse) {
    .tgm-peek { display: none; }
}
/* ---------- Rates ledger ---------- */
.tgm-ledger { border-top: 1px solid var(--tgm-line-strong); }
.tgm-ledger-row {
    display: flex;
    align-items: baseline;
    gap: clamp(14px, 2.4vw, 28px);
    padding: clamp(18px, 2.6vw, 30px) clamp(4px, 1vw, 12px);
    border-bottom: 1px solid var(--tgm-line);
    transition: background 0.3s ease, padding 0.4s var(--tgm-ease);
}
.tgm-ledger-row:hover { background: var(--tgm-blue-soft); padding-left: clamp(12px, 2vw, 24px); }
.tgm-ledger-name {
    font-family: var(--tgm-disp);
    font-size: clamp(19px, 2.6vw, 30px);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}
.tgm-ledger-fill {
    flex: 1;
    border-bottom: 1px dotted var(--tgm-line-strong);
    transform: translateY(-0.35em);
}
.tgm-ledger-price { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.tgm-ledger-price strong {
    font-family: var(--tgm-disp);
    font-size: clamp(24px, 3.2vw, 40px);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.tgm-ledger-row:hover .tgm-ledger-price strong { color: var(--tgm-blue); }
.tgm-ledger-price em {
    font-style: normal;
    font-family: var(--tgm-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tgm-dim);
}
.tgm-note {
    margin: 22px 0 0;
    font-family: var(--tgm-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--tgm-muted);
    max-width: 62ch;
}
/* ---------- Staircase process (the Endless nod) ---------- */
.tgm-stairlist {
    --tgm-step: clamp(28px, 4.5vw, 64px);
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(16px, 2.4vw, 32px);
    align-items: start;
}
.tgm-stair {
    border-top: 3px solid var(--tgm-text);
    padding: 18px 4px 0;
    position: relative;
}
/* Treads step down by margin-top, so the rise between every stair
   is identical no matter how long each stair's text runs. */
.tgm-stair:nth-child(1) { margin-top: calc(var(--tgm-step) * 3); }
.tgm-stair:nth-child(2) { margin-top: calc(var(--tgm-step) * 2); }
.tgm-stair:nth-child(3) { margin-top: var(--tgm-step); }
.tgm-stair:nth-child(4) { margin-top: 0; }
.tgm-stair:nth-child(4) { border-top-color: var(--tgm-blue); }
.tgm-stair::before {
    content: "";
    position: absolute;
    top: -3px;
    right: 100%;
    width: clamp(16px, 2.4vw, 32px);
    height: var(--tgm-step);
    border-right: 3px solid var(--tgm-text);
    display: none;
}
.tgm-stair:nth-child(n+2)::before { display: block; }
.tgm-stair:nth-child(4)::before { border-right-color: var(--tgm-blue); }
.tgm-stair-idx {
    font-family: var(--tgm-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--tgm-dim);
    display: block;
    margin-bottom: 10px;
}
.tgm-stair h3 {
    margin: 0 0 10px;
    font-family: var(--tgm-disp);
    font-size: clamp(17px, 1.9vw, 23px);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    line-height: 1.1;
}
.tgm-stair p {
    margin: 0;
    font-size: clamp(13px, 1.3vw, 15px);
    color: var(--tgm-muted);
}
/* ---------- Marquee band ---------- */
.tgm-marquee {
    margin-top: clamp(80px, 12vw, 160px);
    background: #0b0b0b;
    color: #ffffff;
    overflow: hidden;
    padding: clamp(20px, 3vw, 34px) 0;
    transform: rotate(-1.2deg) scale(1.02);
}
/* Top variant: the divider between the parallax hero and the page */
.tgm-marquee-top {
    margin-top: 0;
    margin-bottom: clamp(8px, 1.5vw, 20px);
    background: #0b0b0b;
    color: #ffffff;
    overflow: hidden;
    padding: clamp(20px, 3vw, 34px) 0;
    transform: rotate(-1.2deg) scale(1.02);
}
.tgm-marquee-track {
    display: flex;
    width: max-content;
    animation: tgm-marquee 26s linear infinite;
    will-change: transform;
}
.tgm-marquee-chunk {
    font-family: var(--tgm-disp);
    font-size: clamp(22px, 3.4vw, 42px);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    padding-right: 0.6em;
}
.tgm-marquee-chunk i {
    font-style: normal;
    color: var(--tgm-blue);
    font-size: 0.55em;
    vertical-align: 0.25em;
    padding: 0 0.5em;
}
@keyframes tgm-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.tgm-marquee:hover .tgm-marquee-track { animation-play-state: paused; }
/* ---------- Quote lead-in ---------- */
.tgm-quote-head {
    text-align: center;
    padding-bottom: clamp(56px, 8vw, 110px);
    scroll-margin-top: 40px;
}
.tgm-quote-head .tgm-kicker { justify-content: center; }
.tgm-down {
    display: inline-flex;
    margin-top: clamp(28px, 4vw, 48px);
    width: 52px;
    height: 52px;
    border: 1px solid var(--tgm-line-strong);
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    animation: tgm-bob 2.4s var(--tgm-ease) infinite;
}
.tgm-down svg {
    width: 15px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@keyframes tgm-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(9px); }
}
/* ---------- Page-level custom cursor ---------- */
.tgm-cursor-dot, .tgm-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147483100;
    pointer-events: none;
    border-radius: 50%;
    mix-blend-mode: difference;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.tgm-cursor-dot {
    width: 6px;
    height: 6px;
    background: #ffffff;
    transform: translate(-50%, -50%);
}
.tgm-cursor-ring {
    width: 34px;
    height: 34px;
    border: 1px solid #ffffff;
    transform: translate(-50%, -50%);
    transition: opacity 0.25s ease, width 0.3s var(--tgm-ease), height 0.3s var(--tgm-ease), border-color 0.3s ease, background 0.3s ease;
}
body.tgm-cursor-visible .tgm-cursor-dot, body.tgm-cursor-visible .tgm-cursor-ring { opacity: 1; }
body.tgm-cursor-visible.tgm-cursor-parked .tgm-cursor-dot, body.tgm-cursor-visible.tgm-cursor-parked .tgm-cursor-ring { opacity: 0; }
.tgm-cursor-ring.tgm-cursor-hover {
    width: 56px;
    height: 56px;
    border-color: #3E6AE1;
    mix-blend-mode: normal;
    background: rgba(62, 106, 225, 0.08);
}
.tgm-cursor-ring.tgm-cursor-down { width: 26px; height: 26px; }
@media (hover: none), (pointer: coarse) {
    .tgm-cursor-dot, .tgm-cursor-ring { display: none; }
}
/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .tgm-manifesto-foot { flex-direction: column; align-items: flex-start; gap: 28px; }
    .tgm-stats { flex-wrap: wrap; gap: 20px 32px; max-width: 100%; }
    .tgm-row { grid-template-columns: 2.4em 1fr 34px; }
    .tgm-row-tags { display: none; }
    .tgm-stairlist { grid-template-columns: 1fr 1fr; align-items: start; }
    .tgm-stair { margin-bottom: 0 !important; }
    .tgm-stair::before { display: none !important; }
    .tgm-stair p { max-width: none; }
}
@media (max-width: 520px) {
    .tgm-stairlist { grid-template-columns: 1fr; }
    .tgm-index-hint { display: none; }
}
/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .tgm-line-inner, .tgm-reveal { transition: none !important; transform: none !important; opacity: 1 !important; }
    .tgm-marquee-track { animation: none; }
    .tgm-down { animation: none; }
    .tgm-kicker-dot { animation: none; }
    .tgm-peek { display: none; }
    .tgm-cursor-dot, .tgm-cursor-ring { display: none; }
}
/* ============================================================
   EMBEDDED PHOTO GALLERY (events wall) - scoped to #tg-gallery.
   Ported from the ENDLESS GALLERY widget, events tab only.
   ============================================================ */
/* ============================================================
   THOMAS GARDEA — ENDLESS GALLERY  (WP Coder: CSS tab)
   Theme: white-on-white brutalist minimalism, film grain,
   staircase motif — inspired by the Endless cover art.
   Everything is scoped under #tg-gallery so it can't collide
   with the WordPress theme.
   ============================================================ */
#tg-gallery {
    --tg-ink: #0a0a0a;
    --tg-paper: #ffffff;
    --tg-gray: #8a8a8a;
    --tg-line: #e6e6e6;
    --tg-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 40px);
    box-sizing: border-box;
    background: var(--tg-paper);
    color: var(--tg-ink);
    font-family: var(--tg-font);
    overflow: hidden;
}
#tg-gallery *,
#tg-gallery *::before,
#tg-gallery *::after { box-sizing: border-box; }
/* Film-grain overlay across the whole widget (the Endless texture) */
#tg-gallery::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 60;
    opacity: 0.5;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Hide the native cursor when the custom cursor is running (desktop only) */
@media (pointer: fine) {
    #tg-gallery.tg-has-cursor,
    #tg-gallery.tg-has-cursor * { cursor: none !important; }
}
/* ================= HEADER ================= */
#tg-gallery .tg-head {
    padding: 8px 0 20px;
}
#tg-gallery .tg-eyebrow {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--tg-gray);
}
#tg-gallery .tg-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}
#tg-gallery .tg-title {
    margin: 0;
    font-size: clamp(44px, 8vw, 104px);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: var(--tg-ink);
}
#tg-gallery .tg-title-ghost {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--tg-ink);
}
/* "Switch to Video" button — hidden until the tg-show-videobtn
   switch is added to the #tg-gallery class list in the HTML */
#tg-gallery .tg-video-btn {
    display: none;
    align-items: center;
    padding: 15px 28px;
    background: var(--tg-ink);
    color: var(--tg-paper);
    border: 1px solid var(--tg-ink);
    border-radius: 999px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    white-space: nowrap;
    flex: none;
    transition: background 0.3s ease, color 0.3s ease;
}
#tg-gallery.tg-show-videobtn .tg-video-btn { display: inline-flex; }
#tg-gallery .tg-video-btn:hover {
    background: var(--tg-paper);
    color: var(--tg-ink);
}
/* Option switches (set on the #tg-gallery class list in the HTML) */
#tg-gallery.tg-hide-caption .tg-preview-caption { display: none; }
#tg-gallery.tg-hide-count .tg-tab-count { display: none; }
#tg-gallery .tg-sub {
    margin: 14px 0 0;
    max-width: 520px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--tg-gray);
}
/* ================= TICKER ================= */
#tg-gallery .tg-ticker {
    overflow: hidden;
    border-top: 1px solid var(--tg-ink);
    border-bottom: 1px solid var(--tg-ink);
    padding: 9px 0;
    margin: 18px 0 0;
    white-space: nowrap;
}
#tg-gallery .tg-ticker-track {
    display: inline-flex;
    animation: tg-ticker 28s linear infinite;
}
#tg-gallery .tg-ticker-track span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--tg-ink);
    padding-right: 8px;
}
@keyframes tg-ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
/* ================= TABS ================= */
#tg-gallery .tg-tabs {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: clamp(18px, 4vw, 56px);
    margin: 0 0 26px;
    border-bottom: 1px solid var(--tg-line);
    overflow-x: auto;
    scrollbar-width: none;
}
#tg-gallery .tg-tabs::-webkit-scrollbar { display: none; }
#tg-gallery .tg-tab {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 22px 2px 18px;
    background: none;
    border: none;
    font-family: var(--tg-font);
    color: var(--tg-gray);
    cursor: pointer;
    flex: none;
    transition: color 0.35s ease;
    -webkit-tap-highlight-color: transparent;
}
#tg-gallery .tg-tab-num {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    transform: translateY(-8px);
    color: inherit;
    opacity: 0.65;
}
/* Dual-label roll-up on hover */
#tg-gallery .tg-tab-text {
    display: block;
    position: relative;
    overflow: hidden;
    height: 1.05em;
    font-size: clamp(19px, 2.6vw, 30px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
#tg-gallery .tg-tab-text span {
    display: block;
    transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1);
}
#tg-gallery .tg-tab:hover .tg-tab-text span,
#tg-gallery .tg-tab:focus-visible .tg-tab-text span {
    transform: translateY(-100%);
}
#tg-gallery .tg-tab-count {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    transform: translateY(-8px);
    min-width: 2ch;
    opacity: 0.65;
}
#tg-gallery .tg-tab.is-active { color: var(--tg-ink); }
#tg-gallery .tg-tab:focus-visible {
    outline: 2px solid var(--tg-ink);
    outline-offset: -2px;
}
/* Sliding ink bar under the active tab (positioned by JS) */
#tg-gallery .tg-tab-ink {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--tg-ink);
    transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1),
                width 0.55s cubic-bezier(0.76, 0, 0.24, 1);
}
/* ================= PANELS ================= */
#tg-gallery .tg-panel { display: none; }
#tg-gallery .tg-panel.is-active {
    display: block;
    animation: tg-panel-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes tg-panel-in {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* ================= GALLERY (3D torus engine — layout kept intact) ================= */
#tg-gallery .gallery-instance-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    margin: 0 auto;
    background: var(--tg-paper);
    overflow-x: hidden;
    box-sizing: border-box;
    gap: clamp(16px, 2.5vw, 32px);
}
#tg-gallery .gallery-container {
    position: relative;
    flex: 1;
    width: 60%;
    height: 62vh;
    min-height: 420px;
    background: var(--tg-paper);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 1000px;
    border: 1px solid var(--tg-ink);
    border-radius: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
    cursor: grab;
}
/* Soft white vignette so the wall fades at the frame edges */
#tg-gallery .gallery-container::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    background:
        linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0) 12%, rgba(255,255,255,0) 88%, rgba(255,255,255,0.9)),
        linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0) 14%, rgba(255,255,255,0) 86%, rgba(255,255,255,0.9));
}
#tg-gallery .white-wall-scene,
#tg-gallery .white-wall {
    position: relative;
    transform-style: preserve-3d;
}
#tg-gallery .ww-item {
    position: absolute;
    width: 300px;
    height: 220px;
    top: -110px;
    left: -150px;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    border: 6px solid var(--tg-paper);
    background: var(--tg-paper);
    box-sizing: border-box;
    transition: border-radius 0.3s ease;
}
#tg-gallery .ww-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    border-radius: 0;
    transition: border-radius 0.3s ease, filter 0.4s ease;
}
#tg-gallery .ww-item.active {
    border-radius: 40px;
    z-index: 10;
}
#tg-gallery .ww-item.active img {
    border-radius: 30px;
}
/* Corner tag inside the frame */
#tg-gallery .tg-container-tag {
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--tg-gray);
    pointer-events: none;
}
/* ================= INTRO HINT OVERLAY ================= */
#tg-gallery .tg-hint {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    opacity: 1;
    transition: opacity 0.6s ease;
}
#tg-gallery .tg-hint.is-hidden {
    opacity: 0;
    pointer-events: none;
}
#tg-gallery .tg-hint-card {
    text-align: center;
    padding: 24px;
    max-width: 380px;
    animation: tg-hint-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes tg-hint-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* 3-axis gyroscope diagram */
#tg-gallery .tg-hint-gyro {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 22px;
    transform-style: preserve-3d;
    perspective: 500px;
}
#tg-gallery .tg-gyro-ring {
    position: absolute;
    inset: 0;
    border: 1.5px dashed var(--tg-ink);
    border-radius: 50%;
}
#tg-gallery .tg-gyro-x {
    animation: tg-gyro-x 5s linear infinite;
}
#tg-gallery .tg-gyro-y {
    animation: tg-gyro-y 7s linear infinite;
}
@keyframes tg-gyro-x {
    from { transform: rotateX(72deg) rotateZ(0deg); }
    to   { transform: rotateX(72deg) rotateZ(360deg); }
}
@keyframes tg-gyro-y {
    from { transform: rotateY(72deg) rotateZ(0deg); }
    to   { transform: rotateY(72deg) rotateZ(-360deg); }
}
#tg-gallery .tg-gyro-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--tg-ink);
    animation: tg-gyro-dot 3.2s ease-in-out infinite;
}
@keyframes tg-gyro-dot {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(26px, -14px); }
    50%  { transform: translate(0, 16px); }
    75%  { transform: translate(-26px, -10px); }
    100% { transform: translate(0, 0); }
}
#tg-gallery .tg-hint-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--tg-ink);
}
#tg-gallery .tg-hint-copy {
    margin: 0 0 22px;
    font-size: 13.5px;
    line-height: 1.65;
    color: #4a4a4a;
}
#tg-gallery .tg-hint-copy em { font-style: italic; }
#tg-gallery .tg-hint-btn {
    display: inline-block;
    padding: 13px 30px;
    background: var(--tg-ink);
    color: var(--tg-paper);
    border: 1px solid var(--tg-ink);
    font-family: var(--tg-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}
#tg-gallery .tg-hint-btn:hover {
    background: var(--tg-paper);
    color: var(--tg-ink);
}
/* ================= PREVIEW WIDGET ================= */
#tg-gallery .selection-widget {
    width: 35%;
    max-width: 480px;
    padding: 0;
    background: var(--tg-paper);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
#tg-gallery .tg-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 2px 2px 12px;
}
#tg-gallery .tg-preview-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--tg-ink);
}
#tg-gallery .tg-preview-counter {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--tg-gray);
    font-variant-numeric: tabular-nums;
}
#tg-gallery .selected-image-container {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--tg-ink);
    border-radius: 0;
    overflow: hidden;
    background: #f4f4f4;
    cursor: pointer;
}
#tg-gallery .selected-image-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Blocks the browser's hover/long-press image tools
       (visual search, lens, save menu) on the preview */
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
#tg-gallery .tg-preview-ghost { z-index: 1; }
#tg-gallery .active-image-display { z-index: 2; }
/* Crossfade + settle whenever a new photo lands in focus */
#tg-gallery .selected-image-container.is-fading .active-image-display {
    animation: tg-preview-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes tg-preview-in {
    from { opacity: 0; transform: scale(1.045); }
    to   { opacity: 1; transform: scale(1); }
}
#tg-gallery .expand-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    width: auto;
    height: auto;
    background: rgba(10, 10, 10, 0.85);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--tg-font);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}
#tg-gallery .expand-btn:hover {
    background: #000;
    transform: translateY(-2px);
}
#tg-gallery .tg-preview-caption {
    margin: 14px 2px 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--tg-ink);
    min-height: 1.4em;
}
#tg-gallery .tg-preview-note {
    margin: 6px 2px 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--tg-gray);
}
/* ================= FULLSCREEN MODAL (injected by JS, lives on body) ================= */
.tg-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 6, 0.96);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.tg-modal.open {
    display: flex;
    animation: tg-modal-in 0.35s ease both;
}
@keyframes tg-modal-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.tg-modal-figure {
    margin: 0;
    max-width: 92%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.tg-modal-image {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.25);
    animation: tg-modal-img 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
@keyframes tg-modal-img {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
.tg-modal-caption {
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}
.tg-modal-close {
    position: absolute;
    top: 22px;
    right: 26px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: #fff;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
    z-index: 100000;
}
.tg-modal-close:hover {
    background: #fff;
    color: #000;
}
/* ================= CUSTOM CURSOR (injected by JS, lives on body) ================= */
.tg-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.tg-cursor.is-on { opacity: 1; }
.tg-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 7px;
    height: 7px;
    margin: -3.5px 0 0 -3.5px;
    border-radius: 50%;
    background: #0a0a0a;
}
.tg-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border: 1.5px solid #0a0a0a;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                margin 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.3s ease;
}
.tg-cursor-label {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}
/* Ring grows and fills black when hovering something interactive */
.tg-cursor.has-label .tg-cursor-ring {
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
    background: #0a0a0a;
}
.tg-cursor.has-label .tg-cursor-label { opacity: 1; }
.tg-cursor.is-down .tg-cursor-ring {
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
}
.tg-cursor.is-down.has-label .tg-cursor-ring {
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
}
/* ================= MOBILE ================= */
@media (max-width: 900px) {
    #tg-gallery .gallery-instance-wrapper {
        flex-direction: column;
    }
    #tg-gallery .gallery-container {
        /* flex:1 comes from the desktop row layout; in the stacked column
           layout it collapses the height, so reset it here */
        flex: none;
        width: 100%;
        height: 56vh;
        min-height: 380px;
    }
    /* Note: the wall's zoom level is set responsively by JS (fitScene)
       so the torus always fills the frame on narrow screens. */
    #tg-gallery .selection-widget {
        width: 100%;
        max-width: 100%;
        margin-top: 22px;
    }
    #tg-gallery .tg-head-row { align-items: center; flex-wrap: wrap; }
    #tg-gallery .tg-tab { padding: 16px 2px 14px; }
    #tg-gallery .tg-hint-card { max-width: 300px; }
    #tg-gallery .tg-hint-copy { font-size: 12.5px; }
}
/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    #tg-gallery .tg-ticker-track,
    #tg-gallery .tg-gyro-x,
    #tg-gallery .tg-gyro-y,
    #tg-gallery .tg-gyro-dot { animation: none; }
}
/* ---------- SEO helpers ---------- */
.tgm-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}
.tgm-events script { display: none !important; }
