/* ============================================================
   Workroom — Rotary Phone Switchboard  v1
   An analog index to the room. Lift the receiver, dial 1–7.
   Tuned to the existing workroom palette: bakelite black,
   brass (#c7a45a), cream (#f4ead8), dossier red.
   ============================================================ */

.workroomSwitchboard{
  padding-top:clamp(2rem,4vw,4rem);
  padding-bottom:clamp(2.4rem,5vw,5rem);
}
.workroomSwitchboard .sectionHead{
  width:min(1120px, calc(100% - 2rem));
  margin:0 auto;
}

/* --- Layout: phone + readout card --- */
.switchboardGrid{
  width:min(1120px, calc(100% - 2rem));
  margin:clamp(18px,3vw,30px) auto 0;
  display:grid;
  grid-template-columns:minmax(0,.85fr) minmax(320px,1.05fr);
  gap:clamp(20px,3vw,40px);
  align-items:center;
}

/* --- Phone housing --- */
.switchboardPhone{
  position:relative;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:clamp(20px,3vw,38px) clamp(16px,2.4vw,30px) clamp(16px,2.4vw,26px);
  border:1px solid rgba(201,164,90,.34);
  border-radius:28px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255,226,170,.10), transparent 20%),
    radial-gradient(circle at 52% 28%, rgba(201,164,90,.14), transparent 54%),
    linear-gradient(180deg, rgba(32,24,18,.96), rgba(8,6,5,.985));
  box-shadow:inset 0 0 0 1px rgba(244,234,216,.04), inset 0 -40px 80px rgba(0,0,0,.22), 0 30px 90px rgba(0,0,0,.46);
  overflow:hidden;
}
.switchboardPhone::before{
  content:"NEW YORK STATION";
  position:absolute;
  top:16px;left:18px;
  font-family:"IBM Plex Sans Condensed",Inter,sans-serif;
  font-size:.72rem;
  letter-spacing:.20em;
  text-transform:uppercase;
  color:rgba(244,234,216,.42);
}
html[lang="da"] .switchboardPhone::before{content:"NEW YORK-STATION";}

.switchboardPhone::after{
  content:"";
  position:absolute;
  inset:auto 10% 8px 10%;
  height:64px;
  pointer-events:none;
  background:radial-gradient(ellipse at center, rgba(201,164,90,.06), transparent 70%);
  filter:blur(12px);
}
.phoneSvgWrap{
  position:relative;
  isolation:isolate;
}
.phoneSvgWrap::after{
  content:"";
  position:absolute;
  inset:8% 8% 18% 8%;
  pointer-events:none;
  border-radius:26px;
  background:radial-gradient(circle at 50% 10%, rgba(255,234,185,.08), transparent 24%), linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%, rgba(0,0,0,.18) 82%, transparent 100%);
  mix-blend-mode:screen;
}
.phoneSvgWrap svg{ filter: drop-shadow(0 12px 32px rgba(0,0,0,.34)); }
.phoneArtifactMeta{
  width:100%;
  max-width:380px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:start;
  margin-top:10px;
  margin-bottom:8px;
}
.stationPlate{
  display:inline-flex;
  flex-direction:column;
  gap:2px;
  justify-self:start;
  padding:10px 14px 9px;
  border:1px solid rgba(199,164,90,.42);
  border-radius:5px;
  background:linear-gradient(180deg, rgba(118,89,43,.55), rgba(53,37,18,.88));
  box-shadow: inset 0 1px 0 rgba(255,239,197,.16), 0 8px 18px rgba(0,0,0,.28);
}
.stationPlate strong,
.stationPlate span{
  font-family:"IBM Plex Sans Condensed",Inter,sans-serif;
  text-transform:uppercase;
  letter-spacing:.16em;
}
.stationPlate strong{
  color:#f1ddb1;
  font-size:.64rem;
  line-height:1.2;
}
.stationPlate span{
  color:rgba(244,234,216,.62);
  font-size:.52rem;
  line-height:1.2;
}
.extensionSlips{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
}
.extensionSlips span{
  display:inline-flex;
  align-items:center;
  padding:6px 9px 5px;
  border:1px solid rgba(244,234,216,.16);
  border-radius:2px;
  background:linear-gradient(180deg, rgba(237,222,185,.95), rgba(204,183,136,.92));
  color:#3b2a12;
  box-shadow:0 4px 10px rgba(0,0,0,.18);
  font-family:"IBM Plex Sans Condensed",Inter,sans-serif;
  font-size:.56rem;
  letter-spacing:.15em;
  text-transform:uppercase;
  white-space:nowrap;
}
.extensionSlips span:nth-child(odd){ transform:rotate(-1.4deg); }
.extensionSlips span:nth-child(even){ transform:rotate(1.2deg); }
.phoneHint{ max-width:380px; }

