/* IN., the together app: the app's own look. White, its magenta, its
   rounded wordmark. Dark mode keeps the magenta on near-black. */

:root {
  --bg: #ffffff;
  --surface: #f5f3f8;
  --border: #e7e2ee;
  --text: #17141c;
  --text-2: #5d5866;
  --text-3: #8b8594;
  --brand: #c210eb;
  --brand-soft: color-mix(in srgb, #c210eb 10%, transparent);
  --shapes: url(/projects/in/img/in-shapes-light.svg);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0b12;
    --surface: #18141e;
    --border: #2b2433;
    --text: #f6f3fa;
    --text-2: #b4adbf;
    --text-3: #847d8f;
    --brand: #d64bff;
    --brand-soft: color-mix(in srgb, #d64bff 14%, transparent);
    --shapes: url(/projects/in/img/in-shapes-dark.svg);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: 3px; }

/* The shapes on their own fixed layer, sized to the screen (iOS ignores
   background-attachment: fixed). Phones get a portrait set. */
body::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100lvh;
  z-index: -1; pointer-events: none;
  background: var(--shapes) center / cover no-repeat;
  view-transition-name: in-app;
}
@media (max-aspect-ratio: 1/1) {
  :root { --shapes: url(/projects/in/img/in-shapes-portrait-light.svg); }
}
@media (max-aspect-ratio: 1/1) and (prefers-color-scheme: dark) {
  :root { --shapes: url(/projects/in/img/in-shapes-portrait-dark.svg); }
}

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

header.site { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
nav { display: flex; gap: 20px; }
nav a { color: var(--text-2); text-decoration: none; font-size: 15px; }
nav a:hover { color: var(--text); }

h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: clamp(38px, 7vw, 60px); line-height: 1.05; margin: 0 0 14px; font-weight: 800; }
h2 { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; margin: 0 0 10px; font-weight: 800; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--brand); margin: 0 0 8px; }
p { color: var(--text-2); max-width: 60ch; margin: 0 0 12px; }

.eyebrow { font-size: 14px; color: var(--text-3); margin-bottom: 14px; }
.lede { font-size: 20px; }
.occasions { color: var(--brand); font-weight: 600; font-size: 15px; }

.hero { padding-top: 32px; text-align: center; }
.hero p { margin-inline: auto; }
.app-icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 10px 30px -10px rgb(60 0 80 / 0.4); margin-bottom: 18px; }
.notice {
  max-width: 560px; margin: 18px auto 0; padding: 12px 16px; border-radius: 14px;
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  color: var(--text-2); font-size: 15px;
}
.notice strong { color: var(--text); }
.store-hero { width: 100%; max-width: 720px; height: auto; margin-top: 32px; border-radius: 24px; }

/* The App Store screenshots, swiped sideways like the store itself. */
.listing { padding-top: 56px; margin-top: 56px; border-top: 1px solid var(--border); }
.gallery {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 12px; margin-top: 12px;
}
.gallery img {
  height: 480px; width: auto; flex: none; border-radius: 22px; scroll-snap-align: start;
  border: 1px solid var(--border);
}
@media (max-width: 600px) { .gallery img { height: 400px; } }

.about { display: grid; grid-template-columns: 1fr 280px; gap: 40px; margin-top: 36px; }
.description p { color: var(--text-2); }
.facts { margin: 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); align-self: start; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.facts div:last-of-type { border-bottom: 0; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; color: var(--text); text-align: right; }
.facts dd span { display: block; font-size: 13px; color: var(--text-3); }
.facts .asof { font-size: 12px; color: var(--text-3); margin: 10px 0 0; }
@media (max-width: 720px) { .about { grid-template-columns: 1fr; } }

.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding-block: 56px; margin-top: 56px; border-top: 1px solid var(--border);
}
.features p { font-size: 16px; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }

.quote {
  padding: 32px 24px 40px; border-radius: 28px; background: var(--brand-soft); text-align: center;
}
.quote img { width: 100%; max-width: 640px; height: auto; }
.quote p { margin: 16px auto 0; font-size: 19px; color: var(--text); }

.role { padding-block: 56px; border-top: 1px solid var(--border); margin-top: 56px; }
.role ul { padding-left: 20px; margin: 16px 0 0; color: var(--text-2); max-width: 64ch; }
.role li { margin-bottom: 8px; }
.stats { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 20px; }
.stats strong { display: block; font-size: 40px; line-height: 1; color: var(--brand); font-weight: 800; letter-spacing: -0.03em; }
.stats span { font-size: 14px; color: var(--text-3); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.tags span { font-size: 13px; color: var(--text-2); padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; }

footer.site {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 24px; padding-block: 28px; border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 14px;
}
footer.site a { color: var(--text-2); text-decoration: none; }

/* Back to the projects on the home page, with the same crossfade. */
.back { display: inline-block; margin-top: 4px; font-size: 15px; color: var(--text-2); text-decoration: none; }
.back:hover { color: var(--text); }

/* Page changes: the old page fades out fast and the new one fades in with
   a small rise. A project card and its page's background share a name, so
   the card opens into the page and closes back into itself. Browsers
   without cross-document view transitions just change pages. Still for
   anyone who asked for less motion. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 140ms ease-in both page-out; }
::view-transition-new(root) { animation: 260ms cubic-bezier(.2, .8, .2, 1) 60ms both page-in; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
::view-transition-group(wattage), ::view-transition-group(in-app) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(wattage), ::view-transition-new(wattage),
::view-transition-old(in-app), ::view-transition-new(in-app) { height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
