/*
  A quiet page around one demo: a screen you can't select text on,
  a green selection box, and CopyVisible's real panel.
*/
@font-face { font-family: Familjen; src: url(assets/fonts/familjen.woff2) format("woff2"); font-weight: 400 700; font-display: swap }

:root {
  --bg: #f7f9f8;
  --surface: #fff;
  --text: #141a17;
  --muted: #59625d;
  --line: #d6ddd9;
  --green: #16a34a;
  --green-ink: #0f7a37;
  --nav: rgb(255 255 255 / .88);
  --ui: Familjen, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1210; --surface: #161b18; --text: #ecf2ee; --muted: #9aa69f;
    --line: #29302c; --green: #34d379; --green-ink: #34d379; --nav: rgb(22 27 24 / .88); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1210; --surface: #161b18; --text: #ecf2ee; --muted: #9aa69f;
  --line: #29302c; --green: #34d379; --green-ink: #34d379; --nav: rgb(22 27 24 / .88); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box }
[hidden] { display: none !important }
html { scroll-behavior: smooth; scroll-padding-top: 72px }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 var(--ui); -webkit-font-smoothing: antialiased }
main, footer { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 24px }
img { display: block; max-width: 100%; height: auto }
h1, h2, h3, h4, p { margin: 0 }
h1, h2 { text-wrap: balance }
h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; font-weight: 600 }
a { color: inherit }
button { font: inherit; color: inherit; cursor: pointer }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px }
kbd { font: 600 .92em var(--ui); padding: .05em .4em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); white-space: nowrap }

