/* ═══════════════════════════════════════════════════════════════════════
   PhotoMemory — Encrypted Photo Platform Landing
   Teal/green aesthetic. Photo grid animations. End-to-end encryption.
   ═══════════════════════════════════════════════════════════════════════ */

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

:root {
  /* PhotoMemory brand: teal/green photo */
  --brand: #14b8a6;
  --brand-2: #2dd4bf;
  --brand-3: #5eead4;
  --brand-glow: rgba(20, 184, 166, 0.22);

  --acc-1: #22c55e;
  --acc-2: #38bdf8;
  --acc-3: #f59e0b;

  --bg: #06080d;
  --bg-2: #08101a;
  --s1: #0e1219;
  --s2: #161b27;
  --s3: #1e2436;
  --s4: #2a3148;

  --tx: #f5f7fa;
  --mu: #9aa4b2;
  --dim: #6b7280;

  --bd: rgba(255, 255, 255, 0.06);
  --bd2: rgba(255, 255, 255, 0.12);
  --bd3: rgba(255, 255, 255, 0.18);

  --gn: #22c55e;
  --rd: #ef4444;
  --gd: #fbbf24;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl: 28px;
  --t: .25s cubic-bezier(.4, 0, .2, 1);
  --glass: rgba(14, 18, 25, 0.6);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--tx);
  line-height: 1.6;
  overflow-x: hidden;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  position: relative;
}

.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 30%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.bg-glow-1 {
  position: fixed; top: -200px; left: 50%; transform: translateX(-50%);
  width: 1200px; height: 800px;
  background: radial-gradient(ellipse, rgba(20, 184, 166, 0.14) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
  animation: drift 22s ease-in-out infinite;
}
.bg-glow-2 {
  position: fixed; top: 60%; right: -200px;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.07) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
  animation: drift 28s ease-in-out infinite reverse;
}
@keyframes drift {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(40px); }
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 24px;
  background: rgba(6, 8, 13, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--bd);
  transition: var(--t);
}
.nav.scrolled { padding: 10px 24px; background: rgba(6, 8, 13, 0.92); border-bottom-color: var(--bd2); }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--tx);
}
.nav-logo .logo-icon {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--brand) 0%, var(--acc-1) 100%);
  display: grid; place-items: center;
  color: white; font-size: 16px;
  box-shadow: 0 0 20px var(--brand-glow);
}
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--mu); transition: var(--t); padding: 8px 14px; border-radius: var(--r-sm); }
.nav-link:hover { color: var(--tx); background: var(--s2); }
.nav-cta {
  background: var(--brand); color: white !important;
  padding: 9px 18px !important; font-weight: 600; border-radius: var(--r-sm);
  margin-left: 6px; box-shadow: 0 2px 8px var(--brand-glow); transition: var(--t);
}
.nav-cta:hover { background: var(--brand-2) !important; transform: translateY(-1px); }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  position: relative; overflow: hidden;
}
.hero-content { max-width: 920px; position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(12px);
  border: 1px solid var(--bd2); border-radius: 100px;
  font-size: 12px; font-weight: 600; color: var(--mu);
  margin-bottom: 32px;
  font-family: 'JetBrains Mono', monospace; letter-spacing: 0.5px;
  animation: fadeInUp 0.6s ease;
}
.hero-eyebrow .live-dot {
  position: relative; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 12px var(--brand);
}
.hero-eyebrow .live-dot::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid var(--brand);
  animation: ping 2s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  margin-bottom: 28px; animation: fadeInUp 0.8s ease;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--brand) 0%, var(--acc-1) 50%, var(--brand) 100%);
  background-size: 250% 250%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 8s ease infinite;
}
@keyframes gradient-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--mu); max-width: 720px;
  margin: 0 auto 40px; line-height: 1.6;
  animation: fadeInUp 1s ease;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  animation: fadeInUp 1.2s ease;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: var(--t); border: 1px solid transparent; text-decoration: none;
}
.btn-primary { background: var(--brand); color: white; box-shadow: 0 4px 20px var(--brand-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--brand-glow); background: var(--brand-2); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(12px);
  color: var(--tx); border-color: var(--bd2);
}
.btn-secondary:hover { background: var(--s3); transform: translateY(-2px); border-color: var(--brand); }
.btn-ghost { background: transparent; color: var(--mu); }
.btn-ghost:hover { color: var(--tx); background: var(--s2); }

