/* Mesh UI website. The core style of dalica.pkarma.com: dark Gruvbox, Schibsted Grotesk,
   one accent (the app's blue-gray) and one warm touch (orange) for the wordmark dot. */
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/SchibstedGrotesk-Variable-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/Caveat-SemiBold-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #1d2021; --panel: #282828; --raised: #32302f; --line: #3c3836; --line-2: #504945;
  --ink: #ebdbb2; --ink-hi: #fbf1c7; --soft: #d5c4a1; --muted: #a89984; --faint: #928374;
  --accent: #83a598; --accent-hi: #9bb8ad; --accent-deep: #5f7f73; --on-accent: #1d2021;
  --warm: #fe8019;
  --radius: 12px; --matte: 8px;
  --shadow: 0 30px 70px -30px #000c;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, ::before, ::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); overflow-x: hidden;
  background:
    radial-gradient(55% 90% at 10% 0%, #83a5981a, transparent 70%) 0 0 / 100% 1000px no-repeat,
    radial-gradient(90% 100% at 50% 0%, #3a3633 0%, #282828 45%, #1d2021 82%) 0 0 / 100% 1200px no-repeat,
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: #83a59955; color: var(--ink-hi); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .16s; }
a:hover { color: var(--accent-hi); }
img { max-width: 100%; }
code { font: .86em var(--mono); color: var(--ink); background: var(--raised); border: 1px solid var(--line); border-radius: 4px; padding: .05em .32em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--raised); padding: 8px 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; transition: background-color .3s, box-shadow .3s, backdrop-filter .3s; }
.top.stuck { background: #1d2021d9; backdrop-filter: blur(12px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.top-in { max-width: 1160px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; flex: none; white-space: nowrap; align-items: center; gap: 10px; color: var(--ink-hi); text-decoration: none; }
.brand img { transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-12deg) scale(1.04); }
.brand:hover { color: var(--ink-hi); }
.wordmark { font-size: 1.45rem; font-weight: 650; letter-spacing: -.035em; line-height: 1; }
.wordmark::after { content: ""; display: inline-block; width: .16em; height: .16em; margin-left: .07em; background: var(--warm); border-radius: .03em; }
.wordmark.small { font-size: 1.1rem; }
.top nav { display: flex; align-items: center; gap: 20px; white-space: nowrap; }
.gh { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); text-decoration: none; font-size: .98rem; }
.gh svg { width: 19px; height: 19px; }
.gh:hover { color: var(--ink-hi); }

