/* AZ iOS Apps — house design system
   Studio hub + reusable boilerplate (topbar / footer / page-head / prose / faq).
   Each app can override --accent to tint the shared components to its own colour. */

:root {
  --ink:        #17140D;   /* warm near-black — the studio "gallery wall" */
  --ink-soft:   #221E15;
  --paper:      #FBF7F0;   /* house paper */
  --paper-2:    #F4EDE1;
  --card:       #FFFFFF;
  --text:       #211E17;   /* warm ink text */
  --muted:      #6B6559;
  --line:       #E7DECC;
  --cream:      #F3ECDD;   /* text on dark */
  --cream-dim:  #B7AE98;

  --accent:     #E29A26;   /* studio ochre — apps override this */
  --accent-ink: #A9640E;   /* accent as text on paper (AA) */

  --radius:     20px;
  --radius-lg:  28px;
  --shadow:     0 26px 50px -30px rgba(23,20,13,.55);
  --shadow-sm:  0 12px 26px -20px rgba(23,20,13,.6);
  --maxw:       1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 1.13rem; line-height: 1.62;
  color: var(--text); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; }

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500; line-height: 1.05; letter-spacing: -0.015em;
  color: var(--ink); margin: 0;
}

.eyebrow {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 0; }
.section--tint { background: var(--paper-2); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,247,240,.82); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: 'Fraunces',serif; font-weight: 600; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: 'Space Mono',monospace; font-weight: 700; font-size: .95rem; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.topnav { display: flex; gap: 24px; }
.topnav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 1rem; }
.topnav a:hover { color: var(--accent-ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--cream);
  padding: 14px 24px; border-radius: 999px;
  font-family: 'Hanken Grotesk',sans-serif; font-weight: 600; font-size: 1.02rem;
  text-decoration: none; border: 0; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }

/* ---------- studio hero (dark) ---------- */

.studio-hero { background: radial-gradient(130% 90% at 12% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%), var(--paper); color: var(--text); padding: 74px 0 0; overflow: hidden; }
.studio-hero .eyebrow { color: var(--accent-ink); }
.studio-hero h1 {
  color: var(--ink); font-weight: 400;
  font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.02;
  max-width: 15ch; margin: 18px 0 0;
}
.studio-hero h1 em { font-style: italic; color: var(--accent-ink); }
.studio-hero .lede { max-width: 46ch; margin: 26px 0 0; font-size: 1.2rem; color: var(--muted); }
.studio-hero .facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 30px 0 0; font-family: 'Space Mono',monospace; font-size: .82rem; letter-spacing: .06em; color: var(--muted); }
.studio-hero .facts span { display: inline-flex; align-items: center; gap: 8px; }
.studio-hero .facts .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* the collection: a slow drift of the real app icons — the body of work as the hero.
   It sits in its own bounded "shelf" band, which closes off the header and
   separates it from the app grid below. */
.marquee { margin-top: 52px; padding: 30px 0; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.marquee-inner { position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 26px; width: max-content; animation: drift 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 14px 28px -16px rgba(23,20,13,.32); flex: 0 0 auto; }

/* ---------- app grid ---------- */

.section-head { max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 12px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 12px 0 0; }

.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.app {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; text-decoration: none; color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.app:hover { transform: translateY(-5px); box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.app .top { display: flex; align-items: center; gap: 16px; }
.app img { width: 62px; height: 62px; border-radius: 15px; box-shadow: var(--shadow-sm); flex: 0 0 auto; }
.app .name { font-family: 'Fraunces',serif; font-weight: 600; font-size: 1.35rem; color: var(--ink); }
.app .tag { font-family: 'Space Mono',monospace; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-top: 3px; }
.app .desc { margin: 18px 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.5; flex: 1; }
.app .more { margin-top: 20px; font-family: 'Space Mono',monospace; font-size: .82rem; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }
.app .more .arw { transition: transform .2s ease; }
.app:hover .more .arw { transform: translateX(4px); }

/* delisted state */
.app--gone { opacity: .72; }
.app--gone img { filter: grayscale(.5); }
.app--gone .name { color: var(--muted); }
.badge-gone { position: absolute; top: 18px; right: 18px; font-family: 'Space Mono',monospace; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; }

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

.foot { background: var(--paper-2); color: var(--muted); padding: 46px 0; border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.foot .brand { color: var(--ink); }
.foot .brand .mark { background: var(--accent); color: #fff; }
.foot nav a { color: var(--text); text-decoration: none; margin-left: 22px; font-weight: 500; }
.foot nav a:hover { color: var(--accent-ink); text-decoration: underline; }
.foot .copy { width: 100%; font-family: 'Space Mono',monospace; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 6px; }

/* ---------- reusable content pages (page-head / prose / faq) ---------- */

.page-head { background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--paper-2); color: var(--text); text-align: center; padding: 60px 0 66px; border-bottom: 1px solid var(--line); }
.page-head img.logo { width: 88px; height: 88px; border-radius: 21px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.page-head h1 { color: var(--ink); font-size: clamp(2.2rem,5.5vw,3.2rem); }
.page-head .eyebrow { color: var(--accent-ink); margin-bottom: 12px; }
.back-link { display: inline-block; margin-top: 24px; color: var(--ink); background: rgba(23,20,13,.06); padding: 11px 20px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.back-link:hover { background: rgba(23,20,13,.12); }

.prose { max-width: 760px; margin: 0 auto; padding: 68px 24px; }
.prose h2 { font-size: 1.85rem; margin: 8px 0 22px; }
.prose h3 { font-size: 1.3rem; color: var(--ink); margin: 38px 0 12px; }
.prose p { margin: 0 0 18px; }
.prose ul { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.updated { display: inline-block; font-family: 'Space Mono',monospace; font-size: .85rem; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 16%, #fff); padding: 8px 14px; border-radius: 10px; margin-bottom: 28px; }

.faq { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 14px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 22px 26px; font-weight: 600; font-size: 1.12rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: 'Space Mono',monospace; color: var(--accent); font-size: 1.5rem; line-height: 1; transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 26px 24px; color: var(--muted); font-size: 1.04rem; line-height: 1.6; }
.callout { background: color-mix(in srgb, var(--accent) 12%, #fff); border-radius: var(--radius); padding: 24px 28px; }

/* ---------- motion ---------- */

@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes rise  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.studio-hero .eyebrow, .studio-hero h1, .studio-hero .lede, .studio-hero .facts { animation: rise .7s both cubic-bezier(.2,.7,.2,1); }
.studio-hero h1 { animation-delay: .06s; }
.studio-hero .lede { animation-delay: .14s; }
.studio-hero .facts { animation-delay: .22s; }

/* ---------- a11y floor ---------- */

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

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

/* ---------- responsive ---------- */

@media (max-width: 900px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  body { font-size: 1.08rem; }
  .section { padding: 60px 0; }
  .app-grid { grid-template-columns: 1fr; }
  .topnav { gap: 14px; font-size: .95rem; }
  .topnav a.hide-sm { display: none; }
  .marquee-track img { width: 74px; height: 74px; }
  .foot .wrap { flex-direction: column; align-items: flex-start; }
  .foot nav a { margin: 0 22px 0 0; }
}
