/* THE SWITCHER (/channels): the whole stage is the channel that is on; a remote changes it.
   Each screen is that channel's own world, in its own tokens and faces (scoped under
   .screen--tv, --tp, --tt, --mb); the remote stays in the AEZZE inks and carries the channel
   names, nothing numbered. Phone: the screen above four keys and Watch. Desktop (1000px and up):
   the screen on the left seven tenths, the remote a column on the right. switcher.js cuts between
   screens; nothing animates. Sizes inside a screen are the mockups' values capped by the screen's
   own height (cqh), so a short phone (Safari's 390×664) keeps the whole composition, and one-line
   texts by its width (cqw); the remote's heights are capped by the stage the same way. */
.sw { display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--ink); container-type: size; }

/* every screen: a link the size of the stage, with a paper edge towards the remote */
.screen {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; container-type: size;
  text-decoration: none; border-bottom: 4px solid var(--paper);
}
.screen:focus-visible { outline-offset: -7px; } /* the site's ring, drawn inside: the stage clips outside it */
.screen--tv:focus-visible, .screen--tt:focus-visible { outline-color: var(--paper); } /* blue is faint on black and navy */

/* 1 · AEZZE TV: no still (the founder's call, 28 Sep); like the other three, the channel's own
   mark and one visual on a clean print. The ground is a riso television: fine paper scanlines
   over black. On it, the TV system's one ground shape, a circle: a disc of road-marking yellow
   printed as a halftone that deepens to the lower right, and a solid ring of the same ink laid
   a few points off register. The mark on its stock plate (its own offset print in the yellow)
   and "Break the format. Keep the feeling." stand centred on the disc; the yellow band below. */
