/* kurzworld.com: the home page's opening screen (build.py intro()): dark, the whole window, the globe in the middle and
   the site's four parts around it, each lit by its own colour; a keyboard along the bottom. Everything still without
   movement for those who ask their system for less. */
.intro {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 40px 0 92px; background: #07080b;
}
/* the glow behind the globe, a hint of each part's colour in its corner, and a fine grid of dots */
.intro::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34% 44% at 50% 38%, rgba(48, 104, 245, .34), transparent 72%),
    radial-gradient(30% 36% at 10% 18%, rgba(232, 145, 58, .12), transparent 70%),
    radial-gradient(30% 36% at 90% 18%, rgba(232, 69, 60, .12), transparent 70%),
    radial-gradient(30% 36% at 10% 86%, rgba(155, 106, 232, .14), transparent 70%),
    radial-gradient(30% 36% at 90% 86%, rgba(240, 163, 58, .11), transparent 70%); }
.intro::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px) 0 0 / 26px 26px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent 80%); mask-image: radial-gradient(60% 60% at 50% 45%, #000, transparent 80%); }

.iwrap { position: relative; width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr minmax(340px, 1fr) 1fr; grid-template-areas: "s1 core s2" "s3 core s4";
  gap: 28px 40px; align-items: center; }

/* the lines from the globe to the parts, and a spark running out along each, in its part's colour */
.ilines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.ilines path { fill: none; }
.ilines .base { stroke: rgba(255, 255, 255, .14); stroke-width: .14; animation: ifade 1.2s .7s backwards; }
.ilines .pulse { stroke: var(--c); stroke-width: .5; stroke-linecap: round; stroke-dasharray: 6 194; stroke-dashoffset: 200;
  animation: ipulse 4.8s linear infinite; animation-delay: calc(2s + var(--n) * 1.2s); }

/* the middle: the globe in its orbits, the name, one line and the way in */
.icore { grid-area: core; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.iglobe { position: relative; width: 220px; height: 220px; margin: 34px 0 40px; animation: iglobe 1.3s cubic-bezier(.2, .7, .2, 1) backwards; }
.iglobe .emblem { position: relative; z-index: 1; width: 100%; height: 100%; filter: drop-shadow(0 0 46px rgba(64, 124, 255, .55));
  animation: ifloat 7s 1.3s ease-in-out infinite; }
.iglobe .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1); animation: ispin linear infinite; }
.iglobe .r1 { inset: -18px; animation-duration: 26s; }
.iglobe .r2 { inset: -40px; border-style: dashed; border-color: rgba(255, 255, 255, .08); animation-duration: 48s; animation-direction: reverse; }
.iglobe .r3 { inset: -64px; border-color: rgba(255, 255, 255, .06); animation-duration: 72s; }
/* (on the orbits, a planet for each part, in its colour) */
.iglobe .ring::before, .iglobe .r3::after { content: ""; position: absolute; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; }
.iglobe .r1::before { top: 50%; left: 0; background: #e8913a; box-shadow: 0 0 12px #e8913a; }
.iglobe .r2::before { top: 14.6%; left: 85.4%; background: #e8453c; box-shadow: 0 0 12px #e8453c; }
.iglobe .r3::before { top: 100%; left: 50%; background: #9b6ae8; box-shadow: 0 0 12px #9b6ae8; }
.iglobe .r3::after { top: 14.6%; left: 14.6%; background: #f0a33a; box-shadow: 0 0 12px #f0a33a; }
.iword { margin: 0; animation: iup .9s .35s backwards; }
.iword .word { font-size: clamp(40px, 4.4vw, 62px); line-height: 1; letter-spacing: .05em; color: #f6f8fb; }
.iword .word b { color: #4a84ff; }
.itag { margin: 14px 0 0; font: 600 11.5px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); animation: iup .9s .5s backwards; }
.iline { margin: 18px 0 0; max-width: 30ch; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.5; color: var(--ink-dim); animation: iup .9s .65s backwards; }
.ienter { margin-top: 26px; --accent: #2f6cf0; animation: iup .9s .8s backwards; }
.ienter span { font-size: 18px; animation: inudge 2.4s 2s ease-in-out infinite; }

/* the four parts: a fan of pictures, then the words; the whole card is the link */
.isat { position: relative; z-index: 1; display: block; width: 100%; max-width: 360px; padding: 16px 20px 20px; border-radius: 16px;
  text-decoration: none; color: var(--ink);
  background: linear-gradient(color-mix(in srgb, var(--accent) 15%, #14171d), #0e1115 82%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 26px 50px -26px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
  animation: isat 1s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(1s + var(--n) * .16s); }
.isat:hover, .isat:focus-visible { transform: translateY(-5px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 30px 60px -24px color-mix(in srgb, var(--accent) 80%, transparent); }
.s1 { grid-area: s1; justify-self: end; } .s2 { grid-area: s2; justify-self: start; }
.s3 { grid-area: s3; justify-self: end; } .s4 { grid-area: s4; justify-self: start; }
.ifan { position: relative; display: block; height: 128px; margin-bottom: 14px; }
.ifan img { position: absolute; left: 50%; top: 50%; border-radius: 7px;
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .09);
  transform: translate(-50%, -50%) translateX(calc(var(--i) * var(--dx))) translateY(calc(var(--i) * var(--dy, 0px))) rotate(calc(var(--i) * var(--rot)));
  transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.ifan.covers img { width: 104px; --dx: 42px; --rot: 7deg; --dy: 0px; }
.ifan.screens img { width: 210px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; --dx: 30px; --rot: 5deg; --dy: 4px; }
.ifan.strips img { top: 42%; width: 250px; --dx: 0px; --dy: 26px; --rot: -2.5deg; }
.isat:hover .ifan.covers img { --dx: 50px; --rot: 10deg; }
.isat:hover .ifan.screens img { --dx: 40px; --rot: 8deg; }
.isat:hover .ifan.strips img { --dy: 36px; --rot: -4deg; }
.ilabel { display: flex; align-items: center; gap: 10px; font: 700 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.ilabel b { color: var(--ink-faint); font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.isat h2 { margin: 10px 0 8px; font: 800 23px/1.15 var(--sans); letter-spacing: -.02em; color: #f6f8fb; }
.isat p { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--ink-dim); }
.imore { font: 600 14px/1 var(--sans); color: color-mix(in oklab, var(--accent) 75%, #fff); }

/* the keyboard along the bottom, a wave of blue running over its keys */
.ikeys { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; z-index: -1; opacity: .6;
  -webkit-mask-image: linear-gradient(to top, #000 15%, transparent); mask-image: linear-gradient(to top, #000 15%, transparent);
  animation: ifade 1.5s 1.2s backwards; }
.ikeys i { position: relative; flex: 1; border-left: 1px solid rgba(255, 255, 255, .06); background: linear-gradient(#1a1e25, #0f1217); }
.ikeys i::after { content: ""; position: absolute; inset: 0; opacity: 0; background: linear-gradient(to top, rgba(74, 132, 255, .95), rgba(74, 132, 255, 0));
  animation: ilit 7s ease-out infinite; animation-delay: calc(2.4s + var(--k) * 55ms); }
.ikeys b { position: absolute; top: 0; z-index: 1; width: calc(100% / 36 * .56); height: 56%; transform: translateX(-50%);
  background: #050608; border-radius: 0 0 2px 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .04); }

.ianchor { display: block; height: 0; }

@keyframes ifade { from { opacity: 0; } }
@keyframes iup { from { opacity: 0; translate: 0 22px; } }
@keyframes isat { from { opacity: 0; translate: 0 30px; scale: .97; } }
@keyframes iglobe { from { opacity: 0; scale: .55; } }
@keyframes ifloat { 50% { translate: 0 -8px; } }
@keyframes ispin { to { rotate: 360deg; } }
@keyframes inudge { 50% { translate: 0 3px; } }
@keyframes ipulse { to { stroke-dashoffset: 0; } }
@keyframes ilit { 0% { opacity: 0; } 3% { opacity: 1; } 18%, 100% { opacity: 0; } }

/* a window not tall enough for the two rows: the pictures smaller */
@media (min-width: 981px) and (max-height: 860px) {
  .intro { padding-bottom: 70px; }
  .ifan { height: 100px; margin-bottom: 10px; }
  .ifan.covers img { width: 84px; --dx: 34px; } .ifan.screens img { width: 170px; } .ifan.strips img { width: 210px; --dy: 20px; }
  .iglobe { width: 180px; height: 180px; margin: 30px 0 34px; }
  .isat p { margin-bottom: 10px; }
}
/* a tablet: the globe on top, the parts two by two under it, no lines */
@media (max-width: 980px) {
  .intro { min-height: 0; padding: 56px 0 96px; }
  /* (taller than wide: the glow over the globe, the parts' colours low down) */
  .intro::before { background: radial-gradient(90% 26% at 50% 14%, rgba(48, 104, 245, .34), transparent 72%),
    radial-gradient(70% 30% at 50% 100%, rgba(155, 106, 232, .14), transparent 70%); }
  .iwrap { grid-template-columns: 1fr 1fr; grid-template-areas: "core core" "s1 s2" "s3 s4"; gap: 18px; }
  .ilines { display: none; }
  .icore { margin-bottom: 26px; }
  .isat { max-width: none; justify-self: stretch; }
}
/* a phone: one part to a row, its pictures beside its words */
@media (max-width: 620px) {
  .intro { padding: 60px 0 84px; }
  .iwrap { grid-template-columns: 1fr; grid-template-areas: "core" "s1" "s2" "s3" "s4"; gap: 12px; padding: 0 16px; }
  .iglobe { width: 150px; height: 150px; margin: 30px 0 34px; }
  .iglobe .r3 { inset: -52px; }
  .isat { display: grid; grid-template-columns: 112px 1fr; column-gap: 16px; padding: 14px 16px; align-items: start; }
  .ifan { grid-row: 1 / span 4; height: 100%; min-height: 96px; margin: 0; }
  .ifan.covers img { width: 58px; --dx: 13px; --rot: 8deg; }
  .ifan.screens img { width: 96px; --dx: 9px; --rot: 6deg; --dy: 2px; }
  .ifan.strips img { width: 108px; --dy: 15px; }
  .isat:hover .ifan.covers img { --dx: 16px; } .isat:hover .ifan.screens img { --dx: 12px; } .isat:hover .ifan.strips img { --dy: 18px; }
  .isat h2 { margin: 7px 0 5px; font-size: 18px; }
  .isat p { margin-bottom: 8px; font-size: 14px; }
  .ikeys { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro *, .intro *::before, .intro *::after { animation: none !important; transition: none !important; }
  .ilines .pulse { display: none; }
}