/* PHOTO MOSAIC HERO ANIMATION */
.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: 70px;
  gap: 8px;
  margin: 50px auto 0;
  max-width: 720px;
  animation: fadeInUp 1.4s ease;
}
.photo-tile {
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--brand) 0%, var(--acc-1) 100%);
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: tile-fade 8s ease-in-out infinite;
}
.photo-tile::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
}
.photo-tile:nth-child(1) { animation-delay: 0s; background: linear-gradient(135deg, #14b8a6, #22c55e); }
.photo-tile:nth-child(2) { animation-delay: 0.2s; grid-row: span 2; background: linear-gradient(135deg, #38bdf8, #14b8a6); }
.photo-tile:nth-child(3) { animation-delay: 0.4s; background: linear-gradient(135deg, #f59e0b, #ef4444); }
.photo-tile:nth-child(4) { animation-delay: 0.6s; background: linear-gradient(135deg, #a855f7, #ec4899); }
.photo-tile:nth-child(5) { animation-delay: 0.8s; grid-column: span 2; background: linear-gradient(135deg, #22c55e, #14b8a6); }
.photo-tile:nth-child(6) { animation-delay: 1s; background: linear-gradient(135deg, #ef4444, #f59e0b); }
.photo-tile:nth-child(7) { animation-delay: 1.2s; background: linear-gradient(135deg, #38bdf8, #a855f7); }
.photo-tile:nth-child(8) { animation-delay: 1.4s; background: linear-gradient(135deg, #14b8a6, #38bdf8); }
.photo-tile:nth-child(9) { animation-delay: 1.6s; background: linear-gradient(135deg, #ec4899, #f59e0b); }
.photo-tile:nth-child(10) { animation-delay: 1.8s; background: linear-gradient(135deg, #22c55e, #38bdf8); }
.photo-tile:nth-child(11) { animation-delay: 2s; grid-row: span 2; background: linear-gradient(135deg, #a855f7, #14b8a6); }
.photo-tile:nth-child(12) { animation-delay: 2.2s; background: linear-gradient(135deg, #f59e0b, #22c55e); }
.photo-tile:nth-child(13) { animation-delay: 2.4s; background: linear-gradient(135deg, #14b8a6, #ec4899); }
.photo-tile:nth-child(14) { animation-delay: 2.6s; background: linear-gradient(135deg, #38bdf8, #ef4444); }
.photo-tile:nth-child(15) { animation-delay: 2.8s; background: linear-gradient(135deg, #22c55e, #a855f7); }
.photo-tile:nth-child(16) { animation-delay: 3s; background: linear-gradient(135deg, #ef4444, #14b8a6); }
@keyframes tile-fade {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* Lock overlay icon */
.photo-mosaic-overlay {
  position: relative;
  margin-top: 50px;
}
.photo-mosaic-overlay .encryption-badge {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--bg);
  border: 1px solid var(--brand);
  border-radius: var(--r-xl);
  padding: 14px 22px;
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700;
  color: var(--brand);
  box-shadow: 0 0 30px var(--brand-glow);
  letter-spacing: 0.5px;
  z-index: 2;
}

/* HERO METRICS */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 60px;
  background: var(--bd);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  overflow: hidden;
  backdrop-filter: blur(8px);
  animation: fadeInUp 1.6s ease;
}
.hero-metric { background: var(--glass); padding: 28px 20px; text-align: center; }
.hero-metric-value {
  font-size: 2.4rem; font-weight: 800;
  background: linear-gradient(135deg, var(--brand) 0%, var(--acc-1) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
  font-family: 'JetBrains Mono', monospace; line-height: 1;
}
.hero-metric-label {
  font-size: 11px; color: var(--mu); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px; margin-top: 8px;
}
.hero-metric-sub { display: block; font-size: 10px; color: var(--dim); margin-top: 4px; }

/* SECTIONS */
.section { padding: 120px 0; position: relative; }
.section-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
}
.section-eyebrow::before { content: '// '; color: var(--mu); opacity: 0.6; }
.section-eyebrow-center { text-align: center; display: block; }
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800;
  letter-spacing: -0.03em; text-align: center;
  margin-bottom: 18px; line-height: 1.05;
}
.section-subtitle {
  font-size: 1.125rem; color: var(--mu);
  text-align: center; max-width: 720px;
  margin: 0 auto 64px; line-height: 1.65;
}

/* FEATURES */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature {
  position: relative; padding: 32px 28px;
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid var(--bd); border-radius: var(--r-xl);
  transition: var(--t); overflow: hidden;
}
.feature::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0; transition: var(--t);
}
.feature:hover { border-color: var(--bd3); transform: translateY(-4px); background: var(--s1); }
.feature:hover::before { opacity: 1; }
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18) 0%, rgba(20, 184, 166, 0.05) 100%);
  display: grid; place-items: center;
  margin-bottom: 24px; font-size: 20px; color: var(--brand);
  border: 1px solid rgba(20, 184, 166, 0.25);
}
.feature h4 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.feature p { color: var(--mu); font-size: 14px; line-height: 1.7; }

/* ENCRYPTION TIMELINE */
.encryption-flow {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  padding: 24px 0;
}
.flow-line {
  position: absolute;
  left: 50%; top: 32px; bottom: 32px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--acc-1) 100%);
  transform: translateX(-50%);
  opacity: 0.3;
}
.flow-step {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 24px;
  position: relative; z-index: 1;
}
.flow-step:nth-child(odd) .flow-card { margin-left: auto; }
.flow-step:nth-child(even) { flex-direction: row-reverse; }
.flow-step:nth-child(even) .flow-card { margin-right: auto; }

.flow-card {
  flex: 0 0 380px;
  padding: 20px 24px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bd2);
  border-radius: var(--r-lg);
}
.flow-card h5 {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700; margin-bottom: 6px;
  color: var(--tx);
}
.flow-card h5 i { color: var(--brand); }
.flow-card p { font-size: 13px; color: var(--mu); line-height: 1.6; }
.flow-card code {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--r-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--brand);
}
.flow-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand-glow);
  flex-shrink: 0;
  position: relative;
}
.flow-dot::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid var(--brand);
  opacity: 0.4;
  animation: ping 3s ease-out infinite;
}

/* TECH BAND */
.tech-band {
  padding: 60px 0;
  border-top: 1px solid var(--bd);
  border-bottom: 1px solid var(--bd);
  background: rgba(0, 0, 0, 0.3);
}
.tech-label {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--mu);
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 32px; font-family: 'JetBrains Mono', monospace;
}
.tech-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; max-width: 900px; margin: 0 auto;
}
.tech-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid var(--bd2);
  border-radius: 100px;
  font-size: 13px; font-weight: 600; color: var(--tx);
  font-family: 'JetBrains Mono', monospace;
  transition: var(--t);
}
.tech-pill:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* CTA */
.cta-band {
  margin: 40px 0 0; padding: 100px 24px; text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(20, 184, 166, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, rgba(34, 197, 94, 0.04) 0%, transparent 100%);
  border-top: 1px solid var(--bd);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.cta-band-content { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.cta-band h2 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 16px; line-height: 1.1;
}
.cta-band h2 .gradient-text {
  background: linear-gradient(135deg, var(--brand) 0%, var(--acc-1) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cta-band p { font-size: 1.15rem; color: var(--mu); margin-bottom: 36px; line-height: 1.6; }

/* FOOTER */
.footer {
  border-top: 1px solid var(--bd);
  padding: 60px 0 32px;
  background: var(--bg-2);
  position: relative; z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand-block { max-width: 320px; }
.footer-brand-block .footer-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; font-weight: 700; font-size: 17px;
}
.footer-brand-block .logo-icon {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--brand) 0%, var(--acc-1) 100%);
  display: grid; place-items: center;
  color: white; font-size: 14px;
}
.footer-brand-block p { color: var(--mu); font-size: 14px; line-height: 1.65; }
.footer-col h5 {
  font-size: 11px; font-weight: 700; color: var(--tx);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 18px; font-family: 'JetBrains Mono', monospace;
}
.footer-col a {
  display: block; color: var(--mu); font-size: 14px;
  padding: 6px 0; transition: var(--t);
}
.footer-col a:hover { color: var(--brand); padding-left: 4px; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--bd);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { color: var(--dim); font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--s2); border: 1px solid var(--bd); border-radius: var(--r-sm);
  color: var(--mu); transition: var(--t);
}
.footer-social a:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand-block { grid-column: 1 / -1; }
  .flow-step { flex-direction: column !important; }
  .flow-card { flex: 1; margin: 0 !important; }
}
@media (max-width: 600px) {
  .nav { padding: 10px 16px; }
  .nav-link:not(.nav-cta) { display: none; }
  .hero { padding: 130px 16px 60px; }
  .section { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .features-grid { grid-template-columns: 1fr; }
  .photo-mosaic { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
