/* ============================================
   MyLinks — Bold Redesign
   Editorial Warmth × Confident Scale
   ============================================ */

/* --- Geist Pixel Font (self-hosted, OFL license) --- */
@font-face {
  font-family: 'Geist Pixel Square';
  src: url('../assets/fonts/GeistPixel-Square.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Pixel Grid';
  src: url('../assets/fonts/GeistPixel-Grid.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Warm stone palette — amplified */
  --bg: oklch(95.5% 0.010 65);
  --bg-subtle: oklch(92% 0.014 65);
  --surface: oklch(98.5% 0.005 65);
  --border: oklch(86% 0.018 65);
  --border-light: oklch(90% 0.012 65);

  /* Text — warm tinted, higher contrast */
  --text-primary: oklch(15% 0.020 50);
  --text-secondary: oklch(38% 0.025 50);
  --text-muted: oklch(52% 0.018 50);

  /* Accent — burnt vermillion (hotter, deeper) */
  --accent: oklch(46% 0.185 25);
  --accent-hover: oklch(40% 0.20 25);
  --accent-subtle: oklch(92% 0.05 25);
  --accent-glow: oklch(46% 0.12 25 / 0.14);

  /* Spacing rhythm — 8px base, with dramatic jumps */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 80px;

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --container-max: 520px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.55;
  position: relative;
}

/* Subtle warm radial glow behind content */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 70%;
  background: radial-gradient(
    ellipse at center,
    oklch(93% 0.025 40 / 0.5) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
  z-index: 9999;
}

/* --- Share Button --- */
.share-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease,
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px oklch(0% 0 0 / 0.06);

  opacity: 0;
  animation: fadeUp 0.4s ease 0.3s forwards;
}

.share-btn:hover {
  background: var(--bg-subtle);
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.08);
}

.share-btn:active {
  transform: scale(0.95);
}

