/* ==========================================================================
   BEIKORA — Components
   Design System V4: OKLCH achromatic premium
   ========================================================================== */


/* --------------------------------------------------------------------------
   NAVIGATION — Glassmorphism sutil
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background var(--duration-medium) var(--ease-default),
    border-bottom-color var(--duration-medium) var(--ease-default);
}

.nav--scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border-bottom-color: var(--glass-border);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.04) inset,
    0 8px 32px oklch(0 0 0 / 0.30);
}

.nav__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__mark {
  width: 14px;
  height: 19px;
  flex-shrink: 0;
  display: block;
}

.nav__wordmark {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  color: var(--on-surface);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--on-surface-muted);
  text-decoration: none;
  letter-spacing: var(--ls-wide);
  transition: color var(--duration-short) var(--ease-default);
}

.nav__links a:hover {
  color: var(--on-surface);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-short) var(--ease-default);
}

.nav__hamburger:hover {
  background: var(--primary-subtle);
}

.nav__hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--on-surface-muted);
  border-radius: var(--radius-full);
  transition:
    transform var(--duration-medium) var(--ease-default),
    opacity var(--duration-medium) var(--ease-default);
  transform-origin: center;
}

.nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, var(--opacity-overlay));
  z-index: 150;
  opacity: 0;
  transition: opacity var(--duration-medium) var(--ease-default);
}

.nav__mobile {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 200;
  width: min(320px, 85vw);
  height: 100dvh;
  background: var(--surface-container);
  border-left: 1px solid var(--border);
  padding: calc(var(--nav-height) + 24px) 32px 40px;
  transform: translateX(100%);
  transition: transform var(--duration-long) var(--ease-emphasized);
  overflow-y: auto;
  flex-direction: column;
  gap: 8px;
}

.nav__mobile a {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--on-surface-muted);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--duration-short) var(--ease-default);
}

.nav__mobile a:hover {
  color: var(--on-surface);
}

.nav__mobile .nav__mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}


/* --------------------------------------------------------------------------
   BUTTONS — Achromatic premium
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transform: translateZ(0);
  transition:
    background var(--duration-medium) var(--ease-default),
    color var(--duration-medium) var(--ease-default),
    border-color var(--duration-medium) var(--ease-default),
    transform var(--duration-medium) var(--ease-default),
    box-shadow var(--duration-medium) var(--ease-default);
  border: 1px solid transparent;
  white-space: nowrap;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
  overflow: hidden;
  isolation: isolate;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Primary — Pure white (app-aligned, achromatic) */
.btn--primary {
  background: oklch(0.97 0.003 75);
  color: oklch(0.14 0 0);
  padding: 15px 30px;
  font-size: 0.9375rem;
  border-color: oklch(1 0 0 / 0.85);
  box-shadow:
    0 1px 2px oklch(0 0 0 / 0.30),
    0 4px 12px oklch(0 0 0 / 0.18),
    inset 0 1px 0 oklch(1 0 0 / 0.50);
}

/* Shine layer — sweeps across on hover */
.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    100deg,
    transparent 30%,
    oklch(1 0 0 / 0.25) 48%,
    oklch(1 0 0 / 0.45) 50%,
    oklch(1 0 0 / 0.25) 52%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform var(--duration-slow) var(--ease-default);
  pointer-events: none;
  z-index: 1;
}

.btn--primary > * {
  position: relative;
  z-index: 2;
}

.btn--primary:hover {
  background: oklch(1 0 0);
  border-color: oklch(1 0 0);
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px oklch(0 0 0 / 0.35),
    0 12px 28px oklch(0 0 0 / 0.28),
    0 20px 48px oklch(0 0 0 / 0.20),
    inset 0 1px 0 oklch(1 0 0 / 0.55);
}

.btn--primary:hover::before {
  transform: translateX(120%);
}

.btn--primary:active {
  transform: translateY(0);
  background: oklch(0.94 0.003 75);
  border-color: oklch(0.94 0.003 75);
  box-shadow:
    0 1px 2px oklch(0 0 0 / 0.30),
    inset 0 1px 2px oklch(0 0 0 / 0.10);
  transition-duration: var(--duration-instant);
}

/* Secondary — Ghost outline */
.btn--secondary {
  background: oklch(0.97 0.003 75 / 0.04);
  color: var(--on-surface);
  padding: 14px 29px;
  font-size: 0.9375rem;
  border-color: oklch(0.97 0.003 75 / 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--secondary:hover {
  background: oklch(0.97 0.003 75 / 0.08);
  border-color: oklch(0.97 0.003 75 / 0.24);
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px oklch(0 0 0 / 0.25),
    0 12px 24px oklch(0 0 0 / 0.20);
}

.btn--secondary:active {
  transform: translateY(0);
  background: oklch(0.97 0.003 75 / 0.05);
  transition-duration: var(--duration-instant);
}

/* Size modifier — small (nav) */
.btn--sm {
  padding: 10px 22px;
  font-size: 0.8125rem;
}

/* Width modifier — full */
.btn--full {
  width: 100%;
}

/* Respect reduced motion on btn hover transforms */
@media (prefers-reduced-motion: reduce) {
  .btn--primary:hover,
  .btn--secondary:hover {
    transform: none;
  }
  .btn--primary::before {
    display: none;
  }
}


/* --------------------------------------------------------------------------
   PILLS & BADGES — Achromatic
   -------------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
}

.pill--primary {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
}

.badge--primary {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge--clay {
  /* DEPRECATED — keep achromatic */
  background: var(--primary-subtle);
  color: var(--on-surface-muted);
}

.badge--stone {
  background: var(--primary-subtle);
  color: var(--on-surface-muted);
}


/* --------------------------------------------------------------------------
   SECTION HEADERS — DM Serif Display + DM Mono eyebrow
   -------------------------------------------------------------------------- */

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: var(--primary);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h2);
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
  color: var(--on-surface);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: var(--text-body-lg);
  color: var(--on-surface-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: var(--lh-relaxed);
}