.phoneSvgWrap{
  width:100%;
  max-width:380px;
  cursor:default;
  user-select:none;
}
.phoneSvgWrap svg{ width:100%; height:auto; overflow:visible; display:block; }

/* --- Receiver lift --- */
.receiver-group{
  transform-origin:50% 100%;
  transform-box:fill-box;
  transition:transform .7s cubic-bezier(.25,1.3,.5,1);
  cursor:pointer;
}
.receiver-group.lifted{
  transform:translateY(-58px) translateX(-22px) rotate(-12deg);
}
.phoneSvgWrap:not(.live) .receiver-group:hover{ filter:brightness(1.1); }

/* --- Dial rotation --- */
.dial-group{
  transform-origin:50% 50%;
  transform-box:fill-box;
  transition:transform .45s cubic-bezier(.4,0,.2,1);
}
.finger-hole{ cursor:pointer; transition:filter .2s; }
.phoneSvgWrap.live .finger-hole:hover{
  filter:brightness(1.5) drop-shadow(0 0 6px rgba(199,164,90,.6));
}
.phoneSvgWrap:not(.live) .finger-hole{ cursor:not-allowed; }

/* --- Bulb --- */
.bulb-light{ transform-origin:center; }
.bulb-pulse{ animation:phoneBulbPulse 1.7s ease-in-out infinite; }
@keyframes phoneBulbPulse{
  0%,100%{ opacity:.35; }
  50%{ opacity:1; }
}

