/* ==========================================================================
   Cinepals — "Gece Seansı" (Late-Night Screening)
   Display: Montserrat (self-hosted) · Body: Instrument Sans · Subtitle/label: IBM Plex Mono
   ========================================================================== */

@font-face {
  font-family: 'Montserrat';
  src: url('../assets/Montserrat/Montserrat-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../assets/Montserrat/Montserrat-Italic-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg:        #0B0B0D;
  --surface:   #18181B;
  --surface-2: #1F1B2E;
  --primary:   #7C3AED;
  --lavender:  #A78BFA;
  --text:      #E4E4E7;
  --text-dim:  #8E8E96;
  --white:     #FFFFFF;

  --font-display: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --container: 1120px;
  --edge: 24px;
  --section-gap: 140px;

  /* ---- Liquid glass surfaces ---- */
  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-bg-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.5);
  --glass-blur: 22px;
  --nav-ctrl-h: 44px;

  /* ---- Radius scale: one shape language for the whole page ---- */
  --radius-card: 20px;
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 200ms;
  --dur-base: 360ms;
  --dur-slow: 560ms;
}

@media (max-width: 640px) {
  :root { --section-gap: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 1ms; --dur-base: 1ms; --dur-slow: 1ms; }
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: var(--white);
  padding: 12px 20px;
  z-index: 200;
  font-family: var(--font-display);
  font-weight: 700;
}
.skip-link:focus { left: var(--edge); top: 12px; }

:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 3px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(11, 11, 13, 0.5);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background-color var(--dur-base) var(--ease-fluid), border-color var(--dur-base) var(--ease-fluid);
}
.nav--scrolled {
  background: rgba(11, 11, 13, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.09);
}
.nav__row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo { display: inline-flex; transition: opacity var(--dur-fast) ease; }
.nav__logo:hover { opacity: 0.82; }
.nav__logo img { height: 28px; width: auto; }

/* ---------- Nav CTA: liquid-glass split-reveal button ---------- */
.nav-cta {
  position: relative;
  display: inline-flex;
  height: var(--nav-ctrl-h);
  border-radius: var(--radius-pill);
}
.nav-cta__label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 34px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  white-space: nowrap;
  background: linear-gradient(155deg, var(--lavender), var(--primary) 68%);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 8px 22px -10px rgba(124, 58, 237, 0.7);
  transition: opacity var(--dur-base) var(--ease-fluid), transform var(--dur-base) var(--ease-fluid);
}
.nav-cta__label:active { transform: scale(0.96); }

.nav-cta__split {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.nav-cta__half {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: -0.01em;
  color: var(--white);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px) scale(0.92);
  transition: opacity var(--dur-base) var(--ease-fluid), transform var(--dur-base) var(--ease-fluid), background-color var(--dur-fast) ease;
  pointer-events: none;
}
.nav-cta__icon { width: 13px; height: 13px; fill: var(--white); flex-shrink: 0; }
.nav-cta__divider {
  position: absolute;
  top: 21%;
  bottom: 21%;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--glass-border) 25%, var(--glass-border) 75%, transparent);
  transform: scaleY(0);
  transition: transform var(--dur-base) var(--ease-fluid);
}

@media (hover: hover) and (pointer: fine) {
  .nav-cta__half:hover { background-color: rgba(255, 255, 255, 0.08); }
  .nav-cta:hover .nav-cta__label,
  .nav-cta:focus-within .nav-cta__label {
    opacity: 0;
    transform: scale(0.88);
    pointer-events: none;
  }
  .nav-cta:hover .nav-cta__half,
  .nav-cta:focus-within .nav-cta__half {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav-cta:hover .nav-cta__divider,
  .nav-cta:focus-within .nav-cta__divider {
    transform: scaleY(1);
  }
}
@media not all and (hover: hover) {
  .nav-cta__split { display: none; }
}

@media (max-width: 420px) {
  .nav-cta__label { padding: 0 18px; font-size: 0.82rem; }
}

/* ---------- Subtitle device (signature element — appears 5×) ---------- */
.subtitle {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lavender);
  margin: 0 0 20px;
}

