/* ============================================================
   LIBOSIFY — Editorial Noir
   High-fashion magazine aesthetic. Typography as hero.
   ============================================================ */

:root {
  --bg: #0A0A0A;
  --accent: #C8FF00;
  --text: #E8E8E8;
  --text-dim: #6B6B6B;
  --text-ghost: #333;
  --border: rgba(255,255,255,0.06);
  --font-display: 'Comfortaa', system-ui, sans-serif;
  --font-body: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1100px;
}

/* --- FONT --- */
@font-face {
  font-family: 'Comfortaa';
  src: url('./fonts/Comfortaa-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #000; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
figure { margin: 0; }

/* --- GRAIN OVERLAY --- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* --- CONTAINER --- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 32px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 36px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  border-radius: 0;
  transition: all 0.35s var(--ease);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn--accent {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn--accent:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn--dark {
  background: #000;
  color: var(--accent);
  border-color: #000;
}
.btn--dark:hover {
  background: #111;
  border-color: #333;
}

.btn--sm { padding: 10px 22px; font-size: 0.75rem; }
.btn--lg { padding: 18px 48px; font-size: 0.875rem; }

/* --- HEADER --- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.4s var(--ease);
}
.header--hidden { transform: translateY(-100%); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.header__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.header__actions { display: flex; align-items: center; gap: 12px; }

/* --- LANG SWITCHER --- */
.lang-switcher {
  display: flex;
  gap: 1px;
}
.lang-btn {
  padding: 5px 9px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.25s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: var(--accent); }

/* ============================================================
   HERO — typographic power, no images
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px;
  position: relative;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.hero__eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 48px;
  position: relative;
}
.hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 40px;
  max-width: 900px;
}

.hero__sub {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  color: var(--text-dim);
  max-width: 440px;
  line-height: 1.7;
  margin-bottom: 56px;
}

.hero__cta { margin-bottom: 80px; }

/* Scroll indicator */
.hero__scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero__scroll-hint span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  30% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  70% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ============================================================
   SECTION LABEL
   ============================================================ */
.section-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
  color: var(--text);
  text-align: left;
  margin-bottom: 64px;
}

/* ============================================================
   FEATURES — editorial index
   ============================================================ */
.features {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.features__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feat {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.feat:first-child { border-top: 1px solid var(--border); }

.feat:hover {
  background: rgba(200,255,0,0.015);
}

.feat__num {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  padding-top: 2px;
}

.feat__body { max-width: 520px; }

.feat__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.feat__desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ============================================================
   HOW IT WORKS — large numbers
   ============================================================ */
.how {
  padding: 120px 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step { display: flex; flex-direction: column; }

.step__n {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--text-ghost);
  margin-bottom: 24px;
  transition: color 0.5s var(--ease);
}
.step:hover .step__n { color: var(--accent); }

.step__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.step__desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 280px;
}

/* ============================================================
   GALLERY — screenshot scroll
   ============================================================ */
.gallery {
  padding: 120px 0 80px;
  border-top: 1px solid var(--border);
}

.gallery__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 32px 40px;
  cursor: grab;
  user-select: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.is-dragging { cursor: grabbing; scroll-behavior: auto; }

.gallery__item {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.gallery__frame {
  width: 200px;
  height: 380px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.gallery__item:hover .gallery__frame {
  transform: translateY(-6px);
  border-color: rgba(200,255,0,0.25);
}

.gallery__frame img {
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%;
  height: 165%;
  object-fit: cover;
  object-position: center top;
}

.gallery__item figcaption {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* ============================================================
   CTA — inverted lime section
   ============================================================ */
.cta {
  background: var(--accent);
  padding: 100px 0;
  position: relative;
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.cta__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #000;
  line-height: 1.1;
  max-width: 560px;
}

.cta__desc {
  font-size: 1rem;
  color: rgba(0,0,0,0.55);
  max-width: 380px;
  line-height: 1.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }

.footer__link {
  font-size: 0.8125rem;
  color: var(--text-dim);
  transition: color 0.25s;
}
.footer__link:hover { color: var(--text); }

.footer__meta {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-ghost);
}

/* ============================================================
   REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.hero__eyebrow { transition-delay: 0.1s; }
.hero__title { transition-delay: 0.25s; }
.hero__sub { transition-delay: 0.4s; }
.hero__cta { transition-delay: 0.55s; }
.hero__scroll-hint { transition-delay: 0.7s; }

.features__list .feat:nth-child(1) { transition-delay: 0.05s; }
.features__list .feat:nth-child(2) { transition-delay: 0.15s; }
.features__list .feat:nth-child(3) { transition-delay: 0.25s; }

.steps .step:nth-child(1) { transition-delay: 0.05s; }
.steps .step:nth-child(2) { transition-delay: 0.15s; }
.steps .step:nth-child(3) { transition-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.visible { opacity: 1; transform: none; transition: none; }
  .hero__eyebrow::before { animation: none; }
  .hero__scroll-hint span { animation: none; }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
@media (hover: hover) {
  ::-webkit-scrollbar { width: 4px; height: 4px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }
}

/* ============================================================
   RESPONSIVE — 960px
   ============================================================ */
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .step__n { font-size: 3rem; }

  .feat { grid-template-columns: 60px 1fr; gap: 16px; padding: 32px 0; }

  .footer__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ============================================================
   RESPONSIVE — 640px
   ============================================================ */
@media (max-width: 640px) {
  .container { padding-inline: 20px; }

  .header__inner { height: 48px; }

  .hero { padding: 100px 0 60px; }
  .hero__title { font-size: clamp(2.5rem, 12vw, 4rem); }
  .hero__sub { font-size: 0.9375rem; }
  .hero__cta .btn { width: 100%; }
  .hero__scroll-hint { display: none; }

  .features, .how, .gallery { padding: 80px 0; }
  .section-label { margin-bottom: 40px; }

  .feat { grid-template-columns: 48px 1fr; gap: 12px; padding: 28px 0; }
  .feat__num { font-size: 0.75rem; }

  .gallery__frame { width: 160px; height: 310px; }
  .gallery__track { padding-inline: 20px; }

  .cta { padding: 72px 0; }
  .cta .btn { width: 100%; }

  .footer__links { gap: 16px; }
  .footer__meta { flex-direction: column; gap: 4px; }

  .lang-btn { padding: 4px 7px; font-size: 0.5625rem; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
