/* Public profile pages. Colors/type come from ios-tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--label); background: var(--bg-secondary);
  -webkit-font-smoothing: antialiased; text-size-adjust: 100%;
}
h1, h2, h3, p { margin: 0; }
img { display: block; }
a { color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.on-dark { color: #fff; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }

/* ---------- Layout: one phone-width column, vertical snap feed ---------- */
.backdrop { display: none; }
.stage {
  position: relative; height: 100vh; height: 100dvh; max-width: 430px; margin: 0 auto;
  overflow: hidden; background: #000;
}
.feed {
  height: 100%; overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; overscroll-behavior-y: contain;
  scrollbar-width: none; outline: none;
}
.feed::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) { .feed { scroll-behavior: smooth; } }

.page {
  position: relative; height: 100%; overflow: hidden;
  scroll-snap-align: start; scroll-snap-stop: always;
}

/* Desktop: the same column floats centered over a blurred backdrop, like a web story */
@media (min-width: 600px) {
  body.profile { background: #000; }
  .backdrop {
    display: block; position: fixed; inset: 0; overflow: hidden; z-index: 0;
    background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 45%, #000), #000 70%);
  }
  .backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(48px) saturate(1.4); transform: scale(1.25); opacity: .65; }
  .stage { z-index: 1; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .12), 0 30px 90px rgba(0, 0, 0, .55); }
}

/* ---------- Cover ---------- */
.page-cover { background: linear-gradient(165deg, var(--tint), color-mix(in srgb, var(--tint) 35%, #000) 55%, #000); }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.4) 38%, rgba(0,0,0,0) 68%), linear-gradient(to bottom, rgba(0,0,0,.28), rgba(0,0,0,0) 22%); }
.cover-text {
  position: absolute; left: 24px; right: 24px; bottom: calc(112px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.eyebrow { text-transform: uppercase; letter-spacing: .8px; font-size: 13px; opacity: .85; }
.hero { font-size: 40px; line-height: 46px; letter-spacing: -.6px; font-weight: 700; text-wrap: balance; }
.sub { color: rgba(255,255,255,.86); max-width: 34ch; }
.cover-text .btn { margin-top: 8px; padding: 0 28px; }

/* ---------- Video ---------- */
.page-video { background: #000; }
.page-eyebrow {
  position: absolute; z-index: 3; top: calc(18px + env(safe-area-inset-top)); left: 20px;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.vscroller {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.vscroller::-webkit-scrollbar { display: none; }
.vitem { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; background: #000; }
.vitem video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vitem video.portrait { object-fit: cover; }
.vitem::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, rgba(0,0,0,.65), transparent); pointer-events: none; }
.embed iframe { position: absolute; left: 0; top: 50%; width: 100%; aspect-ratio: 16 / 9; transform: translateY(-50%); border: 0; }
.vtitle { position: absolute; z-index: 2; left: 20px; right: 76px; bottom: calc(100px + env(safe-area-inset-bottom)); color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); pointer-events: none; }
.mute-btn {
  position: absolute; z-index: 2; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom));
  width: var(--touch); height: var(--touch); border-radius: 50%; border: 0; color: #fff; cursor: pointer;
  background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  display: grid; place-items: center; transition: opacity var(--anim-out) ease;
}
.mute-btn:active { opacity: var(--pressed-opacity); }
.mute-btn svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mute-btn svg .fill { fill: currentColor; stroke: none; }
.dots { position: absolute; z-index: 3; top: calc(24px + env(safe-area-inset-top)); right: 20px; display: flex; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); transition: background var(--anim-in) ease, transform var(--anim-in) ease; }
.dots i.on { background: #fff; transform: scale(1.25); }
.empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: rgba(255,255,255,.7); }
.page-portfolio .empty { color: var(--label-2); }

/* ---------- Portfolio ---------- */
.page-portfolio { background: var(--bg-primary); display: flex; flex-direction: column; padding-top: calc(56px + env(safe-area-inset-top)); }
.page-heading { padding: 0 24px; }
.hscroller {
  flex: 1 1 auto; min-height: 0; display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden;
  padding: 20px 24px calc(104px + env(safe-area-inset-bottom)); scroll-padding-inline: 24px;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.hscroller::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 82%; scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-secondary); border-radius: 20px;
}
.card-img { flex: 1 1 55%; min-height: 0; background: var(--fill-3); }
.card-img img, .card-ph { width: 100%; height: 100%; object-fit: cover; }
.card-ph { background: linear-gradient(135deg, color-mix(in srgb, var(--tint) 55%, transparent), color-mix(in srgb, var(--tint) 15%, transparent)); }
.card-body { padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.card-body p { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Contact ---------- */
.page-contact { background: var(--grouped-primary); overflow-y: auto; scrollbar-width: none; }
.page-contact::-webkit-scrollbar { display: none; }
.contact-inner { padding: calc(56px + env(safe-area-inset-top)) 24px calc(112px + env(safe-area-inset-bottom)); }
.blurb { margin: 8px 0 0; }
.contact-inner .grouped { margin-top: 24px; }
.row-area { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px; }
.row-area textarea { text-align: left; resize: none; padding: 8px 0 0; }
.form-msg { min-height: 18px; margin: 10px 4px 12px; color: var(--label-2); }
.form-msg.err { color: var(--system-red); }
.page-contact .btn-lg { width: 100%; }
.quick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.foot { text-align: center; margin-top: 28px; }
.form-done { margin-top: 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.form-done[hidden] { display: none; }
.check { width: 64px; height: 64px; border-radius: 50%; background: var(--system-green); display: grid; place-items: center; margin-bottom: 8px; }
.check svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Floating tab bar ---------- */
.tabbar {
  position: absolute; z-index: 10; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100% - 32px); max-width: 360px;
  display: flex; gap: 2px; padding: 6px; border-radius: 30px;
  background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 8px 32px rgba(0,0,0,.28), 0 0 0 .5px rgba(128,128,128,.25);
}
.tabbar a {
  flex: 1 1 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 24px; text-decoration: none; color: var(--label-2); -webkit-tap-highlight-color: transparent;
  transition: color var(--anim-in) ease, background var(--anim-in) ease, opacity var(--anim-out) ease;
}
.tabbar a:active { opacity: var(--pressed-opacity); }
.tabbar a[aria-current="true"] { color: var(--tint-text); background: var(--fill-3); }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar svg .fill { fill: currentColor; stroke: none; }
.tabbar span { font-size: 10.5px; line-height: 12px; font-weight: 500; letter-spacing: .1px; }

/* ---------- Apex chooser ---------- */
body.chooser { background: var(--grouped-primary); }
.chooser-inner { max-width: 430px; margin: 0 auto; padding: 18vh 24px 24px; }
.chooser-inner p { margin: 6px 0 24px; }
