:root {
  --background: #09090b;
  --surface: #111114;
  --surface-hover: #18181c;
  --border: #27272a;

  --text: #f4f4f5;
  --muted: #a1a1aa;

  --accent: #ffffff;
  --accent-text: #09090b;

  --max-width: 1150px;
}

[data-theme="light"] {
  --background: #f8f8f8;
  --surface: #ffffff;
  --surface-hover: #f1f1f1;
  --border: #dedede;

  --text: #18181b;
  --muted: #66666f;

  --accent: #18181b;
  --accent-text: #ffffff;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  background: var(--background);
  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.6;
}

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

button,
input {
  font: inherit;
}

/* Layout */
.container {
  width: min(
    calc(100% - 40px),
    var(--max-width)
  );

  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;

  border-bottom: 1px solid var(--border);

  background: rgba(9, 9, 11, 0.85);

  backdrop-filter: blur(16px);
}

[data-theme="light"] .site-header {
  background: rgba(248, 248, 248, 0.88);
}

.header-inner {
  min-height: 70px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;

  gap: 10px;

  font-size: 1rem;
  font-weight: 700;

  letter-spacing: -0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);

  font-size: 0.8rem;
}

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

.nav a {
  color: var(--muted);

  font-size: 0.9rem;
  font-weight: 500;

  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.nav a:hover {
  color: var(--text);
}

.theme-toggle {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);
  color: var(--text);

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.theme-toggle:hover {
  background: var(--surface-hover);
}

/* Hero */
.hero {
  padding: 120px 0 100px;

  border-bottom: 1px solid var(--border);
}

.hero-content {
  max-width: 850px;

  text-align: center;
}

.eyebrow {
  display: inline-block;

  margin-bottom: 18px;

  color: var(--muted);

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 800px;

  margin: 0 auto;

  font-size: clamp(
    3rem,
    8vw,
    6rem
  );

  line-height: 0.98;

  letter-spacing: -0.065em;
}

.hero h1 span {
  color: var(--muted);
}

.hero-description {
  max-width: 650px;

  margin: 28px auto 0;

  color: var(--muted);

  font-size: 1.05rem;
}

/* Search */
.search-box {
  max-width: 680px;

  display: flex;

  margin: 38px auto 0;

  border: 1px solid var(--border);
  border-radius: 12px;

  overflow: hidden;

  background: var(--surface);
}

.search-box input {
  min-width: 0;
  flex: 1;

  padding: 16px 18px;

  border: 0;
  outline: 0;

  background: transparent;
  color: var(--text);

  font-size: 0.95rem;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box button {
  padding: 0 22px;

  border: 0;
  border-left: 1px solid var(--border);

  background: var(--accent);
  color: var(--accent-text);

  font-weight: 700;

  cursor: pointer;

  transition: opacity 0.2s ease;
}

.search-box button:hover {
  opacity: 0.85;
}

/* Sections */
.section {
  padding: 90px 0;
}

.section-header {
  margin-bottom: 35px;
}

.section-header.centered {
  text-align: center;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);

  line-height: 1.1;

  letter-spacing: -0.045em;
}

.section-header p {
  max-width: 620px;

  margin-top: 12px;

  color: var(--muted);
}

.centered p {
  margin-left: auto;
  margin-right: auto;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;

  gap: 30px;
}

.section-heading-row > a {
  flex-shrink: 0;

  color: var(--muted);

  font-size: 0.9rem;
  font-weight: 600;

  transition: color 0.2s ease;
}

.section-heading-row > a:hover {
  color: var(--text);
}

/* App cards */
.app-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 18px;
}

.app-card {
  min-height: 180px;

  padding: 24px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  gap: 28px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--surface);

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);

  background: var(--surface-hover);
}

.app-icon {
  width: 88px;
  height: 88px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--background);

  font-size: 1.25rem;
  font-weight: 800;
}

.app-info h3 {
  font-size: 1.1rem;
}

.app-info p {
  margin-top: 5px;

  color: var(--muted);

  font-size: 0.88rem;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;

  margin-top: 14px;
}

