/* ── CSS Reset & Design Tokens ────────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;

  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-gradient: linear-gradient(135deg, #01b4e4, #90cea1);
  --tag-bg: #e0f2fe;
  --tag-text: #0369a1;
  --tag-border: #bae6fd;

  --font-main:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-code:
    ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  --max-width: 1040px;
  --radius: 8px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
  overflow-x: clip;
}

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

/* ── Layout & Typography ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.brand-text-cine {
  color: var(--accent);
}

/* ── Navigation Bar ──────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 10px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

/* ── Hero Section ────────────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-title {
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  max-width: 800px;
  margin: 0 auto 1.25rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Mockup Window Component ─────────────────────────────────────────────── */
.mockup-window {
  background: #0f172a;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow:
    0 20px 40px -15px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.mockup-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red {
  background: #ef4444;
}

.dot-yellow {
  background: #f59e0b;
}

.dot-green {
  background: #10b981;
}

.mockup-title {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  font-family: var(--font-code);
  letter-spacing: 0.02em;
}

.mockup-spacer {
  width: 42px;
}

.mockup-body {
  position: relative;
  background: #0d0f14;
  overflow: hidden;
}

.mockup-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Hero Showcase ───────────────────────────────────────────────────────── */
.hero-showcase {
  margin: 3rem auto 0;
  max-width: 620px;
  position: relative;
}

.hero-showcase::before {
  content: "";
  position: absolute;
  inset: 10% 5% -5% 5%;
  background: radial-gradient(
    circle,
    rgba(2, 132, 199, 0.18) 0%,
    rgba(2, 132, 199, 0) 70%
  );
  filter: blur(40px);
  will-change: filter;
  z-index: 0;
  pointer-events: none;
}

.hero-showcase .mockup-window {
  position: relative;
  z-index: 1;
}

/* ── Section Structure ───────────────────────────────────────────────────── */
.section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-header {
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.section-title {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  margin-bottom: 0.6rem;
}

.section-description {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ── Features Grid ───────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ── Gallery Section ─────────────────────────────────────────────────────── */
.gallery-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-top: 1rem;
}

.gallery-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-tab {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
}

.gallery-tab:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.gallery-tab.active {
  background: var(--bg-subtle);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.tab-index {
  font-family: var(--font-code);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.4;
  padding-top: 0.1rem;
}

.gallery-tab.active .tab-index {
  color: var(--accent);
}

.tab-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tab-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.gallery-tab.active .tab-title {
  color: var(--accent);
}

.tab-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.gallery-viewport {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.gallery-panel {
  display: none;
}

.gallery-panel.active {
  display: block;
  animation: galleryFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-caption {
  display: none;
}

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

/* ── People & Discovery Spotlight Section ────────────────────────────────── */
.discovery-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.discovery-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.discovery-list-item {
  color: var(--text);
}

/* ── Film Modal Simulation ───────────────────────────────────────────────── */
.film-modal-demo {
  background: #0f172a;
  border-radius: 10px;
  border: 1px solid #1e293b;
  box-shadow:
    0 20px 40px -15px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  font-size: 0.82rem;
  color: #f8fafc;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.film-modal-header {
  position: relative;
  padding: 1rem 1.15rem;
  background: #162032;
  border-bottom: 1px solid #1e293b;
}

.film-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.3rem;
  line-height: 1;
  cursor: default;
}

.film-modal-header-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.film-modal-poster {
  width: 70px;
  height: 105px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.film-poster-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.film-modal-header-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.film-director-name {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
}

.film-title-row {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.3;
}

.film-title-row strong {
  color: #f8fafc;
}

.film-creator-count {
  margin-top: 0.15rem;
}

.film-count-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
}

.film-count-link:hover {
  text-decoration: underline;
}

.film-stars {
  color: #f59e0b;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}

.film-modal-body {
  padding: 1rem 1.15rem;
  background: #0f172a;
}

.film-modal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0.85rem;
}

.film-modal-table th {
  text-align: right;
  width: 1%;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 4px 10px 4px 0;
  vertical-align: top;
}

.film-modal-table td {
  padding: 4px 0;
  vertical-align: top;
}

.film-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.genre-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.genre-tag:hover {
  border-color: var(--accent);
  color: #f8fafc;
  background: #273549;
}

.genre-tag.active {
  background: rgba(2, 132, 199, 0.2);
  border-color: var(--accent);
  color: #38bdf8;
  font-weight: 600;
}

.film-runtime-val {
  font-size: 0.8rem;
  color: #cbd5e1;
  padding-top: 2px;
}

.film-modal-tabs {
  margin-top: 0.5rem;
  border-top: 1px solid #1e293b;
  padding-top: 0.65rem;
}

.film-tab-nav {
  display: flex;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 0.5rem;
}

.film-tab-item {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding: 0.25rem 0.5rem;
}

.film-tab-content {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  text-align: justify;
}

.film-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.15rem;
  background: #162032;
  border-top: 1px solid #1e293b;
}

.film-btn-provider {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  color: #94a3b8;
  border: 1px solid #334155;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.film-btn-close {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  color: #cbd5e1;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 0.25rem 0.85rem;
  border-radius: 4px;
}

/* ── Architecture Section ────────────────────────────────────────────────── */
.arch-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.arch-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.arch-tag {
  font-family: var(--font-code);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.35rem;
  display: block;
}

.arch-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
}

.arch-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ── Code Snippet Box ────────────────────────────────────────────────────── */
.code-box {
  background: #0f172a;
  border-radius: var(--radius);
  border: 1px solid #1e293b;
  overflow: hidden;
  font-family: var(--font-code);
}

.code-header {
  background: #1e293b;
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

.code-content {
  padding: 1.25rem 1rem;
  overflow-x: auto;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.7;
}

.code-comment {
  color: #64748b;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  padding: 2.5rem 0;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.link {
  color: var(--accent);
  text-decoration: underline;
}

.link:hover {
  color: var(--accent-hover);
}

.copyleft {
  display: inline-block;
  transform: rotate(180deg);
}

/* ── Responsive Rules ────────────────────────────────────────────────────── */
@media (max-width: 890px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  .section {
    padding: 3rem 0;
  }

  .discovery-section {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem;
    gap: 1.75rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .gallery-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .gallery-tabs {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.25rem 0.25rem 0.75rem 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gallery-tabs::-webkit-scrollbar {
    display: none;
  }

  .gallery-tab {
    flex-shrink: 0;
    width: auto;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    align-items: center;
    gap: 0.4rem;
  }

  .tab-desc {
    display: none;
  }

  .tab-index {
    padding-top: 0;
    font-size: 0.75rem;
  }

  .tab-title {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .gallery-caption {
    display: block;
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.45;
    padding: 0 0.5rem;
  }

  .hero-showcase {
    margin-top: 2rem;
    max-width: 100%;
  }

  .hero-showcase::before {
    display: none;
  }

  .gallery-viewport {
    max-width: 100%;
  }
}
