/* ================================================================
   alcinema.app — Films Homepage
   Dark cinematic grid of all film cards
   ================================================================ */

/* —— Reset (scoped to this page via body.fh-body) —— */

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

/* —— Custom Properties —— */

:root {
  --fh-bg: #0b0b0f;
  --fh-bg-elevated: #141418;
  --fh-text: #e8e6e3;
  --fh-text-dim: #9a9a9d;
  --fh-text-muted: #5c5c60;
  --fh-accent: #c8a44c;
  --fh-accent-soft: rgba(200, 164, 76, 0.12);
  --fh-border: rgba(255, 255, 255, 0.06);
  --fh-max-w: 1100px;
  --fh-radius: 6px;
}

/* —— Page —— */

html {
  scroll-behavior: smooth;
}

.fh-body {
  background: var(--fh-bg);
  background-image: radial-gradient(ellipse at 50% -20%, #18181f 0%, var(--fh-bg) 70%);
  color: var(--fh-text);
  font-family:
    'Inter',
    -apple-system,
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Gold ambient glow — top-left */
.fh-body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -20%;
  width: 70%;
  height: 70%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(200, 164, 76, 0.18) 0%,
    rgba(200, 164, 76, 0.06) 40%,
    transparent 70%
  );
}

/* Film grain noise overlay */
.fh-body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* —— Header —— */

.fh-header {
  position: relative;
  z-index: 1;
  padding: 40px 24px 0;
  text-align: center;
}

.fh-header-inner {
  max-width: var(--fh-max-w);
  margin: 0 auto;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--fh-border);
}

.fh-logo {
  font-family: 'Bodoni Moda', 'Georgia', serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fh-text);
  text-decoration: none;
}

.fh-logo-accent {
  color: var(--fh-accent);
}

.fh-tagline {
  margin-top: 10px;
  font-size: 12px;
  color: var(--fh-text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* —— Hero —— */

.fh-hero {
  padding: 100px 0 80px;
  text-align: center;
}

.fh-hero-title {
  font-family: 'Bodoni Moda', 'Georgia', serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 680px;
  margin: 0 auto;
}

.fh-hero-title em {
  font-style: italic;
  color: var(--fh-accent);
}

.fh-hero-sub {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fh-text-dim);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.fh-hero-cta {
  display: inline-block;
  margin-top: 40px;
  padding: 12px 32px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fh-accent);
  border: 1px solid var(--fh-accent);
  border-radius: 4px;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.fh-hero-cta:hover {
  background: var(--fh-accent);
  color: var(--fh-bg);
}

/* —— Features —— */

.fh-features {
  padding: 72px 0 72px;
}

.fh-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 48px;
  max-width: 760px;
  margin: 0 auto;
}

.fh-feat {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.fh-feat:nth-child(even) {
  flex-direction: row-reverse;
  text-align: right;
}

.fh-feat-body {
  flex: 1;
  min-width: 0;
}

.fh-feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--fh-accent);
}

.fh-feat-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fh-feat-title {
  font-family: 'Bodoni Moda', 'Georgia', serif;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}

.fh-feat-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fh-text-dim);
}

@media (max-width: 799px) {
  .fh-features-grid {
    gap: 32px 36px;
  }
}

