/* Portfolio 2026 — Marley de Mee. rem only (16px = 1rem). */
@font-face { font-family: 'Ultrabold'; src: url('fonts/ultrabold.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Regular'; src: url('fonts/regular.woff') format('woff'); font-display: swap; }

:root {
  --bg: #0d0e11;
  --bg-2: #14161b;
  --bg-3: #1b1e25;
  --line: #262a33;
  --text: #fef9ef;
  --muted: #9a9ca3;
  --accent: #3b7bff;
  --accent-2: #00d3a7;
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --gutter: max(5vw, 1.25rem);
  --width: 90rem;
  --font-title: 'Ultrabold', 'Arial Black', sans-serif;
  --font: 'Inter', system-ui, sans-serif;
  --font-wide: 'Regular', 'Inter', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
@media (max-width: 40rem) { :root { --gutter: 5vw; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-title); font-weight: normal; margin: 0; line-height: 1.02; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }

.ms {
  font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 1.25rem; line-height: 1;
  display: inline-block; white-space: nowrap; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; user-select: none; flex: none;
}

.wrap { width: min(var(--width), 100%); margin: 0 auto; padding: 0 var(--gutter); }
.label { font-family: var(--font-title); font-size: clamp(1.75rem, 4vw, 2.75rem); display: flex; align-items: baseline; gap: 0.75rem; }
.label .slash { color: var(--accent); }
.label small { font-family: var(--font); font-size: 0.875rem; color: var(--muted); letter-spacing: 0.04em; }
section { padding: clamp(4rem, 10vw, 8rem) 0 0; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 4.5rem;
  display: flex; align-items: center; transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 0.0625rem solid transparent;
}
.nav.scrolled { background: rgb(13 14 17 / 72%); backdrop-filter: blur(1rem) saturate(1.4); border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 1rem; }
.logo { font-family: var(--font-title); font-size: 1.75rem; line-height: 1; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; background: var(--text); color: var(--bg); transition: transform .3s var(--ease); }
.logo:hover { transform: rotate(-8deg) scale(1.05); }
.nav-tools { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.nav-tools a { padding: 0.5rem 0.875rem; border-radius: 2rem; color: var(--muted); font-size: 0.9375rem; transition: color .2s, background .2s; }
.nav-tools a:hover, .nav-tools a.active { color: var(--text); background: var(--bg-3); }
.nav-tools a.cta { color: var(--bg); background: var(--text); display: inline-flex; align-items: center; gap: 0.375rem; }
.nav-tools a.cta:hover { background: var(--accent); color: #fff; }
@media (max-width: 40rem) { .nav-tools a:not(.cta) { display: none; } }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 7rem 0 clamp(2rem, 6vw, 4rem); position: relative; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg canvas { width: 100%; height: 100%; display: block; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(13 14 17 / 0%) 40%, var(--bg) 100%); }
.hero h1 { font-size: clamp(4.5rem, 17vw, 17rem); line-height: 0.84; letter-spacing: -0.03em; }
.hero h1 span { display: block; overflow: hidden; }
.hero h1 span i { display: block; font-style: normal; animation: rise 1s var(--ease) both; }
.hero h1 span:nth-child(2) i { animation-delay: .08s; }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); flex-wrap: wrap; }
.hero-foot p { font-size: clamp(1.125rem, 2vw, 1.5rem); max-width: 36rem; line-height: 1.4; animation: fade 1s .3s both; }
.hero-foot p b { font-weight: normal; color: var(--accent); }
.scroll-hint { width: 3.5rem; height: 3.5rem; border-radius: 50%; border: 0.0625rem solid var(--line); display: grid; place-items: center; animation: fade 1s .5s both; transition: background .2s, border-color .2s; }
.scroll-hint:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.scroll-hint .ms { animation: bob 2s ease-in-out infinite; }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade { from { opacity: 0; transform: translateY(1rem); } }
@keyframes bob { 50% { transform: translateY(0.25rem); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; margin-top: 2.5rem; }
.about p { font-size: clamp(1.125rem, 1.8vw, 1.5rem); line-height: 1.55; }
.about p + p { margin-top: 1.25rem; }
.about p a { color: var(--accent); }
.about .muted { color: var(--muted); font-size: 1.0625rem; }
.about-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-3); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: saturate(.9); transition: transform .8s var(--ease); }
.about-photo:hover img { transform: scale(1.03); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
.fact { border-top: 0.0625rem solid var(--line); padding-top: 1rem; }
.fact b { display: block; font-family: var(--font-title); font-weight: normal; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.fact span { color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 52rem) { .about { grid-template-columns: 1fr; } .about-photo { max-width: 26rem; } }

/* ---------- Marquee ---------- */
.marquee { margin-top: 2.5rem; overflow: hidden; border-block: 0.0625rem solid var(--line); padding: 1.25rem 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: var(--font-title); font-size: clamp(1.5rem, 3vw, 2.25rem); white-space: nowrap; display: inline-flex; align-items: center; gap: 3rem; }
.marquee span::after { content: ''; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Work ---------- */
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.work-head p { color: var(--muted); max-width: 32rem; }
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 2rem; }
.filters button { all: unset; cursor: pointer; padding: 0.5rem 1rem; border-radius: 2rem; border: 0.0625rem solid var(--line); color: var(--muted); font-size: 0.9375rem; transition: all .2s; display: inline-flex; gap: 0.5rem; align-items: center; }
.filters button sup { font-size: 0.75rem; opacity: .7; }
.filters button:hover { color: var(--text); border-color: var(--muted); }
.filters button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); margin-top: 2rem; }
.grid .card:nth-child(6n+1), .grid .card:nth-child(6n+6) { grid-column: span 2; }
.grid .card:nth-child(6n+1) .card-media, .grid .card:nth-child(6n+6) .card-media { aspect-ratio: 21 / 9; }
@media (max-width: 52rem) { .grid { grid-template-columns: 1fr; } .grid .card { grid-column: auto !important; } .grid .card .card-media { aspect-ratio: 16 / 10 !important; } }
.card { display: flex; flex-direction: column; gap: 1rem; --c: var(--accent); }
.card.hidden { display: none; }
.card-media {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--c) 45%, transparent), transparent 60%), var(--bg-2);
  border: 0.0625rem solid var(--line); transition: border-color .3s, transform .5s var(--ease);
}
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .8s var(--ease); }
.card-media .phone-shot { position: absolute; inset: auto; left: 50%; top: 9%; width: auto; height: 120%; aspect-ratio: 9 / 19.5; transform: translateX(-50%); object-fit: cover; object-position: top; border-radius: 1.75rem; border: 0.375rem solid #08090b; box-shadow: 0 2rem 4rem rgb(0 0 0 / 50%); }
.card-media .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-title); font-size: clamp(2rem, 5vw, 4rem); color: color-mix(in srgb, var(--c) 70%, var(--text)); opacity: .5; }
.card:hover .card-media { border-color: var(--c); }
.card:hover .card-media img { transform: scale(1.025); }
.card:hover .card-media .phone-shot { transform: translateX(-50%) translateY(-0.5rem); }
.card-go { position: absolute; right: 1rem; bottom: 1rem; width: 3rem; height: 3rem; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; transform: scale(.6); opacity: 0; transition: all .35s var(--ease); }
.card:hover .card-go { transform: scale(1); opacity: 1; }
.card-live { position: absolute; left: 1rem; top: 1rem; display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.3rem 0.625rem; border-radius: 2rem; background: rgb(13 14 17 / 70%); backdrop-filter: blur(0.5rem); }
.card-live::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0.25rem rgb(0 211 167 / 20%); }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; flex-wrap: wrap; }
.card h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
.card .ctx { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.card p { color: var(--muted); margin-top: -0.5rem; max-width: 40rem; }

/* ---------- Archive teaser ---------- */
.archive-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; margin-top: 2rem; }
.archive-strip a { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-3); }
.archive-strip img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.6); transition: filter .4s, transform .6s var(--ease); }
.archive-strip a:hover img { filter: none; transform: scale(1.05); }
@media (max-width: 40rem) { .archive-strip { grid-template-columns: repeat(3, 1fr); } .archive-strip a:nth-child(n+4) { display: none; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.625rem; height: 3.25rem; padding: 0 1.5rem; border-radius: 3rem; border: 0.0625rem solid var(--line); font-size: 1rem; transition: all .25s var(--ease); white-space: nowrap; }
.btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn .ms { transition: transform .25s var(--ease); }
.btn:hover .ms.arrow { transform: translateX(0.25rem); }

/* ---------- Footer / contact ---------- */
.contact { padding-bottom: 3rem; }
.contact h2:not(.label) { font-size: clamp(3rem, 10vw, 9rem); line-height: 0.9; margin-top: 2rem; }
.contact h2 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 0.08em no-repeat; transition: background-size .5s var(--ease), color .3s; }
.contact h2 a:hover { background-size: 100% 0.08em; color: var(--accent); }
.contact-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2.5rem; }
.foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: 0.875rem; border-top: 0.0625rem solid var(--line); margin-top: clamp(4rem, 8vw, 6rem); padding-block: 1.5rem 2rem; }

