/* ================================================================
   BLVD Case Studies — Shared Design System
   Used by: ai-receptionist, next-gen-booking
================================================================ */

/* ─── Animated border property ──────────────────────────────── */
@property --sparkle-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

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

/* ─── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:            #0A0A0A;
  --text-primary:  #FFFFFF;
  --text-secondary:#A0A0A0;
  --text-tertiary: #606060;
  --accent:        #CEAA75;
  --border:        rgba(255, 255, 255, 0.08);

  --title-xl: clamp(48px, 6vw, 96px);
  --title-lg: clamp(32px, 4vw, 56px);
  --title-md: clamp(22px, 3vw, 32px);
  --body-lg:  18px;
  --body-md:  16px;
  --body-sm:  14px;
  --body-xs:  12px;

  --max-w: 1080px;
  --gutter: clamp(24px, 5vw, 80px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Base ───────────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Scroll animation ───────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.block {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

/* ─── Label ──────────────────────────────────────────────────── */
.label {
  font-size: var(--body-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text-primary);
  color: var(--bg);
  font-size: var(--body-sm);
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.cta-btn:hover { opacity: 0.85; }

.proto-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text-primary);
  color: var(--bg);
  font-size: var(--body-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.proto-btn:hover { opacity: 0.85; }
.proto-btn svg { width: 14px; height: 14px; }

.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--body-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 12px 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.secondary-btn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.2); }

/* ─── Meta strip ─────────────────────────────────────────────── */
.meta-strip {
  padding: 24px 0;
}

.meta-grid {
  display: grid;
  grid-template-columns: auto 1fr 1fr 1fr;
  gap: 0;
}

.meta-item {
  background: var(--bg);
  padding: 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--border);
}

.meta-item:first-child { padding-left: 0; }
.meta-item:last-child  { padding-right: 0; border-right: none; }

.meta-value {
  font-size: var(--body-sm);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0;
}

