/* ============================================================
   REY LANDING — Design System
   ============================================================ */

@font-face {
  font-family: "NyghtSerif";
  src: url("public/fonts/NyghtSerif-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --rey-bg: #131517;
  --rey-card: #222425;
  --rey-card-2: #313232;
  --rey-yellow: #fed13a;
  --rey-yellow-dim: rgba(254, 209, 58, 0.12);
  --rey-yellow-glow: rgba(254, 209, 58, 0.25);
  --rey-white: #fbfbfb;
  --rey-muted: #979798;
  --rey-border: #313232;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --font-sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "NyghtSerif", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--rey-bg);
  color: var(--rey-white);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.display-font { font-family: var(--font-display); font-weight: 700; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--rey-yellow);
  color: #131517;
  padding: .75rem 1.75rem;
  font-size: .9375rem;
}
.btn-primary:hover { background: #ffd94d; transform: translateY(-1px); box-shadow: 0 8px 24px var(--rey-yellow-glow); }
.btn-primary:active { transform: scale(.97); }

.btn-ghost {
  background: transparent;
  color: var(--rey-muted);
  padding: .75rem 1.25rem;
  font-size: .9375rem;
}
.btn-ghost:hover { color: var(--rey-white); }

.btn-sm { padding: .5rem 1.25rem; font-size: .875rem; }
.btn-lg { padding: .875rem 2rem; font-size: 1rem; }

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background .3s, backdrop-filter .3s;
}

.nav.scrolled {
  background: rgba(19,21,23,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rey-border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}

#nav-orb, #footer-orb {
  /* canvas è 80×80px (orbSize 40 × PAD 2); mostriamo solo i 36px centrali */
  width: 80px !important;
  height: 80px !important;
  flex-shrink: 0;
  margin: -22px;  /* taglia i bordi trasparenti del glow */
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rey-white);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 5rem;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-30%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(254,209,58,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 6rem;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--rey-yellow-dim);
  border: 1px solid rgba(254,209,58,.25);
  border-radius: 9999px;
  padding: .35rem 1rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--rey-yellow);
  margin-bottom: 1.75rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rey-yellow);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.4); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
  color: var(--rey-white);
}

.hero-title .display-font {
  color: var(--rey-yellow);
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--rey-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-store-badges {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.trust-avatars {
  display: flex;
}

.trust-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--rey-bg);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -8px;
}
.trust-avatar:first-child { margin-left: 0; }

.trust-text {
  font-size: .875rem;
  color: var(--rey-muted);
}
.trust-text strong { color: var(--rey-white); }

/* PHONE MOCKUP */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-mockup {
  width: 320px;
  background: #0e0f10;
  border-radius: 44px;
  border: 2px solid var(--rey-card-2);
  padding: .75rem;
  box-shadow:
    0 40px 80px rgba(0,0,0,.6),
    0 0 0 1px rgba(255,255,255,.04),
    inset 0 1px 0 rgba(255,255,255,.06);
  position: relative;
  z-index: 2;
  animation: phone-float 6s ease-in-out infinite;
}

@keyframes phone-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.phone-screen {
  background: var(--rey-bg);
  border-radius: 36px;
  overflow: hidden;
  padding: .75rem;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Call screen ── */
.phone-screen-call {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.call-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.call-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.55) 0%, transparent 30%),
    linear-gradient(to top,    rgba(0,0,0,.70) 0%, transparent 40%);
}

.call-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem .875rem .5rem;
  width: 100%;
}

.call-back-btn,
.call-avatar-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(49,50,50,.80);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--rey-white);
  flex-shrink: 0;
}

.call-avatar-btn {
  color: var(--rey-yellow);
}

.call-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding-top: 2rem;
}

.call-label {
  font-size: .55rem;
  letter-spacing: .12em;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  font-weight: 500;
}

.call-name {
  font-size: 1.5rem;
  color: var(--rey-white);
  line-height: 1;
}

.call-timer {
  font-size: .65rem;
  color: rgba(255,255,255,.6);
  font-variant-numeric: tabular-nums;
}

.call-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: .75rem .875rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.call-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
}