/* ---------- Case page ---------- */
.case-hero { padding: 8rem 0 0; }
.back { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--muted); font-size: 0.9375rem; transition: color .2s; }
.back:hover { color: var(--text); }
.case-hero h1 { font-size: clamp(3rem, 10vw, 9rem); line-height: 0.9; margin-top: 1.5rem; letter-spacing: -0.02em; }
.case-hero .tagline { font-size: clamp(1.25rem, 2.4vw, 1.875rem); line-height: 1.35; max-width: 50rem; margin-top: 1.5rem; }
.case-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; border-top: 0.0625rem solid var(--line); padding-top: 1.5rem; }
.case-meta dt { color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; }
.case-meta dd { margin: 0.375rem 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.chips span { font-size: 0.8125rem; padding: 0.2rem 0.625rem; border-radius: 2rem; background: var(--bg-3); border: 0.0625rem solid var(--line); }
@media (max-width: 52rem) { .case-meta { grid-template-columns: 1fr 1fr; } }

.demo { margin-top: clamp(3rem, 6vw, 5rem); }
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.demo-note { display: flex; gap: 0.625rem; align-items: flex-start; color: var(--muted); font-size: 0.9375rem; max-width: 46rem; }
.demo-note .ms { color: var(--accent-2); margin-top: 0.125rem; }
.browser { border-radius: var(--radius); overflow: hidden; border: 0.0625rem solid var(--line); background: var(--bg-2); box-shadow: 0 2rem 6rem rgb(0 0 0 / 45%), 0 0 0 0.0625rem rgb(255 255 255 / 3%) inset; }
.browser-bar { height: 2.75rem; display: flex; align-items: center; gap: 0.75rem; padding: 0 1rem; border-bottom: 0.0625rem solid var(--line); }
.dots { display: flex; gap: 0.4rem; }
.dots i { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--line); }
.dots i:nth-child(1) { background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.url { flex: 1; max-width: 28rem; margin: 0 auto; height: 1.75rem; border-radius: 0.5rem; background: var(--bg-3); display: flex; align-items: center; justify-content: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--muted); }
.url .ms { font-size: 0.875rem; }
.browser iframe { display: block; width: 100%; height: min(52rem, 82vh); border: 0; background: #fff; }
.phone-stage { display: grid; place-items: center; padding: clamp(2rem, 5vw, 4rem) 0; border-radius: var(--radius); border: 0.0625rem solid var(--line);
  background: radial-gradient(60% 70% at 50% 40%, color-mix(in srgb, var(--c, var(--accent)) 30%, transparent), transparent 70%), var(--bg-2); }
.phone { width: min(24rem, 88vw); aspect-ratio: 9 / 19.5; border-radius: 3rem; padding: 0.75rem; background: #050506; box-shadow: 0 0 0 0.125rem #2a2d33, 0 3rem 6rem rgb(0 0 0 / 60%); position: relative; }
.phone::before { content: ''; position: absolute; top: 1.4rem; left: 50%; transform: translateX(-50%); width: 6rem; height: 1.6rem; border-radius: 1rem; background: #050506; z-index: 2; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 2.35rem; background: #fff; display: block; }
@media (max-width: 40rem) { .browser iframe { height: 80vh; } }

.case-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); }
.case-body h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1rem; }
.case-body p { color: #d9d6cf; }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.highlights li { display: flex; gap: 0.875rem; padding: 1rem 0; border-bottom: 0.0625rem solid var(--line); }
.highlights li .ms { color: var(--accent); margin-top: 0.2rem; }
@media (max-width: 52rem) { .case-body { grid-template-columns: 1fr; } }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pager a { display: flex; flex-direction: column; gap: 0.375rem; padding: 1.5rem; border-radius: var(--radius); border: 0.0625rem solid var(--line); transition: border-color .25s, background .25s; }
.pager a:hover { border-color: var(--muted); background: var(--bg-2); }
.pager a.next { text-align: right; align-items: flex-end; }
.pager small { color: var(--muted); display: inline-flex; align-items: center; gap: 0.25rem; }
.pager b { font-family: var(--font-title); font-weight: normal; font-size: clamp(1.25rem, 3vw, 2rem); line-height: 1.1; }

/* ---------- Archive page ---------- */
.gallery { columns: 3 18rem; column-gap: 1rem; margin-top: 2rem; }
.gallery button { all: unset; cursor: zoom-in; display: block; margin-bottom: 1rem; border-radius: var(--radius-sm); overflow: hidden; break-inside: avoid; background: var(--bg-3); }
.gallery img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.gallery button:hover img { transform: scale(1.03); }
.gallery-group + .gallery-group { margin-top: 4rem; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; overflow: visible; }
dialog.lightbox::backdrop { background: rgb(5 6 8 / 85%); backdrop-filter: blur(0.5rem); }
dialog.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius-sm); animation: fade .4s var(--ease); }
dialog.lightbox button { position: fixed; top: 1.25rem; right: 1.25rem; width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); display: grid; place-items: center; cursor: pointer; }

