/* The Kaydorn AI page, the home of each language (it/, en/, de/, ar/), loaded after site.css, which gives it the
   palette, the type, the nav, the footer, the fade-ins, the chapters and the close. One idea per screen: the opening,
   with the product's name over the page's film; a chapter drawn as a dial, the data inside the servers; the models
   of Kaydorn AI in large type; and the close. The Kaydorn Sibyl page, a product of Kaydorn AI, loads this sheet too,
   for the panels and the motion of its drawings and the lede of its close, then its own (sibyl.css).
   The dial is inline SVG, coloured here and measured in its own units, so lines and labels scale with it. It keeps its
   left and right on the Arabic pages, like the map of the offices: it is a picture. Its motion runs only while it is on
   screen (data-motion, assets/site.js) and not at all for a visitor who asks for less motion. */

.of-glow-stop { stop-color: var(--brass-hi); }
/* A drawing fills its figure and keeps left and right on the Arabic pages: the dial here, the drawings of the
   capabilities of the Kaydorn Sibyl page (sibyl.css). */
.of-drawing > svg { display: block; width: 100%; height: auto; overflow: visible; direction: ltr; }
[data-motion].is-idle * { animation-play-state: paused; }

/* A light that runs along a line: one dash of 10 in a pattern of 120 on a line 100 long (pathLength), so a single dash
   is on the line at a time. It starts hidden before the line's start and leaves past its end. */
@keyframes of-flow { from { stroke-dashoffset: 10; } to { stroke-dashoffset: -100; } }
@keyframes of-turn { to { transform: rotate(360deg); } }
@keyframes of-glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes of-film { from { opacity: 0; transform: scale(1.04); } }
@keyframes of-rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Opening ---------- */
/* The name of the product and its promise over the page's film (assets/film-offerta.mp4, from tools/build-film.sh),
   which the hero's rules and script play as on the AI Agents page (.hero__video in site.css). The film is a portrait picture:
   a landscape screen shows it on the side away from the copy, where it needs less enlarging than across the whole
   width and the face stays clear of the copy, and a shade fades it into the dark under the copy, under the nav and at
   the foot. --shade-to points from the copy to the film. */
.of-open { --shade-to: 90deg; position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; display: grid; padding-top: var(--nav-h); background: var(--abyss); }
[dir="rtl"] .of-open { --shade-to: 270deg; }
.of-open .hero__video { inset-inline-start: auto; width: 68%; object-position: 50% 24%; animation: of-film 2.4s var(--ease) both; }
.of-open::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  linear-gradient(180deg, color-mix(in srgb, var(--abyss) 70%, transparent), transparent calc(var(--nav-h) + 6rem)),
  linear-gradient(0deg, var(--abyss), color-mix(in srgb, var(--abyss) 55%, transparent) 14%, transparent 34%),
  linear-gradient(var(--shade-to), var(--abyss) 32%, color-mix(in srgb, var(--abyss) 55%, transparent) 50%, color-mix(in srgb, var(--abyss) 12%, transparent) 72%, transparent); }
.of-open__in { position: relative; z-index: 1; display: grid; align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem); }
.of-open__copy { display: grid; justify-items: start; gap: 1.5rem; max-width: 44rem; }
.of-open__copy .eyebrow { margin-bottom: -.4rem; }
.of-open__title { font-size: clamp(5rem, 8vw, 8.6rem); font-weight: 200; line-height: .9; letter-spacing: -.05em; white-space: nowrap; }
.of-open__claim { max-width: 19em; font-size: clamp(1.5rem, 2.3vw, 2.35rem); font-weight: 200; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
.of-open__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .5rem; }
/* The copy rises line after line as the page opens, while the film comes out of the dark. */
.of-open__copy > * { animation: of-rise .9s var(--ease) both; }
.of-open__copy > :nth-child(2) { animation-delay: .08s; }
.of-open__copy > :nth-child(3) { animation-delay: .18s; }
.of-open__copy > :nth-child(4) { animation-delay: .28s; }

/* ---------- Statement ---------- */
/* Two parts, the second in brass on lines of its own: as a block, each part is balanced by itself. */
.page-statement__text em { display: block; }

/* ---------- Chapter drawn as a dial ---------- */
/* The picture half of the chapter holds the drawing on the hull's colour, over a faint grid of dots. */
.of-panel { display: grid; place-items: center; padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 5vw, 5rem); background: var(--hull); }
.of-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, color-mix(in srgb, var(--bone) 9%, transparent) 1px, transparent 1.6px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); }
.of-drawing { position: relative; width: min(100%, 36rem); }

/* 01 · The data: the company's servers as an instrument dial. A rim with 120 ticks and 12 marks, a brass arc and a ring
   of dots turning opposite ways, six of the company's systems on the ring of dots and, at the centre, the model: the
   star of the brand. The systems are products, so their names, the labels, are the same in every language. The ticks, the marks and the dots are the dashes of a circle with its own pathLength; the strokes are in the
   drawing's units (see .union__ring in site.css). */
