@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=Instrument+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* Colors from the app's own dark theme and icon */
:root {
  color-scheme: dark;
  --bg: #0f1114;
  --panel: #16181d;
  --panel-2: #1c1f25;
  --line: rgba(255, 255, 255, .09);
  --text: #eef0f3;
  --muted: #9aa1ac;
  --amber: #f2b84e;
  --teal: #5cc8b0;
  --blue: #7aa8ff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 'Instrument Sans', system-ui, sans-serif; }
a { color: var(--amber); }
img { max-width: 100%; height: auto; }
code { font-family: 'JetBrains Mono', monospace; font-size: .88em; color: var(--text); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 14px; background: var(--amber); color: #111; }
.skip-link:focus { top: 12px; }
.shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { font-family: 'Bricolage Grotesque', sans-serif; line-height: 1.05; letter-spacing: -.02em; }

/* Header */
.sw-header { position: sticky; top: 0; z-index: 5; background: rgba(15, 17, 20, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.sw-header .shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.15rem; }
.sw-nav { display: flex; gap: 22px; }
.sw-nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.sw-nav a:hover { color: var(--text); }

/* Hero: the icon's three bars become the backdrop */
.hero { position: relative; overflow: hidden; padding: 80px 0 0; text-align: center; }
.hero::before { content: ''; position: absolute; inset: 0; background:
  radial-gradient(40% 30% at 20% 20%, rgba(242, 184, 78, .12), transparent),
  radial-gradient(40% 30% at 80% 35%, rgba(92, 200, 176, .12), transparent),
  radial-gradient(40% 30% at 30% 60%, rgba(122, 168, 255, .10), transparent); pointer-events: none; animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(4%, -3%, 0) scale(1.1) rotate(4deg); } }
.hero > * { position: relative; }
.app-icon { width: 112px; height: 112px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
/* The logo's three bars slide in from out of order and settle, the way the app's startup animation does it. */
.app-icon .bar { transform-box: fill-box; animation: bar-sort 1.1s cubic-bezier(.2, .9, .25, 1.25) both; }
.app-icon .bar-1 { --from: translateX(330px); animation-delay: .15s; }
.app-icon .bar-2 { --from: translateX(-260px); animation-delay: .3s; }
.app-icon .bar-3 { --from: translateX(420px); animation-delay: .45s; }
@keyframes bar-sort { from { transform: var(--from) scaleX(.6); opacity: 0; } }

/* The sorting line under the hero copy */
[data-bin="Documents"] { --c: var(--amber); }
[data-bin="Photos"] { --c: var(--teal); }
[data-bin="Code"] { --c: var(--blue); }
.sorter { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 24px; width: min(1000px, calc(100% - 32px)); height: 250px; margin: 56px auto 0; text-align: left; }
.sorter .stage-label { margin: 0 0 10px; color: var(--muted); font-size: .66rem; }
.pile, .bins { padding: 14px; border: 1px dashed rgba(255, 255, 255, .14); border-radius: 16px; }
.reader { display: flex; flex-direction: column; }
.lens { position: relative; flex: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 24px), rgba(255, 255, 255, .02); transition: border-color .3s ease; }
.lens::after { content: ''; position: absolute; inset: 0 0 auto; height: 45%; border-bottom: 2px solid var(--teal); background: linear-gradient(to bottom, transparent, rgba(92, 200, 176, .25)); opacity: 0; transform: translateY(-100%); }
.reading .lens { border-color: rgba(92, 200, 176, .5); }
.reading .lens::after { opacity: 1; animation: scan .5s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(225%); } }
.readout { min-height: 3em; margin: 10px 0 0; color: var(--muted); font: .78rem/1.5 'JetBrains Mono', monospace; }
.readout[data-bin] { color: var(--c); }
.bins { display: grid; align-content: center; gap: 10px; }
.bin { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 11px 14px; border-radius: 12px; background: var(--panel); }
.bin strong { font-weight: 600; }
.bin [data-count] { color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.bin-bar { grid-column: 1 / -1; width: var(--fill, 8%); height: 6px; border-radius: 3px; background: var(--c); transition: width .5s cubic-bezier(.3, 1.4, .5, 1); }
.chip { position: absolute; top: 0; left: 0; display: flex; align-items: center; gap: 8px; max-width: 210px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); box-shadow: 0 10px 24px rgba(0, 0, 0, .4); font: 500 .82rem 'Instrument Sans', sans-serif; white-space: nowrap; pointer-events: none; will-change: transform; transition: border-color .3s ease; }
.chip span { overflow: hidden; text-overflow: ellipsis; }
.chip b { flex: none; padding: 2px 6px; border-radius: 5px; background: rgba(255, 255, 255, .08); color: var(--muted); font: 600 .6rem 'JetBrains Mono', monospace; letter-spacing: .06em; transition: background-color .3s ease, color .3s ease; }
.chip[data-bin] { border-color: var(--c); }
.chip[data-bin] b { background: var(--c); color: #14161a; }
.hero .mono { color: var(--teal); margin: 22px 0 8px; }
.hero h1 { margin: 0; font-size: clamp(2.8rem, 8vw, 5.4rem); font-weight: 800; }
.hero h1 span { color: var(--amber); }
.hero-lede { max-width: 640px; margin: 18px auto 0; color: var(--muted); font-size: 1.15rem; }
.hero .release { color: var(--muted); margin-top: 18px; letter-spacing: .08em; }
.window { width: min(1080px, calc(100% - 32px)); margin: 50px auto 0; padding: 0; border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; overflow: hidden; box-shadow: 0 -10px 80px rgba(242, 184, 78, .08); }
.window img { display: block; }
/* The screenshot starts tipped back and lays flat as it scrolls up into view. */
@supports (animation-timeline: view()) {
  .window { transform-origin: 50% 100%; animation: lay-flat linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  @keyframes lay-flat { from { transform: perspective(1400px) rotateX(24deg) scale(.92); opacity: .4; } }
}

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.actions-start { justify-content: flex-start; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--text); font: 600 .95rem 'Instrument Sans', sans-serif; text-decoration: none; transition: transform .2s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-2px); background: #23272e; }
.btn-amber { background: var(--amber); border-color: var(--amber); color: #1a1408; }
.btn-amber:hover { background: #f7c76a; }
.btn small { font-weight: 500; opacity: .7; }
.btn small:empty { display: none; }

/* Sections */
section { padding: 80px 0; }
.section-title { max-width: 700px; margin-bottom: 36px; }
.section-title .mono { color: var(--teal); margin: 0 0 10px; }
.section-title h2 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 3rem); }
.section-title p { margin: 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.card::before { content: ''; display: block; width: 36px; height: 8px; border-radius: 4px; background: var(--amber); }
.card:nth-child(3n + 2)::before { background: var(--teal); width: 46px; }
.card:nth-child(3n)::before { background: var(--blue); width: 26px; }

/* Scroll reveals (motion.js adds .reveal, so nothing hides without JavaScript) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease var(--delay, 0s), transform .7s cubic-bezier(.2, .8, .2, 1) var(--delay, 0s); }
.reveal.in { opacity: 1; transform: none; }
.card.reveal::before { transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1) calc(var(--delay, 0s) + .35s); }
.card.reveal.in::before { transform: none; }
.card h3 { margin: 16px 0 8px; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.shots { display: flex; gap: 20px; overflow-x: auto; padding: 0 16px 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots img { flex: 0 0 auto; width: min(520px, 85vw); border: 1px solid var(--line); border-radius: 14px; scroll-snap-align: center; }
@media (min-width: 1100px) { .shots { justify-content: center; } }

.downloads .card { display: flex; flex-direction: column; gap: 12px; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, -200px), rgba(242, 184, 78, .1), transparent 70%), var(--panel); }
.downloads .card:hover { border-color: rgba(242, 184, 78, .3); }
.downloads .card p { flex: 1; }
.downloads .btn { justify-content: space-between; }
.downloads .soon { flex: 0; padding: 12px 0; color: var(--muted); font-style: italic; }
[data-download-status] { color: var(--amber); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 30px; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 18px; border-top: 1px solid var(--line); }
.steps li::before { content: '0' counter(step); font-family: 'JetBrains Mono', monospace; color: var(--amber); font-size: .8rem; }
.steps h3 { margin: 8px 0; font-size: 1.25rem; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Footer */
.sw-footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: .88rem; }
.sw-footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
.sw-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.sw-footer a { color: var(--muted); text-decoration: none; }
.sw-footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 820px) {
  .grid, .steps { grid-template-columns: 1fr; }
  .sw-nav { gap: 14px; }
  .sw-nav a[data-optional] { display: none; }
}

@media (max-width: 700px) {
  .sorter { grid-template-columns: 1fr 1fr; grid-template-rows: 200px auto; gap: 12px; height: auto; }
  .bins { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); padding: 10px; }
  .bin { padding: 9px 10px; font-size: .85rem; }
  .chip { max-width: 140px; font-size: .74rem; }
  .readout { font-size: .7rem; }
}
