/* Homepage only. One column of apps laid out like App Store search results:
   icon, name, subtitle and store button, with three screenshots underneath.
   App pages keep using site.css. */
:root {
  --page: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e8e8ed;
  --fill: #f2f2f7;
  --blue: #0071e3;
  --ui: -apple-system, BlinkMacSystemFont, Figtree, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--ui); font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px max(20px, env(safe-area-inset-left, 0px)) 64px; }

/* ---------- Top bar and tabs ---------- */
.bar { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.bar.scrolled { border-bottom-color: var(--line); }
.bar-in { position: relative; max-width: 1120px; margin: 0 auto; height: 52px; padding: 0 max(20px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: space-between; }
.bar-title { font-weight: 600; font-size: 1rem; opacity: 0; transition: opacity .2s; }
.bar.scrolled .bar-title { opacity: 1; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 6px 12px; border-radius: 99px; color: var(--muted); font-size: .92rem; font-weight: 600; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { background: var(--fill); color: var(--ink); }

/* ---------- Contact tab ---------- */
/* A centred card like an iOS contact. The page header is hidden on this tab
   because the card repeats the name. */
body[data-tab="contact"] header { display: none; }
body[data-tab="contact"] .bar-title { visibility: hidden; }
.contact { max-width: 440px; margin: 24px auto 0; text-align: center; }
.contact .avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 16px; }
.contact h2 { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.contact-bio { margin: 4px 0 24px; color: var(--muted); }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.actions a { display: grid; justify-items: center; gap: 4px; padding: 12px 8px 10px; border-radius: 14px; background: var(--fill); color: var(--blue); font-size: .8rem; font-weight: 500; text-decoration: none; }
.actions a:hover { background: #e5e5ea; }
.actions svg { width: 24px; height: 24px; }
.rows { list-style: none; margin: 0 0 16px; padding: 0; background: var(--fill); border-radius: 14px; text-align: left; }
.rows li { display: grid; padding: 12px 16px; }
.rows li + li { border-top: 1px solid var(--line); }
.rows small { color: var(--muted); font-size: .78rem; }
.rows a { display: grid; margin: -12px -16px; padding: 12px 16px; color: var(--blue); text-decoration: none; }
.rows a:hover { text-decoration: underline; }
.email { user-select: all; overflow-wrap: anywhere; }
.copy { margin: 0; color: var(--muted); font-size: .78rem; }

/* ---------- Header ---------- */
header { margin-bottom: 32px; }
h1 { margin: 0 0 6px; font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.bio { margin: 0; color: var(--muted); font-size: 1.1rem; }

/* ---------- App list ---------- */
.apps { list-style: none; margin: 0; padding: 0; }
.app { padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }

.app-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.icon { width: 64px; height: 64px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); display: block; }
.mark { display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #2f6a8a, #1d3b4f); }
.mark svg { width: 70%; height: 70%; }
.app-text { min-width: 0; }
.app h2 { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.25; }
.app h2 a { text-decoration: none; }
/* Stretch the title link over the whole row so the icon and subtitle open the app page too */
.app-row { position: relative; }
.app h2 a::after { content: ""; position: absolute; inset: 0; }
.app-row:has(h2 a):hover:not(:has(.award-line a:hover)) h2 a { text-decoration: underline; }
.get a { position: relative; z-index: 1; }
.sub { margin: 2px 0 0; color: #424245; font-size: .92rem; line-height: 1.3; }
/* Award on its own line under the app row, lined up with the icon. The medal hangs on its own,
   so if the line wraps on a phone the second line sits under the placing */
.award-line { grid-column: 1 / -1; margin: 2px 0 0; font-size: .86rem; line-height: 1.35; }
.award-line a { position: relative; z-index: 1; display: inline-grid; grid-template-columns: auto 1fr; column-gap: 6px; color: var(--muted); text-decoration: none; }
.award-line svg { width: 15px; height: 15px; margin-top: 1px; }
.award-line b { margin-right: 3px; color: #7a5300; font-weight: 700; }
.award-line.bronze b { color: #7a4320; }
.award-line a:hover span { text-decoration: underline; }
.meta { margin: 8px 0 0; color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meta b { color: var(--ink); font-weight: 700; }
.stars { color: #ff9f0a; letter-spacing: 1px; font-size: .95rem; }

/* Buttons share icon and label columns, so stacked icons line up and the pair stays centred */
.get { display: grid; grid-template-columns: 1fr auto auto 1fr; row-gap: 6px; }
.get a svg { grid-column: 2; justify-self: center; }
.get a span { grid-column: 3; justify-self: center; }
.get a, .soon { display: inline-flex; align-items: center; gap: 5px; padding: 6px 16px; border-radius: 99px; background: var(--fill); color: var(--blue); font-size: .85rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.get a:hover { background: #e5e5ea; }
.get a { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
.get svg { width: 13px; height: 13px; }
.soon { color: var(--muted); grid-column: 1 / -1; }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.shot {
  /* iPhone-style bezel. Radii are percentages so the screen corners stay true
     to the device at any width (screens are roughly 1:2.17). */
  align-self: start; padding: 2.4%; background: #1d1d1f; border: 0; border-radius: 14% / 6.6%; cursor: zoom-in;
  box-shadow: inset 0 0 0 1px #3a3a3c, 0 0 0 1px #c7c7cc, 0 14px 24px -16px rgba(0, 0, 0, .35);
  transition: transform .15s ease;
}
.shot:hover { transform: translateY(-2px); }
.shot img { width: 100%; height: auto; display: block; border-radius: 12.5% / 5.8%; }

/* Two apps side by side on wider screens */
@media (min-width: 900px) {
  .apps { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
  /* Each pair shares row heights, so a two-line subtitle doesn't push one app's phones lower */
  .app { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  .app-row { align-self: center; row-gap: 10px; }
  .app h2 { font-size: 1rem; }
  .shots { gap: 12px; }
}

/* ---------- Screenshot viewer ---------- */
.viewer { border: 0; padding: 0; background: none; overflow: visible; max-width: none; max-height: none; }
.viewer::backdrop { background: rgba(20, 20, 24, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.viewer-frame { padding: 1.1vh; background: #1d1d1f; border-radius: 14% / 6.6%; box-shadow: inset 0 0 0 1px #3a3a3c, 0 30px 60px -20px rgba(0, 0, 0, .6); }
.viewer-frame img { height: min(84vh, 880px); width: auto; max-width: 80vw; object-fit: contain; display: block; border-radius: 12.5% / 5.8%; }
.viewer-btn { position: fixed; top: 50%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.viewer-btn:hover { background: #fff; }
.viewer-btn.prev { left: max(16px, env(safe-area-inset-left, 0px)); }
.viewer-btn.next { right: max(16px, env(safe-area-inset-right, 0px)); }
.viewer-btn.close { top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); margin-top: 0; font-size: 1rem; }



@media (max-width: 520px) {
  .wrap { padding-top: 40px; }
  .icon { width: 56px; height: 56px; }
  .app-row { grid-template-columns: auto 1fr; align-items: start; row-gap: 10px; }
  .get { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
  .get a { display: inline-flex; }
  .shots { gap: 8px; }
}
