/* ============================================================
   DataCraft — Work section shared stylesheet
   Reuses the exact tokens/fonts from the main site (index.html)
   ============================================================ */

:root {
  --navy: #0B1D3A;
  --navy-mid: #152D52;
  --blue: #1A56A0;
  --teal: #0096B4;
  --teal-light: #00B8D9;
  --gold: #C8963E;
  --gold-light: #E8B86D;
  --white: #FFFFFF;
  --off-white: #F4F7FB;
  --slate: #EAF0F8;
  --text-primary: #0B1D3A;
  --text-secondary: #4A6080;
  --text-muted: #7A91AD;
  --border: #D0DEEE;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; }

/* ── NAV (identical to main site) ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11,29,58,0.97);
  backdrop-filter: blur(12px);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-logo span { color: var(--teal-light); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--teal-light) !important; }
@media (max-width: 900px) { .nav-links { display: none; } }

/* ── PAGE HERO (compact — used at top of /work and each case study) ── */
.page-hero {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding: 150px 5% 70px;
}
.page-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,150,180,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,150,180,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-hero-glow {
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,150,180,0.16) 0%, transparent 70%);
  top: -120px; right: -80px;
  pointer-events: none;
}
.page-hero-inner {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
  margin-bottom: 1.4rem;
}
.breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.breadcrumb a:hover { color: var(--teal-light); }
.page-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,150,180,0.15);
  border: 1px solid rgba(0,150,180,0.3);
  color: var(--teal-light);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 20px;
  margin-bottom: 1.2rem;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.page-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--teal-light), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero-sub {
  font-size: 1.05rem; font-weight: 300;
  color: rgba(255,255,255,0.65);
  max-width: 640px;
  line-height: 1.75;
}
.page-hero-tags {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 1.6rem;
}

/* ── TECH / META PILLS ── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 600;
  padding: 6px 13px; border-radius: 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.8);
}
.pill.light {
  background: var(--slate);
  border-color: var(--border);
  color: var(--text-secondary);
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-light); flex-shrink: 0; }
.pill.light .status-dot { background: var(--teal); }

/* ── SECTIONS ── */
section { padding: 80px 5%; }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before { content: ''; display: block; width: 28px; height: 2px; background: var(--teal); }

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-intro {
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.75;
}

/* ── INTRO STRIP (work/index.html) ── */
.intro-strip { background: var(--off-white); border-bottom: 1px solid var(--border); }

/* ── CATEGORY BLOCKS + PROJECT GRID ── */
.category-block { border-top: 1px solid var(--border); }
.category-block:nth-child(even) { background: var(--off-white); }
.category-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.category-count { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  transform: scaleX(0); transition: transform 0.3s; transform-origin: left;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(11,29,58,0.08); }
.project-card:hover::before { transform: scaleX(1); }

.project-card.featured {
  background: var(--navy);
  border-color: transparent;
  cursor: pointer;
}
.project-card.featured::before { transform: scaleX(1); background: linear-gradient(90deg, var(--teal-light), var(--gold-light)); }

.project-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px;
  margin-bottom: 12px;
  background: var(--slate); color: var(--teal);
  align-self: flex-start;
}
.project-card.featured .project-status { background: rgba(0,150,180,0.2); color: var(--teal-light); }

.project-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px; line-height: 1.3;
}
.project-card.featured .project-name { color: var(--white); }

.project-desc {
  font-size: 0.88rem; color: var(--text-secondary);
  line-height: 1.65; margin-bottom: 16px; flex-grow: 1;
}
.project-card.featured .project-desc { color: rgba(255,255,255,0.6); }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
  font-size: 0.7rem; font-weight: 600;
  padding: 3px 9px; border-radius: 4px;
  background: var(--slate); color: var(--text-muted);
}
.project-card.featured .tag { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.55); }

.project-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  transition: gap 0.2s;
}
.project-card.featured .project-link { color: var(--teal-light); border-color: rgba(255,255,255,0.1); }
.project-card:hover .project-link { gap: 10px; }
.project-card:not(.featured) .project-link.disabled { color: var(--text-muted); cursor: default; }

