/* Abraca Lab — public site. Dark by design: most of the work glows. */
:root {
  --bg: #0b0b0d;
  --bg2: #151518;
  --ink: #f3efe6;
  --muted: #a29e95;
  --line: rgba(243, 239, 230, 0.13);
  --red: #ed1c24;
  --green: #00cc52;
  --blue: #0080ff;
  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --text: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut: clamp(16px, 4vw, 48px);
  --max: 1480px;
  --row: clamp(260px, 30vw, 540px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- header */
.top { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gut); background: linear-gradient(to bottom, rgba(11, 11, 13, 0.72), rgba(11, 11, 13, 0)); transition: background 0.3s, padding 0.3s; }
.top.is-solid { background: rgba(11, 11, 13, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-block: 12px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 700 15px/1 var(--display); letter-spacing: 0.08em; white-space: nowrap; }
.brand .prism { width: 34px; height: auto; }
.top nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); font-weight: 500; font-size: 15px; }
.top nav a { text-decoration: none; opacity: 0.86; }
.top nav a:hover { opacity: 1; text-decoration: underline; }
.top nav .ig { display: inline-flex; }

/* the prism's three colours, used as a small brand rule */
.kicker { display: inline-flex; align-items: center; gap: 12px; font: 600 12.5px/1 var(--text); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); opacity: 0.9; margin-bottom: 22px; }
.kicker::before { content: ""; width: 42px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--red) 0 33%, var(--green) 33% 66%, var(--blue) 66%); }
.kicker a { text-decoration: none; }

/* ---------- hero */
.hero { position: relative; min-height: max(620px, 100svh); display: flex; align-items: flex-end; isolation: isolate; overflow: hidden; }
.hero-slides { position: absolute; inset: 0; z-index: -2; }
/* stacked slides: only the visible one may take clicks or focus */
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 1.4s ease, visibility 0s linear 1.4s; }
.hero-slide.is-on { opacity: 1; visibility: visible; pointer-events: auto; z-index: 1; transition-delay: 0s; }
.hero-pause { position: absolute; z-index: 3; right: var(--gut); top: 84px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(243, 239, 230, 0.35); background: rgba(11, 11, 13, 0.4); color: var(--ink); font-size: 11px; letter-spacing: -1px; cursor: pointer; display: grid; place-items: center; opacity: 0.7; }
.hero-pause:hover, .hero-pause:focus-visible { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 7s ease-out; }
.hero-slide.is-on img { transform: scale(1); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(to top, rgba(11, 11, 13, 0.96) 0%, rgba(11, 11, 13, 0.55) 38%, rgba(11, 11, 13, 0.08) 72%), linear-gradient(to right, rgba(11, 11, 13, 0.55), rgba(11, 11, 13, 0) 60%); }
.hero-glow { position: absolute; left: -10vw; bottom: -30vh; width: 70vw; height: 70vh; z-index: 1; pointer-events: none; background: radial-gradient(closest-side, rgba(237, 28, 36, 0.22), transparent 70%) 0 30% / 50% 100% no-repeat, radial-gradient(closest-side, rgba(0, 204, 82, 0.16), transparent 70%) 40% 60% / 50% 100% no-repeat, radial-gradient(closest-side, rgba(0, 128, 255, 0.2), transparent 70%) 80% 40% / 50% 100% no-repeat; filter: blur(30px); mix-blend-mode: screen; }
.hero-copy { position: relative; z-index: 2; pointer-events: none; width: 100%; max-width: var(--max); margin-inline: auto; padding: 0 var(--gut) clamp(48px, 9vh, 104px); }
.hero h1 { font-weight: 700; font-size: clamp(2.5rem, 7vw, 6.6rem); line-height: 0.98; letter-spacing: -0.03em; max-width: 14ch; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.3rem); max-width: 46ch; color: rgba(243, 239, 230, 0.86); margin: 24px 0 0; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; pointer-events: auto; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; border: 1px solid var(--ink); transition: transform 0.15s, background 0.2s, color 0.2s; }
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: rgba(11, 11, 13, 0.35); color: var(--ink); border-color: rgba(243, 239, 230, 0.4); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.hero-cap { position: absolute; z-index: 2; right: var(--gut); bottom: clamp(48px, 9vh, 104px); display: grid; gap: 2px; text-align: right; font-size: 13.5px; color: rgba(243, 239, 230, 0.78); max-width: 34ch; }
.hero-cap b { font-weight: 600; color: var(--ink); }

/* ---------- sections */
section { padding-block: clamp(64px, 10vw, 140px) 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: clamp(24px, 3vw, 40px); }
.sec-head h2 { font-size: clamp(1.7rem, 3.4vw, 3rem); }
.sec-head p { margin: 0; color: var(--muted); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }

