/* Devemote, tiles: black page, the lit tile grid on the right, the promise on the left. */
:root {
  --bg: #000;
  --text: #f4f4f5;
  --muted: rgb(244 244 245 / .62);
  --line: rgb(255 255 255 / .14);
  --red: #eb2f33;
  --pad: clamp(20px, 4.4vw, 64px);
  color-scheme: dark;
}

@font-face { font-family: "Allo"; src: url(fonts/allo/Allo-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Allo"; src: url(fonts/allo/Allo-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }

/* Headline cut: Allo pinned to roundness 0 and weight 400 (optical size kept), subset to Latin + Latvian: 41 KB instead of 490 KB. */
@font-face { font-family: "Allo Variable"; src: url(fonts/allo/AlloSharp.woff2) format("woff2"); font-weight: 400; font-display: swap; }
/* Exile shapes the one word "UGLY"; block briefly rather than flash it in a fallback face. */
@font-face { font-family: "Exile"; src: url(fonts/exile/Exile-Regular.woff2) format("woff2"); font-weight: 400; font-display: block; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Exile"; src: url(fonts/exile/Exile-LatinExt.woff2) format("woff2"); font-weight: 400; font-display: block; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 "Allo", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, p, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 16px; height: 16px; flex: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr;
  min-height: 100svh; padding: 0 var(--pad);
}
/* The tiles: a square image pinned to the right edge at full height; its black gutters melt into the page. */
.hero::before {
  content: ""; position: absolute; z-index: -2; top: 0; right: 0; bottom: 0;
  aspect-ratio: 1688 / 1736; height: 100%;
  background: url(img/flizes.webp) center / cover no-repeat;
  animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) both;
}
/* Fade the tiles into black behind the copy and the service row. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, #000 30%, rgb(0 0 0 / .7) 44%, transparent 62%),
    linear-gradient(rgb(0 0 0 / .55), transparent 15%, transparent 74%, rgb(0 0 0 / .9) 92%);
}

/* Nav: plain white links on the left, the wordmark centred, the red Panic button alone on the right. */
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-top: 22px; }
/* Menu: a burger (literally) that opens a panel with the links. Native popover: Esc and outside clicks close it. */
.menu { justify-self: start; }
.menu-btn { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: rgb(24 24 26 / .5); color: var(--text); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: border-color .2s, background-color .2s; }
.menu-btn:hover { background: rgb(40 40 44 / .7); }
.menu-btn svg { width: 20px; height: 20px; }
.menu-panel {
  position: fixed; inset: 14px auto auto 14px; margin: 0; width: min(380px, calc(100vw - 28px));
  display: none; flex-direction: column; padding: 64px 28px 24px; border: 1px solid rgb(255 255 255 / .1); border-radius: 28px; corner-shape: squircle;
  background: rgb(16 16 18 / .92); color: var(--text); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / .8);
  opacity: 0; translate: 0 -8px; transition: opacity .25s, translate .3s cubic-bezier(.16, 1, .3, 1), display .3s allow-discrete, overlay .3s allow-discrete;
}
.menu-panel:popover-open { display: flex; opacity: 1; translate: 0 0; }
@starting-style { .menu-panel:popover-open { opacity: 0; translate: 0 -8px; } }
.menu-panel::backdrop { background: rgb(0 0 0 / .4); }
.menu-panel a { padding: 10px 0; border-bottom: 1px solid var(--line); font-family: "Allo Variable", "Allo", system-ui, sans-serif; font-variation-settings: "ROND" 0; font-size: 34px; letter-spacing: -.035em; line-height: 1.1; transition: color .15s, padding .2s; }
.menu-panel a:hover { padding-left: 6px; }
.menu-panel a[aria-current] { color: var(--red); }
.menu-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .08); color: var(--text); cursor: pointer; }
.menu-close:hover { background: rgb(255 255 255 / .16); }
.menu-close svg { width: 18px; height: 18px; }
.menu-foot { margin-top: 22px; font-size: 13px; color: var(--muted); }
.mark { justify-self: center; color: var(--text); }
.mark svg { display: block; width: 116px; height: auto; fill: currentColor; }
.nav-end { justify-self: end; display: flex; align-items: center; gap: 18px; }
.lang { font-size: 14px; font-weight: 500; color: rgb(244 244 245 / .7); padding: 8px 2px; transition: color .15s; }
.lang:hover { color: var(--text); }
.menu-foot a { color: var(--text); border-bottom: 1px solid var(--line); }
.panic-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px 0 14px; border-radius: 999px; background: #d0262a; color: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; transition: background-color .2s, scale .15s; }
.panic-btn:hover { background: #b81f23; }
.panic-btn:active { scale: .98; }
.panic-btn[aria-current] { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35); }
.panic-btn svg { width: 18px; height: 18px; }
/* On hover the joke rolls away and says what the button is for. Touch screens keep the joke only. */
.lbl span + span { display: none; }
@media (hover: hover) and (min-width: 761px) {
  .lbl { display: grid; overflow: hidden; height: 1.3em; line-height: 1.3em; text-align: center; }
  .lbl span { grid-area: 1 / 1; transition: translate .45s cubic-bezier(.16, 1, .3, 1); }
  .lbl span + span { display: block; translate: 0 110%; }
  .panic-btn:is(:hover, :focus-visible) .lbl span:first-child { translate: 0 -110%; }
  .panic-btn:is(:hover, :focus-visible) .lbl span + span { translate: 0 0; }
}
.sos { display: inline-flex; gap: 6px; margin-top: 14px; color: var(--text); }
.sos b { font-weight: 400; color: var(--red); border-bottom: 1px solid rgb(235 47 51 / .45); transition: border-color .15s; }
.sos:hover b { border-color: var(--red); }