/* Floating nav */
.nav {
  position: fixed; top: 16px; right: 24px; z-index: 10;
  display: flex; align-items: center; gap: 2px; padding: 5px;
  background: var(--nav); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 10px; font-size: 15px;
}
.nav a, .nav button {
  display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: 6px; background: none; text-decoration: none; white-space: nowrap;
}
.nav a:hover, .nav button:hover { background: var(--bg) }
.nav .home { padding: 0 5px }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 64px; align-items: end; padding: 122px 0 36px }
.hero h1 { font-size: clamp(46px, 6.5vw, 86px); line-height: 1.04; font-weight: 600; letter-spacing: -.015em }
.seen { position: relative; display: inline-block; padding: 0 .08em; margin-left: -.08em }
.seen::before {
  content: ""; position: absolute; inset: -.04em -.02em -.02em; border: 3px dashed var(--green); border-radius: 6px;
  animation: draw .7s .3s var(--ease) backwards;
}
.pitch { display: grid; gap: 20px; padding-bottom: 6px }
.pitch > p:first-child { font-size: 21px; line-height: 1.45; max-width: 36ch }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px }
.download {
  display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px;
  background: var(--green); color: #fff; border-radius: 9px; font-weight: 600; text-decoration: none;
  transition: transform .15s var(--ease), filter .15s;
}
:root[data-theme="dark"] .download { color: #06240f }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .download { color: #06240f } }
.download:hover { filter: brightness(1.08) }
.download:active { transform: scale(.97) }
.source { text-underline-offset: 5px }
.needs { color: var(--muted); font-size: 15px }

/* The demo */
.stage {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: center;
  min-height: 560px; padding: 40px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 120% at 0% 0%, #1fbf6b 0%, #0a6e57 60%, #08463c 100%);
}
.screen { position: relative; min-width: 0; user-select: none; -webkit-user-select: none; cursor: crosshair; touch-action: none }
.player { border-radius: 12px; overflow: hidden; background: #0b0d10; box-shadow: 0 24px 50px rgb(0 0 0 / .35) }
.titlebar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #1b1f24; color: #8b929c; font-size: 13px }
.titlebar i { width: 11px; height: 11px; border-radius: 50%; background: #3a4048 }
.titlebar span { margin-left: 8px }
.video {
  margin: 0; padding: clamp(24px, 4vw, 48px) clamp(18px, 3vw, 40px); overflow: hidden;
  color: #d8dee9; font: clamp(12px, 1.45vw, 18px)/1.7 var(--mono); white-space: pre;
  background: linear-gradient(180deg, #11151a, #0b0d10);
  filter: blur(.25px);
}
.video b { color: #ff7ab6; font-weight: 500 }
.scrub { height: 30px; padding: 12px 14px; background: #15191e }
.scrub span { display: block; height: 4px; width: 100%; border-radius: 2px; background: linear-gradient(90deg, #34d379 62%, #3a4048 62%) }
.box {
  position: absolute; border: 2px solid #fff; border-radius: 3px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgb(0 0 0 / .32);
}
.size { position: absolute; right: 0; top: calc(100% + 6px); padding: 2px 6px; border-radius: 4px; background: rgb(0 0 0 / .75); color: #fff; font: 11px var(--mono) }
.hint { margin-top: 16px; color: rgb(255 255 255 / .85); font-size: 15px; text-align: center }

.panel { margin: 0; justify-self: center; width: 100%; max-width: 340px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 50px rgb(0 0 0 / .35); transform-origin: left center;
  transition: opacity .3s var(--ease), transform .4s var(--ease) }
.panel img.dark { display: none }
:root[data-theme="dark"] .panel img.light { display: none }
:root[data-theme="dark"] .panel img.dark { display: block }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .panel img.light { display: none }
  :root:not([data-theme="light"]) .panel img.dark { display: block }
}
.stage:not([data-phase="done"]) .panel { opacity: .14; transform: translateX(-16px) scale(.97); filter: blur(6px) }
.copied {
  position: absolute; left: 50%; bottom: 22px; translate: -50% 0; padding: 8px 16px; border-radius: 999px;
  background: rgb(255 255 255 / .92); color: #0f5132; font-weight: 600; font-size: 15px;
  transition: opacity .25s, transform .3s var(--ease);
}
.copied::before { content: "✓  " }
.stage:not([data-phase="done"]) .copied { opacity: 0; transform: translateY(8px) }
.replay {
  position: absolute; right: 16px; top: 14px; min-height: 34px; padding: 0 14px; border: 1px solid rgb(255 255 255 / .35);
  border-radius: 8px; background: rgb(0 0 0 / .18); color: #fff; font-size: 14px;
}
.caption { margin-top: 12px; color: var(--muted); font-size: 14px }

/* Sections */
.section { padding: 110px 0 0 }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 36px }
.section-head p { color: var(--muted); font-size: 19px }
.group { margin: 44px 0 16px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--green-ink) }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px }
.grid article { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface) }
.grid h4 { margin: 12px 0 6px; font-size: 19px; font-weight: 600 }
.grid p { color: var(--muted); font-size: 16px }
.ic {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px;
  background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green-ink); font-size: 18px; font-weight: 700;
}
.kinds { display: flex; flex-wrap: wrap; gap: 10px }
.kinds span { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted) }
.kinds b { color: var(--text); font-weight: 600 }

/* Privacy */
.privacy h2 em { font-style: normal; color: var(--green-ink) }
.privacy dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; margin: 40px 0 0 }
.privacy dt { font-weight: 600; margin-bottom: 6px }
.privacy dd { margin: 0; color: var(--muted) }

/* Install */
.install { display: grid; justify-items: start; gap: 22px; padding-bottom: 40px }
.install ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; font-size: 19px }

footer { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 48px; padding-bottom: 48px; border-top: 1px solid var(--line); margin-top: 80px; color: var(--muted); font-size: 15px }
footer span { margin-right: auto }

@keyframes draw { from { clip-path: inset(0 100% 0 0) } to { clip-path: inset(0 0 0 0) } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 96px }
  .stage { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 56px 16px 72px }
  .stage:not([data-phase="done"]) .panel { display: none }
  .video { font-size: 2.6vw }
  .grid, .privacy dl { grid-template-columns: 1fr 1fr }
}
@media (max-width: 600px) {
  main, footer { padding-inline: 16px }
  .nav { right: 16px }
  .nav .wide { display: none }
  .grid, .privacy dl { grid-template-columns: 1fr }
  .section { padding-top: 80px }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important }
}
