/* ── Design Tokens ──────────────────────────────────────────────── */

:root {
  --bg-deep: #020b14;
  --bg-panel: rgba(7, 18, 31, 0.92);
  --bg-panel-strong: rgba(5, 14, 24, 0.96);
  --bg-card: rgba(10, 24, 39, 0.82);
  --border: rgba(108, 244, 255, 0.18);
  --border-strong: rgba(108, 244, 255, 0.35);
  --text-main: #e8f6ff;
  --text-muted: #94b4c7;
  --text-dim: #6e8ea3;
  --accent-a: #6cf4ff;
  --accent-b: #62ffc7;
  --shadow-card: 0 40px 100px rgba(0, 0, 0, 0.65),
    0 16px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(108, 244, 255, 0.12),
    0 0 80px rgba(108, 244, 255, 0.1);
  --shadow-card-hover: 0 48px 110px rgba(0, 0, 0, 0.7),
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(108, 244, 255, 0.2),
    0 0 100px rgba(108, 244, 255, 0.15);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-normal: 220ms var(--ease-out);
  --transition-slow: 350ms var(--ease-out);
}

/* ── Reset & Base ──────────────────────────────────────────────── */

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  font-family: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

/* ── Full-bleed Background ─────────────────────────────────────── */

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 10%, rgba(108, 244, 255, 0.14), transparent),
    radial-gradient(ellipse 60% 50% at 90% 90%, rgba(98, 255, 199, 0.1), transparent);
  pointer-events: none;
}

/* ── Buttons ───────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.78rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-normal),
    opacity var(--transition-fast);
}

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

.button:active {
  transform: translateY(0);
  transition-duration: 60ms;
}

.button:focus-visible {
  outline: 2px solid var(--accent-a);
  outline-offset: 3px;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #062531;
  box-shadow: 0 6px 20px rgba(98, 255, 199, 0.2), 0 2px 6px rgba(98, 255, 199, 0.1);
}

.button-primary:hover {
  box-shadow: 0 10px 32px rgba(98, 255, 199, 0.3), 0 4px 10px rgba(98, 255, 199, 0.15);
}

.button-primary:active {
  box-shadow: 0 4px 12px rgba(98, 255, 199, 0.15);
}

.button-secondary {
  border-color: rgba(108, 244, 255, 0.35);
  background: rgba(108, 244, 255, 0.06);
  color: var(--text-main);
}

.button-secondary:hover {
  border-color: rgba(108, 244, 255, 0.55);
  background: rgba(108, 244, 255, 0.12);
  box-shadow: 0 4px 16px rgba(108, 244, 255, 0.08);
}

.button-secondary:active {
  background: rgba(108, 244, 255, 0.16);
}

.button-compact {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

/* ── Brand Mark ────────────────────────────────────────────────── */

.brand-mark {
  position: fixed;
  left: 50%;
  top: clamp(1.5rem, 6vh, 3.5rem);
  z-index: 5;
  width: min(200px, 38vw);
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.65));
  transition: opacity var(--transition-slow);
}

/* ── Landing Page ──────────────────────────────────────────────── */

.landing-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 5rem 1.25rem 3rem;
}

.hero-card {
  width: min(880px, 94vw);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--bg-panel-strong);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  animation: card-enter 0.6s var(--ease-out) both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
}

.hero-art {
  position: relative;
  height: 340px;
  overflow: hidden;
  background: rgba(6, 20, 33, 0.92);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-panel-strong) 0%, transparent 30%);
  pointer-events: none;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
}

.hero-body {
  padding: 1.75rem 2rem 2rem;
}

.hero-copy,
.muted-copy,
.presskit-header p,
.feature-list,
.result-banner,
.empty-state p {
  color: var(--text-muted);
}

.hero-copy {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.65;
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.hero-gallery img {
  aspect-ratio: 16 / 10;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  object-fit: cover;
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-normal);
  cursor: pointer;
}

.hero-gallery img:hover {
  border-color: rgba(108, 244, 255, 0.45);
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Press Kit Shell ───────────────────────────────────────────── */

.presskit-shell {
  width: min(1100px, 96vw);
  margin: 2.5rem auto;
  padding: 0 0 3rem;
}

.presskit-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  animation: card-enter 0.5s var(--ease-out) both;
}

/* ── Press Kit Header ──────────────────────────────────────────── */

.presskit-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.presskit-brand {
  display: flex;
  gap: 1.1rem;
  align-items: center;
}

.presskit-brand img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  object-fit: cover;
}

.presskit-header h1 {
  margin: 0;
}

.presskit-header p {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
}

.text-link {
  color: var(--accent-a);
  font-weight: 700;
  font-size: 0.92rem;
  transition: opacity var(--transition-fast);
}

.text-link:hover {
  opacity: 0.8;
}

/* ── Press Kit Content Blocks ──────────────────────────────────── */

.presskit-copy-block,
.asset-section {
  margin-top: 2rem;
}

.copy-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.copy-head h2 {
  margin: 0;
}

.copy-head p {
  margin: 0.5rem 0 0;
}

.copy-button {
  align-self: center;
}

