/* Daftar's front page. One bold look on purpose, no dark mode: navy and
   amber like the app icon. Shadows stay small and nothing uses filters, so
   scrolling stays smooth on cheap phones. */
:root {
  --navy: #24345c;
  --navy-deep: #141d36;
  --ink: #0d1324;
  --amber: #f0a04b;
  --amber-deep: #b45f06;
  --paper: #f6f5f1;
  --paper-2: #ebe8df;
  --white: #ffffff;
  --text: #1d1c19;
  --text-soft: #4d4a43;
  --on-navy-soft: #c9d2ea;
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 var(--gutter); }
.display {
  font-stretch: 125%;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.98;
  margin: 0;
  text-wrap: balance;
}

/* Header */
.top { background: var(--navy); color: var(--white); }
.nav { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-stretch: 112%; font-size: 21px; }
.brand img { width: 36px; height: 36px; image-rendering: pixelated; }
.nav-links { display: flex; gap: 28px; margin-left: 24px; font-weight: 600; font-size: 15px; }
.nav-links a { text-decoration: none; opacity: 0.85; transition: opacity 150ms ease; }
.nav-links a:hover { opacity: 1; }
.nav .pill { margin-left: auto; }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 0;
  font: 700 17px/1 'Archivo', sans-serif;
  text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.pill svg { width: 22px; height: 22px; flex: none; }
.pill:active { transform: scale(0.97); }
.pill-white { background: var(--white); color: var(--ink); }
.pill-ink { background: var(--ink); color: var(--white); }
.pill-amber { background: var(--amber); color: var(--ink); }
.pill-small { min-height: 40px; padding: 0 18px; font-size: 15px; }
@media (hover: hover) and (pointer: fine) {
  .pill-white:hover, .pill-amber:hover { box-shadow: 0 10px 24px -8px rgb(0 0 0 / 0.45); }
  .pill-ink:hover { background: #1d2846; }
}
.pill:focus-visible, .nav-links a:focus-visible, .foot a:focus-visible, .tab:focus-visible, .close:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-bottom: 72px; }
.hero h1 { font-size: clamp(38px, 4.5vw, 66px); }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p { color: var(--on-navy-soft); font-size: 20px; max-width: 30ch; margin: 24px 0 32px; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--on-navy-soft); }
.stage { position: relative; padding: 24px 0 72px; }
.laptop {
  border-radius: 14px; overflow: hidden;
  border: 6px solid var(--ink);
  box-shadow: 0 24px 40px -20px rgb(5 8 20 / 0.7);
  transform: rotate(-1.5deg);
  background: var(--ink);
}
.phone {
  position: absolute; right: -18px; bottom: 8px; width: 27%;
  border-radius: 26px; overflow: hidden;
  border: 6px solid var(--ink);
  box-shadow: 0 18px 30px -14px rgb(5 8 20 / 0.75);
  transform: rotate(3deg);
  background: var(--ink);
}
.px { position: absolute; image-rendering: pixelated; pointer-events: none; }
.ground { height: 64px; background: var(--paper); clip-path: polygon(0 100%, 100% 0, 100% 100%); margin-top: -64px; position: relative; }

/* Feature rows */
.rows { padding-top: 16px; padding-bottom: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 72px; align-items: center; padding: 64px 0; }
.row.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.row.flip .shot { order: 2; }
.row h2 { font-size: clamp(32px, 3.6vw, 50px); }
.row p { font-size: 19px; color: var(--text-soft); margin: 20px 0 0; max-width: 34ch; }
.tag { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: 14px; }
.shot { border-radius: 14px; overflow: hidden; box-shadow: 0 18px 32px -20px rgb(30 25 15 / 0.45), 0 0 0 1px rgb(30 25 15 / 0.08); background: var(--white); }

.dark-band { background: var(--ink); color: var(--white); }
.dark-band .row p { color: #b9c0d4; }
.dark-band .tag { color: var(--amber); }
.dark-band .shot { box-shadow: 0 18px 36px -16px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(255 255 255 / 0.08); }

.more { padding-top: 40px; padding-bottom: 96px; }
.more h3 { font-stretch: 125%; font-weight: 900; text-transform: uppercase; font-size: 22px; margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--white); border: 2px solid var(--paper-2); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 15px; }

/* Final call */
.end { background: var(--navy); color: var(--white); position: relative; overflow: hidden; }
.end .wrap { padding-top: 104px; padding-bottom: 112px; display: grid; justify-items: center; text-align: center; }
.end h2 { font-size: clamp(38px, 5.4vw, 72px); max-width: 15ch; }
.end .pill { margin-top: 40px; }
.end .big-icon { width: 112px; height: 112px; margin-bottom: 28px; image-rendering: pixelated; }

