/* ══════════════════════════════════════════
   WithLore — Deliverable Page Styles (Dark Theme)
   Used for all agent-generated deliverables:
   presentations, storyboards, proposals, reports, etc.

   Built on the same design system as concept pages.
   ══════════════════════════════════════════ */

/* ── Dark Theme Color Palette (shared with concept pages) ── */
:root {
  --dlv-black: #0b0b0b;
  --dlv-black-warm: #111110;
  --dlv-surface: #181817;
  --dlv-surface-elevated: #1f1f1d;
  --dlv-border: #2a2a27;
  --dlv-border-subtle: #222220;
  --dlv-yellow: #FFB800;
  --dlv-yellow-dim: #C89200;
  --dlv-yellow-glow: rgba(255, 184, 0, 0.125);
  --dlv-text: #f0efe8;
  --dlv-text-secondary: #a09f94;
  --dlv-text-tertiary: #6b6a62;
  --dlv-white: #faf9f5;
}

/* ── Page-level overrides ── */
body.deliverable-body {
  background-color: var(--dlv-black);
  color: var(--dlv-text);
}

/* Noise texture overlay */
body.deliverable-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ── Nav ── */
.dlv-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 11, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(34, 34, 32, 0.5);
}

.dlv-nav__brand { display: flex; align-items: center; gap: 12px; }
.dlv-nav__icon { width: 100px; height: auto; opacity: 0.9; }

.dlv-nav__cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--dlv-black);
  background: var(--dlv-yellow);
  padding: 10px 22px;
  transition: all 0.25s ease;
  letter-spacing: -0.01em;
}

.dlv-nav__cta:hover {
  background: #ffc52e;
  box-shadow: 0 4px 20px rgba(255, 184, 0, 0.3);
  transform: translateY(-1px);
}

@media (min-width: 640px) {
  .dlv-nav { padding: 20px 40px; }
}

/* ── Hero ── */
.dlv-hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 128px 24px 64px;
  position: relative;
  overflow: hidden;
}

.dlv-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.dlv-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.dlv-hero__image + .dlv-hero__content {
  position: relative;
  z-index: 10;
}

.dlv-hero__glow-1 {
  position: absolute;
  top: 0; right: 0;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 2;
}

.dlv-hero__glow-2 {
  position: absolute;
  bottom: 0; left: 0;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 2;
}

.dlv-hero__content {
  position: relative;
  z-index: 10;
  max-width: 900px;
}

.dlv-hero__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dlv-yellow);
  margin-bottom: 24px;
  animation: dlv-fade 0.8s ease both;
  animation-delay: 0.2s;
}

.dlv-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  animation: dlv-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.3s;
}

.dlv-hero__title-gradient {
  background: linear-gradient(135deg, var(--dlv-yellow) 0%, #ffe08a 40%, var(--dlv-yellow) 70%, #e8a800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dlv-hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.5;
  color: var(--dlv-text-secondary);
  font-weight: 300;
  margin-bottom: 24px;
  max-width: 700px;
  animation: dlv-fade 0.8s ease both;
  animation-delay: 0.5s;
}

.dlv-hero__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--dlv-text-secondary);
  animation: dlv-fade 0.8s ease both;
  animation-delay: 0.6s;
}

.dlv-hero__meta p { font-size: 15px; }
.dlv-hero__meta .name { color: var(--dlv-text); font-weight: 500; }
.dlv-hero__meta .date { color: var(--dlv-text-tertiary); }
.dlv-hero__meta .dot { display: none; width: 4px; height: 4px; border-radius: 50%; background: var(--dlv-text-tertiary); }

.dlv-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  animation: dlv-fade 0.8s ease both;
  animation-delay: 0.7s;
}

.dlv-hero__bottom-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
}

@media (min-width: 640px) {
  .dlv-hero { padding: 128px 40px 96px; }
  .dlv-hero__meta { flex-direction: row; align-items: center; gap: 24px; }
  .dlv-hero__meta .dot { display: block; }
}

/* ── Tag Pill ── */
.dlv-tag {
  padding: 6px 14px;
  background: var(--dlv-surface);
  border: 1px solid var(--dlv-border);
  font-size: 13px;
  color: var(--dlv-text-secondary);
  letter-spacing: 0.01em;
}

/* ── Glow Divider ── */
.dlv-divider { padding: 0 24px; }

.dlv-divider__line {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--dlv-yellow-dim) 20%, var(--dlv-yellow) 50%, var(--dlv-yellow-dim) 80%, transparent 100%);
  opacity: 0.3;
}

@media (min-width: 640px) {
  .dlv-divider { padding: 0 40px; }
}

/* ── Section Shared ── */
.dlv-section { padding: 80px 24px; }
.dlv-section__inner { max-width: 800px; }
.dlv-section__inner--wide { max-width: 1200px; }

.dlv-section__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dlv-yellow);
  margin-bottom: 24px;
}

