/* Teri Levine Art & Design: the shared full-screen gallery menu (3D home and every inner page).
   A dark curtain drops, serif words rise in, and an arched painting changes with each hovered link. */
.tl-menu {
  --tlm-night: #0E1013; --tlm-text: #F4EFE6; --tlm-dim: rgba(244, 239, 230, .62); --tlm-hair: rgba(244, 239, 230, .16);
  --tlm-gold: rgba(196, 154, 78, .75); --tlm-blush: #F2C9D1;
  --tlm-display: "Cormorant", "Cormorant Garamond", Didot, Georgia, serif;
  --tlm-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --tlm-script: "Allura", "Snell Roundhand", "Segoe Script", cursive;
  --tlm-gl: calc(max(16px, env(safe-area-inset-left, 0px)) + clamp(0px, 2vw, 24px));
  --tlm-gr: calc(max(16px, env(safe-area-inset-right, 0px)) + clamp(0px, 2vw, 24px));
  position: fixed; inset: 0; z-index: 90; overflow-y: auto; overscroll-behavior: contain;
  background: var(--tlm-night); color: var(--tlm-text); font-family: var(--tlm-body);
  display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(env(safe-area-inset-top, 0px) + clamp(16px, 2.4vw, 28px)) var(--tlm-gr) calc(env(safe-area-inset-bottom, 0px) + clamp(16px, 2.4vw, 28px)) var(--tlm-gl);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .85s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .85s;
}
.tl-menu.open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .85s cubic-bezier(.7, 0, .2, 1), visibility 0s; }
.tl-menu a { color: inherit; text-decoration: none; }
.tl-menu :focus-visible { outline: 2px solid var(--tlm-blush); outline-offset: 4px; border-radius: 4px; }

/* The hovered painting glows faintly behind everything */
.tlm-bg { position: fixed; inset: -10%; z-index: -1; background: var(--tlm-bg, none) center / cover no-repeat; filter: blur(60px) saturate(1.3) brightness(.32); opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.tl-menu.open .tlm-bg { opacity: .9; }

/* Top bar mirrors the page header: logo left, close pill right */
.tlm-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tlm-brand { display: inline-grid; line-height: 1; }
.tlm-brand .sig { font-family: var(--tlm-script); font-size: clamp(2rem, 3vw, 2.5rem); line-height: .9; }
.tlm-brand .sub { font-size: .62rem; letter-spacing: .32em; text-transform: uppercase; color: var(--tlm-dim); margin-top: 4px; padding-left: 2px; }
.tlm-close {
  display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 8px 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--tlm-hair); background: rgba(244, 239, 230, .06); color: var(--tlm-text);
  font: 500 .68rem/1 var(--tlm-body); letter-spacing: .18em; text-transform: uppercase;
}
.tlm-close:hover { border-color: var(--tlm-text); }
.tlm-close i { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--tlm-text); }
.tlm-close i::before, .tlm-close i::after { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 1.5px; background: var(--tlm-night); transform: rotate(45deg); }
.tlm-close i::after { transform: rotate(-45deg); }

/* Body: big serif links left, arched painting right */
.tlm-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(24px, 5vw, 80px); align-items: center; padding-block: clamp(20px, 4vh, 48px); }
.tlm-main { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(4px, 1.2vh, 14px); }
.tlm-main > li { transition: opacity .35s ease; }
.tlm-main:hover > li:not(:hover), .tlm-main:focus-within > li:not(:focus-within) { opacity: .32; }
.tlm-link { position: relative; display: inline-flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.tlm-clip { display: inline-block; overflow: hidden; padding: .04em .02em .02em; }
.tlm-word {
  display: inline-block; position: relative;
  font-family: var(--tlm-display); font-weight: 300; text-transform: uppercase; letter-spacing: -.005em;
  font-variant-numeric: lining-nums; /* full-height "3" in "3D" */
  font-size: clamp(2.6rem, min(7.4vw, 10.5vh), 6.2rem); line-height: .92;
  transform: translateY(110%); transition: transform .95s cubic-bezier(.16, .8, .14, 1), letter-spacing .5s ease;
  transition-delay: 0s;
}
.tl-menu.open .tlm-word { transform: none; transition-delay: calc(.3s + var(--d) * .07s), 0s; }
.tlm-word::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: 1px; background: var(--tlm-gold); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.tlm-link:hover .tlm-word, .tlm-link:focus-visible .tlm-word { letter-spacing: .02em; }
.tlm-link:hover .tlm-word::after, .tlm-link:focus-visible .tlm-word::after { transform: scaleX(1); }
.tlm-link em { font-family: var(--tlm-display); font-size: clamp(1rem, 1.5vw, 1.3rem); color: var(--tlm-dim); opacity: 0; transform: translateX(-8px); transition: opacity .4s ease, transform .4s ease; }
.tlm-link:hover em, .tlm-link:focus-visible em { opacity: 1; transform: none; }
/* Current page: a dot hung in the margin, so every word keeps the same left edge */
.tlm-link[aria-current="page"]::before { content: ""; position: absolute; left: -16px; top: .46em; width: 7px; height: 7px; border-radius: 50%; background: var(--tlm-blush); font-size: clamp(2.6rem, min(7.4vw, 10.5vh), 6.2rem); transform: translateY(-50%); }
.tlm-sub { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 6px 0 4px 2px; opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; }
.tl-menu.open .tlm-sub { opacity: 1; transform: none; transition-delay: calc(.55s + var(--d) * .07s); }
.tlm-sub a { font-size: .74rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--tlm-dim); padding: 4px 0; position: relative; }
.tlm-sub a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.tlm-sub a:hover, .tlm-sub a:focus-visible, .tlm-sub a[aria-current="page"] { color: var(--tlm-text); }
.tlm-sub a:hover::after, .tlm-sub a:focus-visible::after { transform: scaleX(1); }