/* Footer */
.foot { background: var(--navy-deep); color: #cfd5e6; padding: 64px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.foot .brand { color: var(--white); font-size: 26px; }
.foot .brand img { width: 44px; height: 44px; }
.foot p { margin: 14px 0 0; max-width: 36ch; }
.foot h4 { margin: 0 0 14px; color: var(--amber); font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid #2a3558; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #98a2c0; font-size: 14px; }

/* Install sheet */
dialog {
  border: 0; padding: 0; border-radius: 22px; width: min(460px, calc(100vw - 32px));
  background: var(--white); color: var(--text);
  box-shadow: 0 24px 48px -16px rgb(5 8 20 / 0.6);
}
dialog::backdrop { background: rgb(13 19 36 / 0.6); }
dialog[open] { animation: pop 220ms var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(8px); } }
.sheet { padding: 28px; }
.sheet h3 { font-stretch: 125%; font-weight: 900; text-transform: uppercase; font-size: 24px; line-height: 1.05; margin: 0 40px 6px 0; }
.sheet .sub { color: var(--text-soft); margin: 0 0 18px; font-size: 15px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { border: 2px solid var(--paper-2); background: var(--white); border-radius: 999px; padding: 6px 14px; font: 700 14px 'Archivo', sans-serif; cursor: pointer; color: var(--text); }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
ol.steps a { color: var(--amber-deep); }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; font-size: 16px; }
ol.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--amber); color: var(--ink); font-weight: 900; }
.sheet .tip { margin: 18px 0 0; font-size: 14px; color: var(--text-soft); background: var(--paper); border-radius: 12px; padding: 12px 14px; }
.close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--paper); cursor: pointer; display: grid; place-items: center; color: var(--text); }
.close svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero .px { display: none; }
  .hero { padding-top: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 16px; padding-bottom: 40px; }
  .hero p { font-size: 18px; }
  .stage { padding: 24px 0 64px; }
  .row, .row.flip { grid-template-columns: 1fr; gap: 32px; padding: 44px 0; }
  .row.flip .shot { order: 0; }
  .row .shot { max-width: 420px; justify-self: center; width: 100%; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav { height: 64px; }
  .nav .pill { min-height: 40px; padding: 0 16px; font-size: 15px; }
  .ctas .pill { width: 100%; justify-content: center; }
  .phone { width: 34%; right: -4px; bottom: 16px; border-width: 4px; border-radius: 18px; }
  .laptop { border-width: 4px; border-radius: 10px; }
  .row .shot { max-width: 300px; border-radius: 22px; }
}
/* Motion. The hero plays once on load; the rest shows up as you scroll to
   it (welcome.js marks those with .reveal and adds .in). Only transform and
   opacity move, so it stays smooth on cheap phones. */
.rise .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.rise .w > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .rise .w > span { animation: rise 760ms var(--ease-out) both; animation-delay: calc(80ms + var(--i) * 55ms); }
  .hero p { animation: up 700ms var(--ease-out) 360ms both; }
  .ctas { animation: up 700ms var(--ease-out) 440ms both; }
  .hero-note { animation: up 700ms var(--ease-out) 520ms both; }
  .laptop { animation: laptop-in 1000ms var(--ease-out) 200ms both; }
  .phone { animation: phone-in 1000ms var(--ease-out) 480ms both; }
  .px { animation: twinkle 2.6s steps(1) 900ms 3 backwards; }
  .px:nth-of-type(2) { animation-delay: 1.5s; }
  .px:nth-of-type(3) { animation-delay: 2.1s; }

  .reveal.row .shot { opacity: 0; transform: translateX(-36px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
  .reveal.row.flip .shot { transform: translateX(36px); }
  .reveal.row :is(.tag, h2, p) { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); }
  .reveal.row h2 { transition-delay: 70ms; }
  .reveal.row p { transition-delay: 140ms; }
  .reveal .chip { opacity: 0; transform: translateY(10px) scale(0.96); transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-out); transition-delay: calc(var(--i, 0) * 40ms); }
  .reveal.end .big-icon { opacity: 0; transform: translateY(-28px) rotate(-8deg); transition: opacity 400ms var(--ease-out), transform 700ms cubic-bezier(0.34, 1.56, 0.64, 1); }
  .reveal.end :is(h2, .pill) { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease-out) 120ms, transform 700ms var(--ease-out) 120ms; }
  .reveal.end .pill { transition-delay: 240ms; }
  .reveal.in :is(.shot, .tag, h2, p, .chip, .big-icon, .pill) { opacity: 1; transform: none; }
  /* Once it's in, buttons go back to their own quick press. */
  .reveal.end.in .pill { transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms ease; }

  ol.steps li { animation: up 380ms var(--ease-out) both; }
  ol.steps li:nth-child(2) { animation-delay: 50ms; }
  ol.steps li:nth-child(3) { animation-delay: 100ms; }
}
@keyframes rise { from { transform: translateY(105%); } }
@keyframes up { from { opacity: 0; transform: translateY(16px); } }
@keyframes laptop-in { from { opacity: 0; transform: translateY(48px) rotate(0deg); } }
@keyframes phone-in { from { opacity: 0; transform: translateY(72px) rotate(9deg); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 8% { opacity: 0.2; } 14% { opacity: 1; } 20% { opacity: 0.35; } 26% { opacity: 1; } }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .row .shot { transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), opacity 700ms var(--ease-out); }
  .row.in .shot:hover, .row:not(.reveal) .shot:hover { transform: translateY(-4px); box-shadow: 0 28px 44px -22px rgb(30 25 15 / 0.5), 0 0 0 1px rgb(30 25 15 / 0.08); }
  .chip { transition: border-color 150ms ease, opacity 400ms var(--ease-out), transform 500ms var(--ease-out); }
  .chip:hover { border-color: var(--amber); }
}

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

/* Title bar of the Windows app (titlebar.js), in the hero's navy. */
.titlebar { display: none; }
html.has-titlebar body { padding-top: var(--titlebar-h); }
html.has-titlebar .titlebar {
  position: fixed; inset: 0 0 auto; z-index: 60; height: var(--titlebar-h);
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--navy); color: var(--on-navy-soft);
  font: 500 12px/1 system-ui, sans-serif; letter-spacing: 0.01em;
  user-select: none; -webkit-app-region: drag; app-region: drag;
}
.titlebar img { image-rendering: pixelated; }