/* --- Hint line under the phone --- */
.phoneHint{
  margin-top:20px;
  min-height:22px;
  font-family:"Cormorant Garamond",serif;
  font-style:italic;
  font-size:1.05rem;
  letter-spacing:.01em;
  color:rgba(244,234,216,.58);
  text-align:center;
  transition:color .35s;
}
.phoneHint.alert{ color:#d8654f; }

/* --- Extension legend --- */
.phoneLegend{
  margin-top:18px;
  width:100%;
  max-width:380px;
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:6px;
  border-top:1px solid rgba(201,164,90,.20);
  padding-top:14px;
}
.phoneLegend button{
  appearance:none;
  background:none;
  border:none;
  padding:6px 2px;
  cursor:pointer;
  font-family:"Cormorant Garamond",serif;
  color:rgba(244,234,216,.5);
  transition:color .2s, transform .2s;
}
.phoneLegend button:hover{ color:#c7a45a; transform:translateY(-2px); }
.phoneLegend button[disabled]{ cursor:not-allowed; opacity:.4; }
.phoneLegend button[disabled]:hover{ color:rgba(244,234,216,.5); transform:none; }
.phoneLegend .legendNum{
  display:block;
  font-size:1.25rem;
  font-weight:700;
  color:#c7a45a;
  line-height:1;
}
.phoneLegend button[disabled] .legendNum{ color:rgba(244,234,216,.5); }
.phoneLegend .legendName{
  display:block;
  margin-top:3px;
  font-family:"IBM Plex Sans Condensed",Inter,sans-serif;
  font-size:.55rem;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.phoneLegend button.active .legendNum,
.phoneLegend button.active .legendName{ color:#f4ead8; }

/* ============================================================
   Readout card — the memo the line transmits
   ============================================================ */
.switchboardCard{
  position:relative;
  min-width:0;
  display:flex;
  flex-direction:column;
  border:1px solid rgba(201,164,90,.33);
  border-radius:28px;
  overflow:hidden;
  background:linear-gradient(180deg,rgba(30,23,17,.92),rgba(13,10,8,.96));
  box-shadow:0 30px 90px rgba(0,0,0,.42);
}
.switchboardCard::before{
  content:"WORKROOM LOG";
  position:absolute;
  top:18px;left:20px;
  z-index:3;
  font-family:"IBM Plex Sans Condensed",Inter,sans-serif;
  font-size:.78rem;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(244,234,216,.55);
}
html[lang="da"] .switchboardCard::before{content:"WORKROOM-LOG";}

.memoSheet{
  margin:46px 22px 22px;
  position:relative;
  padding:30px 30px 56px;
  color:#23190f;
  background:
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(120,90,45,.16) 29px 30px),
    linear-gradient(150deg, #e7d6ac 0%, #d8c596 100%);
  border-radius:6px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.18) inset,
    0 2px 6px rgba(0,0,0,.45),
    0 22px 44px rgba(0,0,0,.4);
  transform:rotate(-1.2deg);
  transition:transform .55s cubic-bezier(.2,.9,.3,1);
  min-height:330px;
}
.memoSheet.updating{ transform:rotate(-1.2deg) translateY(-3px); }
.memoSheet::after{
  /* paper edge wear */
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:6px;
  box-shadow:inset 0 0 26px rgba(120,90,45,.22), inset 0 0 80px rgba(70,46,18,.10);
}

.memoMeta{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  font-family:"IBM Plex Sans Condensed",Inter,sans-serif;
  font-size:.68rem;
  letter-spacing:.20em;
  text-transform:uppercase;
  color:rgba(35,25,15,.55);
  margin-bottom:14px;
}
.memoMeta .memoExt{
  font-weight:700;
  letter-spacing:.16em;
  color:rgba(150,38,28,.85);
}
.memoTitle{
  font-family:"Cormorant Garamond",serif;
  font-weight:600;
  font-size:clamp(1.4rem,2.4vw,1.85rem);
  line-height:1.16;
  margin:0 0 14px;
  color:#23190f;
}
.memoBody{
  font-family:"Cormorant Garamond",serif;
  font-size:1.06rem;
  line-height:1.62;
  color:#33240f;
  white-space:pre-line;
  min-height:96px;
}
.memoBody .typeCursor{
  display:inline-block;
  width:7px;height:1.05em;
  background:#33240f;
  margin-left:1px;
  vertical-align:text-bottom;
  animation:memoBlink .9s steps(2) infinite;
}
@keyframes memoBlink{ 50%{ opacity:0; } }

.memoLink{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:18px;
  padding:9px 15px;
  border:1px solid rgba(150,38,28,.5);
  border-radius:3px;
  background:rgba(150,38,28,.07);
  color:rgba(120,30,22,.95);
  font-family:"IBM Plex Sans Condensed",Inter,sans-serif;
  font-size:.74rem;
  letter-spacing:.13em;
  text-transform:uppercase;
  text-decoration:none;
  font-weight:700;
  opacity:0;
  transform:translateY(4px);
  transition:opacity .4s, transform .4s, background .2s;
}
.memoLink.show{ opacity:1; transform:translateY(0); }
.memoLink:hover{ background:rgba(150,38,28,.16); }

.memoStamp{
  position:absolute;
  bottom:18px;right:22px;
  font-family:"Cormorant Garamond",serif;
  font-weight:700;
  font-size:.72rem;
  letter-spacing:.20em;
  text-transform:uppercase;
  color:rgba(150,38,28,.78);
  border:2px solid rgba(150,38,28,.7);
  padding:4px 10px;
  transform:rotate(7deg);
  opacity:0;
  transition:opacity .5s .35s;
}
.memoSheet.stamped .memoStamp{ opacity:1; }

/* native-audio fallback (shown only without JS) */
.phoneFallback{
  margin:0 22px 20px;
  padding:12px 14px;
  border:1px solid rgba(201,164,90,.22);
  border-radius:12px;
  background:rgba(10,8,6,.6);
}
.phoneFallback p{
  margin:0 0 8px;
  font-size:.84rem;
  color:rgba(244,234,216,.6);
}
.phoneFallback audio{ width:100%; filter:sepia(.35) saturate(.9); }
.js .phoneFallback{ display:none; }

/* ============================================================
   Responsive
   ============================================================ */
@media(max-width:900px){
  .switchboardGrid{ grid-template-columns:1fr; }
  .switchboardCard{ order:2; }
  .switchboardPhone{ order:1; }
}
@media(max-width:680px){
  .switchboardPhone{ border-radius:22px; }
  .switchboardCard{ border-radius:22px; }
  .memoSheet{ margin:42px 16px 18px; padding:24px 22px 50px; }
  .phoneLegend{ gap:2px; padding-top:12px; }
  .phoneLegend .legendName{ display:none; }
  .phoneLegend .legendNum{ font-size:1.5rem; }
  .phoneLegend button{ padding:10px 2px; }
}

/* Respect reduced-motion */
@media(prefers-reduced-motion:reduce){
  .receiver-group,.dial-group,.memoSheet{ transition:none; }
  .bulb-pulse{ animation:none; opacity:.8; }
  .memoBody .typeCursor{ animation:none; }
}


/* v5 merge: preserve the 1950s radio hum atmosphere inside the rotary switchboard. */
.radioHumStrip{
  margin:14px 22px 0;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-top:1px solid rgba(201,164,90,.18);
  border-bottom:1px solid rgba(201,164,90,.14);
  color:rgba(244,234,216,.56);
  font-family:"IBM Plex Sans Condensed",Inter,sans-serif;
  font-size:.68rem;
  letter-spacing:.16em;
  text-transform:uppercase;
}
.radioHumStrip i{
  position:relative;display:block;height:1px;overflow:hidden;
  background:linear-gradient(90deg,rgba(201,164,90,.15),rgba(201,164,90,.75),rgba(201,164,90,.15));
}
.radioHumStrip i::after{
  content:"";position:absolute;top:-3px;bottom:-3px;width:36%;left:-42%;
  background:linear-gradient(90deg,transparent,rgba(244,234,216,.8),transparent);
  animation:radioNeedleDrift 4.8s ease-in-out infinite;opacity:.45;
}
@keyframes radioNeedleDrift{
  0%,100%{left:-42%;opacity:.20;}
  45%{left:62%;opacity:.55;}
  65%{left:48%;opacity:.34;}
}
.phoneSvgWrap:focus-within{outline:1px solid rgba(201,164,90,.44);outline-offset:6px;border-radius:18px;}
@media(max-width:940px){
  .workroomSwitchboard{padding-top:2rem!important;padding-bottom:2.8rem!important;}
  .switchboardGrid{width:min(100%,680px)!important;grid-template-columns:1fr!important;gap:16px!important;}
  .switchboardPhone,.switchboardCard{border-radius:18px!important;}
  .switchboardPhone{padding:22px 14px 18px!important;}
  .phoneSvgWrap{max-width:310px!important;}
  .phoneLegend{grid-template-columns:repeat(7,minmax(36px,1fr))!important;max-width:100%!important;}
  .phoneLegend button{min-height:44px!important;touch-action:manipulation!important;}
  .memoSheet{min-height:270px!important;transform:none!important;}
  .memoBody{font-size:1rem!important;line-height:1.54!important;}
  .radioHumStrip{margin-left:16px;margin-right:16px;font-size:.58rem;letter-spacing:.12em;}
}
@media(max-width:430px){
  .phoneSvgWrap{max-width:276px!important;}
  .switchboardPhone::before,.switchboardCard::before{font-size:.58rem!important;letter-spacing:.14em!important;}
  .phoneHint{font-size:.98rem!important;}
  .memoTitle{font-size:1.3rem!important;}
}


/* ============================================================
   v11 — Mobile Signal Desk polish
   Makes "Lift the receiver. Dial the room." behave clearly on phones:
   readable extension labels, reliable touch targets, no sideways drift,
   and the memo transmission comes into view after dialing.
   ============================================================ */
.receiver-group,
.finger-hole,
.phoneLegend button{
  cursor:pointer;
  pointer-events:auto;
  -webkit-tap-highlight-color:rgba(199,164,90,.18);
  touch-action:manipulation;
}
.memoSheet.updating{
  box-shadow:0 24px 70px rgba(0,0,0,.42),0 0 0 1px rgba(199,164,90,.28),0 0 38px rgba(199,164,90,.09);
}
@media(max-width:680px){
  .workroomSwitchboard .compactHead{margin-bottom:1.1rem!important;}
  .switchboardGrid{gap:12px!important;}
  .switchboardPhone{padding:18px 12px 14px!important;}
  .phoneSvgWrap{max-width:min(286px,76vw)!important;margin-inline:auto!important;}
  .phoneHint{min-height:1.55em!important;margin:.45rem 0 .7rem!important;text-align:center!important;}
  .phoneLegend{
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    gap:4px!important;
    padding-top:8px!important;
  }
  .phoneLegend button{
    min-height:54px!important;
    padding:7px 1px 6px!important;
    border-radius:12px!important;
  }
  .phoneLegend .legendNum{display:block!important;font-size:1.24rem!important;line-height:1!important;}
  .phoneLegend .legendName{
    display:block!important;
    max-width:100%;
    margin-top:3px;
    overflow:hidden;
    text-overflow:clip;
    white-space:nowrap;
    font-size:.48rem!important;
    line-height:1.05!important;
    letter-spacing:.045em!important;
    opacity:.72!important;
  }
  .switchboardCard{margin-top:0!important;}
  .memoSheet{
    margin:12px 12px 16px!important;
    min-height:238px!important;
    padding:22px 18px 48px!important;
    scroll-margin-top:18px;
  }
  .memoMeta{gap:8px!important;}
  .memoExt,.memoTypeLabel{font-size:.62rem!important;letter-spacing:.14em!important;}
  .memoTitle{font-size:1.22rem!important;line-height:1.04!important;}
  .memoBody{font-size:.98rem!important;line-height:1.48!important;}
  .memoLink{min-height:40px!important;display:inline-flex!important;align-items:center!important;}
  .radioHumStrip{grid-template-columns:auto 1fr auto!important;gap:7px!important;margin:8px 12px 0!important;}
}
@media(max-width:380px){
  .phoneSvgWrap{max-width:min(252px,74vw)!important;}
  .phoneLegend{gap:3px!important;}
  .phoneLegend button{min-height:50px!important;border-radius:10px!important;}
  .phoneLegend .legendNum{font-size:1.1rem!important;}
  .phoneLegend .legendName{font-size:.43rem!important;letter-spacing:.02em!important;}
  .memoSheet{padding-left:16px!important;padding-right:16px!important;}
}

.receiver-group .handle-reflection{ opacity:.24; }
@media (max-width: 760px){
  .phoneArtifactMeta{ grid-template-columns:1fr; gap:10px; }
  .stationPlate{ justify-self:center; }
  .extensionSlips{ justify-content:center; }
  .extensionSlips span{ font-size:.53rem; padding:5px 8px 4px; }
  .phoneSvgWrap{ max-width:420px; }
}