/* reveal on scroll (added by site.js; content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(2rem); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Two screens (office + phone) ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.duo-item { margin: 0; display: flex; flex-direction: column; gap: 0.875rem; }
.duo-item figcaption { color: var(--muted); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; text-align: center; }
.duo .phone { width: min(22rem, 88vw); }
.duo .browser iframe { height: min(48rem, 80vh); }
@media (max-width: 64rem) { .duo { grid-template-columns: 1fr; justify-items: center; } .duo-item { width: 100%; align-items: center; } .duo .browser { width: 100%; } }

/* ---------- Showcase of live client sites ---------- */
.showcase { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); margin-top: 2rem; }
@media (max-width: 52rem) { .showcase { grid-template-columns: 1fr; } }
.site { display: flex; flex-direction: column; gap: 1rem; }
.site h3 { font-size: clamp(1.375rem, 2.4vw, 2rem); }
.site p { color: var(--muted); margin-top: -0.5rem; }
.site .ctx { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--muted); font-size: 0.875rem; }
.site .ctx .ms { font-size: 1rem; }
.site-shots { position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius); background: var(--bg-2); border: 0.0625rem solid var(--line); overflow: hidden; transition: border-color .3s; }
.site:hover .site-shots { border-color: var(--muted); }
.site-desktop { position: absolute; left: 0; top: 0; width: 88%; height: auto; border-radius: 0 0 var(--radius-sm) 0; transition: transform .8s var(--ease); }
.site-mobile { position: absolute; right: 4%; bottom: -12%; width: 24%; height: auto; border-radius: 1rem; border: 0.3125rem solid #08090b; box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 55%); transition: transform .6s var(--ease); }
.site:hover .site-desktop { transform: scale(1.02); transform-origin: top left; }
.site:hover .site-mobile { transform: translateY(-0.75rem); }

/* wide display face for small accents; Inter for reading */
.nav-tools a, .btn, .filters button, .card .ctx, .site .ctx, .card-live, .label small, .case-meta dt, .duo-item figcaption, .pager small, .back, .hero-foot p, .fact span, .marquee span { font-family: var(--font-wide); }
.about p:not(.muted) { font-family: var(--font-wide); }
