/* Bruno Pantaleão Gonçalves — the apps. One stylesheet, no build step.
   The page is meant to read like a Settings screen: system font, system greys,
   grouped rows with a hairline between and a footnote under the group.
   Screenshots are the only decoration. */

:root {
  color-scheme: light dark;

  --canvas: #f2f2f7;
  --surface: #ffffff;
  --hairline: #d9d9de;
  --label: #000000;
  --secondary-label: #6e6e73;
  --tertiary-label: #aeaeb2;
  --accent: #0a7aff;
  --mark: #fff3bf;
  --mark-ink: #6b4d00;

  --radius: 12px;
  --icon-radius: 22.37%;          /* the system squircle ratio */
  --measure: 720px;
  --gutter: 20px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000000;
    --surface: #1c1c1e;
    --hairline: #38383a;
    --label: #ffffff;
    --secondary-label: #98989e;
    --tertiary-label: #636366;
    --accent: #0a84ff;
    --mark: #3d3200;
    --mark-ink: #ffd75e;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--label);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; height: auto; }

mark {
  background: var(--mark);
  color: var(--mark-ink);
  border-radius: 4px;
  padding: 0 4px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------- header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding-block: 8px;
}
.site-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--label);
  letter-spacing: -0.01em;
}
.site-title:hover { text-decoration: none; }
.site-title .hello { display: block; height: 30px; width: auto; }
.site-nav { display: flex; gap: 20px; font-size: 15px; }
.site-nav a { color: var(--accent); }

/* -------------------------------------------------------------- hero */

.page-title {
  margin: 28px 0 6px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-lede {
  margin: 0 0 8px;
  font-size: 19px;
  color: var(--secondary-label);
}

.hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
.hero .page-title, .hero .page-lede { margin-top: 0; }
.hero .page-title { margin-bottom: 4px; }
.hero .page-lede { margin-bottom: 0; }
.portrait {
  width: 88px;
  height: 88px;
  flex: none;
  border-radius: var(--icon-radius);
  object-fit: cover;
}
@media (max-width: 480px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 14px; }
  .portrait { width: 72px; height: 72px; }
}

/* ------------------------------------------------------- edge-to-edge */
/* Horizontal strips run the full width of the window, not the column, and
   fade out over the last few pixels on each side so a card leaving the
   screen dissolves instead of being cut. The first item still lines up with
   the column's left edge. */

.carousel, .shots {
  --bleed-pad: max(var(--gutter), calc((100vw - var(--measure)) / 2 + var(--gutter)));
  --edge-fade: 28px;
  margin-inline: calc(50% - 50vw);
  padding-inline: var(--bleed-pad);
  scroll-padding-inline: var(--bleed-pad);
  scrollbar-width: none;
}
/* The fade is a desktop nicety; on a phone the strip simply runs off the screen. */
@media (min-width: 761px) {
  .carousel, .shots {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent);
  }
}
.carousel::-webkit-scrollbar, .shots::-webkit-scrollbar { display: none; }
body { overflow-x: clip; }

/* ----------------------------------------------------------- carousel */
/* Portrait cards, newest update first. Each is a screenshot with a
   progressive (linear) blur rising from the bottom, and a glass label. */