.of-dial__rim { fill: none; stroke: var(--rule-strong); stroke-width: 1; }
.of-dial__ticks { fill: none; stroke: color-mix(in srgb, var(--bone) 28%, transparent); stroke-width: 9; stroke-dasharray: .08 .92; }
.of-dial__marks { fill: none; stroke: var(--brass); stroke-width: 20; stroke-dasharray: .012 .988; }
.of-dial__arc { fill: none; stroke: var(--brass-hi); stroke-width: 1.4; stroke-dasharray: 20 5 3 5 36 31; opacity: .85; transform-box: fill-box; transform-origin: center; animation: of-turn 140s linear infinite; }
.of-dial__dots { fill: none; stroke: color-mix(in srgb, var(--bone) 32%, transparent); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 0 1; transform-box: fill-box; transform-origin: center; animation: of-turn 220s linear infinite reverse; }
.of-dial__ring { fill: none; stroke: color-mix(in srgb, var(--brass) 45%, transparent); stroke-width: 1; }
.of-dial__glow { animation: of-glow 5s ease-in-out infinite; }
.of-dial__spokes path { fill: none; stroke: color-mix(in srgb, var(--brass) 38%, transparent); stroke-width: 1; }
.of-dial__flows path { fill: none; stroke: var(--brass-hi); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 10 110; stroke-dashoffset: 10; animation: of-flow 3.6s cubic-bezier(.45, 0, .55, 1) infinite; }
.of-dial__flows path:nth-child(2) { animation-delay: -.6s; }
.of-dial__flows path:nth-child(3) { animation-delay: -2.4s; }
.of-dial__flows path:nth-child(4) { animation-delay: -1.2s; }
.of-dial__flows path:nth-child(5) { animation-delay: -3s; }
.of-dial__flows path:nth-child(6) { animation-delay: -1.8s; }
.of-dial__nodes circle { fill: var(--brass-hi); stroke: color-mix(in srgb, var(--brass-hi) 30%, transparent); stroke-width: 8; }
/* An outline in the panel's colour keeps each label readable where it crosses the arc. */
.of-dial__labels text { fill: var(--mist); font: 500 13px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; paint-order: stroke; stroke: var(--hull); stroke-width: 7px; stroke-linejoin: round; }
.of-dial__core { fill: color-mix(in srgb, var(--abyss) 70%, transparent); stroke: var(--brass); stroke-width: 1.2; }
.of-dial__halo { fill: none; stroke: color-mix(in srgb, var(--brass) 55%, transparent); stroke-width: 1; }
.of-dial__star { fill: var(--brass-hi); }
/* Under the chapter's text, the levels of security from the safest down: a small label in brass capitals, then one row
   per level with its name in English. The name column fits the longest, Kaydorn Private Cloud. */
.of-tiers__title { margin-top: clamp(2rem, 4vw, 2.8rem); font-size: .78rem; font-weight: 500; letter-spacing: .22em; line-height: 1.4; text-transform: uppercase; color: var(--brass); }
.of-tiers { --list-name: 11.5rem; margin-top: 1rem; }

/* ---------- Models ---------- */
/* The section opens on a band like the opening of the page: the head on one side, and on the other, against the edge of
   the screen, a still of the page's film, a hand on the glass, fading into the dark under the head and at the foot;
   its inner edge stands where the shade is still whole. --shade-to points from the head to the still.
   Then, after some room, one row per model, across the width, like a catalogue: its name on one line, KAYDORN in brass
   capitals and the area in bone at the same size, and on the other side what it covers. Under the pointer the row
   lights up from one edge of the screen to the other, as the lineup of the AI Agents page does, and KAYDORN brightens.
   The first model, Global Business, stands apart by its shape and its warmth, never by the light the pointer gives the
   others: its name runs across both columns, with what it covers under it, and its row rests on a band tinted with brass,
   which warms under the pointer. */
.of-modules { --shade-to: 90deg; padding-bottom: clamp(6rem, 12vw, 11rem); border-top: 1px solid var(--rule); }
[dir="rtl"] .of-modules { --shade-to: 270deg; }
.of-modules__band { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: min(80svh, 48rem); padding-block: clamp(6rem, 12vw, 10rem) clamp(3rem, 6vw, 5rem); }
.of-modules__band .sec__head { gap: 1.6rem; margin-bottom: 0; }
.of-modules__photo { position: absolute; inset-block: 0; inset-inline-end: 0; z-index: -2; width: 62%; height: 100%; object-fit: cover; object-position: 50% 36%; }
.of-modules__band::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  linear-gradient(0deg, var(--abyss), color-mix(in srgb, var(--abyss) 55%, transparent) 18%, transparent 40%),
  linear-gradient(var(--shade-to), var(--abyss) 40%, color-mix(in srgb, var(--abyss) 45%, transparent) 56%, transparent 76%); }