.dlv-section__heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--dlv-text);
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .dlv-section { padding: 112px 40px; }
}

/* ── Text Section ── */
.dlv-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--dlv-text-secondary);
}

.dlv-text p { margin-bottom: 16px; }
.dlv-text p:last-child { margin-bottom: 0; }
.dlv-text strong { color: var(--dlv-text); font-weight: 600; }
.dlv-text em { font-style: italic; }

/* ── Quote ── */
.dlv-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.35;
  color: var(--dlv-text);
  font-weight: 300;
  font-style: italic;
  border-left: 3px solid var(--dlv-yellow);
  padding-left: 28px;
  max-width: 800px;
}

.dlv-quote__attribution {
  margin-top: 16px;
  padding-left: 31px;
  font-size: 14px;
  color: var(--dlv-text-tertiary);
}

/* ── Stats Grid ── */
.dlv-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 48px;
}

.dlv-stat {
  background: var(--dlv-surface);
  border: 1px solid var(--dlv-border-subtle);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.dlv-stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--dlv-yellow), transparent);
  opacity: 0.5;
}

.dlv-stat__value {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  color: var(--dlv-yellow);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.dlv-stat__label {
  font-size: 13px;
  color: var(--dlv-text-tertiary);
  font-weight: 500;
}

@media (min-width: 640px) {
  .dlv-stats__grid { grid-template-columns: repeat(4, 1fr); }
  .dlv-stats__grid--3 { grid-template-columns: repeat(3, 1fr); }
  .dlv-stats__grid--2 { grid-template-columns: repeat(2, 1fr); }
  .dlv-stat { padding: 24px; }
}

/* ── Storyboard ── */
.dlv-storyboard { padding: 80px 0; }
.dlv-storyboard__header { padding: 0 24px; margin-bottom: 56px; }
.dlv-storyboard__header .dlv-section__heading { margin-top: 12px; }
.dlv-scenes { padding: 0 24px; display: grid; grid-template-columns: 1fr; gap: 24px; }

@media (min-width: 640px) {
  .dlv-storyboard { padding: 112px 0; }
  .dlv-storyboard__header { padding: 0 40px; }
  .dlv-scenes { padding: 0 40px; }
}

@media (min-width: 900px) {
  .dlv-scenes { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* ── Scene Card ── */
.dlv-scene {
  position: relative;
  background: var(--dlv-surface);
  border: 1px solid var(--dlv-border-subtle);
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dlv-scene:hover {
  border-color: var(--dlv-yellow-dim);
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(255, 184, 0, 0.08);
}

.dlv-scene__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}

.dlv-scene__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.dlv-scene:hover .dlv-scene__image img { transform: scale(1.03); }

.dlv-scene__image::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--dlv-surface) 0%, transparent 100%);
  pointer-events: none;
}

.dlv-scene__image--placeholder {
  background: var(--dlv-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dlv-scene__image--placeholder svg {
  width: 48px; height: 48px;
  opacity: 0.12;
  color: var(--dlv-text-tertiary);
}

.dlv-scene__number {
  position: absolute;
  top: 0; left: 0;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dlv-yellow);
  color: var(--dlv-black);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  z-index: 2;
}

.dlv-scene__image-title {
  position: absolute;
  bottom: 12px; left: 16px; right: 16px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.dlv-scene__image-title h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dlv-text);
  letter-spacing: -0.02em;
}

.dlv-scene__image-title span {
  font-size: 12px;
  color: var(--dlv-text-tertiary);
  font-family: monospace;
  letter-spacing: 0.05em;
}

/* Scene Body */
.dlv-scene__body { flex: 1; padding: 20px 20px 24px; }

.dlv-scene__description {
  font-size: 14px;
  line-height: 1.65;
  color: var(--dlv-text-secondary);
  margin-bottom: 16px;
}

.dlv-scene__details { display: flex; flex-wrap: wrap; gap: 6px 20px; }

.dlv-scene__detail { display: flex; align-items: baseline; gap: 8px; }

.dlv-scene__detail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dlv-text-tertiary);
}

.dlv-scene__detail-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--dlv-yellow);
}

.dlv-scene__notes {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--dlv-border-subtle);
}

.dlv-scene__notes-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dlv-text-tertiary);
}

.dlv-scene__notes-text {
  margin-left: 8px;
  font-size: 13px;
  color: var(--dlv-text-secondary);
}

@media (min-width: 640px) {
  .dlv-scene__body { padding: 24px 24px 28px; }
}

/* ── Media Section ── */
.dlv-media { margin-top: 32px; }

.dlv-media img {
  width: 100%;
  border: 1px solid var(--dlv-border-subtle);
}

.dlv-media__caption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--dlv-text-tertiary);
  font-style: italic;
}

/* ── List Section ── */
.dlv-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.dlv-list__item { display: flex; gap: 16px; }

