/* Alvin Zhu: site styles. Palette and type follow the media kit. */
:root {
  --ink: #171614;
  --ink-2: #2b2926;
  --muted: #6f6b64;
  --line: #dcd7cf;
  --paper: #f7f4ef;
  --card: #efebe4;
  --accent: #8a6a45;
  --todo: #fff3cd;
  --max: 1080px;
  --gutter: 16px;
}
@media (min-width: 720px) { :root { --gutter: 40px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 300; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(40px, 8vw, 84px); line-height: 1.02; }
h2 { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.1; margin-bottom: 24px; }
h3 { font-size: 22px; line-height: 1.2; margin-bottom: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-2); max-width: 680px; }
.muted { color: var(--muted); }
.todo { background: var(--todo); color: var(--ink); padding: 0 4px; border-radius: 2px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { font-family: Fraunces, Georgia, serif; font-size: 22px; text-decoration: none; }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--accent); }

/* Sections */
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { section { padding: 104px 0; } }
.hero { padding-top: 88px; }
.hero .lede { margin-top: 28px; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-block; padding: 13px 22px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:hover { border-color: var(--accent); }
.btn.primary:hover { background: var(--accent); }

/* Film tiles (own work) */
.tiles { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tiles { grid-template-columns: 1.4fr 1fr; } .tiles .tile:first-child { grid-row: span 2; } }
.tile .frame { aspect-ratio: 9 / 16; max-height: 640px; width: 100%; background: var(--card); border-radius: 4px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; margin-bottom: 14px; }
.tiles .tile:not(:first-child) .frame { aspect-ratio: 16 / 10; }
.tile p { margin: 0 0 6px; color: var(--ink-2); }
.tile .role { font-size: 14px; color: var(--muted); }

/* Credits (work at The Local Project: links only) */
.credits { display: grid; gap: 28px; }
.credit { border-left: 2px solid var(--accent); padding-left: 18px; }
.credit .t { font-weight: 600; }
.credit .r { color: var(--ink-2); margin: 2px 0 8px; }
.credit .links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.credit .links a { color: var(--accent); }
.note { font-size: 14px; color: var(--muted); margin-top: 28px; max-width: 680px; }

/* Names */
.names { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .names { grid-template-columns: 1fr 1fr; } }
.names .label { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.names p { margin: 0; color: var(--ink-2); }

/* Two columns */
.two { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } }
ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 10px 0; border-top: 1px solid var(--line); }
ul.clean li:last-child { border-bottom: 1px solid var(--line); }

/* About */
.about { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .about { grid-template-columns: 300px 1fr; } }
.portrait { aspect-ratio: 4 / 5; background: var(--card); border-radius: 4px; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; }