.call-status-text {
  font-size: .875rem;
  font-weight: 600;
  color: var(--rey-yellow);
}

.call-status-sub {
  font-size: .65rem;
  color: rgba(255,255,255,.55);
}

.call-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.call-ctrl-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--rey-white);
}

.call-ctrl-end {
  width: 50px; height: 50px;
  background: #ff3b5c;
  font-size: 1.25rem;
}

/* SOUND TOGGLE */
.sound-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  background: rgba(19,21,23,.72);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(254,209,58,.3);
  border-radius: 9999px;
  padding: .875rem 1.5rem;
  color: var(--rey-white);
  font-size: 1.75rem;
  cursor: pointer;
  transition: background .2s, border-color .2s, opacity .3s;
}
.sound-toggle:hover { background: rgba(49,50,50,.9); border-color: rgba(254,209,58,.6); }
.sound-toggle.active {
  opacity: 0;
  pointer-events: none;
}

.sound-label {
  font-size: .7rem;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--rey-yellow);
}

.call-video-bg {
  filter: blur(6px);
  transform: scale(1.05); /* evita bordi bianchi con il blur */
  transition: filter .5s ease, transform .5s ease;
}
.call-video-bg.unblurred {
  filter: blur(0px);
  transform: scale(1);
}

/* FLOATING CARDS */
.hero-floating-card {
  position: absolute;
  background: var(--rey-card);
  border: 1px solid var(--rey-border);
  border-radius: var(--radius-lg);
  padding: .625rem 1rem;
  font-size: .8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .5rem;
  z-index: 3;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.card-1 {
  top: 12%;
  right: -10px;
  animation: float-card-1 5s ease-in-out infinite;
}

.card-2 {
  bottom: 18%;
  right: -20px;
  animation: float-card-2 5s ease-in-out infinite 1.5s;
}

@keyframes float-card-1 {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes float-card-2 {
  0%, 100% { transform: translateY(0) rotate(1deg); }
  50% { transform: translateY(-6px) rotate(-1deg); }
}

.float-icon { font-size: 1rem; }

/* ============================================================
   FEATURES
   ============================================================ */

.features {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  background: var(--rey-yellow-dim);
  border: 1px solid rgba(254,209,58,.2);
  border-radius: 9999px;
  padding: .3rem .875rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--rey-yellow);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin-bottom: 1rem;
}

.section-title .display-font { color: var(--rey-yellow); }

.section-sub {
  font-size: 1rem;
  color: var(--rey-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* riga 1: large (span 3 — intera riga) */
/* riga 2: 3 card normali */
.feature-card:nth-child(1) { grid-column: 1 / -1; }
.feature-card:nth-child(2) { grid-column: auto; }
.feature-card:nth-child(3) { grid-column: auto; }
.feature-card:nth-child(4) { grid-column: auto; }

/* Fai sì che le card normali si estendano in altezza nella loro row */
.feature-card {
  background: var(--rey-card);
  border: 1px solid var(--rey-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: border-color .2s, transform .2s;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  border-color: rgba(254,209,58,.3);
  transform: translateY(-2px);
}

.feature-large { /* handled by nth-child above */ }
.feature-wide  { /* handled by nth-child above */ }

.feature-icon-wrap {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  background: var(--rey-yellow-dim);
  border: 1px solid rgba(254,209,58,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-ph {
  font-size: 28px;
  color: var(--rey-yellow);
}

.feature-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: .5rem;
  letter-spacing: -.01em;
}

.feature-desc {
  font-size: .9rem;
  color: var(--rey-muted);
  line-height: 1.6;
}

/* Pulse animation */
.pulse-ring {
  position: absolute;
  bottom: 1.5rem; right: 1.75rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(254,209,58,.4);
  animation: pulse-ring 2s ease-out infinite;
}

.pulse-dot {
  position: absolute;
  bottom: calc(1.5rem + 18px);
  right: calc(1.75rem + 18px);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--rey-yellow);
}

@keyframes pulse-ring {
  0% { transform: scale(.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Mood chart */
.mood-chart {
  display: flex;
  align-items: flex-end;
  gap: .4rem;
  height: 60px;
  margin-top: 1.5rem;
}

.mood-bar {
  flex: 1;
  background: var(--rey-card-2);
  border-radius: 4px 4px 0 0;
  animation: bar-grow .6s ease-out forwards;
  transform-origin: bottom;
  transition: background .3s;
}

.mood-bar.active { background: var(--rey-yellow); }
.mood-bar:hover { background: rgba(254,209,58,.5); }

@keyframes bar-grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */

.testimonials {
  padding: 6rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(254,209,58,.02) 50%, transparent 100%);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.testimonial-card {
  background: var(--rey-card);
  border: 1px solid var(--rey-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: border-color .2s, transform .2s;
}

.testimonial-card:hover {
  border-color: rgba(254,209,58,.25);
  transform: translateY(-2px);
}

.testimonial-featured {
  border-color: rgba(254,209,58,.3);
  background: linear-gradient(135deg, var(--rey-card) 0%, rgba(254,209,58,.04) 100%);
  position: relative;
}

.stars {
  color: var(--rey-yellow);
  font-size: 1rem;
  letter-spacing: .05em;
  margin-bottom: 1rem;
  display: flex;
  gap: .15rem;
}

.testimonial-text {
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--rey-white);
  margin-bottom: 1.5rem;
  font-style: italic;
  opacity: .9;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: .875rem;
  font-weight: 700;
  color: var(--rey-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-name {
  font-weight: 600;
  font-size: .9rem;
}

.author-role {
  font-size: .8rem;
  color: var(--rey-muted);
}

/* ============================================================
   DOWNLOAD
   ============================================================ */

.download {
  padding: 6rem 0;
}

.download-card {
  background: var(--rey-card);
  border: 1px solid rgba(254,209,58,.2);
  border-radius: 2rem;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-glow {
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(254,209,58,.12) 0%, transparent 65%);
  pointer-events: none;
}

.download-content {
  position: relative;
  z-index: 1;
}

.download-orb-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.download-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin-bottom: 1rem;
}

.download-title .display-font { color: var(--rey-yellow); }

.download-sub {
  font-size: 1rem;
  color: var(--rey-muted);
  margin-bottom: 2.5rem;
}

.store-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.store-badge-link {
  display: inline-flex;
  transition: transform .2s, opacity .2s;
}
.store-badge-link:hover { transform: translateY(-2px); opacity: .88; }
.store-badge-link:active { transform: scale(.97); }

.store-badge {
  height: 60px;
  width: auto;
  display: block;
}

.store-badge-play {
  height: 60px;
}

.download-note {
  font-size: .8125rem;
  color: var(--rey-muted);
  margin-top: .25rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  border-top: 1px solid var(--rey-border);
  padding: 3rem 0 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.footer-tagline {
  font-size: .9rem;
  color: var(--rey-muted);
  margin-top: .75rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.footer-col-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rey-muted);
  margin-bottom: .25rem;
}

.footer-col a {
  font-size: .875rem;
  color: var(--rey-muted);
  text-decoration: none;
  transition: color .15s;
}
.footer-col a:hover { color: var(--rey-white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8125rem;
  color: var(--rey-muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rey-border);
  flex-wrap: wrap;
  gap: .5rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
    padding-top: 2rem;
  }

  .hero-content { max-width: 100%; }
  .hero-sub { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-trust { justify-content: center; }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .feature-card:nth-child(1) { grid-column: 1 / -1; }
  .feature-card:nth-child(2) { grid-column: auto; }
  .feature-card:nth-child(3) { grid-column: auto; }
  .feature-card:nth-child(4) { grid-column: 1 / -1; }

  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .footer-top { flex-direction: column; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-card:nth-child(n) { grid-column: 1 / -1; grid-row: auto; }

  .hero-floating-card { display: none; }

  .phone-mockup { width: 240px; }
  .phone-screen { min-height: 460px; }

  .download-card { padding: 2.5rem 1.25rem; }
  .store-buttons { flex-direction: column; align-items: center; }

  .footer-links { gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