/* --------------------------------------------------------------------------
   STORE BADGES
   -------------------------------------------------------------------------- */

.store-badge {
  display: inline-block;
  transition: transform var(--duration-short) var(--ease-default);
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge img {
  height: 44px;
  width: auto;
  max-width: 160px;
  display: block;
}


/* --------------------------------------------------------------------------
   IPHONE FRAME — Dynamic Island, real screenshots
   -------------------------------------------------------------------------- */

.iphone-frame {
  position: relative;
  display: inline-block;
}

.iphone-frame__body {
  width: 280px;
  aspect-ratio: 390 / 844;
  background: #080A08;
  border-radius: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.8),
    0 48px 96px rgba(0, 0, 0, 0.7),
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

/* Dynamic Island */
.iphone-frame__island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 33%;
  height: 4.4%;
  background: #000000;
  border-radius: var(--radius-full);
  z-index: 10;
}

.iphone-frame__screen {
  position: absolute;
  inset: 0;
  border-radius: 43px;
  overflow: hidden;
}

.iphone-frame__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Reflejo lateral especular */
.iphone-frame::after {
  content: '';
  position: absolute;
  top: 8%;
  right: -1px;
  width: 3px;
  height: 60%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.06) 30%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 70%,
    transparent
  );
  border-radius: var(--radius-full);
  pointer-events: none;
}

/* Subtle shadow glow bajo el frame — achromático */
.iphone-frame::before {
  content: '';
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 48px;
  background: radial-gradient(ellipse, rgba(242, 245, 243, 0.07), transparent 70%);
  filter: blur(14px);
  pointer-events: none;
  z-index: -1;
}

/* Variantes de tamaño */
.iphone-frame--hero .iphone-frame__body    { width: 260px; }
.iphone-frame--showcase .iphone-frame__body { width: 300px; }
.iphone-frame--duo .iphone-frame__body      { width: 240px; }


/* --------------------------------------------------------------------------
   CHECK ICON — Achromatic circle
   -------------------------------------------------------------------------- */

.check-icon {
  color: var(--primary);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}


/* --------------------------------------------------------------------------
   TRUST LOGOS
   -------------------------------------------------------------------------- */

.trust-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--on-surface-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  opacity: 0.5;
  transition: opacity var(--duration-medium) var(--ease-default);
}

.trust-logo:hover {
  opacity: 0.9;
}


/* --------------------------------------------------------------------------
   LEGACY: phone-mockup preserved for backward compatibility
   -------------------------------------------------------------------------- */

.phone-mockup {
  position: relative;
  display: inline-block;
}

.phone-mockup__frame {
  width: 280px;
  height: 580px;
  background: var(--surface-container);
  border-radius: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
}

.phone-mockup__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 36px;
  background: #000;
  border-radius: 18px;
  z-index: 2;
}

.phone-mockup__screen {
  width: 100%;
  height: 100%;
  background: var(--scaffold);
  overflow: hidden;
}

.phone-mockup__glow {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 60px;
  background: radial-gradient(ellipse, oklch(0.97 0.003 75 / 0.10), transparent 70%);
  filter: blur(16px);
  pointer-events: none;
}


/* --------------------------------------------------------------------------
   STICKY MOBILE CTA — Only visible on mobile, after user scrolls past hero
   -------------------------------------------------------------------------- */

.sticky-cta {
  display: none; /* Mobile-only, toggled by responsive.css */
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  padding: 12px 14px 12px 18px;
  background: oklch(0.14 0 0 / 0.88);
  border: 1px solid oklch(0.97 0.003 75 / 0.10);
  border-radius: var(--radius-full);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.05) inset,
    0 2px 8px oklch(0 0 0 / 0.30),
    0 16px 48px oklch(0 0 0 / 0.40);
  transform: translateY(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--duration-long) var(--ease-default),
    opacity var(--duration-long) var(--ease-default);
}

.sticky-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sticky-cta__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sticky-cta__label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--on-surface);
  letter-spacing: -0.005em;
}

.sticky-cta__sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--on-surface-faint);
}

.sticky-cta__btn {
  flex-shrink: 0;
  padding: 10px 20px;
}

@media (max-width: 768px) {
  .sticky-cta {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta {
    transition: opacity var(--duration-medium) linear;
    transform: none;
  }
}