/* ── CASE STUDY CONTENT ── */
.cs-block { max-width: 760px; }
.cs-block + .cs-block { margin-top: 56px; }
.cs-block h2.section-title { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.cs-block p { color: var(--text-secondary); font-size: 1rem; line-height: 1.85; margin-bottom: 1.1rem; }
.cs-block p strong { color: var(--text-primary); font-weight: 600; }
.cs-block ul { margin: 0 0 1.1rem 1.3rem; color: var(--text-secondary); font-size: 1rem; line-height: 1.85; }
.cs-block li { margin-bottom: 0.4rem; }

.cs-quote {
  border-left: 3px solid var(--teal);
  padding-left: 20px; margin: 1.8rem 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem; color: var(--navy-mid);
  font-style: italic; line-height: 1.6;
}

.cs-highlight-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px; margin-top: 8px;
}
.cs-highlight {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
}
.cs-highlight-title { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.cs-highlight-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.cs-highlight-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

.cs-shot {
  background: var(--slate);
  border: 1px dashed var(--border);
  border-radius: 14px;
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem; font-weight: 500;
  margin: 2rem 0;
  text-align: center;
  padding: 20px;
}

.cs-img-wrap {
  margin: 2rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(11,29,58,0.1);
}
.cs-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-stack-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.cs-stack-table tr { border-bottom: 1px solid var(--border); }
.cs-stack-table td { padding: 12px 0; font-size: 0.92rem; }
.cs-stack-table td:first-child { color: var(--text-muted); font-weight: 600; width: 140px; vertical-align: top; }
.cs-stack-table td:last-child { color: var(--text-secondary); }

/* ── CASE STUDY NAV (prev/next between the 5 flagships) ── */
.cs-nav {
  background: var(--navy);
  padding: 46px 5%;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.cs-nav-inner { max-width: 1100px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.cs-nav a { text-decoration: none; color: rgba(255,255,255,0.55); font-size: 0.85rem; }
.cs-nav a:hover { color: var(--teal-light); }
.cs-nav .cs-nav-next { text-align: right; }
.cs-nav .cs-nav-title { display: block; font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--white); margin-top: 4px; }

/* ── CTA STRIP (reused on case studies + index bottom) ── */
.cta-strip {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  position: relative; overflow: hidden;
  text-align: center;
}
.cta-strip::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,150,180,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,150,180,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}
.cta-strip-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.cta-strip .section-label { justify-content: center; color: var(--teal-light); }
.cta-strip .section-label::before { display: none; }
.cta-strip h2 { color: var(--white); }
.cta-strip p { color: rgba(255,255,255,0.6); margin-bottom: 1.8rem; }

.btn-primary {
  background: var(--teal); color: var(--white);
  padding: 14px 28px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: all 0.2s;
  border: none; cursor: pointer; display: inline-block;
}
.btn-primary:hover { background: var(--teal-light); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: rgba(255,255,255,0.85);
  padding: 14px 28px; border-radius: 8px;
  font-weight: 500; font-size: 0.95rem;
  text-decoration: none; border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s; display: inline-block;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ── FOOTER (identical to main site) ── */
footer { background: var(--navy); padding: 50px 5% 30px; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--white); text-decoration: none; }
.footer-logo span { color: var(--teal-light); }
.footer-tagline { font-size: 0.82rem; color: rgba(255,255,255,0.4); margin-top: 4px; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--teal-light); }
.footer-bottom { max-width: 1100px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.07); font-size: 0.78rem; color: rgba(255,255,255,0.3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ── REVEAL ANIMATION ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── CATEGORY CHART ── */
.chart-section { background: var(--white); border-bottom: 1px solid var(--border); }
.chart-wrap { max-width: 760px; margin-top: 8px; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-caption { font-size: 0.85rem; color: var(--text-muted); margin-top: 14px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .cs-nav-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .cs-nav .cs-nav-next { text-align: left; }
}
