:root {
  color-scheme: dark light;
  font-family: "Inter", system-ui, sans-serif;
  --bg: #0b0c10;
  --text: #f4f5f7;
  --accent: #6d5dfc;
  --muted: #9096a4;
}

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

body {
  background: #050507;
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

button,
select {
  font: inherit;
}

.primary {
  background: linear-gradient(120deg, #6d5dfc, #00d1ff);
  color: #0b0c10;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 209, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0, 209, 255, 0.35);
}

.ghost {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.landing {
  min-height: 100vh;
  padding: 4rem 7vw 6rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  background: radial-gradient(circle at top, rgba(109, 93, 252, 0.25), transparent 60%),
    linear-gradient(120deg, #0b0c10, #080b18, #09040f);
  position: relative;
  overflow: hidden;
}

.landing::before {
  content: "";
  position: absolute;
  inset: -200px;
  background: conic-gradient(from 180deg, rgba(0, 209, 255, 0.12), transparent, rgba(109, 93, 252, 0.18));
  animation: spin 18s linear infinite;
  z-index: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.landing-hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.2rem;
}

.landing-hero h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  letter-spacing: -0.04em;
  font-family: "Space Grotesk", sans-serif;
}

.landing-kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
}

.landing-subtitle {
  font-size: 1.5rem;
  max-width: 40ch;
}

.landing-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.design-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.design-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1.5rem;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  animation: floatIn 0.8s ease both;
}

.design-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.design-card .preview {
  height: 70px;
  border-radius: 1rem;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  position: relative;
  overflow: hidden;
}

.preview-layout {
  position: absolute;
  inset: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 8px;
  gap: 6px;
}

.preview-block {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.preview-block.tall {
  grid-row: span 4;
}

.preview-block.wide {
  grid-column: span 3;
}

.preview-layout.neon .preview-block {
  background: rgba(0, 209, 255, 0.35);
}

.preview-layout.tabloid .preview-block {
  background: rgba(227, 0, 15, 0.6);
}

.preview-layout.kinetic .preview-block {
  background: rgba(0, 0, 0, 0.45);
}

.preview-layout.newspaper .preview-block {
  background: rgba(120, 110, 90, 0.5);
}

.preview-layout.social .preview-block {
  background: rgba(109, 93, 252, 0.6);
}

.preview-layout.minimal .preview-block {
  background: rgba(120, 120, 120, 0.35);
}

.preview-layout.timeline .preview-block {
  background: rgba(0, 209, 255, 0.5);
}

.preview-layout.experimental .preview-block {
  background: rgba(98, 65, 255, 0.5);
}

.design-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
}

.design-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.design-card .tag {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-footer {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  color: var(--muted);
}

.reader,
.compare {
  min-height: 100vh;
  padding: 3rem 6vw 6rem;
}

.reader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.reader-title {
  display: grid;
  gap: 0.2rem;
}

.reader-controls {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.design-switcher {
  display: grid;
  gap: 0.2rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.design-switcher select {
  padding: 0.4rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.4);
  color: inherit;
}

.reader-header h2 {
  font-size: 2rem;
  font-family: "Space Grotesk", sans-serif;
}

.reader-header p {
  color: var(--muted);
}

.progress {
  height: 4px;
  background: linear-gradient(90deg, #00d1ff, #6d5dfc);
  width: 0;
  position: sticky;
  top: 0;
  z-index: 5;
  border-radius: 999px;
}

.toc {
  position: sticky;
  top: 1rem;
  align-self: flex-start;
  background: rgba(7, 9, 14, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: 1rem;
  max-width: 260px;
  margin-bottom: 2rem;
}

.toc ul {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.toc a {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
}

.toc a:hover {
  opacity: 1;
}

.design-content {
  display: grid;
  gap: 2.5rem;
}

.article {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 1.5rem;
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.article img {
  width: 100%;
  border-radius: 1rem;
  object-fit: cover;
  max-height: 360px;
}

.article h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
}

.article .meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.article p {
  line-height: 1.7;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
}

body.text-mode .article img {
  display: none;
}

body.text-mode .article {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}

.compare-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 2.5rem;
}

.compare-controls label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.compare-controls select {
  padding: 0.5rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.6);
  color: inherit;
}

.compare-grid {
  display: grid;
  gap: 1.5rem;
}

.compare-column {
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
}

.compare-column h3 {
  margin-bottom: 1rem;
  font-family: "Space Grotesk", sans-serif;
}

.compare-column.design-neon {
  background: rgba(13, 16, 31, 0.9);
  color: #e8f2ff;
  border-color: rgba(0, 209, 255, 0.3);
}

.compare-column.design-neon .article {
  background: rgba(14, 19, 38, 0.8);
  border-color: rgba(0, 209, 255, 0.3);
}

.compare-column.design-tabloid {
  background: #1a0406;
  color: #fff4f0;
  border-color: #e3000f;
}

.compare-column.design-tabloid .article {
  border-color: #e3000f;
  background: #1a0406;
}

.compare-column.design-kinetic {
  background: #f9f8f4;
  color: #151515;
  border-color: #111;
}

.compare-column.design-kinetic .article {
  background: #fff;
  border-color: #111;
}

.compare-column.design-newspaper {
  background: #f2efe6;
  color: #2d2a24;
  border-color: #d5cdb8;
}

.compare-column.design-newspaper .article {
  background: #fffaf0;
  border-color: #d5cdb8;
}

.compare-column.design-social {
  background: #0f1119;
  color: #eef1ff;
  border-color: rgba(109, 93, 252, 0.4);
}

.compare-column.design-social .article {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(109, 93, 252, 0.4);
}

.compare-column.design-minimal {
  background: #ffffff;
  color: #111;
  border-color: #d5d7dc;
}

.compare-column.design-minimal .article {
  background: #f9f9fb;
  border-color: #d5d7dc;
}

.compare-column.design-timeline {
  background: #0b1114;
  color: #e8f4ff;
  border-color: rgba(255, 255, 255, 0.2);
}

.compare-column.design-timeline .article {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.compare-column.design-experimental {
  background: #0c0c0f;
  color: #f9f9f9;
  border-color: rgba(255, 255, 255, 0.2);
}

.compare-column.design-experimental .article {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 5, 0.8);
  display: grid;
  place-items: center;
  z-index: 40;
}

.modal-content {
  background: #0b0c10;
  padding: 2rem;
  border-radius: 1.5rem;
  max-width: 900px;
  width: min(90vw, 900px);
  max-height: 85vh;
  overflow-y: auto;
  display: grid;
  gap: 1.5rem;
}

.modal .close {
  justify-self: end;
}

/* Neon Stream */
body.design-neon {
  background: radial-gradient(circle at top, #0d101f, #05050c 60%);
  color: #e8f2ff;
}

body.design-neon .article {
  background: rgba(14, 19, 38, 0.8);
  border-color: rgba(0, 209, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 209, 255, 0.15);
}

body.design-neon .article img {
  position: sticky;
  top: 6rem;
}

body.design-neon .toc,
body.design-neon .progress {
  display: block;
}

body.design-neon .design-content {
  grid-template-columns: minmax(0, 1fr);
}

/* Tabloid */
body.design-tabloid {
  background: #0d0d0d;
  color: #fff4f0;
  font-family: "Space Grotesk", sans-serif;
}

body.design-tabloid .reader-header {
  border-bottom: 4px solid #e3000f;
  padding-bottom: 1rem;
}

body.design-tabloid .article {
  border-color: #e3000f;
  background: #1a0406;
}

body.design-tabloid .article h3 {
  font-size: 2.3rem;
  text-transform: uppercase;
}

body.design-tabloid .article .eyecatcher {
  color: #e3000f;
  font-weight: 700;
  letter-spacing: 0.12em;
}

body.design-tabloid .ticker {
  background: #e3000f;
  color: #fff;
  padding: 0.4rem 0;
  overflow: hidden;
  margin-bottom: 2rem;
}

body.design-tabloid .ticker span {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 18s linear infinite;
  padding-left: 100%;
}

@keyframes ticker {
  to {
    transform: translateX(-100%);
  }
}

/* Kinetic Arts */
body.design-kinetic {
  background: #f9f8f4;
  color: #151515;
  font-family: "Playfair Display", serif;
}

body.design-kinetic .article {
  background: #fff;
  border-color: #111;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

body.design-kinetic .article h3 {
  font-size: 2.5rem;
}

body.design-kinetic .accent {
  color: #e35d6a;
}

/* Classic Newspaper */
body.design-newspaper {
  background: #f2efe6;
  color: #2d2a24;
  font-family: "Playfair Display", serif;
}

body.design-newspaper .design-content {
  column-count: 2;
  column-gap: 2rem;
}

body.design-newspaper .article {
  break-inside: avoid;
  background: #fffaf0;
  border-color: #d5cdb8;
}

body.design-newspaper .article h3 {
  font-size: 1.8rem;
}

body.design-newspaper .caption {
  font-size: 0.85rem;
  color: #6b6454;
  border-top: 1px solid #d5cdb8;
  padding-top: 0.5rem;
}

/* Social Magazine */
body.design-social {
  background: #0f1119;
  color: #eef1ff;
}

body.design-social .design-content {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

body.design-social .article {
  padding: 1.2rem;
}

body.design-social .stories {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

body.design-social .story {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid #6d5dfc;
  background: linear-gradient(135deg, rgba(109, 93, 252, 0.5), rgba(0, 209, 255, 0.4));
}

/* Minimal Accessible */
body.design-minimal {
  background: #ffffff;
  color: #111;
  font-family: "Inter", sans-serif;
}

body.design-minimal .article {
  background: #f9f9fb;
  border-color: #d5d7dc;
}

body.design-minimal .article h3 {
  font-size: 2rem;
}

body.design-minimal .reader-header,
body.design-minimal .compare-controls select {
  color: #111;
}

body.design-minimal .design-switcher,
body.design-minimal .design-switcher select {
  color: #111;
}

body.design-minimal .design-switcher select {
  background: #ffffff;
  border-color: #111;
}

/* Timeline */
body.design-timeline {
  background: #0b1114;
  color: #e8f4ff;
}

body.design-timeline .design-content {
  position: relative;
  padding-left: 3rem;
}

body.design-timeline .design-content::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.2);
}

body.design-timeline .article {
  position: relative;
}

body.design-timeline .article::before {
  content: "";
  position: absolute;
  left: -2.7rem;
  top: 2.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00d1ff;
  box-shadow: 0 0 12px rgba(0, 209, 255, 0.8);
}

body.design-timeline .chapter {
  font-size: 0.85rem;
  color: #77c7ff;
  letter-spacing: 0.3em;
}

/* Experimental */
body.design-experimental {
  background: #0c0c0f;
  color: #f9f9f9;
}

body.design-experimental .design-content {
  height: calc(100vh - 180px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  padding-right: 1rem;
}

body.design-experimental .article {
  scroll-snap-align: start;
  min-height: calc(100vh - 220px);
}

body.design-experimental .slide-controls {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

body.design-experimental .slide-map {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.slide-dot.active {
  background: #6d5dfc;
  border-color: #6d5dfc;
  transform: scale(1.2);
}

@media (max-width: 900px) {
  .reader-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .reader-controls {
    width: 100%;
    justify-content: flex-start;
  }

  body.design-newspaper .design-content {
    column-count: 1;
  }
}

@media (max-width: 600px) {
  .landing {
    padding: 3rem 5vw 5rem;
  }

  .design-card {
    min-height: 180px;
  }
}