/* Buttons */
.button { display: inline-flex; align-items: center; gap: .55em; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; border-radius: 10px; padding: .6em 1.1em; border: 0; cursor: pointer; font-family: inherit; font-size: 1rem;
  box-shadow: inset 0 1px 0 #ffffff40, 0 2px 0 var(--accent-deep); transition: transform .14s var(--ease), box-shadow .14s var(--ease), background-color .14s; }
.button svg { width: 1.15em; height: 1.15em; stroke-width: 2.2; }
.button:hover { color: var(--on-accent); background: var(--accent-hi); transform: translateY(-1px); box-shadow: inset 0 1px 0 #ffffff40, 0 3px 0 var(--accent-deep), 0 12px 26px -14px var(--accent); }
.button:active { transform: translateY(1px); box-shadow: inset 0 1px 0 #ffffff30, 0 1px 0 var(--accent-deep); }
.button.small { padding: .42em .9em; font-size: .94rem; border-radius: 9px; }
.button.big { padding: .82em 1.5em; font-size: 1.18rem; border-radius: 13px; }

/* Layout */
main { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { color: var(--ink-hi); font-weight: 620; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.3rem); letter-spacing: -.025em; line-height: 1.2; margin: 0 0 10px; text-wrap: balance; }
.section-lead { color: var(--muted); margin: 0 auto 36px; max-width: 40em; text-wrap: pretty; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--accent); font: 600 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before, .eyebrow::after { content: ""; width: 34px; height: 1.5px; background: currentColor; opacity: .7; }

/* Hero: headline, one line, the download, then the app. */
.hero { padding: clamp(40px, 8vh, 88px) 0 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
h1 { font-size: clamp(2.3rem, min(6vw, 7vh), 4.2rem); line-height: 1.08; letter-spacing: -.035em; margin: 0; max-width: 15em; text-wrap: balance; }
h1 .w { display: inline-block; }
.js h1 .w { opacity: 0; transform: translateY(.18em); animation: word .7s var(--ease) forwards; animation-delay: calc(var(--n) * 35ms + 60ms); }
@keyframes word { to { opacity: 1; transform: none; } }
.hl { color: var(--accent); }
@media (max-width: 700px) { h1 .br { display: none; } }
.lead { color: var(--soft); font-size: 1.17rem; line-height: 1.6; margin: 20px auto 0; max-width: 34em; text-wrap: pretty; }
.actions { margin: 28px 0 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dl-meta { color: var(--muted); font-size: .92rem; }
/* Wider than the page column on big screens; no auto margins, so the hero's align-items: center
   spills it evenly to both sides (auto margins would collapse to 0 and push it right). */
.hero-shot { margin: clamp(88px, 12vh, 120px) 0 0; width: min(1240px, calc(100vw - 40px)); position: relative; isolation: isolate; }
.hero-shot::before { content: ""; position: absolute; inset: 6% 4% -2%; z-index: -1; filter: blur(90px); opacity: .22; background: var(--accent); }
.frame { padding: var(--matte); background: #313131; border-radius: 14px; box-shadow: 0 40px 90px -30px #000d, 0 0 0 1px #ffffff1a; }

/* The app in the hero: the sidebar's pages are buttons, the header stays put and the page scrolls.
   Every picture is a demo-mode capture of a 1400 x 860 window (see README). */
.app { position: relative; display: flex; aspect-ratio: 1400 / 860; border-radius: 7px; overflow: hidden; background: #1d2021; }
.app img { display: block; width: 100%; height: auto; }
.app-nav { position: relative; flex: 0 0 17.1429%; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #504945 transparent; }
.app-body:focus-visible { outline-offset: -2px; }
.app-body img { transition: opacity .25s ease; }
.app-body.loading img { opacity: .4; transition-delay: .15s; }
.hotspots button { position: absolute; left: 3.3%; right: 3.3%; height: 3.6%; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.hotspots button:hover { background: #fbf1c70f; box-shadow: inset 0 0 0 1px #fbf1c71f; }
.hotspots button:focus-visible { outline-offset: 0; }

/* The handwritten note: Caveat in the warm accent, an arrow drawn in once. */
.note { position: absolute; z-index: 2; left: 0; top: 0; width: 100%; margin-top: -10%; aspect-ratio: 1400 / 1000; overflow: visible; pointer-events: none; }
.note text { font: 600 46px "Caveat", cursive; fill: var(--warm); stroke: none; }
.note .ink { stroke: var(--warm); stroke-width: 3.6; fill: none; }
.note .halo { stroke: #1d2021; stroke-width: 10; stroke-opacity: .55; fill: none; }
.js .note text, .js .note .halo { animation: fadein .5s ease both; animation-delay: 1.1s; }
.js .note .ink { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s var(--ease) forwards; animation-delay: 1.3s; }
.js .note .halo { animation-delay: 1.5s; }
.js .note .head { animation-delay: 1.85s; animation-duration: .25s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } }
@media (max-width: 900px) { .note { display: none; } .hero-shot { margin-top: 40px; } }

/* Reveal: the hero settles in once, on load. */
.js .rv { animation: rise .8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.d35 { --d: .35s; } .d42 { --d: .42s; } .d50 { --d: .5s; }

/* Download */
.download { padding: 104px 0 96px; text-align: center; }
.os-grid { display: grid; gap: 16px; text-align: left; max-width: 1040px; margin: 0 auto; }
@media (min-width: 820px) { .os-grid { grid-template-columns: repeat(3, 1fr); } }
.os { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 16px; transition: border-color .3s, box-shadow .3s; }
.os:hover { border-color: var(--line-2); }
.os.mine { border-color: #83a59877; box-shadow: 0 0 0 4px #83a59814, var(--shadow); }
.os-head { display: flex; align-items: center; gap: 14px; }
.os-head > svg { width: 30px; height: 30px; color: var(--ink-hi); flex: none; }
.os-head h3 { margin: 0; font-size: 1.12rem; }
.os-head p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.os-head .mine { margin-left: auto; font: 600 .64rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid #83a59877; border-radius: 99px; padding: 3px 8px; white-space: nowrap; display: none; }
.os.mine .os-head .mine { display: inline-block; }
.os .button { justify-content: center; }
.os:not(.mine) .button { background: var(--raised); color: var(--ink-hi); box-shadow: inset 0 1px 0 #ffffff12, 0 0 0 1px var(--line-2); }
.os:not(.mine) .button:hover { background: var(--line); box-shadow: inset 0 1px 0 #ffffff12, 0 0 0 1px var(--faint); }
.alts { margin: 0; color: var(--muted); font-size: .88rem; }
.phone-note { margin: -16px auto 28px; color: var(--soft); }

/* Footer */
.foot { border-top: 1px solid var(--line); background: #191b1c; }
.foot-in { max-width: 1160px; margin: 0 auto; padding: 36px 20px 44px; display: grid; gap: 10px; font-size: .92rem; }
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--ink-hi); }
.foot p { margin: 0; }
.foot-links a { color: var(--soft); }
.muted { color: var(--muted); }

/* Not-found page */
.lost { max-width: 640px; margin: 0 auto; padding: 18vh 20px 80px; text-align: center; }
.lost h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 auto 10px; }
.lost .section-lead { margin: 0 auto 28px; }

/* Small screens */
@media (max-width: 760px) {
  :root { --matte: 5px; }
  .top-in { padding: 12px 16px; }
  .wordmark { font-size: 1.25rem; }
  .hero-shot { width: 100%; }
  .frame { border-radius: 10px; }
}
@media (max-width: 420px) { .gh span { display: none; } .top nav { gap: 14px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
