/* kamrin.online
   One page, six palettes. The collection wears the portfolio's own colours (moody painted teal);
   picking an app re-points every colour role below to that app's own default theme, taken from the
   app's tokens (app-platform theme contract, --theme-* values). Registered with @property so the
   roles themselves animate; site.js adds a circular wipe from the clicked card where the View
   Transitions API exists. Reduced motion swaps instantly. */

/* ---------- fonts ---------- */
@font-face { font-family: 'Permanent Marker'; src: url('/fonts/permanent-marker.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
/* each app's own face, used only inside that app's view (so only fetched when it shows) */
@font-face { font-family: 'Rubik'; src: url('/fonts/rubik.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/fonts/eb-garamond.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/newsreader.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Familjen Grotesk'; src: url('/fonts/familjen-grotesk.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

/* ---------- colour roles (registered so they can animate) ---------- */
@property --bg { syntax: '<color>'; inherits: true; initial-value: #2f4c52; }
@property --surface { syntax: '<color>'; inherits: true; initial-value: #1d3338; }
@property --text { syntax: '<color>'; inherits: true; initial-value: #f6f2e9; }
@property --muted { syntax: '<color>'; inherits: true; initial-value: #cfdcd8; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #f6f2e9; }
@property --on-accent { syntax: '<color>'; inherits: true; initial-value: #17292d; }
@property --accent-text { syntax: '<color>'; inherits: true; initial-value: #ffd27a; }
@property --hero { syntax: '<color>'; inherits: true; initial-value: #f6f2e9; }
@property --on-hero { syntax: '<color>'; inherits: true; initial-value: #17292d; }
@property --line { syntax: '<color>'; inherits: true; initial-value: #f6f2e9; }

:root {
  --ease: cubic-bezier(.65, 0, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --swap: 1s;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --radius: 22px;
  --shadow: 0 30px 60px -24px rgb(0 0 0 / .45);
  --hard: 6px 6px 0 0 var(--line);
  /* the collection: the portfolio's own palette, the same in light and dark */
  --bg: #2f4c52; --surface: #1d3338; --text: #f6f2e9; --muted: #cfdcd8;
  --accent: #f6f2e9; --on-accent: #17292d; --accent-text: #ffd27a;
  --hero: #f6f2e9; --on-hero: #17292d; --line: #f6f2e9;
  color-scheme: dark;
}

/* Each app's default theme. bindr, Contently, Inkling and Trakr default to the system setting, so
   they follow the visitor's light or dark preference; Quil defaults to dark (its forest). */
:root[data-app='bindr'], :root:not(.js):has(#bindr:target) {
  --bg: #f7f4ec; --surface: #ffffff; --text: #231e18; --muted: #6e685e;
  --accent: #231e18; --on-accent: #eeeadf; --accent-text: #8c3420;
  --hero: #fecb3f; --on-hero: #8c3420; --line: #231e18; color-scheme: light;
}
:root[data-app='contently'], :root:not(.js):has(#contently:target) {
  --bg: #f4f4f9; --surface: #ffffff; --text: #0b0b0f; --muted: #4f4f58;
  --accent: #b3441f; --on-accent: #ffffff; --accent-text: #b3441f;
  --hero: #b3441f; --on-hero: #ffffff; --line: #d2d2da; color-scheme: light;
}
:root[data-app='inkling'], :root:not(.js):has(#inkling:target) {
  --bg: #eceee3; --surface: #f4f5ee; --text: #2c2b24; --muted: #5c5c4e;
  --accent: #2c2b24; --on-accent: #f3f2e8; --accent-text: #9f4b2e;
  --hero: #c8623f; --on-hero: #10131a; --line: #2c2b24; color-scheme: light;
}
:root[data-app='quil'], :root:not(.js):has(#quil:target) {
  --bg: #093e24; --surface: #0c482a; --text: #feedd1; --muted: #d1c3ad;
  --accent: #dfa855; --on-accent: #1a1005; --accent-text: #e8b86a;
  --hero: #feedd1; --on-hero: #0a2a20; --line: #feedd1; color-scheme: dark;
}
:root[data-app='trakr'], :root:not(.js):has(#trakr:target) {
  --bg: #f2f2f2; --surface: #ffffff; --text: #1a1a1a; --muted: #565656;
  --accent: #f3fe00; --on-accent: #1a1a1a; --accent-text: #646e00;
  --hero: #f3fe00; --on-hero: #1a1a1a; --line: #1a1a1a; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-app='bindr'], :root:not(.js):has(#bindr:target) {
    --bg: #171411; --surface: #27231d; --text: #eeeadf; --muted: #a8a194;
    --accent: #eeeadf; --on-accent: #231e18; --accent-text: #fecb3f;
    --hero: #fecb3f; --on-hero: #5d1100; --line: #eeeadf; color-scheme: dark;
  }
  :root[data-app='contently'], :root:not(.js):has(#contently:target) {
    --bg: #0a0a0f; --surface: #1c1c22; --text: #f5f5f7; --muted: #b4b4bd;
    --accent: #ff8a65; --on-accent: #10131a; --accent-text: #ff8a65;
    --hero: #ff8a65; --on-hero: #10131a; --line: #34343c; color-scheme: dark;
  }
  :root[data-app='inkling'], :root:not(.js):has(#inkling:target) {
    --bg: #181914; --surface: #22241c; --text: #eff0e6; --muted: #bcbeac;
    --accent: #eff0e6; --on-accent: #1a1b15; --accent-text: #d17d60;
    --hero: #c8623f; --on-hero: #10131a; --line: #eff0e6; color-scheme: dark;
  }
  :root[data-app='trakr'], :root:not(.js):has(#trakr:target) {
    --bg: #1a1a1a; --surface: #262626; --text: #f2f2f2; --muted: #b0b0b0;
    --accent: #f3fe00; --on-accent: #1a1a1a; --accent-text: #f3fe00;
    --hero: #f3fe00; --on-hero: #1a1a1a; --line: #f3fe00; color-scheme: dark;
  }
}

/* the palette swap itself */
:root.motion {
  transition: --bg var(--swap) var(--ease), --surface var(--swap) var(--ease), --text var(--swap) var(--ease),
    --muted var(--swap) var(--ease), --accent var(--swap) var(--ease), --on-accent var(--swap) var(--ease),
    --accent-text var(--swap) var(--ease), --hero var(--swap) var(--ease), --on-hero var(--swap) var(--ease),
    --line var(--swap) var(--ease);
}
/* during a view transition the new state paints at once, inside the expanding circle */
:root.vt, :root.vt *, :root.vt *::before, :root.vt *::after { transition: none !important; }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) {
  animation: wipe 1.05s var(--ease) both;
  mix-blend-mode: normal;
}
@keyframes wipe {
  from { clip-path: circle(0 at var(--vx, 50%) var(--vy, 50%)); }
  to { clip-path: circle(150vmax at var(--vx, 50%) var(--vy, 50%)); }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; min-height: 100vh; overflow-x: clip;
  background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.6 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; font-synthesis: none;
}
img { display: block; max-width: 100%; height: auto; }
main { overflow-x: clip; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: fixed; left: 16px; top: -80px; z-index: 50; padding: 10px 16px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; border-radius: 999px;
}
.skip:focus { top: 16px; }
.marker { font-family: 'Permanent Marker', 'Segoe Print', 'Bradley Hand', cursive; font-weight: 400; letter-spacing: .01em; line-height: .98; }
.g { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* ---------- backdrop layers ---------- */
.tex { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.t { position: absolute; inset: 0 0 auto; height: 130vh; opacity: 0; transition: opacity var(--swap) var(--ease); }
.t-teal { background: #2f4c52 url('/img/tex-teal.webp') center / cover no-repeat; }
.t-bindr { background-image: radial-gradient(circle, rgb(140 52 32 / .13) 1.4px, transparent 1.9px); background-size: 16px 16px; }
.t-contently i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: .42; }
.t-contently i:nth-child(1) { background: #6d5cff; left: -20vmax; top: -10vmax; }
.t-contently i:nth-child(2) { background: #ff7a3d; right: -22vmax; top: 20vh; }
.t-contently i:nth-child(3) { background: #2fd0a0; left: 20vw; bottom: -30vmax; }
.t-inkling { background-image: radial-gradient(circle, rgb(44 43 36 / .22) 1.3px, transparent 1.8px); background-size: 22px 22px; }
.t-quil { background: radial-gradient(120% 80% at 50% 0%, rgb(254 237 209 / .07), transparent 60%), radial-gradient(90% 70% at 50% 110%, rgb(0 0 0 / .35), transparent 70%); }
.t-trakr { background-image: linear-gradient(transparent 0 calc(100% - 1px), rgb(26 26 26 / .07) 0), linear-gradient(90deg, transparent 0 calc(100% - 1px), rgb(26 26 26 / .07) 0); background-size: 48px 48px; }
@media (prefers-color-scheme: dark) {
  .t-bindr { background-image: radial-gradient(circle, rgb(254 203 63 / .09) 1.4px, transparent 1.9px); }
  .t-contently i { opacity: .3; }
  .t-inkling { background-image: radial-gradient(circle, rgb(239 240 230 / .13) 1.3px, transparent 1.8px); }
  .t-trakr { background-image: linear-gradient(transparent 0 calc(100% - 1px), rgb(243 254 0 / .07) 0), linear-gradient(90deg, transparent 0 calc(100% - 1px), rgb(243 254 0 / .07) 0); }
}
:root:not([data-app]) .t-teal,
:root[data-app='bindr'] .t-bindr, :root[data-app='contently'] .t-contently, :root[data-app='inkling'] .t-inkling,
:root[data-app='quil'] .t-quil, :root[data-app='trakr'] .t-trakr { opacity: 1; }
:root:not(.js):has(.view-app:target) .t-teal { opacity: 0; }
:root:not(.js):has(#bindr:target) .t-bindr, :root:not(.js):has(#contently:target) .t-contently,
:root:not(.js):has(#inkling:target) .t-inkling, :root:not(.js):has(#quil:target) .t-quil,
:root:not(.js):has(#trakr:target) .t-trakr { opacity: 1; }
.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: url('/img/grain.png'); opacity: .55; mix-blend-mode: overlay;
}

/* ---------- cursor follower (fine pointers, motion on) ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  .motion .cursor {
    display: block; position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
    width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
    border: 2px solid var(--accent-text); opacity: 0;
    transition: width .35s var(--spring), height .35s var(--spring), margin .35s var(--spring), opacity .3s, background-color .3s;
  }
  .motion .cursor.on { opacity: .9; }
  .motion .cursor.big { width: 74px; height: 74px; margin: -37px 0 0 -37px; background: color-mix(in srgb, var(--accent-text) 18%, transparent); }
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand { font: 400 1.35rem/1 'Permanent Marker', cursive; text-decoration: none; }
.switch ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.switch a {
  display: inline-block; white-space: nowrap; padding: 7px 12px; border-radius: 999px; text-decoration: none;
  font: 700 .74rem/1 'Archivo', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  transition: background-color .25s, color .25s, transform .3s var(--spring);
}
.switch a:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.switch a[aria-current='true'] { background: var(--accent); color: var(--on-accent); }
@media (max-width: 640px) {
  .top { padding-block: 10px; }
  .switch { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .switch ul { flex-wrap: nowrap; }
  .switch a { padding: 8px 10px; }
}

/* ---------- views ---------- */
.view-app { display: none; }
:root[data-app='bindr'] #bindr, :root[data-app='contently'] #contently, :root[data-app='inkling'] #inkling,
:root[data-app='quil'] #quil, :root[data-app='trakr'] #trakr { display: block; }
:root[data-app] .view-collection { display: none; }
:root:not(.js) .view-app:target { display: block; }
:root:not(.js):has(.view-app:target) .view-collection { display: none; }

.kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  font: 700 .72rem/1.3 'Archivo', sans-serif; letter-spacing: .14em; text-transform: uppercase;
}
.kicker.small { justify-content: center; color: var(--muted); }

/* ---------- collection hero ---------- */
.hero {
  position: relative; min-height: calc(100svh - 64px);
  display: grid; align-content: center; justify-items: center; gap: clamp(18px, 3vw, 30px);
  padding: clamp(40px, 8vh, 96px) var(--gutter) clamp(56px, 10vh, 110px);
  text-align: center;
}
.hero .kicker { justify-content: center; }
.headline { margin: 0; font-size: clamp(3rem, 10.5vw, 9.6rem); text-shadow: 0 6px 30px rgb(0 0 0 / .25); }
.headline .ln { display: block; }
.headline .ln:nth-child(2) { font-size: .62em; margin: .12em 0; color: var(--muted); }
.headline .ln:nth-child(3) { position: relative; display: inline-block; }
.scribble { position: absolute; left: 0; right: 0; bottom: -.18em; width: 100%; height: .3em; overflow: visible; }
.scribble path { fill: none; stroke: var(--accent-text); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.motion .scribble path { stroke-dashoffset: 1; animation: draw 1.1s 1s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sticker {
  max-width: 34rem; padding: 18px 22px; border-radius: 6px;
  background: var(--surface); color: var(--text); text-align: left;
  box-shadow: var(--shadow); rotate: -1.6deg;
}
.floaters { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.fl {
  position: absolute; width: clamp(110px, 13vw, 190px); border-radius: 22px; box-shadow: var(--shadow);
  aspect-ratio: 390 / 700; object-fit: cover; object-position: top; opacity: .9;
  translate: var(--mx, 0px) calc(var(--py, 0px) + var(--my, 0px));
}
.fl-1 { left: 4%; top: 12%; rotate: -9deg; }
.fl-2 { left: 14%; bottom: 4%; rotate: 6deg; width: clamp(90px, 10vw, 150px); }
.fl-3 { right: 4%; top: 9%; rotate: 8deg; }
.fl-4 { right: 15%; bottom: 3%; rotate: -5deg; width: clamp(90px, 10vw, 150px); }
.fl-5 { left: 46%; bottom: -10%; rotate: 3deg; width: clamp(80px, 8vw, 120px); opacity: .55; }
@media (max-width: 860px) {
  .fl { opacity: .38; width: 26vw; }
  .fl-2, .fl-4, .fl-5 { display: none; }
  .fl-1 { left: -6%; top: 4%; } .fl-3 { right: -6%; top: auto; bottom: 6%; }
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; padding: 10px 0; rotate: -2deg; scale: 1.05;
  background: var(--accent); color: var(--on-accent);
  border-block: 3px solid var(--on-accent);
}
.mq {
  display: flex; align-items: center; gap: .5em; width: max-content;
  font: 400 clamp(1.8rem, 4.4vw, 3.4rem)/1.1 'Permanent Marker', cursive; white-space: nowrap;
  transform: skewX(var(--skew, 0deg));
}
.mq .g { width: .7em; height: .7em; }
.motion .mq { animation: mq 28s linear infinite; }
@keyframes mq { to { translate: -50% 0; } }

/* ---------- the five cards ---------- */
.cards {
  list-style: none; margin: 0 auto; padding: clamp(64px, 10vw, 120px) var(--gutter) 40px; max-width: var(--maxw);
  display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(18px, 2.4vw, 30px);
}
.cards li { grid-column: span 2; }
.cards li:nth-child(1) { grid-column: span 3; }
.cards li:nth-child(2) { grid-column: span 3; translate: 0 48px; }
.cards li:nth-child(4) { translate: 0 30px; }
@media (max-width: 960px) { .cards li, .cards li:nth-child(n) { grid-column: span 3; translate: none; } .cards li:nth-child(5) { grid-column: 2 / span 4; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } .cards li:nth-child(n) { grid-column: auto; } }
.card {
  --rx: 0deg; --ry: 0deg;
  position: relative; display: grid; gap: 10px; align-content: start; min-height: 290px; height: 100%;
  padding: 24px 24px 22px; border-radius: var(--radius); text-decoration: none; overflow: hidden;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--spring), box-shadow .4s;
}
.card .num { font: 700 .74rem/1 'Archivo', sans-serif; letter-spacing: .14em; }
.card .name { font: 400 clamp(2.6rem, 5vw, 4.2rem)/1 'Permanent Marker', cursive; transition: translate .5s var(--spring); }
.card .what { font-size: 1rem; line-height: 1.45; max-width: 26ch; }
.card .go {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  font: 800 .78rem/1 'Archivo', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  padding: 10px 14px; border-radius: 999px; border: 2px solid currentColor;
}
.card .go svg { width: 1em; height: 1em; transition: rotate .4s var(--spring); }
.card:hover .go svg, .card:focus-visible .go svg { rotate: 45deg; }
.motion .card:hover .name { translate: 6px -4px; }
.card:hover { box-shadow: 0 40px 70px -26px rgb(0 0 0 / .55); }
/* each card is a fixed sample of its app's own palette */
.c-bindr { background: #fecb3f; color: #8c3420; }
.c-contently { background: linear-gradient(135deg, #e5e0ff 0%, #f4f4f9 45%, #ffe1d2 100%); color: #0b0b0f; }
.c-contently .name { color: #b3441f; }
.c-inkling { background: #eceee3 radial-gradient(circle, rgb(44 43 36 / .2) 1.3px, transparent 1.8px) 0 0 / 18px 18px; color: #2c2b24; }
.c-inkling .name { color: #9f4b2e; }
.c-quil { background: #093e24; color: #feedd1; }
.c-quil .name { color: #e8b86a; }
.c-trakr { background: #f3fe00; color: #1a1a1a; box-shadow: 8px 8px 0 #1a1a1a; border: 3px solid #1a1a1a; }
.c-trakr:hover { box-shadow: 12px 12px 0 #1a1a1a; }

/* ---------- shared claims ---------- */
.shared { max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 12vw, 150px) var(--gutter) 40px; }
.shared h2 { font-size: clamp(2.2rem, 6vw, 4.6rem); margin: 0 0 40px; max-width: 14ch; }
.claims { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.claims li { display: flex; gap: 14px; padding: 20px; border-radius: 14px; background: var(--surface); }
.claims .g { width: 1.6rem; height: 1.6rem; color: var(--accent-text); margin-top: 2px; }
.claims strong { display: block; font-weight: 800; }

/* ---------- an app view ---------- */
.app-hero {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 7vw, 90px) var(--gutter) 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px clamp(24px, 4vw, 64px); align-items: center;
}
.app-hero > :not(.hero-shot) { grid-column: 1; }
.hero-shot { grid-column: 2; grid-row: 1 / span 6; margin: 0; }
.app-name { margin: 0; font-size: clamp(4rem, 12vw, 10rem); color: var(--text); }
.specimen {
  justify-self: start; padding: 10px 18px 12px; border-radius: 10px;
  background: var(--hero); color: var(--on-hero);
  font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.15; rotate: -1.2deg;
}
.f-bindr { font-family: 'Rubik', sans-serif; font-weight: 800; letter-spacing: -.02em; }
.f-contently { font-family: 'Manrope', sans-serif; font-weight: 800; letter-spacing: -.03em; }
.f-inkling { font-family: 'EB Garamond', serif; font-weight: 600; }
.f-quil { font-family: 'Newsreader', serif; font-weight: 500; }
.f-trakr { font-family: 'Familjen Grotesk', sans-serif; font-weight: 700; letter-spacing: -.02em; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--text); max-width: 38rem; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
  font: 800 .86rem/1 'Archivo', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  box-shadow: 0 0 0 2px var(--line);
  translate: var(--bx, 0px) var(--by, 0px);
  transition: translate .45s var(--spring), box-shadow .3s;
}
.btn svg { width: 1.1em; height: 1.1em; transition: rotate .4s var(--spring); }
.btn:hover svg { rotate: 45deg; }
.btn:hover { box-shadow: 0 0 0 2px var(--line), var(--hard); }
figure { margin: 0; }
figure img { border-radius: 16px; box-shadow: var(--shadow); }
figcaption { margin-top: 10px; font-size: .86rem; color: var(--muted); }
.hero-shot, .gallery figure { transform: translate3d(0, var(--py, 0px), 0); }
.app-body { max-width: var(--maxw); margin: 0 auto; padding: 40px var(--gutter) 40px; }
.app-body > h2 { font-size: clamp(2.2rem, 6vw, 4.4rem); margin: 30px 0 30px; }
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 40px; counter-reset: f; }
.features li { counter-increment: f; position: relative; padding: 18px 0 18px 52px; border-top: 2px solid color-mix(in srgb, var(--text) 18%, transparent); }
.features li::before {
  content: counter(f, decimal-leading-zero); position: absolute; left: 0; top: 16px;
  font: 400 1.5rem/1 'Permanent Marker', cursive; color: var(--accent-text);
}
.features strong { font-weight: 800; }
.standout {
  margin: clamp(56px, 8vw, 100px) auto; max-width: 60rem; padding: clamp(28px, 4vw, 48px);
  background: var(--hero); color: var(--on-hero); border-radius: 8px; rotate: 1deg;
  box-shadow: var(--shadow);
}
.standout p { font: 400 clamp(1.6rem, 3.6vw, 2.8rem)/1.15 'Permanent Marker', cursive; }
.standout footer { margin-top: 18px; font: 700 .74rem/1.3 'Archivo', sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.never-title { font: 700 .8rem/1 'Archivo', sans-serif !important; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px !important; }
.stamps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 14px; }
.stamps li {
  font: 400 clamp(1.3rem, 2.8vw, 2.1rem)/1 'Permanent Marker', cursive; padding: 10px 14px 12px;
  border: 3px solid currentColor; border-radius: 8px; text-decoration: line-through; text-decoration-thickness: 3px;
}
.stamps li:nth-child(odd) { rotate: -2deg; } .stamps li:nth-child(even) { rotate: 1.5deg; }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; align-items: start; }
.g-wide { grid-column: span 8; }
.g-phone { grid-column: span 4; max-width: 300px; justify-self: center; }
.g-phone img { aspect-ratio: 390 / 760; object-fit: cover; object-position: top; }
.gallery .g-phone:nth-child(even) { margin-top: 80px; }
@media (max-width: 860px) {
  .app-hero { grid-template-columns: 1fr; }
  .hero-shot { grid-column: 1; grid-row: auto; }
  .g-wide, .g-phone { grid-column: 1 / -1; }
  .g-phone { max-width: 260px; }
  .gallery .g-phone:nth-child(even) { margin-top: 0; }
}
.app-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 80px; padding-top: 24px; border-top: 2px solid var(--line); }
.app-nav a {
  display: inline-flex; align-items: center; gap: 8px; font: 400 clamp(1.3rem, 3vw, 2rem)/1.1 'Permanent Marker', cursive;
  text-decoration: none; padding: 6px 2px;
}
.app-nav a svg { width: .8em; height: .8em; }
.app-nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* ---------- about ---------- */
.about { max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 12vw, 150px) var(--gutter) 40px; }
.about h2 { font-size: clamp(2.2rem, 6vw, 4.6rem); margin: 0 0 32px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 28px; }
.about-text { display: grid; gap: 16px; font-size: 1.12rem; }
.lessons { padding: 26px; border-radius: 8px; background: var(--surface); rotate: -1deg; box-shadow: var(--shadow); }
.lessons-title { font: 700 .74rem/1.3 'Archivo', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
.lessons ol { margin: 0; padding-left: 1.2em; display: grid; gap: 12px; }
.lessons strong { font-weight: 800; }

.colophon { max-width: var(--maxw); margin: 0 auto; padding: 60px var(--gutter) 70px; display: grid; gap: 12px; color: var(--muted); font-size: .88rem; }
.colophon p:first-child { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font: 700 .74rem/1 'Archivo', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.colophon p:last-child { max-width: 60rem; }

/* ---------- reveals (only when script runs and motion is wanted) ---------- */
.motion .reveal { transition: opacity .8s var(--ease), translate .9s var(--ease), filter .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.motion .reveal:not(.in) { opacity: 0; translate: 0 40px; filter: blur(6px); }
.motion .cards .reveal:not(.in) { translate: 0 90px; }
.motion .cards li:nth-child(2).reveal.in { translate: 0 48px; }
.motion .cards li:nth-child(4).reveal.in { translate: 0 30px; }
@media (max-width: 960px) { .motion .cards li:nth-child(n).reveal.in { translate: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .card { transform: none; }
}

/* a screenshot whose lower part is empty app ground: show the part that has the app in it */
.crop img { aspect-ratio: 1280 / 500; object-fit: cover; object-position: top; }