/* ---------- Headlines ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--white);
  font-size: clamp(40px, 7vw, 84px);
  margin: 0 0 24px;
}
.headline {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--white);
  font-size: clamp(28px, 4vw, 48px);
  margin: 0 0 20px;
  max-width: 18ch;
}

/* ---------- Store badges ---------- */
.store-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  transition: border-color var(--dur-base) var(--ease-fluid), transform var(--dur-base) var(--ease-fluid), box-shadow var(--dur-base) var(--ease-fluid);
}
.store-badge:hover {
  border-color: var(--lavender);
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 28px -14px rgba(167, 139, 250, 0.55);
}
.store-badge:active { transform: translateY(-1px); }
.store-badge__icon { width: 22px; height: 22px; fill: var(--white); flex-shrink: 0; }
.store-badge__text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.15;
}
.store-badge__text small {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 72px 0 var(--section-gap);
  text-align: center;
}
.hero__body {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 52ch;
  margin: 0 auto 40px;
}

.hero-frame {
  position: relative;
  width: 100%;
  margin-top: 56px;
}
.hero-frame__glow {
  position: absolute;
  inset: -60px 10% auto 10%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.18) 0%, rgba(124, 58, 237, 0) 70%);
  filter: blur(60px);
  z-index: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-frame__glow { animation: blob-drift 11s var(--ease-fluid) infinite alternate; }
}
.hero-frame__phones {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: clamp(220px, 40vw, 460px);
}
.hero-frame__phone { height: 100%; width: auto; }
.hero-frame__phone--a,
.hero-frame__phone--c { opacity: 0.7; transform: translateY(4%); }
.hero-frame__phone--b { transform: translateY(-4%); }

@media (prefers-reduced-motion: no-preference) {
  .js-ready .hero-frame__phones {
    opacity: 0;
    transform: translateY(18px);
    animation: phones-in 900ms 250ms var(--ease-fluid) forwards;
  }
  .js-ready .hero-frame__phone--a { animation: float-a 7s ease-in-out 1.1s infinite; }
  .js-ready .hero-frame__phone--b { animation: float-b 8s ease-in-out 1.1s infinite; }
  .js-ready .hero-frame__phone--c { animation: float-c 7.5s ease-in-out 1.1s infinite; }
}
@keyframes phones-in { to { opacity: 1; transform: translateY(0); } }
@keyframes float-a {
  0%, 100% { transform: translateY(4%) rotate(0deg); }
  50% { transform: translateY(-6%) rotate(-2deg); }
}
@keyframes float-b {
  0%, 100% { transform: translateY(-4%) rotate(0deg); }
  50% { transform: translateY(-17%) rotate(1.8deg); }
}
@keyframes float-c {
  0%, 100% { transform: translateY(4%) rotate(0deg); }
  50% { transform: translateY(-7%) rotate(2.2deg); }
}
@keyframes blob-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(3%, -4%) scale(1.08); }
}

/* page-load moment: projector starting */
@media (prefers-reduced-motion: no-preference) {
  .js-ready .hero-frame__glow {
    animation: glow-on 900ms ease-out both;
  }
}
@keyframes glow-on {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  .hero-frame__phones { gap: 10px; height: clamp(150px, 46vw, 220px); }
}

/* ==========================================================================
   Sections (shared)
   ========================================================================== */
.section { padding: var(--section-gap) 0; }

/* ==========================================================================
   §2 Nasıl çalışır — filmstrip
   ========================================================================== */