.screen--tv {
  grid-template-rows: minmax(0, 1fr) auto; color: #f6f5f0;
  background: #000 repeating-linear-gradient(0deg, rgb(246 245 240 / .07) 0 1px, transparent 1px 4px);
}
.screen--tv .tv-set {
  position: relative; min-height: 0; overflow: hidden; container-type: size;
  display: grid; align-content: center; justify-items: center; gap: min(22px, 4.5cqh); padding: min(24px, 5cqh) 24px; text-align: center;
}
.screen--tv .tv-set::before, .screen--tv .tv-set::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(112cqw, 96cqh); aspect-ratio: 1; border-radius: 50%;
  translate: -50% -50%; pointer-events: none;
}
.screen--tv .tv-set::before {
  background: radial-gradient(circle, #f0b21f 1.35px, transparent 1.7px) 0 0 / 7px 7px;
  -webkit-mask-image: linear-gradient(140deg, transparent 12%, #000 72%); mask-image: linear-gradient(140deg, transparent 12%, #000 72%);
}
.screen--tv .tv-set::after { border: 4px solid #f0b21f; translate: calc(-50% - 9px) calc(-50% - 6px); }
.screen--tv .plate {
  position: relative; z-index: 1; width: min(248px, 64cqw, 46cqh * 2.57); max-width: none; margin: 0;
  background: #eae8e1; border: 4px solid #232326; padding: min(12px, 2.4cqh) 16px; box-shadow: 7px 7px 0 #f0b21f;
}
.screen--tv .plate img { width: 100%; height: auto; }
.screen--tv .tv-line {
  position: relative; z-index: 1; margin: 0; max-width: 11ch; font: 400 min(34px, 9.4cqw, 8.4cqh)/.94 var(--heading);
  text-transform: uppercase; letter-spacing: -.02em; color: #f6f5f0; text-wrap: balance;
}
/* the words knock out of the print: each line on a bar of the black, so no dot or ring runs
   through a letter */
.screen--tv .tv-line span { background: #000; padding: 0 .16em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.screen--tv .band {
  margin: 0; max-width: none; background: #f0b21f; color: #000; font: 700 min(14px, (100cqw - 32px) / 22.8)/1 var(--label); letter-spacing: .1em;
  text-transform: uppercase; padding: min(17px, 3.3cqh) 16px; white-space: nowrap; overflow: hidden;
}

/* 2 · Travelers Place: a postcard on sky and cloud (Sky Drift, Cloud, Peach Blush; Poppins
   and Lora italic). Its own soft world, so inside this postcard only, corners may round. */
.screen--tp { grid-template-rows: minmax(0, 1fr) auto; background: linear-gradient(#8BA7C8 0 40%, #F8F6F4 40%); color: #2D3438; }
.screen--tp .tp-ground { min-height: 0; display: grid; align-items: center; padding: min(58px, 11cqh) 16px 16px; }
.screen--tp .postcard {
  display: grid; background: #FFFDF9; border: 2px solid #E6E1DB; border-radius: 6px;
  padding: min(22px, 4.2cqh) 22px min(24px, 4.6cqh);
}
.screen--tp .tp-message { container-type: inline-size; }
.screen--tp .tp-name { margin: 0; max-width: none; font: 700 min(56px, 100cqi / 4.8, 10.6cqh)/1.02 "Poppins", var(--text); letter-spacing: -.02em; }
.screen--tp .tp-line { margin: 10px 0 0; max-width: none; font: italic 400 clamp(20px, 4.6cqh, 24px)/1.2 "Lora", Georgia, serif; color: #5A7A9A; }
.screen--tp .tp-address {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: end;
  border-top: 2px dashed #8BA7C8; margin-top: min(20px, 3.8cqh); padding-top: min(20px, 3.8cqh);
}
.screen--tp .tp-stamp { grid-column: 2; grid-row: 1; margin: 0; width: min(96px, 18.2cqh); padding: 4px; background: #F5DCC4; border: 5px dotted #FFFDF9; }
.screen--tp .tp-stamp img { width: 100%; height: auto; }
/* the address lines, ruled from the bottom so a short card keeps whole lines */
.screen--tp .tp-ruled { grid-column: 1; grid-row: 1; height: min(96px, 18.2cqh); background: repeating-linear-gradient(to top, #A8CDD0 0 2px, transparent 2px 32px); }
.screen--tp .tp-band {
  margin: 0; max-width: none; background: #F0C4AD; color: #2D3438; font: 500 14px/1 "Poppins", var(--text); letter-spacing: .1em;
  text-transform: uppercase; padding: min(17px, 3.3cqh) 16px; white-space: nowrap; overflow: hidden;
}

/* 3 · Toofani Town: the town's notice board (press navy, press red, press gold on aged
   paper; Rye, Vollkorn, Courier Prime) */
.screen--tt { grid-template-rows: minmax(0, 1fr); background: #16324A; color: #16324A; }
.screen--tt .board { min-height: 0; display: grid; padding: min(58px, 11cqh) 16px 16px; }
.screen--tt .ticket {
  min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: #F5F1E6 radial-gradient(circle, rgb(163 42 32 / .10) 0 2.4px, transparent 2.8px) 0 0 / 13px 13px;
  border: 5px solid #16324A; outline: 9px solid #A32A20; outline-offset: -14px;
}
.screen--tt .tt-band {
  margin: 0; max-width: none; background: #E5AA44; color: #16324A; border-bottom: 5px solid #16324A;
  font: 700 13px/1 "Courier Prime", ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; padding: min(26px, 5cqh) 24px min(14px, 2.7cqh);
}
.screen--tt .tt-body { position: relative; min-height: 0; display: grid; align-content: start; gap: min(22px, 4.2cqh); padding: min(24px, 4.6cqh) 24px min(18px, 3.5cqh); }
.screen--tt .tt-name { margin: 0; max-width: none; font: 400 min(clamp(56px, 17.5vw, 70px), 13cqh)/.9 "Rye", "Vollkorn", Georgia, serif; color: #A32A20; letter-spacing: .01em; }
.screen--tt .tt-line { margin: 0; font: 800 min(clamp(26px, 8.4vw, 34px), 6.3cqh)/1.04 "Vollkorn", Georgia, serif; text-transform: uppercase; color: #16324A; max-width: 12ch; }
.screen--tt .tt-line b { color: #A32A20; font-weight: inherit; }
.screen--tt .seal {
  position: absolute; right: 26px; bottom: 24px; margin: 0; max-width: none; background: #F5F1E6; color: #A32A20; border: 4px solid #A32A20;
  font: 700 clamp(10px, 3.8cqh, 20px)/1 "Courier Prime", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; padding: 9px 10px 8px 13px; transform: rotate(-6deg);
}
.screen--tt .tt-foot { margin: 0 24px; max-width: none; display: flex; justify-content: space-between; gap: 12px; padding: min(13px, 2.5cqh) 0 min(24px, 4.6cqh); border-top: 5px solid #16324A; position: relative; }
.screen--tt .tt-foot::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 3px; background: #16324A; }
.screen--tt .tt-foot span { font: 700 13px/1.2 "Courier Prime", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }

/* 4 · Maximal Bharat: the front door, kept clean: the peacock, the name (its lockup from the
   channel page, "Bharat" between gold rules) and "Coming soon" (peacock ink and gold on cream;
   Syne). "Maximal" in Syne 800 is 7.48em wide, so the name fits the screen's width. */
.screen--mb { grid-template-rows: minmax(0, 1fr); background: #F7F0E4; color: #4A2356; }
.screen--mb .mb-front { min-height: 0; display: grid; align-content: center; justify-items: center; gap: min(22px, 4cqh); padding: min(24px, 4.6cqh) 24px; text-align: center; }
.screen--mb .mb-front img { width: auto; height: min(170px, 40cqh); }
.screen--mb .mb-name { margin: 0; max-width: none; display: grid; font: 800 min(44px, (100cqw - 48px) / 7.6, 8.4cqh)/1.05 "Syne", var(--text); letter-spacing: .06em; }
.screen--mb .mb-name span:last-child { display: flex; align-items: center; gap: .45em; font-size: .82em; }
.screen--mb .mb-name span:last-child::before, .screen--mb .mb-name span:last-child::after { content: ""; flex: 1; height: max(3px, .06em); background: #DFAB4A; }
.screen--mb .mb-soon {
  margin: min(6px, 1cqh) 0 0; max-width: none; font: 700 clamp(12px, 2.8cqh, 14px)/1 "Syne", var(--text); letter-spacing: .22em; text-transform: uppercase;
  padding: 11px 16px 10px; border: 3px solid #DFAB4A;
}

/* the remote: paper keys carrying the channel names, each in its channel's own face (Archivo
   Black, Poppins, Rye, Syne), two by two, and a wide Watch. Each key wears a band of its
   channel's colour along its top edge (its left edge on a desktop), so the four colours read on
   the black remote before anything is pressed. The key that is on, and a key under the pointer,
   fill with their channel's world in a 90ms flip: AEZZE TV's road-marking yellow under black
   scanlines, Travelers Place's sky inside a postcard's dashed edge, Toofani Town's press red
   under a gold ticket rule, Maximal Bharat's gold inside a cream rule. Watch is the colour of
   the channel that is on. On a tablet the keys stop growing: the content holds to 480px, centred
   (phones up to 512px are untouched). Heights are capped by the stage, so a short phone keeps a
   full screen above. */
.remote { background: var(--ink); padding: min(20px, 3.6cqh) max(16px, (100% - 480px) / 2); display: grid; gap: min(14px, 2.5cqh); align-content: center; }
.keys { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.key {
  position: relative; display: grid; place-items: center; min-height: min(60px, 11cqh); padding: 14px 10px 8px; background: var(--paper); color: var(--ink);
  box-shadow: inset 0 8px 0 var(--lit); /* the colour band */
  text-decoration: none; text-align: center; transition: var(--flip), box-shadow var(--dur-1) var(--ease); container-type: inline-size;
}
/* the channel's own edge, drawn inside the key when it is lit */
.key::after { content: ""; position: absolute; inset: 6px; border: var(--edge, 0); opacity: 0; transition: opacity var(--dur-1) var(--ease); pointer-events: none; }
/* each name fits its key: --w is the widest word in ems of that channel's face */
.key span { position: relative; font: 400 min(22px, 4cqh, 100cqw / var(--w))/1 var(--heading); letter-spacing: -.02em; text-transform: uppercase; }
.key[data-channel="aezze-tv"] { --lit: #f0b21f; --lit-ink: #000; --w: 3.8; --tex: repeating-linear-gradient(0deg, rgb(0 0 0 / .14) 0 1px, transparent 1px 4px); }
.key[data-channel="travelers-place"] { --lit: #8BA7C8; --lit-ink: #F8F6F4; --w: 6.6; --edge: 2px dashed #FFFDF9; }
.key[data-channel="travelers-place"] span { font-family: "Poppins", var(--text); font-weight: 700; letter-spacing: 0; }
.key[data-channel="toofani-town"] { --lit: #A32A20; --lit-ink: #F5F1E6; --w: 5.9; --edge: 3px solid #E5AA44; --tex: radial-gradient(circle, rgb(22 50 74 / .35) 0 1.1px, transparent 1.4px) 0 0 / 6px 6px; }
.key[data-channel="toofani-town"] span { font-family: "Rye", "Vollkorn", Georgia, serif; letter-spacing: .01em; }
.key[data-channel="maximal-bharat"] { --lit: #DFAB4A; --lit-ink: #4A2356; --w: 7.8; --edge: 3px solid #F7F0E4; }
.key[data-channel="maximal-bharat"] span { font-family: "Syne", var(--text); font-weight: 800; letter-spacing: .04em; }
.key:hover, .key:focus-visible, .key.is-on { background: var(--lit) var(--tex, none); color: var(--lit-ink); box-shadow: inset 0 8px 0 transparent; }
.key:hover::after, .key:focus-visible::after, .key.is-on::after { opacity: 1; }
/* Watch, in the colour of the channel that is on (paper before the script sets one) */
.sw[data-on="aezze-tv"] { --lit: #f0b21f; --lit-ink: #000; }
.sw[data-on="travelers-place"] { --lit: #8BA7C8; --lit-ink: #F8F6F4; }
.sw[data-on="toofani-town"] { --lit: #A32A20; --lit-ink: #F5F1E6; }
.sw[data-on="maximal-bharat"] { --lit: #DFAB4A; --lit-ink: #4A2356; }
/* the dock prints in the colour of the channel that is on (site.css), with or without script */
body:has(.screen[data-on][data-channel="aezze-tv"]) { --dock-ink: #f0b21f; --dock-on: #000; }
body:has(.screen[data-on][data-channel="travelers-place"]) { --dock-ink: #8BA7C8; --dock-on: #2D3438; }
body:has(.screen[data-on][data-channel="toofani-town"]) { --dock-ink: #A32A20; --dock-on: #F5F1E6; }
body:has(.screen[data-on][data-channel="maximal-bharat"]) { --dock-ink: #DFAB4A; --dock-on: #4A2356; }
.watch { width: 100%; min-height: min(56px, 10cqh); font-size: 15px; background: var(--lit, var(--paper)); color: var(--lit-ink, var(--ink)); border-color: var(--lit, var(--paper)); }
.watch:hover { border-color: var(--blue); color: var(--paper); }

@media (min-width: 1000px) {
  .sw { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); grid-template-rows: minmax(0, 1fr); }
  .screen { border-bottom: 0; border-right: 4px solid var(--paper); }

  /* the same print, larger: the disc sits to the lower right of the stack, so the plate and
     the line stand on the black and the ring runs out past the screen's edge */
  .screen--tv { background-image: repeating-linear-gradient(0deg, rgb(246 245 240 / .08) 0 1px, transparent 1px 4px); }
  .screen--tv .tv-set { gap: min(52px, 6.5cqh); padding: 48px 64px; }
  .screen--tv .tv-set::before, .screen--tv .tv-set::after { width: min(92cqh, 80cqw); left: 58%; top: 56%; }
  .screen--tv .plate { width: min(360px, 44cqw, 30cqh * 2.57); padding: min(18px, 2.2cqh) 24px; box-shadow: 10px 10px 0 #f0b21f; }
  .screen--tv .tv-line { max-width: none; font-size: min(clamp(40px, 4.2vw, 68px), 9cqh); }
  .screen--tv .tv-line span { display: table; margin: 0 auto; padding: .04em .16em; } /* one sentence a line */
  .screen--tv .band { font-size: 16px; padding: min(21px, 2.6cqh) 56px; }

  .screen--tp .tp-ground { padding: min(92px, 11.2cqh) 72px min(56px, 6.8cqh); justify-items: center; }
  .screen--tp .postcard { width: min(100%, 860px); grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); padding: min(52px, 6.3cqh) 52px min(56px, 6.8cqh); }
  .screen--tp .tp-name { font-size: min(84px, 100cqi / 4.8, 10.2cqh); }
  .screen--tp .tp-line { margin-top: 16px; font-size: min(40px, 4.9cqh); }
  .screen--tp .tp-address {
    grid-template-columns: none; grid-template-rows: auto minmax(0, 1fr); align-items: start;
    border-top: 0; border-left: 2px dashed #8BA7C8; margin: 0 0 0 36px; padding: 0 0 0 36px;
  }
  .screen--tp .tp-stamp { grid-column: 1; grid-row: 1; justify-self: end; width: min(150px, 18.2cqh); padding: 6px; border-width: 6px; }
  .screen--tp .tp-ruled { grid-column: 1; grid-row: 2; align-self: end; margin-top: 24px; height: min(134px, 16.3cqh); background-image: repeating-linear-gradient(to top, #A8CDD0 0 2px, transparent 2px 44px); }
  .screen--tp .tp-band { font-size: 16px; padding: min(21px, 2.6cqh) 56px; }

  .screen--tt .board { padding: min(92px, 11.2cqh) 96px min(48px, 5.9cqh); justify-items: center; }
  .screen--tt .ticket { width: min(100%, 820px); }
  .screen--tt .tt-band { font-size: 15px; padding: min(32px, 3.9cqh) 40px min(18px, 2.2cqh); }
  .screen--tt .tt-body { padding: min(36px, 4.4cqh) 40px min(28px, 3.4cqh); gap: min(28px, 3.4cqh); }
  .screen--tt .tt-name { font-size: min(clamp(96px, 9.6vw, 140px), 16.8cqh); }
  .screen--tt .tt-line { font-size: min(40px, 4.9cqh); max-width: 16ch; }
  .screen--tt .seal { right: 44px; bottom: 32px; font-size: min(26px, 3.2cqh); padding: 12px 14px 11px 17px; }
  .screen--tt .tt-foot { margin: 0 40px; padding: min(16px, 2cqh) 0 min(32px, 3.9cqh); }
  .screen--tt .tt-foot span { font-size: 15px; }

  .screen--mb .mb-front { gap: min(30px, 3.6cqh); }
  .screen--mb .mb-front img { height: min(260px, 32cqh); }
  .screen--mb .mb-name { font-size: min(92px, (100cqw - 48px) / 7.6, 11.2cqh); }
  .screen--mb .mb-soon { font-size: min(16px, 2cqh); padding: 13px 20px 12px; }

  /* the remote stands as a column of four wide keys; they shrink on shorter screens so Watch
     always shows. Each name is fitted to its key: two lines tall, TRAVELERS wide */
  .remote { --key: clamp(56px, (100cqh - 300px) / 4, 112px); padding: 40px 32px; gap: 28px; }
  .keys { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .key { min-height: var(--key); justify-items: start; text-align: left; padding: 0 28px 0 40px; box-shadow: inset 12px 0 0 var(--lit); }
  .key:hover, .key:focus-visible, .key.is-on { box-shadow: inset 12px 0 0 transparent; }
  .key span { font-size: min(40px, (var(--key) - 20px) / 2.1, 100cqw / var(--w)); }
  .key::after { inset: 8px; }
  .watch { min-height: 64px; font-size: 16px; }
}
/* a landscape phone scrolls the page (stage.css), so the screen keeps a full height of its own.
   The stage stops being a size container there: contained, its height would not grow with the
   remote below the screen, and Chromium resolves its container units to 0 (the remote's sizes
   then fall back to the viewport, which is the right measure on a page that scrolls) */
@media (max-height: 479px) {
  .sw { container-type: normal; }
  .screen { min-height: 100svh; }
}