.copy-field {
  width: 100%;
  margin-top: 0.9rem;
  border: 1px solid rgba(108, 244, 255, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(5, 14, 24, 0.72);
  color: var(--text-main);
  padding: 1rem 1.1rem;
  line-height: 1.7;
  resize: vertical;
}

.copy-field:focus {
  outline: 2px solid rgba(108, 244, 255, 0.35);
  outline-offset: 2px;
}

.feature-list {
  margin: 0.6rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.85;
}

.feature-list li + li {
  margin-top: 0.15rem;
}

/* ── Toolbar & Search ──────────────────────────────────────────── */

.presskit-toolbar {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.toolbar-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-form {
  flex: 1 1 360px;
}

.filter-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.filter-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-form input {
  flex: 1 1 280px;
  width: 100%;
  border: 1px solid rgba(108, 244, 255, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(5, 14, 24, 0.88);
  color: var(--text-main);
  padding: 0.78rem 1.1rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-normal);
}

.filter-form input::placeholder {
  color: var(--text-dim);
}

.filter-form input:focus {
  border-color: rgba(108, 244, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(108, 244, 255, 0.07), 0 0 20px rgba(108, 244, 255, 0.06);
}

/* ── Asset Sections ────────────────────────────────────────────── */

.asset-sections {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.section-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.section-heading h2 {
  margin: 0;
}

.result-banner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border: 1px solid rgba(108, 244, 255, 0.15);
  border-radius: var(--radius-pill);
  background: rgba(108, 244, 255, 0.04);
  padding: 0.7rem 1.15rem;
  font-size: 0.92rem;
}

.result-banner a {
  color: var(--accent-a);
  font-weight: 700;
}

/* ── Asset Grid ────────────────────────────────────────────────── */

.asset-grid {
  display: grid;
  gap: 0.85rem;
}

.asset-grid-single {
  grid-template-columns: 1fr;
}

.asset-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.asset-grid-logo {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ── Asset Cards ───────────────────────────────────────────────── */

.asset-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-normal), transform var(--transition-fast);
}

.asset-card:hover {
  border-color: rgba(108, 244, 255, 0.4);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(108, 244, 255, 0.08);
  transform: translateY(-2px);
}

.asset-preview {
  display: block;
  overflow: hidden;
}

.asset-preview img {
  width: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.asset-card:hover .asset-preview img {
  transform: scale(1.04);
}

.asset-preview-featured img {
  aspect-ratio: 616 / 353;
}

.asset-preview-wide img {
  aspect-ratio: 16 / 9;
}

.asset-preview-logo {
  background: #081727;
}

.asset-preview-logo img {
  aspect-ratio: 1;
}

.asset-image-contain {
  padding: 1rem;
  object-fit: contain !important;
}

.asset-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(108, 244, 255, 0.08);
}

.asset-download {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(108, 244, 255, 0.35);
  border-radius: var(--radius-pill);
  background: rgba(108, 244, 255, 0.06);
  padding: 0.38rem 0.72rem;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.asset-download:hover {
  border-color: rgba(108, 244, 255, 0.55);
  background: rgba(108, 244, 255, 0.12);
}

/* ── Palette Grid ──────────────────────────────────────────────── */

.palette-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.palette-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(18, 28, 42, 0.96), rgba(8, 17, 29, 0.96));
  padding: 0;
  width: 100%;
  color: var(--text-main);
  text-align: left;
  transition: border-color var(--transition-fast), box-shadow var(--transition-normal), transform var(--transition-fast);
}

.palette-card:hover {
  border-color: rgba(108, 244, 255, 0.4);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.palette-swatch {
  height: 100px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: height var(--transition-normal);
}

.palette-card:hover .palette-swatch {
  height: 108px;
}

.palette-meta-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem 0.85rem;
}

.palette-meta-block strong {
  font-size: 0.9rem;
}

.palette-hint {
  margin-top: 0.2rem;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.palette-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.palette-value-input {
  width: 8.5rem;
  border: 1px solid rgba(108, 244, 255, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(5, 14, 24, 0.88);
  color: var(--text-muted);
  padding: 0.55rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.palette-value-input:focus {
  outline: 2px solid rgba(108, 244, 255, 0.35);
  outline-offset: 2px;
}

/* ── Empty State ───────────────────────────────────────────────── */

.empty-state {
  border: 1px dashed rgba(108, 244, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  background: rgba(7, 18, 31, 0.5);
}

.empty-state h2 {
  margin: 0 0 0.5rem;
}

.empty-state p {
  margin: 0;
}

/* ── Responsive: Tablet ────────────────────────────────────────── */

@media (max-width: 1000px) {
  .palette-grid,
  .asset-grid-wide,
  .asset-grid-logo {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .presskit-brand img {
    width: 60px;
    height: 60px;
  }
}

/* ── Responsive: Mobile Landscape / Small Tablet ───────────────── */

@media (max-width: 700px) {
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.1rem; }

  .brand-mark {
    top: 0.75rem;
    width: min(180px, 40vw);
  }

  .landing-shell {
    display: block;
    padding: 0;
  }

  .hero-card {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .hero-art {
    height: 260px;
    margin-top: 4.5rem;
  }

  .hero-body {
    padding: 1.25rem 1.25rem 2rem;
  }

  .hero-gallery {
    display: none;
  }

  .presskit-shell {
    width: 100%;
    margin: 0;
  }

  .presskit-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 1.25rem;
    min-height: 100vh;
  }

  .palette-grid,
  .asset-grid-wide,
  .asset-grid-logo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .palette-swatch {
    height: 80px;
  }

  .palette-card:hover .palette-swatch {
    height: 84px;
  }
}

/* ── Responsive: Small Phone ───────────────────────────────────── */

@media (max-width: 520px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button,
  .toolbar-actions .button,
  .filter-row .button,
  .copy-head .button,
  .section-heading .button {
    width: 100%;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .button {
    flex: 1;
  }

  .filter-row > * {
    width: 100%;
  }

  .palette-grid,
  .asset-grid-wide,
  .asset-grid-logo {
    grid-template-columns: 1fr;
  }

  .palette-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .palette-actions .button {
    width: 100%;
  }

  .palette-value-input {
    width: 100%;
    text-align: left;
  }

  .presskit-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .presskit-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Accessibility: Reduced Motion ─────────────────────────────── */

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