/* All fonts are self-hosted, so the site never contacts a font service
   (SIL Open Font License, see assets/fonts/LICENSES.md) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../assets/fonts/inter-latin.woff2') format('woff2'); 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; }

/* hifaaz brand font */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/nunito-latin.woff2') format('woff2');
  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;
}

/* App theme colours are registered so they can animate between apps */
@property --app-a       { syntax: '<color>'; inherits: true; initial-value: #f4f5f7; }
@property --app-b       { syntax: '<color>'; inherits: true; initial-value: #ffffff; }
@property --app-ink     { syntax: '<color>'; inherits: true; initial-value: #141414; }
@property --app-soft    { syntax: '<color>'; inherits: true; initial-value: #6b6b73; }
@property --app-line    { syntax: '<color>'; inherits: true; initial-value: rgba(0, 0, 0, .07); }
@property --app-bar     { syntax: '<color>'; inherits: true; initial-value: rgba(255, 255, 255, .5); }
@property --app-glow    { syntax: '<color>'; inherits: true; initial-value: rgba(0, 0, 0, 0); }
@property --app-btn     { syntax: '<color>'; inherits: true; initial-value: #141414; }
@property --app-btn-ink { syntax: '<color>'; inherits: true; initial-value: #ffffff; }

:root {
  --ink: #000;
  --muted: rgba(0, 0, 0, .3);
  --page: #fff;
  --brand: #201d1c;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-quart: cubic-bezier(.25, 1, .5, 1);
  --ease-power3: cubic-bezier(.215, .61, .355, 1);

  --theme-time: .5s;
  transition:
    --app-a var(--theme-time) ease, --app-b var(--theme-time) ease,
    --app-ink var(--theme-time) ease, --app-soft var(--theme-time) ease,
    --app-line var(--theme-time) ease, --app-bar var(--theme-time) ease,
    --app-glow var(--theme-time) ease,
    --app-btn var(--theme-time) ease, --app-btn-ink var(--theme-time) ease;
}

:root.no-theme-transition { transition: none; }

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--page);
}

body {
  color: #333;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

h1, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

img { -webkit-user-drag: none; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.page {
  position: fixed;
  inset: 0;
}

/* soft light in the current app's colour behind the card */
.page::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(76px + (100% - 76px - 163px) / 2);
  width: min(1100px, 140vw);
  height: 640px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--app-glow), transparent);
  pointer-events: none;
}

/* ---------- Header ---------- */

.header {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 26px 48px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  text-decoration: none;
  border-radius: 6px;
}

.brand-logo {
  display: block;
  width: auto;
  height: 32px;
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1;
}

.brand-name span {
  font-weight: 400;
  opacity: .45;
}

/* ---------- Stage ---------- */

/* padding (not inset) gives the card shadow room inside the scroll area */
.stage {
  position: absolute;
  inset: 36px 0 123px;
  display: flex;
  padding: 40px 24px;
  overflow-y: auto;
  scrollbar-width: none;
}

.stage::-webkit-scrollbar { display: none; }

/* ---------- App card (App Store style) ---------- */

.card {
  position: relative;
  width: min(760px, 100%);
  margin: auto;
  border-radius: 28px;
  overflow: hidden;
  color: var(--app-ink);
  background: linear-gradient(160deg, var(--app-a), var(--app-b));
  box-shadow:
    0 0 0 .5px rgba(0, 0, 0, .08),
    0 2px 6px rgba(0, 0, 0, .05),
    0 24px 60px -16px rgba(0, 0, 0, .26);
  touch-action: pan-y;
}

/* the app's own channels, tucked into the card's top right corner */
.card-social {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: flex;
  gap: 2px;
}

.card-social[hidden] { display: none; }

.card-social a {
  display: flex;
  padding: 5px;
  border-radius: 8px;
  color: var(--app-soft);
  opacity: .75;
  transition: opacity .2s, color .2s;
}

@media (hover: hover) {
  .card-social a:hover { opacity: 1; color: var(--app-ink); }
}

.card-social svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.card-social svg .fill {
  fill: currentColor;
  stroke: none;
}

.card-main {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 44px 38px;
}

.card-icon {
  flex: none;
  display: block;
  width: 196px;
  aspect-ratio: 1;
  border-radius: 22.37%;
  object-fit: cover;
  background: #fff;
  box-shadow:
    0 0 0 .5px rgba(0, 0, 0, .12),
    0 2px 4px rgba(0, 0, 0, .08),
    0 16px 32px -12px rgba(0, 0, 0, .32);
}

.card-info {
  min-width: 0;
  font-family: var(--app-font, Inter, sans-serif);
}

.card-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 16px;
  text-transform: uppercase;
  color: var(--app-soft);
}

.card-name {
  margin-top: 6px;
  font-size: 46px;
  font-weight: var(--app-weight, 700);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--app-ink);
}

.card-tagline {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: var(--app-ink);
}

.card-desc {
  max-width: 40ch;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 23px;
  color: var(--app-soft);
}

.card-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 44px;
  background: var(--app-bar);
  border-top: 1px solid var(--app-line);
}

