/* IKTEN landing · section «ΟΛΟ ΤΟ ΕΡΓΟ ΣΕ ΜΙΑ ΟΘΟΝΗ.» (#othoni) · owner: builder mv · class prefix: oth-
   Purpose and Greek copy: work/PLAN_LIGHT.md B1 (kiniseis merged in). Look: work/LIGHT_SPEC.md (the contract is its part f).
   This file styles ONLY this section: every selector carries a class that starts with .oth- (or .sec-othoni, or #othoni),
   and every @keyframes name starts with oth-. The build refuses anything else.
   Shared materials (plate, tray, glass frame, read-out, page, stamp, chips, …) are the .m-… classes of css/prims.css
   and the classes of css/page.css (.key, .led, .odo, .big, .fmt): use them, do not copy them.
   Build and look: python3 build.py --only othoni   then open dev-othoni.html (the build prints its address).

   THE ONE MOMENT: the anatomy sheet. The app's project screen at true size (a "world" of W × H app pixels, W from
   1400 to 1800, scaled by one transform to the width of the glass), six numbered balloons (keys) in two lanes of the
   plate, ink leaders to a dot on each part, a veil that lights one part at a time. js/sec-othoni.js measures and
   places everything; the values written here are the picture without script (W 1400, H 963, the 1440 layout). */

/* the order: head · the anatomy sheet (figure + legend) · the phone. On a desktop the legend and the phone share a row
   (.oth-sheet is only a wrapper there); where a press zooms, the sheet is its own block, so that the figure can stay
   in view (sticky) while the legend scrolls under it, and stop before the phone. */
.oth-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(28px, 3.4vw, 64px); align-items: start;
  max-width: var(--page-max, 1840px); margin: 0 auto; }
.oth-in > .m-head { grid-column: 1 / -1; }
.oth-sheet { display: contents; }
.oth-stage, .oth-say, .oth-note { grid-column: 1 / -1; }
.oth-key { grid-column: 1; margin-top: clamp(22px, 3.4vh, 36px); }
.oth-mob { grid-column: 2; margin-top: clamp(22px, 3.4vh, 36px); }

/* ───────────── the plate: two lanes for the balloons above and under the glass ───────────── */
.oth-plate.m-plate { --oth-lane: 60px; position: relative; padding: var(--oth-lane) 18px; }
.oth-glass.m-glass {
  aspect-ratio: var(--oth-ww, 1400) / var(--oth-wh, 963);
  container-type: inline-size;                       /* 100cqw = the width of the glass (the fallback scale below) */
}
/* the camera: the world at its own size, scaled to the glass. js sets the transform (and the zoom); without it the
   scale is computed by CSS alone (glass width ÷ world width, as a plain number: tan(atan2(a, b)) = a / b). */
.oth-cam {
  position: absolute; left: 0; top: 0; width: calc(var(--oth-ww, 1400) * 1px); height: calc(var(--oth-wh, 963) * 1px);
  transform-origin: 0 0; transform: scale(var(--oth-k, .5));
  transform: scale(tan(atan2(100cqw, calc(var(--oth-ww, 1400) * 1px))));
}
.oth-cam.is-anim { transition: transform 420ms var(--inout); }
.oth-world {
  position: absolute; inset: 0; --ik-vh: 9.63px; --ik-ico-stroke: 2;
  text-align: left; pointer-events: none; user-select: none; -webkit-user-select: none;
}
/* a still picture of the app: no scroll bars, nothing answers the pointer (as the film's world, css/demo.css .world) */
.oth-world .ik-app { height: 100%; }
.oth-world .ik-scroll, .oth-world .ik-projects, .oth-world .ik-chat__log { overflow: hidden; }
.oth-world button { cursor: default; }
.oth-world .ik-rail__logo .ik-mark { font-size: 17px; }