.cards { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-flow: dense; gap: clamp(28px, 3vw, 44px) clamp(12px, 1.6vw, 24px); }
.card { grid-column: span 2; text-decoration: none; display: block; }
.card-wide { grid-column: span 4; }
.card-img { height: var(--row); overflow: hidden; border-radius: 10px; background: var(--bg2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s; }
.card:hover .card-img img { transform: scale(1.035); }
.card-txt { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding-top: 14px; }
.card-txt h3 { font-size: clamp(1.05rem, 1.4vw, 1.3rem); }
.card-txt p { margin: 0; color: var(--muted); font-size: 14px; }
.badge { display: inline-block; vertical-align: middle; font: 600 11px/1 var(--text); letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; background: var(--blue); color: #fff; }
.card:hover h3 { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

.svc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(16px, 3vw, 48px); }
.svc li { border-top: 1px solid var(--line); padding: 22px 0 30px; }
.svc .num { display: block; font: 600 13px/1 var(--display); margin-bottom: 18px; color: var(--red); }
.svc li:nth-child(3n + 2) .num { color: var(--green); }
.svc li:nth-child(3n) .num { color: var(--blue); }
.svc h3 { font-size: 1.15rem; margin-bottom: 10px; }
.svc p { color: var(--muted); margin: 0; max-width: 38ch; }

.studio-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.studio-about p { font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.5; max-width: 40ch; }
.studio-about p:first-child { font-family: var(--display); font-weight: 400; font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.3; letter-spacing: -0.01em; }
.team { list-style: none; margin: 0 0 32px; padding: 0; }
.team li { display: grid; gap: 2px; padding: 16px 0; border-top: 1px solid var(--line); }
.team b { font: 500 1.1rem/1.2 var(--display); }
.team span { color: var(--muted); font-size: 14px; }
.team a { color: var(--muted); font-size: 15px; }
.team a:hover { color: var(--ink); }
.addr { color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

.contact { padding-bottom: clamp(64px, 10vw, 140px); }
.contact h2 { font-weight: 700; font-size: clamp(2.2rem, 6.4vw, 5.8rem); line-height: 1; letter-spacing: -0.03em; max-width: 16ch; border-top: 1px solid var(--line); padding-top: clamp(32px, 5vw, 64px); margin-bottom: clamp(28px, 4vw, 48px); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-bottom: 24px; }
.contact-links a { font: 500 clamp(1.15rem, 2.4vw, 2rem)/1.2 var(--display); text-decoration: none; background: linear-gradient(90deg, var(--red), var(--green), var(--blue)) 0 100% / 0 2px no-repeat; transition: background-size 0.35s; padding-bottom: 4px; overflow-wrap: anywhere; }
.contact-links a:hover { background-size: 100% 2px; }
.ig-link { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; }
.ig-link:hover { color: var(--ink); }

/* ---------- project page */
.p-hero { position: relative; height: min(88svh, 1000px); min-height: 460px; display: flex; align-items: flex-end; isolation: isolate; overflow: hidden; }
.p-hero > img, .p-hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.p-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(to top, rgba(11, 11, 13, 0.95), rgba(11, 11, 13, 0.25) 45%, rgba(11, 11, 13, 0.1) 75%, rgba(11, 11, 13, 0.45)); }
.p-title { width: 100%; padding-bottom: clamp(32px, 6vh, 72px); pointer-events: none; }
.p-title a { pointer-events: auto; }
.p-title h1 { font-weight: 700; font-size: clamp(2.3rem, 6.6vw, 6rem); line-height: 0.98; letter-spacing: -0.03em; }
.p-meta { color: rgba(243, 239, 230, 0.8); margin: 16px 0 0; font-size: 15px; letter-spacing: 0.04em; }
.p-info { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-block: clamp(48px, 7vw, 96px); }
.p-summary p { font-size: clamp(1.12rem, 1.6vw, 1.4rem); line-height: 1.55; max-width: 44ch; }
.p-facts dl { margin: 0 0 28px; }
.p-facts dl div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.p-facts dt { color: var(--muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 3px; }
.p-facts dd { margin: 0; }
.p-facts h2 { font: 600 13px/1 var(--text); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 12px; }
.p-facts ul { margin: 0; padding-left: 18px; }
.p-facts li { margin-bottom: 6px; }

/* justified rows without JS: each tile grows in proportion to its aspect ratio */
.gallery { display: flex; flex-wrap: wrap; gap: clamp(6px, 0.8vw, 12px); }
.gallery::after { content: ""; flex-grow: 1e6; }
.gallery figure { margin: 0; flex: var(--ar) 1 calc(var(--ar) * clamp(170px, 24vw, 400px)); aspect-ratio: var(--ar); max-width: calc(var(--ar) * 82svh); overflow: hidden; border-radius: 6px; background: var(--bg2); position: relative; }
.gallery figure a { display: block; height: 100%; cursor: zoom-in; }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; }
.gallery figure img { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gallery figure a:hover img { transform: scale(1.025); }

.next { position: relative; display: block; margin-top: clamp(64px, 9vw, 128px); height: clamp(260px, 42vh, 460px); overflow: hidden; text-decoration: none; isolation: isolate; }
.next-img, .next-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.next::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(11, 11, 13, 0.6); transition: background 0.4s; }
.next:hover::after { background: rgba(11, 11, 13, 0.35); }
.next-txt { position: absolute; left: var(--gut); bottom: clamp(28px, 5vw, 56px); display: grid; gap: 8px; }
.next-txt small { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(243, 239, 230, 0.8); }
.next-txt b { font: 700 clamp(1.8rem, 5vw, 4.2rem)/1 var(--display); letter-spacing: -0.03em; }

/* ---------- lightbox */
.lb { position: fixed; inset: 0; z-index: 96; background: rgba(6, 6, 8, 0.96); display: grid; place-items: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s, visibility 0s linear 0.2s; }
.lb.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.lb img { max-width: 94vw; max-height: 88svh; width: auto; height: auto; object-fit: contain; border-radius: 4px; user-select: none; }
.lb button { position: absolute; border: 0; background: rgba(243, 239, 230, 0.1); color: var(--ink); width: 52px; height: 52px; border-radius: 50%; font-size: 22px; cursor: pointer; display: grid; place-items: center; }
.lb button:hover { background: rgba(243, 239, 230, 0.22); }
.lb .lb-x { top: 16px; right: 16px; }
.lb .lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb .lb-next { right: 16px; top: 50%; translate: 0 -50%; }
.lb .lb-n { position: absolute; bottom: 18px; left: 50%; translate: -50% 0; color: var(--muted); font-size: 14px; }

/* ---------- footer, misc */
.foot { border-top: 1px solid var(--line); padding: 48px var(--gut) 36px; max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; color: var(--muted); font-size: 15px; }
.foot-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font: 700 14px/1 var(--display); letter-spacing: 0.08em; }
.foot-brand .prism { width: 30px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, auto); justify-content: end; gap: 12px 48px; }
.foot-cols p { margin: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.fine { grid-column: 1 / -1; font-size: 13px; margin: 8px 0 0; }

.preview-bar { position: fixed; z-index: 95; left: 50%; bottom: 16px; translate: -50% 0; width: max-content; max-width: calc(100vw - 32px); text-align: center; background: var(--blue); color: #fff; padding: 10px 18px; border-radius: 22px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); }
.soon { min-height: 80svh; display: grid; place-content: center; text-align: center; gap: 4px; padding-top: 120px; }
.soon-mark .prism { width: 110px; margin: 0 auto 28px; }
.soon h1 { font-weight: 700; font-size: clamp(2rem, 6vw, 4rem); margin-bottom: 12px; }
.soon p { color: var(--muted); }
.empty .top nav { display: none; }

/* ---------- small screens */
@media (max-width: 960px) {
  .svc { grid-template-columns: repeat(2, 1fr); }
  .studio-grid, .p-info { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .foot-cols { justify-content: start; grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top nav a:not(.ig) { font-size: 14px; }
  .brand span { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card, .card-wide { grid-column: auto; }
  .card-img { height: auto; aspect-ratio: 4 / 3; }
  .svc { grid-template-columns: 1fr; }
  .hero-cap { display: none; }
  /* landscape covers in a tall frame: the subject usually sits below the sky */
  .hero-slide img, .p-hero > img { object-position: 50% 62%; }
  .hero h1 { max-width: none; }
  .gallery figure { flex-basis: calc(var(--ar) * 150px); }
  .lb .lb-prev, .lb .lb-next { top: auto; bottom: 10px; translate: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
.lb-open .preview-bar { display: none; }

/* ---------- logo motion: the prism's four shards
   assemble on load, ripple now and then like light passing through,
   and spread slightly on hover. Path order: red, white, blue, green. */
.prism path { transform-box: fill-box; transform-origin: center; transition: translate 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.prism path {
  animation: shard-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards, shard-ripple 10s ease-in-out infinite;
}
.prism path:nth-child(1) { --dx: -16%; --dy: 8%; animation-delay: 0.05s, 2.6s; }
.prism path:nth-child(2) { --dx: 0%; --dy: -18%; animation-delay: 0.17s, 2.75s; }
.prism path:nth-child(3) { --dx: 0%; --dy: 16%; animation-delay: 0.29s, 3.05s; }
.prism path:nth-child(4) { --dx: 16%; --dy: -6%; animation-delay: 0.41s, 2.9s; }
@keyframes shard-in {
  from { translate: var(--dx) var(--dy); scale: 0.82; }
  to { translate: 0 0; scale: 1; }
}
@keyframes shard-ripple {
  0%, 84%, 100% { scale: 1; }
  88% { scale: 1.07; }
  92% { scale: 0.98; }
}
.brand:hover .prism path:nth-child(1), .foot-brand:hover .prism path:nth-child(1) { translate: -5% 2%; }
.brand:hover .prism path:nth-child(2), .foot-brand:hover .prism path:nth-child(2) { translate: 0 -5%; }
.brand:hover .prism path:nth-child(3), .foot-brand:hover .prism path:nth-child(3) { translate: 0 5%; }
.brand:hover .prism path:nth-child(4), .foot-brand:hover .prism path:nth-child(4) { translate: 5% -2%; }
/* the footer mark shouldn't keep rippling below the fold */
.foot-brand .prism path { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .prism path { animation: none !important; transition: none; }
}
.hero-pause .i-play { display: none; }
.hero-pause[aria-pressed="true"] .i-play { display: block; }
.hero-pause[aria-pressed="true"] .i-pause { display: none; }