/* --- Share Dropdown --- */
.share-dropdown {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 100;
  width: 220px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: 0 8px 32px oklch(0% 0 0 / 0.1),
              0 2px 8px oklch(0% 0 0 / 0.05);

  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.2s ease,
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.share-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.share-dropdown[hidden] {
  display: none;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.share-option:hover {
  background: var(--bg-subtle);
}

.share-option:active {
  background: var(--border-light);
}

.share-option svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.share-option .copied-text {
  color: var(--accent);
  font-weight: 600;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-xl);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* --- Profile — The Hero Moment --- */
.profile {
  text-align: center;
  margin-bottom: var(--space-lg);

  opacity: 0;
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.avatar-wrapper {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-lg);
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}

.avatar:hover {
  transform: scale(1.08) rotate(-3deg);
  border-color: var(--accent);
}

.profile-name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 3.8rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1.05;
  margin-bottom: 6px;
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 144;
}

.profile-bio {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --- Social Icons --- */
.socials {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease,
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.25s ease;

  /* Stagger entrance — set by JS */
  opacity: 0;
  animation: socialPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes socialPop {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.social-icon:hover {
  color: var(--accent);
  transform: scale(1.18);
  background: var(--accent-subtle);
}

.social-icon:active {
  transform: scale(0.95);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* --- Sections --- */
.sections {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  padding-left: 2px;
  /* Decorative left accent bar */
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* --- Link Items — editorial list feel --- */
.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 15px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.2s ease,
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.link-card:hover {
  background: var(--bg-subtle);
  transform: translateX(6px);
}

.link-card:active {
  transform: translateX(6px) scale(0.985);
  background: var(--border-light);
}

/* --- Featured Card — THE Showstopper --- */
.link-card.featured {
  background: var(--surface);
  border: 2.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: var(--space-sm);
  box-shadow: 0 4px 20px var(--accent-glow),
              0 1px 3px oklch(0% 0 0 / 0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.35s ease;
}

/* Warm shimmer line on featured card */
.link-card.featured::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    oklch(95% 0.04 35 / 0.4),
    transparent
  );
  animation: shimmer 3s ease-in-out 1.2s 1 forwards;
  pointer-events: none;
}

@keyframes shimmer {
  0% { left: -50%; }
  100% { left: 150%; }
}

.link-card.featured:hover {
  border-color: var(--accent-hover);
  box-shadow: 0 8px 36px var(--accent-glow),
              0 2px 8px oklch(0% 0 0 / 0.06);
  transform: translateY(-3px) scale(1.01);
}

.link-card.featured:active {
  transform: translateY(0) scale(0.99);
}

.link-card.featured .link-title {
  font-family: 'Geist Pixel Square', monospace;
  color: var(--accent);
  font-weight: normal;
  font-style: normal;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.link-card.featured .link-subtitle {
  color: var(--text-secondary);
}

/* --- Link Content --- */
.link-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 30px;
  text-align: center;
}

.link-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 5px;
}

.link-content {
  flex: 1;
  min-width: 0;
}

.link-title {
  font-size: 0.93rem;
  font-weight: 550;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.link-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

.link-arrow {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease,
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.2s ease;
}

.link-card:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

/* --- Divider between sections --- */
.section-animate + .section-animate {
  border-top: 1px solid oklch(86% 0.025 30 / 0.5);
  padding-top: var(--space-lg);
}

/* --- Stagger entrance --- */
.section-animate {
  opacity: 0;
  animation: sectionSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sectionSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* --- Footer --- */
.footer {
  margin-top: auto;
  padding-top: var(--space-3xl);
  text-align: center;

  opacity: 0;
  animation: fadeUp 0.5s ease 0.8s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.footer-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer-powered {
  display: none;
}

/* --- Responsive --- */
@media (min-width: 640px) {
  .container {
    padding: 64px var(--space-lg) var(--space-2xl);
  }

  .avatar-wrapper {
    width: 108px;
    height: 108px;
  }

  .avatar {
    width: 108px;
    height: 108px;
  }
}

/* Mobile — featured card full-bleed */
@media (max-width: 480px) {
  .link-card.featured {
    margin-left: -6px;
    margin-right: -6px;
    border-radius: var(--radius);
  }

  .profile-name {
    font-size: clamp(2.4rem, 12vw, 3rem);
  }
}

/* --- Selection --- */
::selection {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: oklch(75% 0.03 40);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: oklch(60% 0.05 35);
}

/* ============================================
   Free Drop Landing Page
   ============================================ */

.freedrop-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;

  opacity: 0;
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

/* Brand header */
.freedrop-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-xl);
}

.freedrop-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.freedrop-brand-name {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* Hero section */
.freedrop-hero {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.freedrop-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 8px;
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 144;
}

.freedrop-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Demo image */
.freedrop-image-wrapper {
  width: 100%;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px oklch(0% 0 0 / 0.12),
              0 2px 8px oklch(0% 0 0 / 0.06);
}

.freedrop-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Video player */
.freedrop-video-wrapper {
  width: 100%;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px oklch(0% 0 0 / 0.12),
              0 2px 8px oklch(0% 0 0 / 0.06);
}

.freedrop-video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}

/* YouTube embed — 16:9 responsive */
.freedrop-youtube {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.freedrop-youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Description */
.freedrop-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  text-align: center;
  margin-bottom: var(--space-lg);
  max-width: 420px;
}

/* Bullet list */
.freedrop-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl);
  width: 100%;
  max-width: 360px;
}

.freedrop-bullets li {
  position: relative;
  padding-left: 28px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.5;
}

.freedrop-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 6px;
  width: 20px;
  height: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CTA Button */
.freedrop-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  padding: 16px 32px;
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease,
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease;
  box-shadow: 0 4px 20px var(--accent-glow),
              0 1px 3px oklch(0% 0 0 / 0.08);
}

.freedrop-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 32px var(--accent-glow),
              0 2px 8px oklch(0% 0 0 / 0.1);
}

.freedrop-cta:active {
  transform: translateY(0) scale(0.98);
}

/* Footer in freedrop */
.freedrop-footer {
  margin-top: auto;
  padding-top: var(--space-2xl);
}

/* ============================================
   Geist Pixel — Contextual Overrides
   /typewriter: hero title → Pixel Square
   /ai set: section titles + bio → Pixel Grid
   ============================================ */

/* /typewriter Free Drop hero title */
.freedrop-container .freedrop-title.geist-pixel {
  font-family: 'Geist Pixel Square', monospace;
  font-style: normal;
  font-weight: normal;
  letter-spacing: 0.02em;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.15;
}

/* /ai set — section titles get pixel texture */
body.set-ai .section-title {
  font-family: 'Geist Pixel Grid', monospace;
  font-style: normal;
  font-weight: normal;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}


/* /ai set — bio line gets pixel texture */
body.set-ai .profile-bio {
  font-family: 'Geist Pixel Grid', monospace;
  font-style: normal;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