/* the draughtsman's break: a part of the long screen is left out here, and the band says which */
.oth-break { display: flex; align-items: center; gap: 0; height: 28px; margin: 14px -20px 0; padding: 0 20px; background: #ffffff; color: var(--ink); }
.oth-break__l { flex: 1 1 0; height: 1.5px; background: var(--ink); }
.oth-break__z { flex: none; width: 18px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: miter; }
.oth-break__t { flex: none; padding: 0 12px; font: 560 13px/1 var(--f-text); color: var(--ink-3); white-space: nowrap; }

/* the veil: one group per part (a white veil with holes + the ink outline of the holes); only opacity changes */
.oth-veil { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.oth-v { opacity: 0; transition: opacity 180ms var(--out); }
.oth-v.is-on { opacity: 1; }
.oth-v__veil { fill: #ffffff; fill-opacity: .72; fill-rule: evenodd; }
.oth-v__line { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* ───────────── balloons: round white keys with a number (the anatomy of .key, round) ───────────── */
.oth-pin.key {
  --kd: 4px; --oth-d: 40px;
  position: absolute; z-index: 3; left: calc(var(--x, 50%) - var(--oth-d) / 2); top: 0;
  width: var(--oth-d); height: calc(var(--oth-d) + var(--kd)); border-radius: calc(var(--oth-d) / 2);
}
.oth-pin .key__cap { width: var(--oth-d); height: var(--oth-d); border-radius: 50%; padding: 0 0 1px;
  font: 800 20px/1 var(--f-display); letter-spacing: 0; font-variant-numeric: tabular-nums; }
/* touch: a round key drawn 34-40 px takes a tap at least 44 x 44 px (an invisible ring around its cap) */
.oth-pin.key::after { content: ""; position: absolute; border-radius: 50%;
  left: min(0px, calc((100% - 44px) / 2)); right: min(0px, calc((100% - 44px) / 2));
  top: min(0px, calc((100% - 44px) / 2)); bottom: min(0px, calc((100% - 44px) / 2)); }
.oth-pin--top.key { top: calc((var(--oth-lane) - var(--oth-d) - var(--kd)) / 2); }
.oth-pin--bot.key { top: auto; bottom: calc((var(--oth-lane) - var(--oth-d) - var(--kd)) / 2); }
.oth-pin.is-on { --top-a: var(--blk-a); --top-b: var(--blk-b); --side: #000; --txt: #fff; --hi: rgba(255, 255, 255, .34); --seam: rgba(255, 255, 255, .17); }
.oth-pin.is-on .key__cap { transform: translateY(2px); }
.oth-pin.is-on:active .key__cap, .oth-pin.is-on.is-down .key__cap { transform: translateY(var(--kd)); }

/* leaders: a 1.5 px line of ink from the balloon to a dot on its part. js gives each its place, length and angle */
.oth-lead {
  position: absolute; z-index: 2; left: 0; top: 0; width: 1.5px; height: var(--l, 0px); margin-left: -.75px;
  background: var(--ink); pointer-events: none; transform-origin: 50% 0;
  transform: translate(var(--lx, 0px), var(--ly, 0px)) rotate(var(--a, 0deg)) scaleY(var(--s, 1));
  transition: opacity 120ms linear;
}
.oth-dot {
  position: absolute; z-index: 3; left: 0; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 2px #ffffff; pointer-events: none;
  transform: translate(var(--dx, 0px), var(--dy, 0px)); transition: opacity 120ms linear;
}
.sec-othoni.is-drawing .oth-lead { transition: transform 260ms var(--out) var(--d, 0ms), opacity 120ms linear; }
.sec-othoni.is-drawing .oth-dot { transition: opacity 120ms linear calc(var(--d, 0ms) + 240ms); }
html.js .sec-othoni:not(.is-in) .oth-lead { --s: 0; }
html.js .sec-othoni:not(.is-in) .oth-dot { opacity: 0; }
/* without the script the leaders and dots do not exist (they are made by it); the balloons stay in their lanes */
.oth-plate.is-zoom .oth-lead, .oth-plate.is-zoom .oth-dot { opacity: 0; }

/* where a press zooms and the plate takes at most ~60 % of the screen (js decides: .is-stick), the plate stays in
   view, on a white mat, while the read-out and the legend scroll under it, so that a press on a row is seen at once
   (phones). It stops at the end of the legend (.oth-sheet). Within the section's z-index range (the wall's stage is 5). */
.sec-othoni.is-stick .oth-stage { position: sticky; top: var(--top-h); z-index: 4; background: var(--white);
  margin-top: -8px; padding: 8px 0 8px; box-shadow: 0 1px 0 var(--line); }

/* the read-out under the plate: only where the screen is small and a press zooms into it */
.oth-say { display: none; margin-top: 12px; }
.sec-othoni.is-stick .oth-say { margin-top: 4px; }
.sec-othoni.is-zoomable .oth-say { display: flex; }
.oth-say .m-readout__n { min-width: 1.4em; text-align: center; }
.oth-note { margin: 12px 0 0 auto; text-align: right; }

/* ───────────── under the plate: the legend (the keyboard controls) and the phone ───────────── */
.oth-legend {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(20px, 2.6vw, 44px);
  margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink);
}
.oth-item { border-bottom: 1px solid var(--line-2); }
.oth-row {
  position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start;
  width: 100%; min-height: 44px; padding: 15px 12px 17px 16px; text-align: left;
}
button.oth-row { margin: 0; border: 0; border-radius: 0; background: none; font: inherit; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button.oth-row:focus-visible { outline-offset: -2px; border-radius: 4px; }
.oth-row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 16px; width: 3px; background: var(--ink);
  transform: scaleY(0); transform-origin: 50% 0; transition: transform 180ms var(--out); }
.oth-row[aria-pressed="true"]::before { transform: none; }
.oth-n {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin-top: -3px;
  box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink);
  font: 800 17px/1 var(--f-display); font-variant-numeric: tabular-nums; padding-top: 1px;
}
.oth-row[aria-pressed="true"] .oth-n { background: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  button.oth-row:hover .oth-n { box-shadow: inset 0 0 0 2.5px var(--ink); }
}
.oth-tx { display: block; }
.oth-t { display: block; font: 640 17px/1.3 var(--f-text); letter-spacing: -.008em; color: var(--ink); }
.oth-s { display: block; margin-top: 5px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.oth-more {
  display: inline-flex; align-items: center; gap: .4em; min-height: 44px; margin-top: 6px;
  font: 620 16px/1.2 var(--f-text); color: var(--ink); text-decoration: none;
}
.oth-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* the phone: text, then the phone screen of an approval (the kit's mobile.html #egkrisi, light theme) */
.oth-mob { display: grid; grid-template-columns: minmax(0, 15em) auto; gap: 22px; align-items: start; }
.oth-mob__tx { padding-top: 15px; border-top: 1px solid var(--ink); }
.oth-mob__h { margin: 0; font: 660 clamp(21px, 1.7vw, 27px)/1.14 var(--f-text); letter-spacing: -.014em; color: var(--ink); }
.oth-mob__p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.oth-phone.m-plate { --oth-pk: .5; --m-plate-r: 34px; --m-plate-pad: 9px; width: max-content; justify-self: end; }
.oth-phone__glass.m-glass { width: calc(390px * var(--oth-pk)); height: calc(844px * var(--oth-pk)); border-radius: 24px; }
.oth-phone__root {
  position: absolute; left: 0; top: 0; width: 390px; height: 844px; --k-vh: 844px; --ik-ico-stroke: 2;
  transform: scale(var(--oth-pk)); transform-origin: 0 0; pointer-events: none; user-select: none; -webkit-user-select: none;
}
/* a picture of a phone, not a phone: the safe-area padding of the real app must not move it on a phone held sideways */
.oth-phone .oth-phone__root .ik-app { padding-left: 0; padding-right: 0; }
.oth-phone .oth-phone__root button { cursor: default; }

/* ───────────── widths ───────────── */
@media (min-width: 1700px) {
  .oth-phone.m-plate { --oth-pk: .56; }
}
@media (max-width: 1100px) {
  .oth-plate.m-plate { --oth-lane: 54px; padding-left: 14px; padding-right: 14px; }
  .oth-pin.key { --oth-d: 36px; }
  .oth-pin .key__cap { font-size: 18px; }
  .oth-in { display: block; }
  .oth-sheet { display: block; }
  .oth-mob { margin-top: clamp(36px, 5vh, 56px); grid-template-columns: auto minmax(0, 24em); align-items: center; justify-content: start; }
  .oth-mob__tx { order: 2; }
  .oth-phone.m-plate { order: 1; justify-self: start; }
}
@media (max-width: 640px) {
  .oth-plate.m-plate { --oth-lane: 50px; padding-left: 8px; padding-right: 8px; }
  .oth-legend { grid-template-columns: minmax(0, 1fr); }
  .oth-row { padding: 14px 10px 15px 14px; }
  .oth-t { font-size: 16.5px; }
  .oth-s { font-size: 15px; }
  .oth-mob { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; }
  .oth-mob__tx { order: 0; justify-self: stretch; }
  .oth-phone.m-plate { order: 1; justify-self: center; --oth-pk: .55; }
  .oth-note { text-align: left; margin-left: 0; }
}
@media (max-width: 380px) {
  .oth-pin.key { --oth-d: 34px; }
}
