/* The studios globe on /contacts (29.10.2026). Reads the site's own tokens:
   graphite ground, one scarlet, Alegreya Sans for the large words, Wix Madefor
   Text for the rest, the micro-caps 11/600/.16em. No boxes: the pickers are
   lines, the card is type on the page. Only the copy chip is round, because it
   is the only thing here you press that is not a link. */
@layer components {
  /* The first screen of the page, straight under the menu: the globe is its
     ground, the pickers and the card stand on it at the left. */
  .studios {
    position: relative; isolation: isolate;
    display: flex; align-items: center;
    min-height: calc(100svh - 3.5rem);
    padding: clamp(2.5rem, 6vh, 5rem) var(--gutter);
    overflow: hidden;
  }
  /* the copy side is darkened so the type reads over the dots */
  .studios::before {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, var(--void) 0%, rgb(23 24 27 / .82) 26%, rgb(23 24 27 / 0) 52%),
                linear-gradient(0deg, var(--void) 0%, rgb(23 24 27 / 0) 18%);
  }
  .studios-copy { position: relative; z-index: 2; width: min(34rem, 100%); }
  .studios-title {
    font-family: var(--font-display); font-weight: 800;
    font-size: var(--t-h2); line-height: .95; letter-spacing: -.01em;
    margin: 0 0 clamp(1.75rem, 3.5vw, 2.75rem);
  }

  /* ---- pickers --------------------------------------------------------- */
  .studios-picks { display: grid; gap: clamp(1rem, 2vw, 1.4rem); }
  .pick { position: relative; }
  .pick-label {
    display: block; margin-bottom: .35rem;
    font-size: var(--t-micro); font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink-3);
  }
  .pick-btn {
    all: unset; box-sizing: border-box; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    width: 100%; min-height: 3.6rem; padding: .35rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(1.35rem, 2.1vw, 1.85rem); line-height: 1.1; color: var(--ink-2);
    transition: border-color .35s var(--ease), color .35s var(--ease);
  }
  .pick.has-value .pick-btn { color: var(--ink); }
  .pick-btn:hover, .pick.is-open .pick-btn { border-color: var(--ink-2); color: var(--ink); }
  .pick-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
  .pick-caret { width: 18px; height: 18px; flex: 0 0 18px; color: var(--ink-3); transition: transform .45s var(--ease), color .3s; }
  .pick.is-open .pick-caret { transform: rotate(180deg); color: var(--red); }
  .pick.is-disabled .pick-btn { cursor: default; color: var(--ink-3); border-color: var(--line-2); }
  .pick.is-disabled .pick-caret { opacity: .35; }
  /* the hairline fills with scarlet from the left when a value is set */
  .pick-btn::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: var(--red); transform: scaleX(0); transform-origin: left;
    transition: transform .7s var(--ease);
  }
  .pick { --x: 0; }
  .pick.has-value .pick-btn::after { transform: scaleX(1); }
  .pick-btn { position: relative; }

  .pick-list {
    position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + .5rem);
    margin: 0; padding: .4rem 0; list-style: none;
    background: var(--surface); border: 1px solid var(--line-2);
    box-shadow: 0 24px 60px -20px rgb(0 0 0 / .7);
    max-height: min(22rem, 60vh); overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; transform: translateY(-8px); clip-path: inset(0 0 100% 0);
    transition: opacity .2s var(--ease), transform .45s var(--ease), clip-path .45s var(--ease);
    outline: none;
  }
  .pick.is-open .pick-list { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
  .pick-list [role=option] {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    padding: .8rem 1.1rem; cursor: pointer;
    font-size: 1rem; color: var(--ink-2);
    transition: color .2s, background-color .2s, padding .35s var(--ease);
  }
  .pick-list [role=option].is-focus { color: var(--ink); background: var(--surface-2); padding-left: 1.4rem; }
  .pick-list [role=option][aria-selected=true] { color: var(--red); }
  .pick-list [role=option][aria-selected=true] .opt-main::before {
    content: ''; display: inline-block; width: .55rem; height: 1px; background: currentColor;
    vertical-align: middle; margin-right: .55rem;
  }
  .opt-note { font-size: var(--t-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
  .pick-list { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

  /* ---- the card -------------------------------------------------------- */
  .studio-card { position: relative; display: grid; margin-top: clamp(2rem, 4vw, 3.25rem); min-height: 13.5rem; }
  .sc-in { grid-area: 1 / 1; }
  .sc-in > * { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .7s var(--ease); }
  .sc-in.is-in > * { opacity: 1; transform: none; }
  .sc-in.is-in > :nth-child(2) { transition-delay: .06s; }
  .sc-in.is-in > :nth-child(3) { transition-delay: .12s; }
  .sc-in.is-leaving > * { opacity: 0; transform: translateY(-10px); transition-duration: .22s; transition-delay: 0s; }
  .sc-lead { color: var(--ink-3); font-size: var(--t-small); max-width: 30ch; line-height: 1.55; }
  .sc-lockup { display: flex; align-items: center; gap: .8rem; margin: 0; }
  .sc-mark {
    display: block; width: 92px; height: 18px; background: var(--ink);
    -webkit-mask: url('/uploads/logo.webp') no-repeat left center / contain;
    mask: url('/uploads/logo.webp') no-repeat left center / contain;
  }
  .sc-region {
    font-size: var(--t-micro); font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--red); padding-left: .8rem; border-left: 1px solid var(--line);
  }
  .sc-place {
    margin: .9rem 0 0;
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(1.9rem, 3.3vw, 3rem); line-height: .98; letter-spacing: -.01em;
  }
  .sc-hq { display: block; margin-top: .55rem; font-family: var(--font-sans); font-size: var(--t-micro); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
  .sc-rows { margin: 1.6rem 0 0; display: grid; gap: 0; border-top: 1px solid var(--line-2); }
  .sc-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line-2); }
  .sc-row dt { font-size: var(--t-micro); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
  .sc-row dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-width: 0; }
  .sc-row a {
    display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; min-width: 0;
    color: var(--ink); text-decoration: none; font-size: 1.05rem; font-weight: 500;
    overflow-wrap: anywhere;
    background: linear-gradient(currentColor, currentColor) no-repeat 0 calc(50% + .8em) / 0 1px;
    transition: color .25s, background-size .5s var(--ease);
  }
  .sc-row a:hover { color: var(--red); background-size: 100% 1px; }
  .sc-row a svg { width: 14px; height: 14px; flex: 0 0 14px; transition: transform .45s var(--ease); }
  .sc-row a:hover svg { transform: translate(2px, -2px); }
  .sc-copy {
    all: unset; box-sizing: border-box; cursor: pointer; flex: 0 0 auto;
    min-height: 32px; padding: 0 .9rem; border-radius: var(--r-chip);
    border: 1px solid var(--line); color: var(--ink-2);
    font-size: var(--t-micro); font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    display: inline-flex; align-items: center;
    transition: border-color .25s, color .25s, background-color .25s;
  }
  .sc-copy:hover { border-color: var(--ink-2); color: var(--ink); }
  .sc-copy:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
  .sc-copy.is-done { border-color: var(--red); color: var(--red); }

  /* ---- without the script: the same studios as a list ------------------ */
  .studio-index { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
  .studio-index li { display: grid; gap: .15rem; }
  .studio-index span { color: var(--ink-2); font-size: var(--t-small); }
  .studio-index a { color: var(--ink); font-size: var(--t-small); }
  .studios:not(.is-live) .studios-picks, .studios:not(.is-live) .studio-card { display: none; }
  .studios.is-live .studio-index { display: none; }

  /* ---- the globe ------------------------------------------------------- */
  .g-stage {
    position: absolute; inset: 0; z-index: 0;
    touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
  }
  .g-stage.is-dragging { cursor: grabbing; }
  .g-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .g-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
  .g-label {
    position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform, opacity;
    font-family: var(--font-sans); font-weight: 600; text-transform: uppercase;
    color: var(--ink); opacity: 0; visibility: hidden;
  }
  /* Names sit on a dark plate so the dots never run through the letters
     (owner, 29.10.2026: "readable, not lost in the dots"). */
  .g-label { padding: .28em .6em .24em; background: rgb(18 19 22 / .78); border-radius: 2px; line-height: 1; }
  .g-label--continent { font-size: 12px; letter-spacing: .24em; color: var(--ink); }
  .g-label--country { font-size: 10.5px; letter-spacing: .14em; color: var(--ink); font-weight: 600; background: rgb(18 19 22 / .7); }
  .g-label--city {
    font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--ink);
    background: rgb(18 19 22 / .86);
    transition: color .3s, background-color .3s;
  }
  .g-label--city.is-active { color: #fff; background: var(--red); }
  .g-label--city { pointer-events: auto; cursor: pointer; }
  .g-label--city[style*='hidden'] { pointer-events: none; }
  .g-hint {
    position: absolute; left: 62%; bottom: 4%; transform: translateX(-50%);
    margin: 0; display: inline-flex; align-items: center; gap: .55rem;
    font-size: var(--t-micro); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
    pointer-events: none; white-space: nowrap; transition: opacity .6s var(--ease);
  }
  .g-hint svg { width: 20px; height: 20px; }
  .g-stage.was-dragged .g-hint { opacity: 0; }

  /* ---- narrow screens: globe first, pickers under it -------------------- */
  /* Narrow screens: the globe takes the top of the screen, the pickers sit under it. */
  @media (max-width: 960px) {
    .studios { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding-top: 0; }
    .studios::before { background: linear-gradient(0deg, var(--void) 0%, rgb(23 24 27 / 0) 30%); bottom: auto; height: min(100vw, 62svh); }
    .g-stage { order: -1; position: relative; inset: auto; height: min(100vw, 62svh); margin-inline: calc(var(--gutter) * -1); }
    .sc-row dd { flex-wrap: wrap; row-gap: .25rem; }
    .sc-row a { overflow-wrap: normal; white-space: nowrap; }
    .studios-copy { width: 100%; margin-top: -1rem; }
    .studio-card { min-height: 12rem; }
    .sc-row { grid-template-columns: 5.5rem minmax(0, 1fr); }
  }
  @media (prefers-reduced-motion: reduce) {
    .sc-in > *, .pick-list, .pick-btn::after, .pick-caret { transition: none !important; }
  }
}
@media (max-width: 960px) { .g-hint { left: 50% !important; bottom: 1%; white-space: nowrap; font-size: 9.5px; letter-spacing: .1em; } }