/* Footer */
footer { padding: 56px 0 72px; font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* Line breaks only on wider screens */
br.wide { display: none; }
@media (min-width: 720px) { br.wide { display: inline; } }
@media (max-width: 400px) { .nav { gap: 14px; font-size: 14px; } }

/* ---- Personal, warm (Alvin, 2026-11-06) ---- */
:root { --radius: 14px; --accent: #9a6b3f; --hand: #9a6b3f; }
section { border-bottom: none; }
section + section { border-top: 1px dashed var(--line); }
.hand { font-family: Caveat, "Bradley Hand", cursive; font-size: 30px; line-height: 1.1; color: var(--hand); margin: 0 0 10px; transform: rotate(-2deg); transform-origin: left; display: inline-block; }
.hand-sm { font-family: Caveat, "Bradley Hand", cursive; font-size: 20px; color: var(--hand); }
.hero { padding-top: 56px; }
@media (min-width: 720px) { .hero { padding-top: 80px; } }
.reel { margin-top: 32px; aspect-ratio: 16 / 9; width: 100%; background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; box-shadow: 0 20px 50px -30px rgba(60,40,20,.45); }
.reel video, .reel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel:has(img), .reel:has(video) { padding: 0; }
.hero-foot { display: grid; gap: 8px 40px; margin-top: 28px; align-items: end; }
@media (min-width: 900px) { .hero-foot { grid-template-columns: 1fr auto; } .hero-foot .buttons { margin-top: 0; } }
.hero .hero-foot .lede { margin-top: 0; }
.tile .frame, .portrait { border-radius: var(--radius); }
.portrait { border-radius: 50% 50% var(--radius) var(--radius); }
.credit { background: var(--card); border-left: none; border-radius: var(--radius); padding: 20px 22px; }
.btn { transition: background .2s, border-color .2s, color .2s; }

/* ---- Modern type + off-white (Alvin, 2026-11-06) ---- */
:root { --paper: #fafaf8; --card: #f0efeb; --line: #e4e2dd; --ink: #141414; --ink-2: #2a2a2a; --muted: #6e6c68; }
h1, h2, h3, .brand { font-family: "Inter Tight", Inter, -apple-system, Helvetica, Arial, sans-serif; font-weight: 600; }
h1 { font-weight: 600; letter-spacing: -0.035em; line-height: 0.98; }
h2 { font-weight: 600; letter-spacing: -0.025em; }
h3 { font-weight: 600; letter-spacing: -0.015em; font-size: 20px; }
.brand { font-weight: 600; letter-spacing: -0.02em; font-size: 20px; }
.hand { font-size: 32px; }

/* ---- For brands: stats + partnerships (draft, 2026-11-07) ---- */
.stats { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 8px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.stat { background: var(--card); border-radius: var(--radius); padding: 20px 22px; }
.stat .n { display: block; font-family: "Inter Tight", Inter, sans-serif; font-weight: 600; letter-spacing: -0.03em; font-size: clamp(32px, 5vw, 44px); line-height: 1; }
.stat .l { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.partners { margin-top: 48px; }
.partners .label { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.partners .credits { gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .partners .credits { grid-template-columns: 1fr 1fr; } }

/* ---- Smaller, tidier body text (Alvin, 2026-11-07) ---- */
body { font-size: 14px; line-height: 1.5; }
@media (min-width: 720px) { body { font-size: 15px; } }
.lede { font-size: clamp(15px, 1.5vw, 16px); line-height: 1.5; max-width: 580px; }
.hero .lede { margin-top: 20px; }
.tile p, .credit .r, .names p { font-size: inherit; }
ul.clean li { padding: 8px 0; }
.note { font-size: 12px; }
.tile .role, .stat .l { font-size: 12px; }
.btn { font-size: 13px; padding: 10px 18px; }
.nav, footer { font-size: 14px; }

/* ---- People's Textbook rotating Instagram embed (2026-11-07) ---- */
.tile .frame.embed { display: block; aspect-ratio: auto; max-height: none; padding: 0; background: none; overflow: visible; }
.tile .frame.embed .instagram-media { margin: 0 !important; width: 100% !important; min-width: 0 !important; max-width: none !important; border-radius: var(--radius) !important; }
.tile .frame.embed iframe { border-radius: var(--radius); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.linkish:hover { text-decoration-color: var(--accent); }

/* ---- Two film tiles; compact Local Project list (Alvin, 2026-11-07) ---- */
@media (min-width: 720px) {
  .tiles { grid-template-columns: 1fr 1fr; align-items: start; }
  .tiles .tile:first-child { grid-row: auto; }
}
section.compact { padding: 48px 0; }
@media (min-width: 720px) { section.compact { padding: 64px 0; } }
.h2-sm { font-size: clamp(20px, 2.6vw, 26px); margin-bottom: 16px; }
.worklist { list-style: none; margin: 0; padding: 0; }
.worklist li { display: grid; gap: 2px 20px; padding: 10px 0; border-top: 1px solid var(--line); }
.worklist li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .worklist li { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 9.5rem; align-items: baseline; } .worklist .w { text-align: right; } }
.worklist .t { font-weight: 600; }
.worklist .r { color: var(--muted); }
.worklist .w a { color: var(--accent); white-space: nowrap; }
section.compact .note { margin-top: 12px; }

/* ---- Headshot (Alvin, 2026-11-07) ---- */
.portrait:has(img) { padding: 0; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 45%; }

/* ---- Local Project list without links; brand mentions only (Alvin, 2026-11-07) ---- */
@media (min-width: 720px) { .worklist li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.partners .credit .r { margin-bottom: 0; }

/* ---- Phone header: brand on its own line, menu below (2026-11-07) ---- */
@media (max-width: 560px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 14px; padding-bottom: 12px; row-gap: 6px; }
  .nav { width: 100%; justify-content: space-between; gap: 8px; }
}
.nav a[aria-current="page"] { color: var(--accent); }

/* ---- 404 ---- */
.notfound { min-height: 50vh; }

/* ---- Document Everything page, sign-up, booking (2026-11-11) ---- */
.h1-sm { font-size: clamp(34px, 5.5vw, 56px); }
.pdf { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .pdf { grid-template-columns: 320px 1fr; } }
.pdf-cover { aspect-ratio: 705 / 1000; max-width: 320px; background: var(--card); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; padding: 0; text-align: center; overflow: hidden; box-shadow: 0 20px 50px -30px rgba(60,40,20,.45); }
.pdf-cover img { width: 100%; height: 100%; object-fit: cover; }
.signup { margin-top: 40px; padding: 22px; background: var(--card); border-radius: var(--radius); max-width: 580px; }
.signup p { margin: 0 0 12px; }
.signup .note { margin: 12px 0 0; }
.signup-form { display: flex; flex-wrap: wrap; gap: 10px; }
.signup-form input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 16px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); }
.signup-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.freepdf { display: grid; gap: 8px 40px; align-items: end; }
@media (min-width: 720px) { .freepdf { grid-template-columns: 1fr auto; } .freepdf .buttons { margin-top: 0; } }
.freepdf p { margin: 0; color: var(--ink-2); }

/* ---- Guide pop-up: email before download (Alvin, 2026-11-11) ---- */
.gate { border: 0; padding: 30px 26px 26px; border-radius: var(--radius); background: var(--paper); color: var(--ink); width: min(480px, calc(100vw - 32px)); max-width: none; box-shadow: 0 30px 80px -30px rgba(40,25,10,.55); }
.gate::backdrop { background: rgba(20,20,20,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.gate h2 { font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
.gate p { margin: 0 0 14px; color: var(--ink-2); }
.gate .hand-sm { margin-bottom: 4px; }
.gate .signup-form { margin-top: 6px; }
.gate .note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.gate-error { color: #a23a2a !important; font-size: 14px; margin: 10px 0 0 !important; }
.gate-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 50%; }
.gate-close:hover { color: var(--ink); background: var(--card); }
.gate .btn[disabled] { opacity: .6; cursor: default; }
.gate a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }


/* ---- Films: three reels across (Alvin, 2026-11-11) ----
   Phones: a swipeable row with the next reel peeking in. Wider screens: three equal columns. */
.reels { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding: 0 var(--gutter); }
.reels .frame.embed { scroll-snap-align: start; display: block; aspect-ratio: auto; max-height: none; padding: 0; background: none; overflow: visible; }
.reels .frame.embed .instagram-media { margin: 0 !important; width: 100% !important; min-width: 0 !important; max-width: none !important; border-radius: var(--radius) !important; }
.reels .frame.embed iframe { border-radius: var(--radius); }
.reels-caption { margin-top: 18px; }
@media (min-width: 720px) {
  .reels { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 24px; overflow: visible; margin: 0; padding: 0; align-items: start; }
}
/* Show only the video of each reel embed: Instagram's media box is ~1.243x its width tall with the
   9:16 video centred in it, so the iframe is drawn 143% wide, shifted left and up past the 54px top bar,
   and the 9:16 frame clips the bar, the black side bars and the likes/comments footer.
   The iframe also has class .instagram-media, so these selectors must outrank the margin rule above. */
.reels .frame.embed { aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--radius); background: #111; }
.reels .frame.embed .instagram-media { border-radius: 0 !important; }
.reels .frame.embed iframe.instagram-media { width: 143% !important; max-width: none !important; margin: -54px 0 0 -21.5% !important; border: 0 !important; }
.reels-caption .role a { color: var(--accent); }
/* YouTube film below the reels */
.yt-film { margin-top: 56px; }
.yt-film .video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #111; }
.yt-film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-film h3 { margin-top: 18px; }
/* No name in the header (Alvin, 2026-11-11): the menu sits on the right. */
.site-header .wrap { justify-content: flex-end; }
/* People and brands I've filmed: same row style as the work list above it */
.names-list .t small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
.names-list .r { color: var(--ink-2); }
@media (min-width: 720px) { .worklist.names-list li { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); } }
#names .note a { color: var(--accent); }
#work + #names { border-top: none; padding-top: 0; }

/* Proper footer (Alvin, 2026-11-11): dark band with name, email, link columns and a bottom bar. */
footer.site-footer { background: var(--ink); color: #f4f1ec; padding: 72px 0 28px; font-size: 15px; margin-top: 0; }
footer.site-footer .wrap { display: block; }
.site-footer a { color: #f4f1ec; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-top { display: grid; gap: 48px; }
.foot-name { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.foot-id p { color: #a9a49b; margin: 10px 0 22px; max-width: 34ch; line-height: 1.5; }
.foot-mail { font-size: 20px; border-bottom: 1px solid #5a5650; padding-bottom: 2px; }
.foot-mail:hover { text-decoration: none !important; border-color: #f4f1ec; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 32px 24px; }
.foot-cols div { display: flex; flex-direction: column; gap: 10px; }
.foot-cols h4 { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8d887f; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 56px; padding-top: 20px; border-top: 1px solid #34312d; color: #8d887f; font-size: 13px; }
.foot-bottom a { color: #8d887f; }
@media (min-width: 720px) {
  .foot-top { grid-template-columns: minmax(0,1.2fr) minmax(0,1.8fr); align-items: start; }
  .foot-cols { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* Even line breaks for headings (no lone "Now I" at a line end). */
h1, h2 { text-wrap: balance; }

/* ---- Quieter brand partners: plain four-up list, no cards (Alvin, 2026-11-11) ---- */
.partners { margin-top: 36px; }
.partners .label { margin-bottom: 10px; font-size: 11px; }
.partners .credits { gap: 0 20px; grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .partners .credits { grid-template-columns: repeat(4, 1fr); } }
.partners .credit { background: none; border-radius: 0; border-top: 1px solid var(--line); padding: 10px 0; }
.partners .credit .t { font-size: 13px; }
.partners .credit .r { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ---- Sticky header (Alvin, 2026-11-11): stays at the top while scrolling ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 244, 239, .86); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
html { scroll-padding-top: 76px; scroll-behavior: smooth; }

/* ---- Fade in on scroll (Alvin, 2026-11-11) ----
   Hero fades in on load (CSS only). Further down, assets/reveal.js marks blocks below the
   first screen with .rv and adds .in when they scroll into view. No JS: everything just shows. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero .wrap > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero .wrap > :nth-child(2) { animation-delay: .1s; }
.hero .wrap > :nth-child(3) { animation-delay: .2s; }
.hero .wrap > :nth-child(n+4) { animation-delay: .3s; }
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rv-delay, 0s); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .wrap > * { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
}

/* ---- AZ letters top left, no box (tab icon keeps its box) (Alvin, 2026-11-11) ---- */
.site-header .wrap { justify-content: space-between; gap: 16px; }
.logo { flex: none; font-family: "Inter Tight", Inter, -apple-system, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 24px; letter-spacing: -0.05em; line-height: 1; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--accent); }
@media (max-width: 560px) {
  .site-header .wrap { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
  .logo { font-size: 22px; }
  .nav { width: auto; flex: 1; justify-content: space-between; max-width: 300px; margin-left: auto; }
}