.carousel-group .group-title { margin-bottom: 10px; }
.carousel {
  display: flex;
  gap: 14px;
  padding-block: 6px 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.card {
  position: relative;
  flex: none;
  width: 224px;
  height: 350px;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 10px 30px rgb(0 0 0 / 0.12);
  color: var(--label);
  -webkit-transform: translateZ(0);
}
.card:hover { text-decoration: none; }
.card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* Four stacked backdrop layers, each blurring more and starting lower,
   read as one blur that ramps linearly from clear to soft. */
.card-blur { position: absolute; inset: 0; pointer-events: none; }
.card-blur i { position: absolute; inset: 0; display: block; }
.card-blur i:nth-child(1) { -webkit-backdrop-filter: blur(2px);  backdrop-filter: blur(2px);  -webkit-mask-image: linear-gradient(to bottom, transparent 40%, #000 55%); mask-image: linear-gradient(to bottom, transparent 40%, #000 55%); }
.card-blur i:nth-child(2) { -webkit-backdrop-filter: blur(5px);  backdrop-filter: blur(5px);  -webkit-mask-image: linear-gradient(to bottom, transparent 50%, #000 65%); mask-image: linear-gradient(to bottom, transparent 50%, #000 65%); }
.card-blur i:nth-child(3) { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-mask-image: linear-gradient(to bottom, transparent 60%, #000 78%); mask-image: linear-gradient(to bottom, transparent 60%, #000 78%); }
.card-blur i:nth-child(4) { -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); -webkit-mask-image: linear-gradient(to bottom, transparent 70%, #000 90%); mask-image: linear-gradient(to bottom, transparent 70%, #000 90%); }

.glass {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  color: #fff;
  background: rgb(30 30 36 / 0.30);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgb(255 255 255 / 0.35);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.55),
    inset 0 -1px 0 rgb(0 0 0 / 0.08),
    0 6px 18px rgb(0 0 0 / 0.18);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
}
.glass::before {
  /* the specular sweep across the top edge */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, rgb(255 255 255 / 0.35) 0%, rgb(255 255 255 / 0) 45%);
}
.glass img { width: 36px; height: 36px; border-radius: var(--icon-radius); flex: none; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); }
.glass-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.glass-name { font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.glass-meta { font-size: 12px; opacity: 0.85; }

@media (prefers-color-scheme: dark) {
  .card { box-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 10px 30px rgb(0 0 0 / 0.5); }
  .glass {
    background: rgb(40 40 44 / 0.35);
    border-color: rgb(255 255 255 / 0.18);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), inset 0 -1px 0 rgb(0 0 0 / 0.3), 0 6px 18px rgb(0 0 0 / 0.4);
  }
  .glass::before { background: linear-gradient(115deg, rgb(255 255 255 / 0.18) 0%, rgb(255 255 255 / 0) 45%); }
}
@media (max-width: 480px) {
  .card { width: 190px; height: 300px; }
}

/* ------------------------------------------------------------- groups */

.group { margin-top: 36px; }
.group-title {
  margin: 0 var(--gutter) 6px;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--secondary-label);
}
.group-body {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.group-foot {
  margin: 8px var(--gutter) 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--secondary-label);
}
.group-body > p,
.group-body > ul,
.group-body > h3,
.group-body > dl { margin: 0; padding: 12px var(--gutter); }
.group-body > * + * { border-top: 1px solid var(--hairline); }
.group-body ul { list-style: none; }
.group-body li + li { margin-top: 6px; }
.group-body h3 { font-size: 17px; font-weight: 600; padding-bottom: 4px; }
.group-body h3 + p { border-top: 0; padding-top: 0; }
.group-body dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.group-body dt { color: var(--secondary-label); }
.group-body dd { margin: 0; }
@media (max-width: 480px) {
  .group-body dl { grid-template-columns: 1fr; gap: 2px; }
  .group-body dd { margin-bottom: 8px; }
}

/* ------------------------------------------------------------ app rows */

.app-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px var(--gutter);
  color: var(--label);
}
.app-row:hover { text-decoration: none; background: color-mix(in srgb, var(--label) 4%, var(--surface)); }
.app-row + .app-row { border-top: 1px solid var(--hairline); }
.app-row img { width: 60px; height: 60px; border-radius: var(--icon-radius); flex: none; }
.app-row .text { flex: 1 1 auto; min-width: 0; }
.app-row .name { font-weight: 600; }
.app-row .line { color: var(--secondary-label); font-size: 15px; }
.app-row .chevron { color: var(--tertiary-label); flex: none; font-size: 20px; }

/* ----------------------------------------------------------- link rows */

.link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px var(--gutter);
  color: var(--label);
}
.link-row:hover { text-decoration: none; background: color-mix(in srgb, var(--label) 4%, var(--surface)); }
.link-row + .link-row { border-top: 1px solid var(--hairline); }
.link-row .text { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.link-row .name { font-weight: 600; }
.link-row .line { color: var(--secondary-label); font-size: 15px; }
.link-row .chevron { color: var(--tertiary-label); flex: none; font-size: 17px; }
.link-tile {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--tile);
  color: #fff;
  display: grid;
  place-items: center;
}
.link-tile svg { width: 20px; height: 20px; fill: currentColor; }
@media (prefers-color-scheme: dark) {
  .link-tile[style*="#000000"] { background: #ffffff; color: #000; }
}

/* ------------------------------------------------------------ app page */

.app-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
.app-hero img { width: 120px; height: 120px; border-radius: var(--icon-radius); flex: none; }
.app-hero h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; }
.app-hero .tagline { margin: 4px 0 10px; color: var(--secondary-label); font-size: 17px; }
@media (max-width: 480px) {
  .app-hero { flex-direction: column; align-items: flex-start; }
  .app-hero img { width: 96px; height: 96px; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.badge:hover { text-decoration: none; opacity: 0.9; }
.price { margin-left: 10px; font-size: 15px; color: var(--secondary-label); }

.platforms { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px var(--gutter); margin: 0; list-style: none; }
.platforms li {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--canvas);
  color: var(--secondary-label);
}

.shots {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-block: 4px 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots img {
  flex: none;
  height: 480px;
  width: auto;
  border-radius: 20px;
  scroll-snap-align: start;
  border: 1px solid var(--hairline);
  background: var(--surface);
}
@media (max-width: 480px) { .shots img { height: 400px; } }

.crumbs { margin: 24px 0 0; font-size: 15px; color: var(--secondary-label); }
.crumbs a { color: var(--accent); }

/* -------------------------------------------------------------- footer */

.site-footer {
  margin-top: 56px;
  padding: 24px 0 40px;
  font-size: 13px;
  color: var(--secondary-label);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer a { color: var(--secondary-label); }
.footer-links { display: flex; gap: 16px; }