@media (max-width: 519px) {
  .fh-hero {
    padding: 64px 0 48px;
  }

  .fh-hero-title {
    font-size: 32px;
  }

  .fh-hero-sub {
    font-size: 14px;
  }

  .fh-features {
    padding: 0 0 48px;
  }

  .fh-features-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .fh-feat,
  .fh-feat:nth-child(even) {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* —— Templates showcase —— */

.fh-templates {
  padding: 72px 0 88px;
  border-top: 1px solid var(--fh-border);
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}

.fh-templates-title {
  font-family: 'Bodoni Moda', 'Georgia', serif;
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 8px;
}

.fh-templates-desc {
  font-size: 13px;
  color: var(--fh-text-dim);
  margin-bottom: 40px;
}

.fh-templates-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.fh-templates-track::-webkit-scrollbar {
  display: none;
}

/* Single template card — wireframe mockup */
.fh-tpl {
  flex: 0 0 140px;
  scroll-snap-align: start;
}

.fh-tpl-frame {
  height: 200px;
  border-radius: 5px;
  background: var(--fh-bg-elevated);
  border: 1px solid var(--fh-border);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.fh-tpl-label {
  margin-top: 8px;
  font-size: 11px;
  color: var(--fh-text-muted);
  letter-spacing: 0.04em;
}

/* Wireframe building blocks */
.fh-w {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.fh-w--accent {
  background: rgba(200, 164, 76, 0.1);
}

.fh-w--line {
  height: 3px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.fh-w--dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(200, 164, 76, 0.18);
  flex-shrink: 0;
}

/* Template layouts */

/* 1 — Hero: big block + text lines */
.fh-tpl--hero .fh-w:nth-child(1) {
  flex: 4;
}
.fh-tpl--hero .fh-w:nth-child(2) {
  flex: 0 0 3px;
}
.fh-tpl--hero .fh-w:nth-child(3) {
  flex: 0 0 3px;
  width: 70%;
}
.fh-tpl--hero .fh-w:nth-child(4) {
  flex: 1;
}

/* 2 — Split: two columns */
.fh-tpl--split .fh-tpl-frame {
  flex-direction: row;
  gap: 6px;
}
.fh-tpl--split .fh-tpl-cols {
  display: flex;
  gap: 6px;
  flex: 1;
}
.fh-tpl--split .fh-tpl-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fh-tpl--split .fh-tpl-col:first-child .fh-w {
  flex: 1;
}
.fh-tpl--split .fh-tpl-col:last-child .fh-w:nth-child(1) {
  flex: 0 0 3px;
}
.fh-tpl--split .fh-tpl-col:last-child .fh-w:nth-child(2) {
  flex: 0 0 3px;
  width: 80%;
}
.fh-tpl--split .fh-tpl-col:last-child .fh-w:nth-child(3) {
  flex: 1;
}
.fh-tpl--split .fh-tpl-col:last-child .fh-w:nth-child(4) {
  flex: 0 0 14px;
}

/* 3 — Cinematic: full bleed, center circle */
.fh-tpl--cine .fh-w:nth-child(1) {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fh-tpl--cine .fh-w:nth-child(2) {
  flex: 0 0 3px;
}
.fh-tpl--cine .fh-w:nth-child(3) {
  flex: 0 0 3px;
  width: 50%;
  align-self: center;
}

/* 4 — Minimal: centered narrow */
.fh-tpl--mini .fh-tpl-frame {
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.fh-tpl--mini .fh-w:nth-child(1) {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.fh-tpl--mini .fh-w:nth-child(2) {
  width: 70%;
  height: 3px;
}
.fh-tpl--mini .fh-w:nth-child(3) {
  width: 50%;
  height: 3px;
}
.fh-tpl--mini .fh-w:nth-child(4) {
  width: 60px;
  height: 16px;
  margin-top: 4px;
  border-radius: 8px;
}

/* 5 — Grid: 2x3 blocks */
.fh-tpl--grid .fh-tpl-frame {
  flex-wrap: wrap;
  flex-direction: row;
  gap: 5px;
  padding: 8px;
}
.fh-tpl--grid .fh-w {
  width: calc(50% - 3px);
  height: 0;
  padding-bottom: 30%;
  flex: none;
}

/* 6 — Bold: big text block */
.fh-tpl--bold .fh-w:nth-child(1) {
  flex: 0 0 8px;
  width: 90%;
}
.fh-tpl--bold .fh-w:nth-child(2) {
  flex: 0 0 6px;
  width: 60%;
}
.fh-tpl--bold .fh-w:nth-child(3) {
  flex: 1;
  margin-top: 4px;
}
.fh-tpl--bold .fh-w:nth-child(4) {
  flex: 0 0 3px;
}
.fh-tpl--bold .fh-w:nth-child(5) {
  flex: 0 0 3px;
  width: 40%;
}

/* 7 — Dark: inverted feel */
.fh-tpl--dark .fh-tpl-frame {
  background: #0a0a0d;
  border-color: rgba(255, 255, 255, 0.03);
}
.fh-tpl--dark .fh-w:nth-child(1) {
  flex: 0 0 20px;
}
.fh-tpl--dark .fh-w:nth-child(2) {
  flex: 3;
}
.fh-tpl--dark .fh-w:nth-child(3) {
  flex: 0 0 3px;
  width: 60%;
  align-self: center;
}
.fh-tpl--dark .fh-w:nth-child(4) {
  flex: 1;
}

/* 8 — Poster: tall image dominant */
.fh-tpl--poster .fh-w:nth-child(1) {
  flex: 6;
}
.fh-tpl--poster .fh-w:nth-child(2) {
  flex: 0 0 3px;
  width: 80%;
  align-self: center;
}
.fh-tpl--poster .fh-w:nth-child(3) {
  flex: 0 0 14px;
}

/* 9 — Magazine: header + columns */
.fh-tpl--mag .fh-w:nth-child(1) {
  flex: 0 0 16px;
}
.fh-tpl--mag .fh-tpl-cols {
  display: flex;
  gap: 5px;
  flex: 1;
}
.fh-tpl--mag .fh-tpl-col {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}
.fh-tpl--mag .fh-tpl-col:nth-child(2) {
  flex: 1.4;
}

/* 10 — Neon: accent borders */
.fh-tpl--neon .fh-tpl-frame {
  gap: 8px;
}
.fh-tpl--neon .fh-w {
  border: 1px solid rgba(200, 164, 76, 0.12);
  background: transparent;
}
.fh-tpl--neon .fh-w:nth-child(1) {
  flex: 3;
}
.fh-tpl--neon .fh-w:nth-child(2) {
  flex: 0 0 3px;
  background: rgba(200, 164, 76, 0.1);
  border: none;
}
.fh-tpl--neon .fh-w:nth-child(3) {
  flex: 1;
}
.fh-tpl--neon .fh-w:nth-child(4) {
  flex: 0 0 18px;
  border-radius: 9px;
}

@media (max-width: 519px) {
  .fh-templates {
    padding: 48px 0 56px;
  }

  .fh-templates-title {
    font-size: 22px;
  }

  .fh-tpl {
    flex: 0 0 120px;
  }

  .fh-tpl-frame {
    height: 170px;
  }
}

/* —— Main —— */

.fh-main {
  max-width: var(--fh-max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.fh-films {
  border-top: 1px solid var(--fh-border);
}

/* —— Sections —— */

.fh-section {
  padding: 72px 0;
  max-width: 1100px;
  margin: 0 auto;
}

.fh-section + .fh-section {
  border-top: 1px solid var(--fh-border);
}

.fh-section-header {
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--fh-border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.fh-section-title {
  font-family: 'Bodoni Moda', 'Georgia', serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.fh-section-count {
  font-size: 12px;
  color: var(--fh-text-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Pulsing dot for "In sala" */
.fh-dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fh-accent);
  margin-right: 10px;
  vertical-align: middle;
  animation: fh-pulse 2s ease-in-out infinite;
}

@keyframes fh-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* —— Grid (carousel) —— */

.fh-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.fh-grid::-webkit-scrollbar {
  display: none;
}

/* —— Card —— */

.fh-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--fh-radius);
  overflow: hidden;
  background: var(--fh-bg-elevated);
  cursor: pointer;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.55s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.55s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.4s ease;
  flex: 0 0 180px;
  scroll-snap-align: start;
}

.fh-card--visible {
  opacity: 1;
  transform: translateY(0);
}

.fh-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.fh-card--visible:hover {
  transform: translateY(-6px);
}

.fh-card--active:hover {
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(200, 164, 76, 0.08);
}

/* —— Poster —— */

.fh-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1a1a1e;
}

.fh-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.fh-card:hover .fh-poster img {
  transform: scale(1.06);
}

/* Gradient overlay on poster bottom */
.fh-poster::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    transparent 100%
  );
  pointer-events: none;
}

/* —— Card info overlay —— */

.fh-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 14px 14px;
  z-index: 1;
}

.fh-card-title {
  font-family: 'Bodoni Moda', 'Georgia', serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fh-card-detail {
  font-size: 11px;
  color: var(--fh-text-dim);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* —— Badge "In sala" —— */

.fh-badge-insala {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--fh-accent);
  color: #0b0b0f;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
}

/* —— Archived cards —— */

.fh-card--archived .fh-poster img {
  filter: saturate(0.5) brightness(0.88);
  transition:
    filter 0.4s ease,
    transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.fh-card--archived:hover .fh-poster img {
  filter: saturate(0.85) brightness(1);
}

/* —— No poster fallback —— */

.fh-noposter {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bodoni Moda', serif;
  font-size: 56px;
  color: var(--fh-text-muted);
  background: linear-gradient(135deg, #1a1a1e 0%, #121215 100%);
}

/* —— Skeleton cards —— */

.fh-card--skeleton {
  pointer-events: none;
  opacity: 0.35 !important;
}

.fh-skel-shimmer {
  background: linear-gradient(
    110deg,
    var(--fh-bg-elevated) 30%,
    rgba(255, 255, 255, 0.04) 50%,
    var(--fh-bg-elevated) 70%
  );
  background-size: 200% 100%;
  animation: fh-shimmer 1.8s ease-in-out infinite;
}

@keyframes fh-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* —— Newsletter banner —— */

.fh-newsletter {
  padding: 72px 0;
  text-align: center;
  border-top: 1px solid var(--fh-border);
}

.fh-newsletter-title {
  font-family: 'Bodoni Moda', 'Georgia', serif;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 8px;
}

.fh-newsletter-desc {
  font-size: 13px;
  color: var(--fh-text-dim);
  margin-bottom: 24px;
}

.fh-newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.fh-newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--fh-text);
  background: var(--fh-bg-elevated);
  border: 1px solid var(--fh-border);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.fh-newsletter-input::placeholder {
  color: var(--fh-text-muted);
}

.fh-newsletter-input:focus {
  border-color: var(--fh-accent);
}

.fh-newsletter-btn {
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fh-bg);
  background: var(--fh-accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.fh-newsletter-btn:hover {
  opacity: 0.88;
}

.fh-newsletter-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.fh-newsletter-ok {
  font-size: 13px;
  color: var(--fh-accent);
  margin-top: 12px;
}

.fh-newsletter-err {
  font-size: 13px;
  color: #c44;
  margin-top: 12px;
}

/* —— Empty state —— */

.fh-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--fh-text-muted);
  font-size: 14px;
}

/* —— Footer —— */

.fh-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px 48px;
  color: var(--fh-text-muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.fh-footer-inner {
  max-width: var(--fh-max-w);
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid var(--fh-border);
}

.fh-footer a {
  color: var(--fh-text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.fh-footer a:hover {
  color: var(--fh-text);
}

/* —— Mobile —— */

@media (max-width: 519px) {
  .fh-header {
    padding: 28px 16px 0;
  }

  .fh-header-inner {
    padding-bottom: 24px;
  }

  .fh-main {
    padding: 0 16px;
  }

  .fh-section {
    padding: 32px 0;
  }

  .fh-section-title {
    font-size: 22px;
  }

  .fh-section-header {
    margin-bottom: 24px;
  }

  .fh-card-title {
    font-size: 13px;
  }

  .fh-card-info {
    padding: 12px 10px 10px;
  }

  .fh-grid {
    gap: 10px;
  }

  .fh-card {
    flex: 0 0 140px;
  }

  .fh-footer {
    padding: 32px 16px 40px;
  }
}