.dlv-list__marker {
  width: 6px; height: 6px;
  background: var(--dlv-yellow);
  flex-shrink: 0;
  margin-top: 9px;
}

.dlv-list__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dlv-text);
  margin-bottom: 4px;
}

.dlv-list__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dlv-text-secondary);
}

/* ── Timeline ── */
.dlv-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 40px;
}

.dlv-timeline__step {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--dlv-border-subtle);
}

.dlv-timeline__step:last-child { border-bottom: none; }

.dlv-timeline__marker {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dlv-surface);
  border: 1px solid var(--dlv-border);
  flex-shrink: 0;
}

.dlv-timeline__marker span {
  font-size: 14px;
  font-weight: 800;
  color: var(--dlv-yellow);
  letter-spacing: -0.02em;
}

.dlv-timeline__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dlv-text);
  margin-bottom: 4px;
}

.dlv-timeline__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--dlv-text-secondary);
}

/* ── Comparison Table ── */
.dlv-table-wrap {
  margin-top: 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dlv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.dlv-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dlv-yellow);
  background: var(--dlv-surface);
  border-bottom: 2px solid var(--dlv-border);
}

.dlv-table td {
  padding: 14px 16px;
  color: var(--dlv-text-secondary);
  border-bottom: 1px solid var(--dlv-border-subtle);
}

.dlv-table tr:hover td { background: var(--dlv-surface); }

/* ── Markdown Content Styles ── */
.dlv-content h1,
.dlv-content h2,
.dlv-content h3,
.dlv-content h4 {
  font-family: var(--font-display);
  color: var(--dlv-text);
  letter-spacing: -0.02em;
}

.dlv-content h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 48px 0 24px; }
.dlv-content h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 40px 0 20px; }
.dlv-content h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin: 32px 0 16px; }
.dlv-content h4 { font-size: 1.1rem; margin: 24px 0 12px; }

.dlv-content p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--dlv-text-secondary);
  margin-bottom: 16px;
}

.dlv-content ul,
.dlv-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--dlv-text-secondary);
}

.dlv-content li {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.dlv-content strong { color: var(--dlv-text); font-weight: 600; }

.dlv-content blockquote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--dlv-text);
  font-style: italic;
  border-left: 3px solid var(--dlv-yellow);
  padding-left: 24px;
  margin: 32px 0;
}

.dlv-content code {
  font-size: 13px;
  background: var(--dlv-surface);
  border: 1px solid var(--dlv-border-subtle);
  padding: 2px 6px;
  color: var(--dlv-yellow);
}

.dlv-content pre {
  background: var(--dlv-surface);
  border: 1px solid var(--dlv-border-subtle);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}

.dlv-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--dlv-text-secondary);
}

.dlv-content hr {
  border: none;
  height: 1px;
  background: var(--dlv-border);
  margin: 48px 0;
}

.dlv-content img {
  max-width: 100%;
  border: 1px solid var(--dlv-border-subtle);
  margin: 24px 0;
}

.dlv-content a {
  color: var(--dlv-yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dlv-content a:hover { color: #ffc52e; }

/* ── CTA ── */
.dlv-cta {
  padding: 96px 24px;
  max-width: 720px;
}

.dlv-cta__heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--dlv-text);
  margin-bottom: 24px;
}

.dlv-cta__sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--dlv-text-secondary);
  margin-bottom: 40px;
  max-width: 480px;
}

.dlv-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: var(--dlv-yellow);
  color: var(--dlv-black);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dlv-cta__button:hover {
  background: #ffc52e;
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(255, 184, 0, 0.25);
}

.dlv-cta__button svg { width: 20px; height: 20px; }

@media (min-width: 640px) {
  .dlv-cta { padding: 128px 40px; }
}

/* ── Footer ── */
.dlv-footer {
  padding: 48px 24px;
  border-top: 1px solid var(--dlv-border-subtle);
}

.dlv-footer__top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dlv-footer__brand { display: flex; align-items: center; gap: 12px; }
.dlv-footer__brand-icon { width: 80px; height: auto; opacity: 0.7; }
.dlv-footer__brand-name { font-size: 14px; font-weight: 500; color: var(--dlv-text); }
.dlv-footer__brand-title { font-size: 13px; color: var(--dlv-text-tertiary); }

.dlv-footer__links { display: flex; align-items: center; gap: 24px; }

.dlv-footer__link {
  font-size: 13px;
  color: var(--dlv-text-secondary);
  transition: color 0.2s;
}

.dlv-footer__link:hover { color: var(--dlv-yellow); }

.dlv-footer__notice {
  color: rgba(107, 106, 98, 0.5);
  font-size: 11px;
  margin-top: 32px;
}

@media (min-width: 640px) {
  .dlv-footer { padding: 48px 40px; }
  .dlv-footer__top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ── Animations ── */
@keyframes dlv-rise {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dlv-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
