/*
  Ascent Digital UK — shared stylesheet, CASE STUDY pages.

  Covers case-study-barton-accountancy and case-study-hfc-clearance.
  Verified byte-identical before extraction (entire style block, both
  files, 0 diff). Adds article/metrics-block/live-link-panel/back-link/
  cta-section styling on top of the standard nav/hero/footer/mobile-
  menu shell shared with styles-location-v2.css.
*/

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 100000;
  background: #1D9E75;
  color: #050505;
  padding: 12px 20px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; outline: 2px solid #fff; outline-offset: 2px; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #050505;
  --card: #0a0a0a;
  --surface: #0e0e0e;
  --border: #1a1a1a;
  --teal: #1D9E75;
  --teal-bright: #25c28e;
  --teal-glow: rgba(29,158,117,0.15);
  --white: #ffffff;
  --dim: rgba(255,255,255,0.75);
  --muted: rgba(255,255,255,0.65);
  --ghost: rgba(255,255,255,0.07);
  --outfit: 'Outfit', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--teal) transparent;
}

body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
}

a { text-decoration: none; color: inherit; }

/* ── CUSTOM CURSOR ── */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(29,158,117,0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s, transform 0.1s;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.cursor.hover {
  width: 50px;
  height: 50px;
  background: rgba(29,158,117,0.1);
  border-color: var(--teal);
}

.cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--teal);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
}

@media (hover: none) {
  .cursor, .cursor-dot { display: none; }
  body { cursor: auto; }
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 48px);
  background: transparent;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

nav.scrolled {
  background: rgba(5,5,5,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.logo-text {
  font-family: var(--outfit);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.logo-text span { color: var(--teal); }

.nav-links {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  list-style: none;
}

.nav-links a {
  font-family: var(--outfit);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--teal);
  transition: width 0.3s;
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-family: var(--outfit);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 24px;
  background: transparent;
  color: var(--teal);
  border: 1px solid rgba(29,158,117,0.3);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s;
}

.nav-cta:hover {
  background: var(--teal);
  color: var(--black);
  box-shadow: 0 0 30px rgba(29,158,117,0.3);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
}

/* ── HERO (case study — home-page treatment) ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0 clamp(24px, 4vw, 48px);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(29,158,117,0.2) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 20% 80%, rgba(29,158,117,0.14) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
  animation: heroGlow 14s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-gradient { animation: none; }
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding-top: 64px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--outfit);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--teal);
}

.hero-title {
  font-family: var(--outfit);
  font-weight: 800;
  font-size: clamp(52px, 10vw, 140px);
  line-height: 0.88;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin-bottom: 44px;
  color: var(--white);
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line-inner {
  display: block;
  transform: translateY(110%);
}

.hero-title .accent { color: var(--teal); }

.hero-title .shimmer {
  background: linear-gradient(90deg, var(--white) 0%, var(--teal) 50%, var(--white) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: -100% 0; }
  50% { background-position: 100% 0; }
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
}

.hero-desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--dim);
  line-height: 1.8;
  max-width: 480px;
}

.hero-desc strong { color: var(--white); font-weight: 500; }

.cs-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--outfit);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  flex-shrink: 0;
}

.cs-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

/* ── ARTICLE ── */
.article {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) clamp(24px, 4vw, 48px) clamp(40px, 6vw, 80px);
}

.article-divider {
  width: 60px;
  height: 1px;
  background: var(--border);
  margin-bottom: 56px;
}

.article h2 {
  font-family: var(--outfit);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 20px;
  margin-top: 56px;
}

.article h2:first-of-type { margin-top: 0; }

.article h3 {
  font-family: var(--outfit);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 12px;
  margin-top: 36px;
}

.article p {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--dim);
  line-height: 1.9;
  margin-bottom: 28px;
}

.article p:last-of-type { margin-bottom: 0; }

.article ul {
  margin: 0 0 32px;
  padding-left: 0;
  list-style: none;
}

.article ul li {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--dim);
  line-height: 1.8;
  margin-bottom: 14px;
  padding-left: 28px;
  position: relative;
}

.article ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--teal);
  border-radius: 50%;
}

.article ul li strong { color: var(--white); font-weight: 600; }

.article blockquote {
  border-left: 3px solid var(--teal);
  padding: 4px 0 4px 28px;
  margin: 40px 0;
}

.article blockquote p {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  font-style: italic;
  line-height: 1.85;
  margin-bottom: 0;
}

/* ── METRICS BLOCK ── */
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 48px 0;
}

.cs-metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
}

.cs-metric-value {
  font-family: var(--outfit);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--teal-bright);
  line-height: 1;
  margin-bottom: 10px;
}

.cs-metric-label {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--dim);
  line-height: 1.5;
}

/* ── LIVE LINK PANEL ── */
.cs-livelink {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 48px);
}

.cs-livelink-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px clamp(24px, 4vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cs-livelink-text {
  font-family: var(--outfit);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
}

.cs-livelink-text span {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}

.cs-livelink-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--outfit);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-bright);
  border: 1px solid rgba(29,158,117,0.3);
  border-radius: 100px;
  padding: 14px 28px;
  transition: background 0.3s, color 0.3s, gap 0.3s;
}

.cs-livelink-btn:hover {
  background: var(--teal);
  color: var(--black);
  gap: 14px;
}

/* ── BACK LINK ── */
.back-link {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 72px) clamp(24px, 4vw, 48px) clamp(80px, 10vw, 120px);
}

.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--outfit);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  transition: gap 0.3s, color 0.3s;
}

.back-link a:hover { gap: 14px; color: var(--teal-bright); }
.back-link a svg { transition: transform 0.3s; }
.back-link a:hover svg { transform: translateX(-4px); }

/* ── CTA SECTION ── */
.cta-section {
  position: relative;
  padding: clamp(80px, 12vw, 160px) clamp(24px, 4vw, 48px);
  text-align: center;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 50%, rgba(29,158,117,0.2) 0%, transparent 70%);
  pointer-events: none;
  animation: ctaGlow 11s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .cta-bg { animation: none; }
}

.cta-inner { position: relative; z-index: 1; }

.cta-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--outfit);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 32px;
  justify-content: center;
}

.cta-label::before, .cta-label::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--teal);
}

.cta-title {
  font-family: var(--outfit);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 20px;
}

.cta-title .accent { color: var(--teal); }

.cta-sub {
  font-size: 16px;
  font-weight: 300;
  color: var(--dim);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto 48px;
}

.btn-main {
  font-family: var(--outfit);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 18px 40px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}

.btn-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(29,158,117,0.4), 0 0 80px rgba(29,158,117,0.15);
}

.btn-main:hover::before { transform: translateX(100%); }

/* ── REVEAL SYSTEM ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px clamp(24px, 4vw, 48px);
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-left {
  font-family: var(--outfit);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-left span { color: var(--teal); }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-family: var(--outfit);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--teal); }

/* ── MOBILE MENU ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(5,5,5,0.98);
  backdrop-filter: blur(20px);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mobile-menu.open { opacity: 1; pointer-events: auto; }

.mobile-menu a {
  font-family: var(--outfit);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.3s;
}

.mobile-menu a:hover { color: var(--teal); }

.mobile-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 32px;
  font-weight: 200;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .hero-title { font-size: clamp(36px, 9vw, 64px); line-height: 0.92; margin-bottom: 32px; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 28px; }

  .article h2 { font-size: 20px; margin-top: 44px; }
  .article p, .article ul li { font-size: 14px; }

  .cs-metrics { grid-template-columns: 1fr; }
  .cs-livelink-inner { flex-direction: column; align-items: flex-start; }
}