/* Copy: small two-line line-up, then the giant light headline at the bottom-left. */
.copy { align-self: end; padding-bottom: clamp(28px, 4vw, 56px); }
.kicker { font-size: 15px; line-height: 1.45; color: var(--muted); }
.kicker span { color: var(--text); }
.ugly { display: inline-block; font-family: "Exile", system-ui; font-style: normal; font-weight: 400; letter-spacing: 0; color: var(--red); background: repeating-linear-gradient(135deg, var(--red) 0 .075em, transparent .075em .086em); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.star { display: inline-block; width: .46em; height: auto; aspect-ratio: 85 / 72; margin-left: .05em; vertical-align: .34em; color: var(--red); }
h1 { font-family: "Allo Variable", "Allo", system-ui, sans-serif; font-variation-settings: "ROND" 0; margin-top: clamp(20px, 2.6vw, 36px); font-size: clamp(44px, 7.6vw, 124px); font-weight: 400; line-height: .98; letter-spacing: -.045em; }

/* The asterisk's answer, bottom-right, level with the headline's last line. */
.footnote { position: absolute; right: var(--pad); bottom: calc(clamp(28px, 4vw, 56px) + .3em); display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.footnote .star { width: 15px; height: 13px; margin: 0; vertical-align: 0; }

/* The headline's star spins in once, after the page settles. */
h1 .star { animation: star-in .9s cubic-bezier(.16, 1, .3, 1) .5s backwards; }
@keyframes star-in { from { opacity: 0; scale: .4; rotate: -150deg; } }

/* The two stars are one idea: pointing at either turns both and lights the footnote. */
.star { transition: rotate .6s cubic-bezier(.16, 1, .3, 1); }
.footnote { transition: color .2s; }
h1 .star:is(:hover, .is-hover), .footnote:is(:hover, .is-hover) .star,
.hero:has(h1 .star:is(:hover, .is-hover)) .footnote .star, .hero:has(.footnote:is(:hover, .is-hover)) h1 .star { rotate: 180deg; }
.hero:has(h1 .star:is(:hover, .is-hover)) .footnote, .footnote:is(:hover, .is-hover) { color: var(--text); }

@keyframes rise { from { opacity: 0; scale: 1.04; } }

/* Phone: the tiles sit on top as a window; the burger keeps only its icon. */
@media (max-width: 760px) {
  .hero { grid-template-rows: auto 1fr; }
  .hero::before { left: 0; bottom: auto; width: 100%; height: 74svh; aspect-ratio: auto; background-image: url(img/flizes-900.webp); }
  .hero::after { background: linear-gradient(rgb(0 0 0 / .4), transparent 12%, transparent 42%, rgb(0 0 0 / .85) 62%, #000 74%); }
  .nav { padding-top: 12px; gap: 8px; }
  .hero { grid-template-rows: auto 1fr auto; }
  .footnote { position: static; padding-bottom: 28px; }
  .copy { padding-bottom: 20px; }
  .nav { grid-template-columns: auto 1fr auto; gap: 10px; }
  .menu-btn { width: 42px; padding: 0; justify-content: center; }
  .menu-btn span { display: none; }
  .mark svg { width: 92px; }
  .panic-btn { height: 42px; padding-inline: 12px 14px; font-size: 14px; }
  .nav-end { gap: 10px; }
  .lang { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before, h1 .star { animation: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