.of-modules__list { margin-top: clamp(3.5rem, 7vw, 6.5rem); border-bottom: 1px solid var(--rule); }
.of-module { --row-bg: var(--abyss); --name-size: clamp(2.3rem, 4.8vw, 4.6rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); align-items: end; gap: 1.4rem clamp(2rem, 6vw, 6rem); padding-block: clamp(2.4rem, 4.4vw, 4.2rem); border-top: 1px solid var(--rule); background: var(--row-bg); box-shadow: 0 0 0 100vmax var(--row-bg); clip-path: inset(0 -100vmax); }
.js .of-module.reveal { transition: opacity .8s ease, transform .9s var(--ease), background-color .35s ease, box-shadow .35s ease; transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s; }
.of-module__name { font-size: var(--name-size); font-weight: 200; line-height: 1; letter-spacing: -.035em; }
.of-module__brand { font-weight: 300; letter-spacing: .04em; text-transform: uppercase; color: var(--brass); transition: color .35s ease; }
.of-module__word { color: var(--bone); }
.of-module__desc { padding-bottom: .4rem; font-size: 1.02rem; line-height: 1.65; color: var(--mist); }
.of-module--lead { --row-bg: color-mix(in srgb, var(--brass) 9%, var(--abyss)); }
.of-module--lead .of-module__name { grid-column: 1 / -1; }
.of-module--lead .of-module__desc { max-width: 34rem; }
.of-module--lead .of-module__brand { color: var(--brass-hi); }
.of-module:nth-child(2) { --d: .05s; }
.of-module:nth-child(3) { --d: .1s; }
.of-module:nth-child(4) { --d: .15s; }
.of-module:nth-child(5) { --d: .2s; }
.of-module:nth-child(6) { --d: .25s; }
.of-module:nth-child(7) { --d: .3s; }
.of-module:nth-child(8) { --d: .35s; }
@media (hover: hover) {
  .of-module:hover { --row-bg: var(--hull); }
  .of-module--lead:hover { --row-bg: color-mix(in srgb, var(--brass) 14%, var(--abyss)); }
  .of-module:hover .of-module__brand { color: var(--brass-hi); }
}

/* ---------- Close ---------- */
.of-close__lede { max-width: 32rem; margin: -.8rem auto 2.4rem; font-size: 1.05rem; color: var(--mist); text-wrap: balance; }

/* ---------- Languages ---------- */
/* Arabic headings need more room between their lines. German compounds are hyphenated. */
:lang(ar) .of-open__claim { line-height: 1.5; }
:lang(de) :is(.of-open__claim, .of-module__desc) { -webkit-hyphens: auto; hyphens: auto; }

/* ---------- Narrower screens ---------- */
/* Below 1000 px the film covers the whole opening, with its top in view, and the copy stands at the foot over the shade;
   a drawing's panel takes the height it needs; the still of the models covers its band, and a model's name stands
   over what it covers. */
@media (max-width: 1000px) {
  .of-open .hero__video { width: 100%; object-position: 50% 18%; }
  .of-open::after { background:
    linear-gradient(180deg, color-mix(in srgb, var(--abyss) 70%, transparent), transparent calc(var(--nav-h) + 4rem)),
    linear-gradient(0deg, var(--abyss) 8%, color-mix(in srgb, var(--abyss) 80%, transparent) 40%, color-mix(in srgb, var(--abyss) 10%, transparent) 70%); }
  .of-open__in { align-items: end; padding-block: 12rem 2.5rem; }
  .of-open__title { font-size: clamp(3.2rem, 15vw, 6.4rem); }
  .chapter__media.of-panel { aspect-ratio: auto; padding: 3.2rem var(--gutter); }
  .of-modules__band { min-height: min(86svh, 44rem); }
  .of-modules__photo { width: 100%; object-position: 50% 30%; }
  .of-modules__band::after { background: linear-gradient(0deg, var(--abyss) 6%, color-mix(in srgb, var(--abyss) 80%, transparent) 38%, color-mix(in srgb, var(--abyss) 10%, transparent) 72%); }
}
/* In one column every name shrinks so that the longest, KAYDORN Global Business, keeps one line: it is 11.4 times its
   size wide in Hanken Grotesk, and 11.6 leaves it some room. */
@media (max-width: 760px) {
  .of-module { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .of-module__name { font-size: min(var(--name-size), (100vw - 2 * var(--gutter)) / 11.6); }
}
/* On a phone the dial's labels would be too small to read: the dial keeps its drawing. A level of security puts its
   name over its line, which would otherwise be squeezed beside the name's column. */
@media (max-width: 560px) {
  .of-dial__labels { display: none; }
  .of-tiers li { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .of-open .hero__video, .of-open__copy > *, .of-dial__arc, .of-dial__dots, .of-dial__glow, .of-dial__flows path { animation: none; }
  .js .of-module.reveal, .of-module__brand { transition: none; }
}
