/* Yingqi Zhao Studio — one stylesheet for the whole site.
   Colors and fonts are the variables just below: change them here and every page follows. */
:root {
  --paper: #f1efea;
  --ink: #121212;
  --graphite: #6f6f6b;
  --rule: #cfccc4;
  --glass: #a9c7a0;      /* "translucent green" from the brand's own text */
  --ph: #e6e3dc;        /* placeholder grey */
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --pad: clamp(20px, 4vw, 40px);
  --max: 1400px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--glass); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* type */
.label { font: 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--graphite); }
.label.ink { color: var(--ink); }
.display { font-family: var(--display); font-weight: 400; line-height: .92; letter-spacing: -.02em; margin: 0; }
.display em, .mega em { font-style: italic; }
.h-page { font-size: clamp(3rem, 9vw, 8rem); }
.h-sec { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; margin: 0; letter-spacing: -.01em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.35; max-width: 38rem; margin: 0; }
.muted { color: var(--graphite); }
.link-line { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.link-line:hover { text-decoration-color: var(--ink); }
.rule-ink { border-top: 1px solid var(--ink); }
.rule { border-top: 1px solid var(--rule); }

.btn { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 13px 24px; font: 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn .arr { transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(241,239,234,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .bar { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { font: 400 22px/1 var(--display); letter-spacing: -.01em; text-decoration: none; }
.brand em { font-style: italic; }
.nav { display: flex; gap: 36px; }
.nav a { font: 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--graphite); text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; padding: 8px 0; font: 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--ink); cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .site-header { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav { display: none; position: fixed; inset: 64px 0 0 0; overflow-y: auto; background: var(--paper); flex-direction: column; gap: 0; padding: 24px var(--pad); }
  .nav.open { display: flex; }
  .nav a { font: 400 40px/1 var(--display); text-transform: none; letter-spacing: -.01em; color: var(--ink); padding: 20px 0; border-bottom: 1px solid var(--rule); }
}

/* footer */
.site-footer { margin-top: clamp(80px, 12vw, 160px); border-top: 1px solid var(--rule); }
.site-footer .cols { display: grid; gap: 40px; padding-top: 56px; padding-bottom: 56px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .site-footer .cols { grid-template-columns: 5fr 3fr 3fr; } }
.site-footer .big { font: 400 30px/1.1 var(--display); margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.site-footer .legal { border-top: 1px solid var(--rule); padding-top: 18px; padding-bottom: 18px; }

/* scroll reveal (only hidden when JS is running) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- home ---------- */
.hero { position: relative; min-height: min(86vh, 820px); display: flex; align-items: flex-end; border-bottom: 1px solid var(--rule); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .inner { position: relative; z-index: 1; width: 100%; padding-top: 80px; padding-bottom: clamp(32px, 6vw, 72px); pointer-events: none; }
.hero .inner a, .hero .inner button { pointer-events: auto; }
.mega { font: 400 clamp(3.4rem, 13.5vw, 13rem)/.88 var(--display); letter-spacing: -.025em; margin: 18px 0 0; }
.mega .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.mega .ln > span { display: block; transform: translateY(108%); animation: rise 1.1s cubic-bezier(.2,.75,.2,1) forwards; }
.mega .ln:nth-child(2) > span { animation-delay: .14s; }
@keyframes rise { to { transform: none; } }
.hero-foot { display: grid; gap: 28px; margin-top: clamp(28px, 5vw, 56px); align-items: end; }
@media (min-width: 900px) { .hero-foot { grid-template-columns: 7fr 4fr; } }
.cycle { font: 400 clamp(1.4rem, 2.6vw, 2.2rem)/1.15 var(--display); margin: 0; }
.cycle .w { display: inline-block; overflow: hidden; vertical-align: bottom; height: 1.2em; }
.cycle .w > i { display: inline-block; font-style: italic; transition: transform .45s cubic-bezier(.6,0,.2,1), opacity .45s; }
.cycle .w > i.out { transform: translateY(-100%); opacity: 0; }
.cycle .w > i.pre { transform: translateY(100%); opacity: 0; transition: none; }
.hint { display: none; }
@media (hover: hover) { .hint { display: block; text-align: right; } }

.marquee { overflow: hidden; border-bottom: 1px solid var(--rule); padding: 18px 0; white-space: nowrap; }
.marquee .track { display: inline-flex; animation: slide 38s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee span { font: 400 clamp(1.6rem, 3vw, 2.6rem)/1 var(--display); padding-right: 2.2rem; }
.marquee span:nth-child(even) { font-style: italic; color: var(--graphite); }
.marquee span::after { content: "✦"; font: 12px var(--mono); margin-left: 2.2rem; vertical-align: middle; color: var(--glass); }
@keyframes slide { to { transform: translateX(-50%); } }

.sec { margin-top: clamp(72px, 10vw, 140px); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--ink); padding-top: 14px; }

.feature { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); margin-top: 28px; }
@media (min-width: 900px) { .feature { grid-template-columns: repeat(4, 1fr); gap: 28px; } .feature > :nth-child(2) { margin-top: 56px; } .feature > :nth-child(4) { margin-top: 56px; } }

.doors { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 800px) { .doors { grid-template-columns: 1fr 1fr; } }
.door { display: block; padding: clamp(28px, 4vw, 52px); background: var(--paper); text-decoration: none; min-height: 360px; position: relative; transition: background .35s, color .35s; }
.door h2 { font: 400 clamp(3rem, 6vw, 5.6rem)/.95 var(--display); margin: 90px 0 0; letter-spacing: -.02em; }
.door h2 em { font-style: italic; }
.door p { max-width: 26rem; margin: 20px 0 0; color: var(--graphite); }
.door .go { display: inline-block; margin-top: 28px; }
.door:hover { background: var(--glass); color: var(--ink); }
.door:hover p, .door:hover .label { color: var(--ink); }
.door.dark { background: var(--ink); color: var(--paper); }
.door.dark p, .door.dark .label { color: rgba(241,239,234,.65); }
.door.dark:hover { background: var(--glass); color: var(--ink); }

.quote { font: 400 clamp(1.8rem, 3.8vw, 3.4rem)/1.12 var(--display); margin: 0; letter-spacing: -.01em; }

/* ---------- page headers ---------- */
.page-head { padding-top: clamp(48px, 8vw, 96px); }
.page-head .label { margin-bottom: 22px; display: block; }
.page-head .lead { margin-top: 28px; }

/* ---------- jewelry grid ---------- */
.grid14 { display: grid; gap: 22px 16px; grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
@media (min-width: 700px) { .grid14 { grid-template-columns: repeat(3, 1fr); gap: 32px 22px; } }
@media (min-width: 1100px) { .grid14 { grid-template-columns: repeat(4, 1fr); gap: 40px 28px; } }
.tile { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; text-decoration: none; }
.tile .sq { display: block; position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: var(--ph); }
.tile .sq img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.tile:hover .sq img, .tile:focus-visible .sq img { transform: scale(1.045); }
.tile .ph { position: absolute; inset: 0; padding: 14px; display: none; flex-direction: column; justify-content: space-between; }
.tile.noimg .ph { display: flex; }
.tile.noimg .sq img { display: none; }
.tile .cap { display: flex; gap: 12px; align-items: baseline; margin-top: 12px; }
.tile .cap .n { font: 11px/1 var(--mono); color: var(--graphite); letter-spacing: .1em; flex: none; }
.tile .cap .t { display: block; font: 400 20px/1.1 var(--display); }
.tile:hover .cap .t { font-style: italic; }
.tile .cap .s { display: block; margin-top: 4px; }
.tile-cta { aspect-ratio: auto; }
.cta-tile { display: flex; flex-direction: column; justify-content: space-between; padding: 22px; background: var(--ink); color: var(--paper); text-decoration: none; aspect-ratio: 1 / 1; transition: background .3s, color .3s; }
.cta-tile:hover { background: var(--glass); color: var(--ink); }
.cta-tile .label { color: inherit; opacity: .7; }
.cta-tile b { font: 400 clamp(1.8rem, 3vw, 2.8rem)/1 var(--display); letter-spacing: -.01em; }
.cta-tile b em { font-style: italic; }
@media (min-width: 700px) and (max-width: 1099px) { .cta-wide { grid-column: span 3; aspect-ratio: 3 / 1; } }
@media (min-width: 1100px) { .cta-wide { grid-column: span 2; aspect-ratio: 2 / 1; } }
@media (max-width: 699px) { .cta-wide { grid-column: span 2; aspect-ratio: 2 / 1; } }

.series3 { display: grid; gap: 0; }
.series3 > div { display: grid; gap: 10px; padding: 26px 0; border-top: 1px solid var(--rule); }
@media (min-width: 900px) { .series3 > div { grid-template-columns: 2fr 3fr 5fr; gap: 32px; } }
.series3 h3 { font: 400 clamp(2rem, 3.4vw, 3rem)/1 var(--display); margin: 0; }
.series3 .line { font: italic 400 20px/1.2 var(--display); color: var(--graphite); }

/* lightbox */
dialog.lb { border: 0; padding: 0; width: min(1100px, 94vw); max-height: 94vh; background: var(--paper); color: var(--ink); overflow: auto; }
dialog.lb::backdrop { background: rgba(18,18,18,.72); }
.lb-body { display: grid; }
@media (min-width: 800px) { .lb-body { grid-template-columns: 1.15fr 1fr; } }
.lb-img { aspect-ratio: 1/1; background: var(--ph); position: relative; }
.lb-img img { width: 100%; height: 100%; object-fit: cover; }
.lb-img .ph { position: absolute; inset: 0; padding: 16px; display: none; }
.lb-img.noimg .ph { display: block; }
.lb-img.noimg img { display: none; }
.lb-info { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 22px; }
.lb-info h2 { font: 400 clamp(2rem, 3.4vw, 3rem)/1 var(--display); margin: 8px 0 0; }
.lb-info dl { margin: 0; border-top: 1px solid var(--rule); }
.lb-info dl > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.lb-info dd { margin: 0; }
.lb-nav { display: flex; justify-content: space-between; margin-top: auto; }
.lb-nav button, .lb-close { background: none; border: 0; padding: 6px 0; font: 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--ink); cursor: pointer; }
.lb-close { position: absolute; top: 10px; right: 16px; z-index: 2; background: var(--paper); padding: 8px 10px; }
dialog.lb { position: fixed; }

/* ---------- custom design ---------- */
.svc { display: grid; gap: 10px; padding: 30px 0; border-top: 1px solid var(--rule); }
@media (min-width: 900px) { .svc { grid-template-columns: 1fr 5fr 5fr; gap: 32px; } }
.svc h3 { font: 400 clamp(1.8rem, 3vw, 2.8rem)/1.05 var(--display); margin: 0; }
.svc:last-child { border-bottom: 1px solid var(--rule); }
.brief { list-style: none; margin: 0; padding: 0; }
.brief li { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); }
.brief li:first-child { border-top-color: var(--ink); }
.split { display: grid; gap: 40px; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 6fr; gap: 80px; } }
.email-big { font: 400 clamp(1.6rem, 6vw, 5rem)/1.1 var(--display); word-break: break-all; }

/* ---------- digital lab ---------- */
.lab-grid { display: grid; gap: 40px; margin-top: 36px; }
@media (min-width: 900px) { .lab-grid { grid-template-columns: 5fr 7fr; gap: 48px; } }
.lab-title { font: 400 clamp(3.2rem, 8vw, 7rem)/.92 var(--display); margin: 0; letter-spacing: -.02em; }
.lab-title em { font-style: italic; }
.ticks { list-style: none; margin: 28px 0 0; padding: 0; }
.ticks li { display: flex; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); }
.ticks li:last-child { border-bottom: 1px solid var(--rule); }
.ticks .label { width: 26px; flex: none; padding-top: 3px; }
.preview { position: relative; display: block; background: #0b0b14; aspect-ratio: 4 / 3; overflow: hidden; text-decoration: none; }
.preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.preview:hover img { transform: scale(1.03); }
.preview .tag { position: absolute; left: 14px; bottom: 12px; color: #fff; mix-blend-mode: difference; }
.later { display: flex; flex-wrap: wrap; gap: 6px 36px; margin-top: 18px; }
.later span { font: 400 26px/1.2 var(--display); color: var(--graphite); }

.app-frame { display: block; width: 100%; height: calc(100vh - 64px - 78px); min-height: 560px; border: 0; background: #000; }
.app-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }

/* ---------- about ---------- */
.about-grid { display: grid; gap: 40px; margin-top: 72px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 4fr 7fr; gap: 80px; } }
.ph-box { aspect-ratio: 3 / 4; background: var(--ph); padding: 16px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.ph-box img { width: 100%; height: 100%; object-fit: cover; }
.defs .label { margin-right: 14px; }
.defs p { font: 400 clamp(1.6rem, 3vw, 2.4rem)/1.2 var(--display); margin: 8px 0; }
.poem { font: italic 400 clamp(1.8rem, 4vw, 3.6rem)/1.15 var(--display); margin: 18px 0 0; padding: 0; list-style: none; }
.two-col { display: grid; gap: 0 40px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col li { font: 400 clamp(1.5rem, 2.4vw, 2rem)/1.1 var(--display); padding: 14px 0; border-top: 1px solid var(--rule); list-style: none; }
.row3 { display: grid; gap: 24px; padding-top: 14px; }
@media (min-width: 900px) { .row3 { grid-template-columns: 3fr 8fr; gap: 40px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mega .ln > span { animation: none; transform: none; }
  .marquee .track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}
