/* ═══════════════════════════════════════════════════════════════════════════
   NATIONAL LIVERY COMPANY - STYLES
   A contemporary, minimal dark-mode link-in-bio design
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   CSS VARIABLES
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --color-bg: #0c0c0c;
  --color-grid: #333333;
  --color-text: #e0e0e0;
  --color-text-muted: #888888;
  --color-border: #333333;
  --color-border-hover: #505050;
  --color-bg-hover: #141414;

  /* Typography */
  --font-display: 'neue-haas-grotesk-display', 'Helvetica Neue', 'Helvetica', sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --content-max-width: 480px;
  --content-padding: 24px;
  --button-gap: 16px;
  --section-gap: 40px;

  /* Animation */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  position: relative;
  font-family: var(--font-mono);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

html, body {
  height: 100%;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GRID BACKGROUND
   ───────────────────────────────────────────────────────────────────────────── */
.grid-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.grid-background svg {
  display: block;
}

/* Grid line styles */
.grid-line {
  stroke: var(--color-grid);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* Plus sign at intersections */
.grid-plus {
  stroke: var(--color-grid);
  stroke-width: 2;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
}

/* Grid animation - subtle pulse on intersections */
@keyframes gridPulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

.grid-plus.animated {
  animation: gridPulse 4s ease-in-out infinite;
}

/* Staggered animation delays for plus signs */
.grid-plus.animated.delay-1 { animation-delay: 0.1s; }
.grid-plus.animated.delay-2 { animation-delay: 0.3s; }
.grid-plus.animated.delay-3 { animation-delay: 0.5s; }
.grid-plus.animated.delay-4 { animation-delay: 0.7s; }
.grid-plus.animated.delay-5 { animation-delay: 0.9s; }
.grid-plus.animated.delay-6 { animation-delay: 1.1s; }
.grid-plus.animated.delay-7 { animation-delay: 1.3s; }
.grid-plus.animated.delay-8 { animation-delay: 1.5s; }

/* Disable animation class */
.grid-background.no-animation .grid-plus {
  animation: none;
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CONTENT WRAPPER
   ───────────────────────────────────────────────────────────────────────────── */
.content-wrapper {
  position: relative;
  z-index: 1;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--section-gap) var(--content-padding);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────────────────────────────── */
.header {
  text-align: center;
  margin-bottom: var(--section-gap);
}

/* Logo */
.logo {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

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

/* ─────────────────────────────────────────────────────────────────────────────
   SOCIAL ICONS
   ───────────────────────────────────────────────────────────────────────────── */
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.1s forwards;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.social-icon:hover {
  opacity: 0.7;
  transform: translateY(-2px);
}

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

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTONS CONTAINER
   ───────────────────────────────────────────────────────────────────────────── */
.buttons-container {
  display: flex;
  flex-direction: column;
  gap: var(--button-gap);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTON LINKS
   ───────────────────────────────────────────────────────────────────────────── */
.button-link {
  display: block;
  width: 100%;
  padding: 20px 24px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base),
    transform var(--transition-fast);
  cursor: pointer;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

/* Staggered button animations */
.button-link:nth-child(1) { animation-delay: 0.2s; }
.button-link:nth-child(2) { animation-delay: 0.3s; }
.button-link:nth-child(3) { animation-delay: 0.4s; }
.button-link:nth-child(4) { animation-delay: 0.5s; }
.button-link:nth-child(5) { animation-delay: 0.6s; }
.button-link:nth-child(6) { animation-delay: 0.7s; }

.button-link:hover {
  border-color: var(--color-border-hover);
  background-color: var(--color-bg-hover);
}

.button-link:active {
  transform: scale(0.995);
}

/* Non-clickable button containers (with embeds) */
div.button-link {
  cursor: default;
}

div.button-link:active {
  transform: none;
}

/* Button alignment options */
.buttons-container.align-center .button-link {
  text-align: center;
}

.buttons-container.align-left .button-link {
  text-align: left;
}

/* Button title */
.button-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 0;
}

.button-link.has-description .button-title {
  margin-bottom: 6px;
}

/* Button description */
.button-description {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

/* Button image */
.button-image {
  width: 100%;
  height: auto;
  margin-top: 12px;
  display: block;
  opacity: 0.9;
  transition: opacity var(--transition-base);
}

/* First image gets more top margin */
.button-image:first-of-type {
  margin-top: 16px;
}

.button-link:hover .button-image {
  opacity: 1;
}

/* X/Twitter Embed */
.x-embed-container {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.x-embed-container .twitter-tweet {
  margin: 0 !important;
}

/* Style the embed iframe once loaded */
.x-embed-container .twitter-tweet-rendered {
  max-width: 100% !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  margin-top: auto;
  padding-top: var(--section-gap);
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.8s forwards;
}

.footer-email {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: opacity var(--transition-fast);
  position: relative;
}

.footer-email::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--color-text);
  opacity: 0;
  transform: scaleX(0);
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.footer-email:hover {
  opacity: 0.8;
}

.footer-email:hover::after {
  opacity: 0.5;
  transform: scaleX(1);
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────────────────────────── */

/* Tablet and below */
@media (max-width: 768px) {
  :root {
    --content-padding: 20px;
    --section-gap: 32px;
  }

  .social-icons {
    gap: 24px;
  }

  .social-icon svg {
    width: 22px;
    height: 22px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --content-padding: 16px;
    --section-gap: 28px;
    --button-gap: 12px;
  }

  .logo {
    margin-bottom: 24px;
  }

  .button-link {
    padding: 18px 20px;
  }

  .button-title {
    font-size: 0.9375rem;
  }

  .button-description {
    font-size: 0.75rem;
  }

  .footer-email {
    font-size: 0.8125rem;
  }
}

/* Small mobile */
@media (max-width: 360px) {
  :root {
    --content-padding: 12px;
  }

  .button-link {
    padding: 16px;
  }
}

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

  .grid-plus.animated {
    animation: none;
    opacity: 1;
  }
}