/* ─── Section divider ───────────────────────────────────────── */
.section-divider {
  padding: 16px 0 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-divider .label {
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* ─── Text block ─────────────────────────────────────────────── */
.media-block {
  padding: 64px 0;
}

.text-block {
  padding: 96px 0;
}

.text-block-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}

.text-block-right p {
  font-size: var(--body-md);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.75;
}

.text-block-right p + p { margin-top: 16px; }

.text-block-right p strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ─── CTA callout ────────────────────────────────────────────── */
.cta-callout {
  padding: 24px 0 72px;
}

.cta-callout-inner {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  gap: 32px;
  box-shadow: inset 0 0 0 rgba(80, 200, 255, 0);
  transition: box-shadow 0.5s ease;
}

.cta-callout-inner:hover {
  box-shadow: inset 0 0 48px rgba(80, 200, 255, 0.06);
}

.cta-callout-inner::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9px;
  background: conic-gradient(
    from var(--sparkle-angle),
    transparent 0%,
    transparent 88%,
    rgba(80, 200, 255, 0.3) 92%,
    rgba(140, 230, 255, 0.9) 95%,
    rgba(80, 200, 255, 0.3) 98%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.cta-callout-inner:hover::after {
  opacity: 1;
  animation: sparkle-orbit 2.5s linear infinite;
}

@keyframes sparkle-orbit {
  to { --sparkle-angle: 360deg; }
}

.cta-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
}

.cta-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cta-text { flex: 1; }

.cta-text p {
  font-size: var(--body-md);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-text p strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ─── Prototype panel ───────────────────────────────────────── */
.proto-panel {
  padding: 48px 0;
}

.proto-panel-inner {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  box-shadow: inset 0 0 0 rgba(80, 200, 255, 0);
  transition: box-shadow 0.5s ease;
}

.proto-panel-inner:hover {
  box-shadow: inset 0 0 48px rgba(80, 200, 255, 0.06);
}

.proto-panel-inner::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9px;
  background: conic-gradient(
    from var(--sparkle-angle),
    transparent 0%,
    transparent 88%,
    rgba(80, 200, 255, 0.3) 92%,
    rgba(140, 230, 255, 0.9) 95%,
    rgba(80, 200, 255, 0.3) 98%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.proto-panel-inner:hover::after {
  opacity: 1;
  animation: sparkle-orbit 2.5s linear infinite;
}

.proto-panel-text .proto-label {
  font-size: var(--body-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.proto-panel-text h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.proto-panel-text p {
  font-size: var(--body-sm);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
}

/* ─── Two-column content ─────────────────────────────────────── */
.two-col {
  padding: 0 0 96px;
}

.two-col-grid {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 64px;
  align-items: center;
}

.two-col-text .col-heading {
  font-size: var(--title-md);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 16px 0 24px;
}

.two-col-text p {
  font-size: var(--body-md);
  color: var(--text-secondary);
  line-height: 1.75;
  font-weight: 300;
}

.two-col-text p + p { margin-top: 16px; }

/* ─── Callout / pull quote ───────────────────────────────────── */
.callout {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 96px;
}

.callout-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  padding-left: 40px;
}

.callout-inner::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
}

.callout-mark {
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
  opacity: 0.6;
}

.callout-quote {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.callout-source {
  margin-top: 24px;
  font-size: var(--body-sm);
  color: var(--text-tertiary);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ─── Three-column grid ──────────────────────────────────────── */
.three-col {
  padding: 0 0 128px;
}

.three-col-header {
  margin-bottom: 48px;
}

.three-col-header h2 {
  font-size: var(--title-lg);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-top: 16px;
}

.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.col-card { padding: 0; }

.col-card-label {
  font-size: var(--body-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.col-card h3 {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.col-card p {
  font-size: var(--body-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
}

/* ─── Results ────────────────────────────────────────────────── */
.results {
  padding: 96px 0;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}

.results-stats {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.results-stat .stat-number {
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
}

.results-stat .stat-number em {
  font-style: normal;
  color: var(--accent);
}

.results-stat .stat-label {
  font-size: var(--body-sm);
  color: var(--text-secondary);
  font-weight: 300;
  margin-top: 10px;
  line-height: 1.5;
}

/* ─── Closing ────────────────────────────────────────────────── */
.closing {
  padding: 80px 0 96px;
}

.closing-inner {
  max-width: 640px;
}

.closing-inner p {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.65;
  letter-spacing: -0.01em;
}

.closing-inner p strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ─── Contact block ──────────────────────────────────────────── */
.contact {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.contact-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.contact-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
}

.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-text h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contact-text p {
  font-size: var(--body-md);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-text a:not(.proto-btn):not(.cta-btn) {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-text a:not(.proto-btn):not(.cta-btn):hover { color: var(--text-primary); }

/* ─── Next case study banner ─────────────────────────────────── */
.next-case-study {
  padding: 40px var(--gutter) 96px;
}

.next-case-study-label {
  font-size: var(--body-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

.next-case-study-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  background: linear-gradient(135deg, #DDE4FF 0%, #C8D5FF 40%, #D8E6FF 100%);
  border-radius: 12px;
  padding: 52px 56px;
  overflow: hidden;
  min-height: 320px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.next-case-study-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 64px rgba(100, 120, 220, 0.2);
}

.next-cs-top { position: relative; z-index: 1; }

.next-cs-heading {
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 600;
  color: #0A0A14;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 560px;
}

.next-cs-sub {
  margin-top: 16px;
  font-size: var(--body-md);
  font-weight: 300;
  color: rgba(0,0,0,0.55);
  line-height: 1.6;
  max-width: 480px;
}

.next-cs-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.next-cs-logo {
  height: 10px;
  display: block;
  opacity: 0.7;
}

/* ─── Video grid (3-up) ──────────────────────────────────────── */
.video-grid {
  padding: 0 0 96px;
}

.video-grid-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.video-grid-item video {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.video-caption {
  margin-top: 16px;
}

.video-caption-title {
  font-size: var(--body-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.video-caption-body {
  font-size: var(--body-sm);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Video grid (2×2) ───────────────────────────────────────── */
.video-grid-2x2-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.video-grid-2x2-item video {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --gutter: 24px; }

  .meta-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .meta-item:first-child { padding-left: 0 !important; }
  .meta-item { padding: 24px 0; border-top: 1px solid var(--border); }
  .meta-item:first-child { border-top: none; }

  .text-block-grid { grid-template-columns: 1fr; gap: 24px; }
  .results-grid { grid-template-columns: 1fr; gap: 48px; }
  .two-col-grid { grid-template-columns: 1fr; gap: 40px; }
  .col-media { order: -1; }
  .three-col-grid { grid-template-columns: 1fr; gap: 32px; }
  .callout-inner { padding-left: 24px; }
}

@media (max-width: 640px) {
  .cta-callout-inner { flex-direction: column; align-items: flex-start; }
  .proto-panel-inner { flex-direction: column; align-items: flex-start; }
  .contact-inner { flex-direction: column; align-items: flex-start; }
  .next-case-study-card { padding: 36px 28px; min-height: 260px; }
  .two-col { padding: 0 0 64px; }
  .callout { padding: 64px 0; margin-bottom: 64px; }
  .three-col { padding: 0 0 80px; }
}
