/* ── Applied Labs — shared case study styles ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: #CFE82C; color: #000; }

:root {
  --bg:          #0b0a08;
  --ink:         #e6dfd3;
  --ink-muted:   #5a544b;
  --accent:      #c8c2b8;
  --border:      rgba(255,255,255,0.055);
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);
  --ease-out:    cubic-bezier(0.22,1,0.36,1);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: "JetBrains Mono", monospace; min-height: 100vh; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; background: radial-gradient(ellipse 90% 50% at 50% -5%, rgba(255,255,255,.03) 0%, transparent 65%); pointer-events: none; z-index: 0; }

/* ── Grain + cursor ── */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 9000; opacity: .032; mix-blend-mode: screen; }
.cursor-ring { position: fixed; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--accent); pointer-events: none; z-index: 9999; top: 0; left: 0; transform: translate(-50%,-50%); opacity: .5; transition: width .45s var(--ease-spring), height .45s var(--ease-spring), opacity .3s ease; will-change: transform; }
.cursor-ring.hovering { width: 56px; height: 56px; opacity: .15; }
.cursor-dot { position: fixed; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); pointer-events: none; z-index: 10000; top: 0; left: 0; transform: translate(-50%,-50%); will-change: transform; }

/* ── Layout ── */
.container { max-width: 760px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* ── Breadcrumb ── */
.case-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 32px 0 0;
  opacity: 0;
  animation: rise .6s var(--ease-out) .05s forwards;
}
.bc-home {
  font-family: "Syne", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color .2s;
  cursor: none;
}
.bc-home:hover { color: var(--ink); }
.bc-current { font-family: "Syne", sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }

/* ── Arrow circle (NE icon) ── */
.arrow-circ {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color .3s, transform .4s var(--ease-spring);
}
.arrow-circ svg { width: 12px; height: 12px; stroke: var(--ink-muted); stroke-width: 1.5; fill: none; transition: stroke .3s; }
.cta-btn .arrow-circ { border-color: rgba(0,0,0,.15); }
.cta-btn .arrow-circ svg { stroke: var(--bg); }
.cta-btn:hover .arrow-circ { transform: translate(2px,-2px); }

/* ── Hero ── */
.case-header { padding: 56px 0 52px; }
.case-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; opacity: 0; animation: rise .6s var(--ease-out) .1s forwards; }
.meta-tag { font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted); }
.meta-sep { color: var(--ink-muted); opacity: .35; font-size: 10px; }
.meta-live { color: #86efac; background: rgba(134,239,172,.08); border: 1px solid rgba(134,239,172,.2); border-radius: 3px; padding: 1px 6px; }
.case-title { font-family: "Syne", sans-serif; font-size: clamp(44px,8vw,80px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--ink); margin-bottom: 14px; opacity: 0; animation: rise .8s var(--ease-out) .15s forwards; }
.case-tagline { font-size: 14px; color: var(--ink-muted); line-height: 1.65; max-width: 420px; opacity: 0; animation: rise .7s var(--ease-out) .22s forwards; }

/* ── Sections ── */
.case-section { padding: 48px 0 0; opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.case-section.visible { opacity: 1; transform: none; }
.section-label-row { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.section-label { font-size: 10px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.section-line { flex: 1; height: 1px; background: var(--border); }
.case-prose { font-size: 13px; line-height: 1.85; color: rgba(200,194,184,.7); max-width: 560px; }

/* ── Animated visual (base — background set per-page) ── */
.case-visual { margin: 48px -8px 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.06); opacity: 0; transform: translateY(20px); transition: opacity .65s var(--ease-out), transform .65s var(--ease-out); }
.case-visual.visible { opacity: 1; transform: none; }

/* ── Capabilities ── */
.capabilities { display: flex; flex-direction: column; }
.cap-item { display: grid; grid-template-columns: 40px 1fr; gap: 0 16px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--border); }
.cap-item:last-child { border-bottom: none; }
.cap-num { font-size: 10px; font-weight: 500; color: var(--ink-muted); letter-spacing: .1em; padding-top: 2px; }
.cap-title { font-family: "Syne", sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 6px; }
.cap-desc { font-size: 12px; line-height: 1.75; color: var(--ink-muted); }

/* ── Screenshot gallery ── */
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery-grid.single { grid-template-columns: 1fr; }
.gallery-item { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.06); background: #111; display: block; }
.gallery-item img { width: 100%; height: auto; display: block; }


/* ── CTA ── */
.case-cta {
  margin-top: 72px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: rgba(255,255,255,.015);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.case-cta.visible { opacity: 1; transform: none; }
.cta-text { display: flex; flex-direction: column; gap: 4px; }
.cta-eyebrow { font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted); }
.cta-heading { font-family: "Syne", sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; margin-top: 4px; }
.cta-sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: none;
  transition: opacity .2s ease, transform .35s var(--ease-spring);
}
.cta-btn:hover { opacity: .85; transform: translateY(-2px); }

/* ── Footer ── */
.case-footer {
  margin-top: 40px;
  padding: 24px 0 56px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  animation: rise .6s var(--ease-out) 1s forwards;
}
/* ── Footer wordmark ── */
.footer-wordmark { font-family: "Syne", sans-serif; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; line-height: 1.1; color: var(--accent); }

.footer-next { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-decoration: none; cursor: none; }
.footer-next-label { font-size: 9px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-muted); opacity: .55; }
.footer-next-name { display: flex; align-items: center; gap: 8px; font-family: "Syne", sans-serif; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; transition: color .2s; }
.footer-next:hover .footer-next-name { color: var(--accent); }
.footer-next:hover .arrow-circ { border-color: var(--accent); transform: translate(2px,-2px); }
.footer-next:hover .arrow-circ svg { stroke: var(--accent); }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .case-title { font-size: clamp(36px,10vw,52px); }
  .gallery-grid { grid-template-columns: 1fr; }
  .case-cta { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .cursor-ring, .cursor-dot { display: none; }
  .bc-home, .cta-btn, .footer-next { cursor: pointer; }
}