.filmstrip {
  margin-top: 48px;
}
.filmstrip__sprockets {
  height: 10px;
  background: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.08) 0 6px,
    transparent 6px 18px
  );
}
.filmstrip__frames {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.frame {
  padding: 28px 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color var(--dur-base) var(--ease-fluid);
}
.frame:first-child { border-left: none; }
.frame:hover { background-color: rgba(255, 255, 255, 0.03); }
.frame__shot {
  width: 100%;
  max-width: 160px;
  height: auto;
  margin: 0 auto 20px;
  transition: transform var(--dur-slow) var(--ease-fluid);
}
.frame:hover .frame__shot { transform: scale(1.045) translateY(-2px); }
.frame__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--white);
  margin: 0 0 8px;
}
.frame__body {
  font-size: 15px;
  color: var(--text);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .filmstrip__frames { grid-template-columns: 1fr; }
  .frame {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .frame:first-child { border-top: none; }
  .frame__shot { max-width: 140px; }
}

/* ==========================================================================
   §3 Challenge
   ========================================================================== */
.challenge {
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: 48px;
  align-items: center;
}
.challenge__body {
  font-size: 17px;
  color: var(--text);
  margin-top: 20px;
  max-width: 44ch;
}
.challenge__visual {
  display: flex;
  justify-content: center;
}
.challenge__shot {
  width: 100%;
  max-width: 320px;
  height: auto;
  transform: rotate(-2deg);
  transition: transform var(--dur-slow) var(--ease-fluid);
}
.challenge__shot:hover {
  transform: rotate(0deg) scale(1.03) translateY(-6px);
}

@media (max-width: 900px) {
  .challenge { grid-template-columns: 1fr; }
  .challenge__visual { order: -1; }
}

/* ==========================================================================
   §4 Topluluklar
   ========================================================================== */
.community-marquee {
  position: relative;
  margin: 48px 0 32px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.community-marquee__track {
  display: flex;
  align-items: stretch;
  gap: 20px;
  width: max-content;
}
@media (prefers-reduced-motion: no-preference) {
  .community-marquee__track {
    animation: community-scroll 42s linear infinite;
  }
  .community-marquee:hover .community-marquee__track,
  .community-marquee:focus-within .community-marquee__track {
    animation-play-state: paused;
  }
}
@keyframes community-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .community-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .community-marquee__track [aria-hidden="true"] { display: none; }
}

.community-card {
  flex: 0 0 auto;
  width: 260px;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-fluid), border-color var(--dur-base) var(--ease-fluid), box-shadow var(--dur-base) var(--ease-fluid);
}
.community-card:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 20px 40px -20px rgba(124, 58, 237, 0.5);
}
.community-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
}
.community-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-fluid);
}
.community-card:hover .community-card__media img { transform: scale(1.06); }
.community-card__info {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.community-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--white);
}
.community-card__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.community-card__meta {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lavender);
}

.communities__note {
  font-size: 17px;
  color: var(--text);
  max-width: 56ch;
}

@media (max-width: 640px) {
  .community-marquee { margin-top: 40px; }
}

/* ==========================================================================
   §5 Final CTA
   ========================================================================== */
.cta {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.cta__glow {
  position: absolute;
  inset: 0 10%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.10) 0%, rgba(124, 58, 237, 0) 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .cta__glow { animation: blob-drift 13s var(--ease-fluid) infinite alternate; }
}
.cta__inner {
  position: relative;
  z-index: 1;
}
.cta__inner .headline {
  margin-left: auto;
  margin-right: auto;
}
.cta__body {
  font-size: 17px;
  color: var(--text);
  margin: 0 auto 40px;
  max-width: 44ch;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}
.footer__mark { height: 20px; width: auto; opacity: 0.8; }
.footer__link {
  margin-left: auto;
  background-image: linear-gradient(var(--white), var(--white));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: color var(--dur-base) ease, background-size var(--dur-base) var(--ease-fluid);
}
.footer__link:hover { color: var(--white); background-size: 100% 1px; }
.footer__social { display: flex; gap: 18px; }
.footer__social a {
  background-image: linear-gradient(var(--white), var(--white));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: color var(--dur-base) ease, background-size var(--dur-base) var(--ease-fluid);
}
.footer__social a:hover { color: var(--white); background-size: 100% 1px; }

@media (max-width: 640px) {
  .footer__row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer__link { margin-left: 0; }
}

/* ==========================================================================
   Scroll reveal (progressive enhancement: hidden state only applies once
   JS confirms it can animate it back in — see .js-ready in main.js)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js-ready .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--dur-slow) var(--ease-fluid), transform var(--dur-slow) var(--ease-fluid);
  }
  .js-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }

  .js-ready .reveal--left { transform: translateX(-32px); }
  .js-ready .reveal--right { transform: translateX(32px); }
  .js-ready .reveal--left.is-visible,
  .js-ready .reveal--right.is-visible { opacity: 1; transform: translate(0); }

  .js-ready .filmstrip__frames .reveal:nth-child(1) { transition-delay: 0ms; }
  .js-ready .filmstrip__frames .reveal:nth-child(2) { transition-delay: 90ms; }
  .js-ready .filmstrip__frames .reveal:nth-child(3) { transition-delay: 180ms; }
  .js-ready .filmstrip__frames .reveal:nth-child(4) { transition-delay: 270ms; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 360px) {
  :root { --edge: 16px; }
  .store-badges { flex-direction: column; align-items: stretch; }
  .store-badges--center { align-items: center; }
}