.card-meta {
  min-width: 0;
  font-family: var(--app-font, Inter, sans-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: var(--app-soft);
}

/* the App Store "Get" button, in the app's own colours */
.get-button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px 0 18px;
  border-radius: 999px;
  background: var(--app-btn);
  color: var(--app-btn-ink);
  font-family: var(--app-font, Inter, sans-serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .16s var(--ease-out), filter .16s;
}

.get-button svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .get-button:hover { filter: brightness(1.12); }
}

.get-button:active { transform: scale(.96); }

.get-button.is-disabled {
  cursor: default;
  background: transparent;
  color: var(--app-soft);
  box-shadow: inset 0 0 0 1px var(--app-line);
  filter: none;
  transform: none;
}

.get-button.is-disabled svg { display: none; }

.card-meta span { white-space: nowrap; }

/* ---------- Launch animation (dock icon → card) ---------- */

.launch-ghost {
  position: fixed;
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .26);
}

.card.is-launching { opacity: 0; }

/* ---------- Dock ---------- */

.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 46px;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.dock-inner {
  position: relative;
  max-width: 100%;
  font-size: 14px;
  pointer-events: auto;
}

.dock-shelf {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(4em + 20px);
  border-radius: 26px;
  background: rgba(244, 245, 247, .72);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
  box-shadow:
    0 0 0 .5px rgba(0, 0, 0, .1),
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 12px 30px -14px rgba(0, 0, 0, .25);
}

.dock-list {
  position: relative;
  display: flex;
  align-items: flex-end;
  max-width: 100%;
  padding: 4em 10px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.dock-list::-webkit-scrollbar { display: none; }

.dock-item:first-child { margin-left: auto; }
.dock-item:last-child { margin-right: auto; }

.dock-item {
  position: relative;
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 5em;
  transition: width .5s var(--ease-out);
}

/* small indicator under the open app */
.dock-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .3s;
}

.dock-item.is-active::after { opacity: 1; }

.dock-button {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  padding: 0 .5em;
  touch-action: manipulation;
}

.dock-icon {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 22.37%;
  object-fit: cover;
  background: #fff;
  box-shadow:
    0 0 0 .5px rgba(0, 0, 0, .12),
    0 1px 2px rgba(0, 0, 0, .12),
    0 6px 12px -6px rgba(0, 0, 0, .28);
  transition: filter .2s;
}

.dock-button:active .dock-icon { filter: brightness(.82); }

.dock-button:focus-visible { outline: none; }
.dock-button:focus-visible .dock-icon {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 0, 0, .55);
}

.dock-tooltip {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(28, 28, 30, .86);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -60%);
  transition: transform .5s var(--ease-out), opacity .5s var(--ease-out);
}

.dock-button:focus-visible + .dock-tooltip {
  opacity: 1;
  transform: translate(-50%, -150%);
}

@media (hover: hover) and (pointer: fine) {
  .dock-item:hover { width: 7em; }
  .dock-item:hover + .dock-item,
  .dock-item:has(+ .dock-item:hover) { width: 6.2em; }
  .dock-item:hover + .dock-item + .dock-item,
  .dock-item:has(+ .dock-item + .dock-item:hover) { width: 5.6em; }

  .dock-item:hover .dock-tooltip {
    opacity: 1;
    transform: translate(-50%, -150%);
  }
}

@media (hover: none), (pointer: coarse) {
  .dock-item[data-dist="0"] { width: 6.2em; }
  .dock-item[data-dist="1"] { width: 5.6em; }
}

/* ---------- Footer ---------- */

.footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 14px 16px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-weight: 500;
}

.footer-side {
  min-width: 56px;
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* social icons stacked above the release date, mirroring the legal links */
.footer-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.footer-social {
  display: flex;
  gap: 4px;
  margin-left: -4px;
}

.footer-social a {
  display: flex;
  padding: 4px;
  color: inherit;
  border-radius: 6px;
  transition: color .2s;
}

@media (hover: hover) {
  .footer-social a:hover { color: rgba(0, 0, 0, .6); }
}

.footer-social svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.footer-social svg .fill {
  fill: currentColor;
  stroke: none;
}

/* legal links stacked above the copyright, tucked into the corner */
.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 56px;
  font-size: 12px;
  line-height: 17px;
  white-space: nowrap;
}