.app-meta span {
  padding: 4px 8px;

  border: 1px solid var(--border);
  border-radius: 6px;

  color: var(--muted);

  font-size: 0.72rem;
}

/* Explore */
.explore-section {
  padding-top: 20px;
}

.explore-card {
  padding: 40px;

  display: grid;
  grid-template-columns: 1fr auto;

  align-items: center;

  gap: 30px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--surface);
}

.explore-card h2 {
  font-size: clamp(2rem, 4vw, 3rem);

  line-height: 1.05;

  letter-spacing: -0.05em;
}

.explore-card p {
  margin-top: 10px;

  color: var(--muted);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;

  padding: 0 20px;

  border: 0;
  border-radius: 9px;

  background: var(--accent);
  color: var(--accent-text);

  font-size: 0.9rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.primary-button:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.explore-result {
  grid-column: 1 / -1;

  padding: 24px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--background);
}

.explore-result[hidden] {
  display: none;
}

.result-label {
  color: var(--muted);

  font-size: 0.7rem;
  font-weight: 700;

  letter-spacing: 0.12em;
}

.explore-result h3 {
  margin-top: 8px;

  font-size: 1.5rem;
}

.explore-result p {
  margin-top: 5px;
}

/* Platforms */
.platforms-section {
  border-top: 1px solid var(--border);
}

.platform-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 18px;
}

.platform-card {
  min-height: 210px;

  padding: 28px 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--surface);

  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.platform-card:hover {
  transform: translateY(-3px);

  background: var(--surface-hover);
}

.platform-icon {
  width: 82px;
  height: 82px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 18px;
}

.platform-icon img {
  display: block;

  width: 72px;
  height: 72px;

  object-fit: contain;
}

.platform-card h3 {
  font-size: 1rem;
}

.platform-card p {
  margin-top: 5px;

  color: var(--muted);

  font-size: 0.78rem;
}

.trademark-notice {
  max-width: 850px;

  margin: 28px auto 0;

  color: var(--muted);

  font-size: 0.75rem;

  line-height: 1.7;

  text-align: center;
}

/* Submit */
.submit-card {
  padding: 40px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--surface);
}

.submit-card h2 {
  font-size: clamp(2rem, 4vw, 3rem);

  line-height: 1.05;

  letter-spacing: -0.05em;
}

.submit-card p {
  max-width: 600px;

  margin-top: 10px;

  color: var(--muted);
}

/* About */
.about-section {
  border-top: 1px solid var(--border);
}

/* Footer */
.site-footer {
  padding: 55px 0 25px;

  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: start;
  justify-content: space-between;

  gap: 30px;
}

.footer-inner strong {
  font-size: 0.95rem;
}

.footer-inner p {
  margin-top: 5px;

  color: var(--muted);

  font-size: 0.82rem;
}

.footer-creator {
  display: flex;
  flex-direction: column;

  text-align: right;
}

.footer-creator span {
  color: var(--muted);

  font-size: 0.75rem;
}

.footer-creator a {
  margin-top: 3px;

  color: var(--muted);

  font-size: 0.8rem;

  transition: color 0.2s ease;
}

.footer-creator a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;

  border-top: 1px solid var(--border);

  color: var(--muted);

  font-size: 0.72rem;
}

/* Responsive */
@media (max-width: 900px) {
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .explore-card {
    grid-template-columns: 1fr;
  }

  .submit-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .header-inner {
    flex-direction: column;
    justify-content: center;

    padding: 14px 0;
  }

  .nav {
    width: 100%;

    justify-content: center;

    flex-wrap: wrap;

    gap: 14px;
  }

  .hero {
    padding: 85px 0 75px;
  }

  .section {
    padding: 70px 0;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-creator {
    text-align: left;
  }
}

@media (max-width: 500px) {
  .container {
    width: min(
      calc(100% - 28px),
      var(--max-width)
    );
  }

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

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    min-height: 48px;

    border-left: 0;
    border-top: 1px solid var(--border);
  }

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

  .explore-card,
  .submit-card {
    padding: 26px;
  }
}