:root {
  --bg: #f3f2ee;
  --ink: #1b1a17;
  --soft: #66635c;
  --tint: #e8e6e0;
  --ochre: #c9962b;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Hanken Grotesk', 'Helvetica Neue', system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* the window: where the arch sits on the first screen */
  --aw: min(34vw, 470px);
  --ar: 9vw;
  --at: 14svh;
  --ab: 12svh;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 4px; }
::selection { background: var(--ochre); color: var(--ink); }
.soft { color: var(--soft); }

/* header sits on top of everything and inverts over the painting */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 24px var(--pad); color: var(--ink); background: transparent; transition: color .35s, background-color .4s, box-shadow .4s, backdrop-filter .4s; }
.top.on-art { color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .4); }
.top.on-art::before { opacity: 1; background: linear-gradient(180deg, rgba(14, 13, 11, .5), rgba(14, 13, 11, 0)); }
.top::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); }
/* once you are past the hero the bar turns to glossy frosted glass */
.top.glass { background: rgba(243, 242, 238, .55); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .6), 0 10px 34px rgba(27, 26, 23, .07); }
.top.glass::before { opacity: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.top a { text-decoration: none; }
.brand { font-family: var(--serif); font-size: 1.25rem; letter-spacing: -0.01em; }
.top nav { display: flex; gap: clamp(18px, 3vw, 36px); font-size: .95rem; }
.top nav a { opacity: .85; transition: opacity .2s; }
.top nav a:hover { opacity: 1; }

/* hero: a window that opens onto the painting as you scroll */
.hero { height: 260svh; position: relative; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.layer { position: absolute; left: calc(100% - var(--ar) - var(--aw)); top: var(--at); bottom: var(--ab); width: var(--aw); overflow: hidden; border-radius: calc(var(--aw) / 2) calc(var(--aw) / 2) 0 0; background: var(--tint); }
.layer img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; }
.arch { position: absolute; top: var(--at); bottom: var(--ab); right: var(--ar); width: var(--aw); visibility: hidden; pointer-events: none; }
.hero-text { position: absolute; left: var(--pad); top: 50%; transform: translateY(-50%); color: var(--ink); }
h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(4rem, 11.5vw, 12rem); line-height: .9; letter-spacing: -0.045em; }
.sub { margin-top: clamp(20px, 3vw, 36px); font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1.15rem, 1.9vw, 1.7rem); line-height: 1.3; letter-spacing: -0.01em; }
.cue, .cap { position: absolute; bottom: 28px; left: var(--pad); font-size: .875rem; letter-spacing: .04em; }
.cue { color: var(--ink); }
.cap { color: #fff; font-size: 1rem; text-shadow: 0 1px 16px rgba(0, 0, 0, .55); }
.cue { display: flex; align-items: center; gap: 14px; }
.cue::after { content: ''; width: 56px; height: 1px; background: currentColor; transform-origin: left; animation: line 2.4s var(--ease) infinite; }
.cap { opacity: 0; }

/* portfolio: four arched paintings, one per category */
.work { padding: clamp(110px, 11vw, 150px) var(--pad) 24px; }
.work-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: clamp(36px, 5vw, 72px); }
.work-head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 4.4vw, 4rem); letter-spacing: -0.035em; line-height: 1; }
.work-head p { font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.5vw, 1.35rem); color: var(--soft); }
.all { margin-top: clamp(56px, 7vw, 96px); text-align: center; }
.all button { font-size: 1rem; color: var(--ink); padding: 12px 4px; border-bottom: 1px solid var(--ochre); transition: color .3s; }
.all button:hover { color: var(--ochre); }
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.6vw, 40px); align-items: start; }
.cats li:nth-child(even) { margin-top: clamp(32px, 6vw, 96px); }
.cat { display: block; width: 100%; text-align: left; color: var(--ink); }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.arch-frame { position: relative; isolation: isolate; display: block; aspect-ratio: 3 / 4.4; border-radius: 999px 999px 0 0; }
.pic { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: var(--tint); }
.pic img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1)); transition: transform 1.3s var(--ease); }
.cat:hover .pic img, .cat:focus-visible .pic img { transform: scale(calc(var(--z, 1) * 1.06)); }
/* a gold light that travels around the edge of the painting on hover */
.arch-frame::before, .arch-frame::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; background: conic-gradient(from var(--a), transparent 0 60%, rgba(201, 150, 43, .5) 72%, #e0ae3a 90%, #fff6c8 98%, transparent 100%); }
.arch-frame::after { padding: 3px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.arch-frame::before { filter: blur(12px); inset: -4px; z-index: -1; }
.cat:hover .arch-frame::before, .cat:focus-visible .arch-frame::before { opacity: .9; }
.cat:hover .arch-frame::after, .cat:focus-visible .arch-frame::after { opacity: 1; }
.cat:hover .arch-frame::before, .cat:hover .arch-frame::after, .cat:focus-visible .arch-frame::before, .cat:focus-visible .arch-frame::after { animation: sweep 2s cubic-bezier(.55, .1, .3, 1) infinite; }
@keyframes sweep { to { --a: 360deg; } }
.label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 18px; }
.name { font-family: var(--serif); font-weight: 300; font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1.1; letter-spacing: -0.025em; transition: font-style .2s; }
.n { font-size: .85rem; color: var(--soft); transition: color .3s; white-space: nowrap; }
.cat:hover .name, .cat:focus-visible .name { font-style: italic; }
.cat:hover .n, .cat:focus-visible .n { color: var(--ochre); }

/* about */
.about { padding: 96px var(--pad) 96px; display: grid; grid-template-columns: auto 1fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.about-img { position: sticky; top: 90px; }
.about-img .arch-frame { aspect-ratio: 5 / 6; height: calc(100svh - 150px); max-height: 860px; min-height: 420px; width: auto; max-width: 100%; }
.about-img img { object-position: 36% 50%; }
.about-text { max-width: 38rem; justify-self: center; padding-top: clamp(0px, 5vh, 56px); }
.about-text .lead { font-size: 1.22rem; line-height: 1.55; color: var(--ink); }
.about-text h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.3rem, 3.9vw, 4.2rem); line-height: 1.04; white-space: nowrap; letter-spacing: -0.035em; margin-bottom: 36px; }
.about-text p { color: #3a3833; font-size: 1.1rem; }
.about-text p + p { margin-top: 1.2em; }

/* contact: a painting behind a frosted, glossy arch of glass */
.contact { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 100svh; padding: 110px var(--pad); background: var(--ink); color: #fff; text-align: center; }
.art { position: absolute; inset: 0; }
.art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; animation: drift 40s ease-in-out infinite alternate; }
.art::after { content: ''; position: absolute; inset: 0; background: rgba(14, 13, 11, .44); }
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.16) translate3d(-1.5%, -1%, 0); } }
.pane { position: relative; isolation: isolate; width: min(760px, 100%); padding: clamp(140px, 18vw, 210px) clamp(24px, 4vw, 56px) clamp(70px, 8vw, 110px); border-radius: 999px 999px 28px 28px; overflow: hidden;
  background: rgba(244, 242, 238, .09); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -40px 80px rgba(255, 255, 255, .04), 0 40px 100px rgba(0, 0, 0, .45); }
