/* ========== $freg — freg is life ========== */
:root {
  --bg: #0a120e;
  --bg-elevated: #111c15;
  --bg-card: #15241b;
  --border: rgba(120, 220, 140, 0.14);
  --border-strong: rgba(120, 220, 140, 0.32);
  --text: #e8f5e9;
  --text-muted: #8aa892;
  --accent: #7dff8a;
  --accent-dim: #3dba55;
  --accent-glow: rgba(125, 255, 138, 0.25);
  --warm: #e8c070;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Bangers", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --header-h: 64px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: #b8ffbf;
}

/* backgrounds */
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  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");
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 70% 10%, rgba(61, 186, 85, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 35% at 15% 60%, rgba(125, 255, 138, 0.06), transparent 55%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(80, 140, 100, 0.08), transparent 50%);
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: rgba(10, 18, 14, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.logo:hover {
  color: var(--accent);
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav a:hover {
  color: var(--text);
  background: rgba(125, 255, 138, 0.08);
}

.nav-cta {
  color: var(--bg) !important;
  background: var(--accent) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: #b8ffbf !important;
  color: var(--bg) !important;
}

.x-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.x-link:hover {
  color: var(--accent);
  border-color: var(--border-strong);
}

/* hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 72px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  font-weight: 400;
}

.accent {
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 38ch;
  margin-bottom: 28px;
}

.hero-sub strong {
  color: var(--accent);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #061008;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
  background: #b8ffbf;
  color: #061008;
  box-shadow: 0 0 28px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: rgba(125, 255, 138, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.ca-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-width: 100%;
  margin-bottom: 14px;
}

.ca-bar-center {
  justify-content: center;
  margin: 20px auto 0;
  max-width: 560px;
}

.ca-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(125, 255, 138, 0.12);
  padding: 4px 8px;
  border-radius: 6px;
}

.ca-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.btn-copy {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.btn-copy:hover,
.btn-copy.copied {
  background: var(--accent);
  color: #061008;
  border-color: var(--accent);
}

.hero-links {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-links .dot {
  margin: 0 6px;
  opacity: 0.4;
}

/* hero art */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-frame {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 1;
  border-radius: 28px;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 80px var(--accent-glow);
  background: #2a2a2a;
}

.hero-freg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #061008;
  padding: 6px 14px;
  border-radius: 999px;
  transform: rotate(-4deg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.float-card {
  position: absolute;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: float 5s ease-in-out infinite;
}

.float-1 {
  top: 8%;
  left: -4%;
  animation-delay: 0s;
  color: var(--accent);
}

.float-2 {
  top: 42%;
  right: -8%;
  animation-delay: -1.5s;
  color: var(--warm);
}

.float-3 {
  bottom: 12%;
  left: -2%;
  animation-delay: -3s;
}

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

/* sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: 0.03em;
  font-weight: 400;
  margin-bottom: 10px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* about cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  font-weight: 400;
  margin-bottom: 10px;
  color: var(--accent);
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.g-item {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: default;
}

.g-item:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.g-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.g-item figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 8px 10px 10px;
  text-align: center;
}

/* pfp lab */
.pfp-lab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.pfp-preview-wrap {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#pfp-canvas {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  border-radius: 20px;
  border: 2px solid var(--border-strong);
  background: #1a1a1a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px var(--accent-glow);
  image-rendering: auto;
}

.pfp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 480px;
}

.pfp-controls {
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.control-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 10px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip.active {
  background: rgba(125, 255, 138, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.chip.chip-swatch {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  position: relative;
}

.chip.chip-swatch.active::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.chip.chip-thumb {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.chip.chip-thumb.active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
}

.select:focus {
  border-color: var(--accent);
}

/* cta */
.cta-section {
  padding-bottom: 80px;
}

.cta-box {
  text-align: center;
  background:
    linear-gradient(135deg, rgba(125, 255, 138, 0.08), transparent 50%),
    var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 48px 32px;
}

.cta-freg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  border: 3px solid var(--border-strong);
  box-shadow: 0 0 30px var(--accent-glow);
}

.cta-box h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: 0.03em;
  font-weight: 400;
  margin-bottom: 8px;
}

.cta-box > p {
  color: var(--text-muted);
  margin-bottom: 22px;
}

.cta-box .hero-actions {
  justify-content: center;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.03em;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: #061008;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* responsive */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 36px;
    text-align: center;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .ca-bar {
    justify-content: center;
  }

  .hero-art {
    order: -1;
  }

  .float-card {
    display: none;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pfp-lab {
    grid-template-columns: 1fr;
  }

  .pfp-preview-wrap {
    position: static;
    align-items: center;
  }

  .pfp-actions {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 3rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