.footer-legal a {
  color: inherit;
  text-decoration: none;
  border-radius: 3px;
  transition: color .2s;
}

@media (hover: hover) {
  .footer-legal a:hover { color: rgba(0, 0, 0, .6); }
}

.footer-legal .footer-year { font-size: 13px; line-height: 20px; }

.footer-center {
  font-size: 12px;
  opacity: 0;
  transition: opacity .3s;
}

.footer.has-overflow .footer-center { opacity: 1; }

/* ---------- Legal pages ---------- */

html.legal,
html.legal body {
  height: auto;
  overflow: auto;
}

html.legal body {
  -webkit-user-select: text;
  user-select: text;
}

.legal-header {
  display: flex;
  justify-content: center;
  padding: 26px 24px 18px;
}

.legal-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  color: #3a3a3c;
  font-size: 15px;
  line-height: 24px;
}

.legal-main .legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}

@media (hover: hover) {
  .legal-main .legal-back:hover { color: rgba(0, 0, 0, .6); }
}

.legal-main h1 {
  color: #141414;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.legal-main .updated {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.legal-main h2 {
  margin: 36px 0 8px;
  color: #141414;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.legal-main p + p { margin-top: 12px; }

.legal-main ul {
  margin-top: 8px;
  padding-left: 20px;
  list-style: disc;
}

.legal-main li + li { margin-top: 4px; }

.legal-main a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, .25);
  text-underline-offset: 3px;
}

.legal-main address { font-style: normal; }

.legal-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 24px max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, .06);
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.legal-footer a { color: inherit; text-decoration: none; }
.legal-footer a[aria-current="page"] { color: rgba(0, 0, 0, .6); }
.legal-footer span { margin-left: auto; }

/* ---------- Intro ---------- */

.js:not(.is-ready) .intro,
.js:not(.is-ready) .dock-item,
.js:not(.is-ready) .dock-shelf { opacity: 0; }

.is-ready .header     { animation: fade-in 1s var(--ease-quart) backwards; }
.is-ready .card       { animation: card-open .8s var(--ease-out) .1s backwards; }
.is-ready .dock-shelf { animation: rise-in .6s var(--ease-power3) .25s backwards; }
.is-ready .dock-item  { animation: rise-in .5s var(--ease-power3) calc(.3s + var(--i, 0) * 80ms) backwards; }
.is-ready .footer     { animation: fade-in 1s var(--ease-quart) .6s backwards; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes card-open { from { opacity: 0; transform: translateY(14px) scale(.965); } }

@media (prefers-reduced-motion: reduce) {
  .is-ready .intro,
  .is-ready .dock-item,
  .is-ready .dock-shelf { animation: fade-in .4s ease backwards; }
  .dock-item, .dock-tooltip { transition: none; }
  :root { --theme-time: 0s; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .card-main { gap: 32px; padding: 36px 36px 34px; }
  .card-icon { width: 164px; }
  .card-name { font-size: 40px; }
  .card-bar { padding-left: 36px; }
}

@media (max-height: 760px) and (min-width: 641px) {
  .card-main { padding-top: 32px; padding-bottom: 30px; }
  .card-icon { width: 168px; }
}

@media (max-width: 640px) {
  .header { padding: 22px 16px 16px; }
  .brand-logo { height: 28px; }
  .stage { inset: 36px 0 120px; padding: 30px 16px; }
  .page::before { top: 45%; }
  .card { border-radius: 24px; }
  .card-main { flex-direction: column; gap: 20px; padding: 30px 22px 26px; text-align: center; }
  .card-icon { width: 124px; }
  .card-name { font-size: 36px; }
  .card-tagline { margin-top: 10px; font-size: 17px; }
  .card-desc { max-width: none; }
  .card-bar { padding: 12px 12px 12px 20px; }
  .dock { bottom: 42px; }
}

@media (max-width: 640px) and (max-height: 760px) {
  .header { padding: 16px 16px 12px; }
  .brand-logo { height: 24px; }
  .brand-name { font-size: 15px; }
  .stage { inset: 30px 0 108px; padding: 24px 16px; }
  .card-main { gap: 14px; padding: 22px 20px 20px; }
  .card-icon { width: 92px; }
  .card-name { margin-top: 4px; font-size: 30px; }
  .card-tagline { margin-top: 8px; font-size: 15px; line-height: 22px; }
  .card-desc { margin-top: 6px; font-size: 13.5px; line-height: 20px; }
  .card-bar { padding: 10px 10px 10px 18px; }
  .get-button { height: 32px; font-size: 14px; }
  .dock { bottom: 36px; }
  .dock-inner { font-size: 12px; }
}