.pane::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(125deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .08) 32%, rgba(255, 255, 255, 0) 55%); }
.pane::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 38%; z-index: -1; pointer-events: none; transform: skewX(-18deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent); animation: gloss 7s ease-in-out 1.5s infinite; }
@keyframes gloss { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.contact h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.9rem, 3.5vw, 3.1rem); line-height: 1.12; letter-spacing: -0.03em; margin: 0 auto 48px; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.mail { display: inline-block; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1.4rem, 2.6vw, 2.2rem); text-decoration: none; border-bottom: 1px solid #e0ae3a; padding-bottom: 6px; transition: color .3s; }
.mail:hover { color: #f0c552; }
.here { margin-top: 44px; font-size: 1rem; color: rgba(255, 255, 255, .88); }
.foot { padding: 28px var(--pad); font-size: .85rem; color: #8b877e; background: var(--ink); }

/* viewer */
dialog { border: 0; padding: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: var(--bg); color: var(--ink); }
dialog[open] { display: grid; grid-template-rows: auto 1fr auto; padding: 22px var(--pad) 24px; animation: fade .4s var(--ease); }
.lb-bar { display: flex; gap: 14px; align-items: baseline; font-family: var(--serif); font-size: 1.3rem; }
.lb-bar .soft { font-family: var(--sans); font-size: .9rem; }
#lb-close { font-size: .95rem; color: var(--soft); padding: 8px 0; transition: color .2s; }
dialog figure { display: flex; flex-direction: column; gap: 16px; min-height: 0; padding: 20px 0 8px; }
dialog img { flex: 1 1 0; min-height: 0; width: 100%; height: auto; object-fit: contain; cursor: pointer; transition: opacity .3s ease; }
dialog img.swap { opacity: 0; }
dialog figcaption { text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.3rem; }
.lb-nav { display: flex; justify-content: space-between; }
.lb-nav button { color: var(--soft); padding: 8px 0; transition: color .2s; }
.lb-nav button:hover, #lb-close:hover { color: var(--ink); }

/* motion */
@keyframes fade { from { opacity: 0; } }
@keyframes line { 0% { transform: scaleX(0); } 55% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-text h1 { animation: rise 1.1s var(--ease) .1s backwards; }
.hero-text .sub { animation: rise 1.1s var(--ease) .3s backwards; }
.js .rv { opacity: 0; transform: translateY(18px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text h1, .hero-text .sub, dialog[open], .cue::after { animation: none; }
  .cat:hover .arch-frame::before, .cat:hover .arch-frame::after, .cat:focus-visible .arch-frame::before, .cat:focus-visible .arch-frame::after { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .art img, .pane::after { animation: none; }
}

/* tablet and phone */
@media (max-width: 900px) {
  :root { --aw: 74vw; --ar: 13vw; --at: 40svh; --ab: 9svh; }
  .hero-text { top: 15svh; transform: none; }
  h1 { font-size: clamp(3.4rem, 17vw, 8rem); }
  .sub { display: block; margin-top: 18px; font-size: 1.15rem; }
  .layer img { object-position: 50% 28%; }
  .cats { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .cats li:nth-child(even) { margin-top: 44px; }
  .label { flex-direction: column; gap: 2px; }
  .about-text { justify-self: start; }
  .about { grid-template-columns: 1fr; padding: 72px var(--pad); }
  .about-img { position: static; }
  .about-img .arch-frame { height: auto; width: 100%; max-width: 440px; aspect-ratio: 4 / 5; min-height: 0; }
}

/* ---- extras: progress line, cursor, tilt, text reveals, viewer upgrades ---- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; background: var(--ochre); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.cursor { position: fixed; top: 0; left: 0; z-index: 40; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none; border: 1.5px solid var(--ochre); display: grid; place-items: center; opacity: 0; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s, border-color .35s, opacity .3s; }
.cursor.on { opacity: 1; }
.cursor span { font-size: .8rem; letter-spacing: .04em; color: var(--ink); opacity: 0; transition: opacity .25s; }
.cursor.view { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: rgba(201, 150, 43, .9); border-color: transparent; }
.cursor.view span { opacity: 1; }
.cursor.link { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
.cursor.over-dark { border-color: #e0ae3a; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

.arch-frame { transition: transform .7s var(--ease); will-change: transform; }
.cats { perspective: 1200px; }

.hero-text h1 .ln { display: inline-block; }
.hero-text h1 .l { display: inline-block; animation: letter 1.1s var(--ease) backwards; animation-delay: calc(.1s + var(--i) * 55ms); }
@keyframes letter { from { opacity: 0; transform: translateY(.45em) rotate(5deg); } to { opacity: 1; transform: none; } }
.hero-text h1 { animation: none; }

.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.split .w > span { display: inline-block; }
.js .split .w > span { transform: translateY(110%); }
.js .split.in .w > span { transform: none; transition: transform 1s var(--ease); transition-delay: calc(var(--wi) * 70ms); }
.js .split.rv { opacity: 1; transform: none; }

.where { margin-top: 1.6em; font-size: .95rem; color: var(--soft); }
.mail { will-change: transform; }

.lb-thumbs { display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.lb-thumbs button { flex: none; width: 64px; height: 46px; opacity: .45; transition: opacity .25s, transform .3s var(--ease); position: relative; }
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button:hover { opacity: .85; }
.lb-thumbs button[aria-current="true"] { opacity: 1; transform: translateY(-3px); }
.lb-thumbs button[aria-current="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--ochre); }
dialog[open] { grid-template-rows: auto 1fr auto auto; }
dialog img { cursor: zoom-in; transform-origin: 50% 50%; }
dialog img.zoomed { cursor: zoom-out; transform: scale(2.3); transition: opacity .3s ease, transform .5s var(--ease); }
dialog figure { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .hero-text h1 .l { animation: none; }
  .js .split .w > span { transform: none; }
  .arch-frame { transition: none; }
}
@media (max-width: 900px) { .lb-thumbs button { width: 52px; height: 38px; } }

.lb-enquire { margin-left: auto; font-family: var(--sans); font-size: .95rem; color: var(--ink); text-underline-offset: 5px; text-decoration-color: var(--ochre); transition: color .3s; }
.lb-enquire:hover { color: var(--ochre); }
#lb-close { margin-left: 28px; color: var(--ink); }
.lb-nav button { color: var(--ink); }
dialog { touch-action: pan-x pan-y pinch-zoom; }