/* Painting column sits on the right edge, in line with the Close button and the contact links */
.tlm-aside { justify-self: end; width: min(100%, 340px); display: grid; justify-items: center; gap: 18px; opacity: 0; transform: translateY(20px); transition: opacity .8s ease .45s, transform .8s ease .45s; }
.tl-menu.open .tlm-aside { opacity: 1; transform: none; }
.tlm-arch {
  position: relative; margin: 11px 11px 0; width: min(calc(100% - 22px), 320px, 46vh); aspect-ratio: 3 / 4;
  border-radius: 999px 999px 0 0; overflow: hidden; border: 1px solid var(--tlm-gold);
  box-shadow: 0 0 0 10px var(--tlm-night), 0 0 0 11px rgba(196, 154, 78, .35), 0 40px 80px -30px rgba(0, 0, 0, .8);
  background: #171A1F;
}
.tlm-arch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity .6s ease, transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.tlm-arch img.on { opacity: 1; transform: scale(1); }
.tlm-arch figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 44px 18px 14px; background: linear-gradient(transparent, rgba(14, 16, 19, .85)); font-family: var(--tlm-display); font-style: italic; font-size: 1.1rem; text-align: center; }
.tlm-quote { max-width: 30ch; text-align: center; font-family: var(--tlm-display); font-style: italic; font-size: 1.05rem; line-height: 1.35; color: var(--tlm-dim); }

/* Foot: themed collections and contact */
.tlm-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 40px; padding-top: 18px; border-top: 1px solid var(--tlm-hair); opacity: 0; transition: opacity .8s ease .6s; }
.tl-menu.open .tlm-foot { opacity: 1; }
.tlm-themes { display: grid; gap: 8px; min-width: 0; }
.tlm-label { font-size: .64rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--tlm-blush); }
.tlm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tlm-chips a { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--tlm-hair); font-size: .78rem; color: var(--tlm-dim); transition: border-color .2s ease, color .2s ease; }
.tlm-chips a:hover, .tlm-chips a:focus-visible { border-color: var(--tlm-text); color: var(--tlm-text); }
.tlm-contact { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; margin-left: auto; font-size: .86rem; color: var(--tlm-dim); }
.tlm-contact a:hover { color: var(--tlm-text); text-decoration: underline; text-underline-offset: 4px; }

/* The "Menu" pill used in every header */
.tlm-open {
  display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 8px 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(244, 239, 230, .38); background: rgba(14, 16, 19, .25); color: #F4EFE6;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 500 .68rem/1 "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; letter-spacing: .18em; text-transform: uppercase;
  transition: background-color .2s ease, border-color .2s ease;
}
.tlm-open:hover { border-color: #F4EFE6; background: rgba(244, 239, 230, .12); }
.tlm-open i { position: relative; width: 26px; height: 26px; border-radius: 50%; background: #F4EFE6; }
.tlm-open i::before, .tlm-open i::after { content: ""; position: absolute; left: 7px; right: 7px; height: 1.5px; background: #0E1013; transition: transform .3s ease; }
.tlm-open i::before { top: 10px; }
.tlm-open i::after { top: 15px; right: 10px; }
.tlm-open:hover i::after { transform: translateX(3px); }

@media (max-width: 860px) {
  .tlm-body { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .tlm-aside { display: none; }
  .tlm-link em { display: none; }
  .tlm-word { font-size: clamp(2.4rem, 12vw, 4rem); }
}
@media (max-width: 520px) {
  .tlm-open span, .tlm-close span { display: none; }
  .tlm-open, .tlm-close { padding: 0 6px; width: 40px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-menu, .tlm-word, .tlm-sub, .tlm-aside, .tlm-foot, .tlm-arch img, .tlm-bg { transition: none !important; }
}
