:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #243044;
  --text-muted: #5f6b7a;
  --primary: #1f5ea8;
  --primary-strong: #2a3175;
  --border: #dce6f5;
  --shadow: 0 10px 24px rgba(31, 94, 168, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 250px);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(960px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero {
  padding: 3rem 0 2.5rem;
}

.site-header {
  padding: 1rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-title {
  font-weight: 700;
  color: var(--primary-strong);
  font-size: 1.1rem;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--primary-strong);
}

.hero-text {
  margin: 0;
  max-width: 720px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.content {
  display: grid;
  gap: 1rem;
  padding-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

h2 {
  margin-top: 0;
  color: var(--primary-strong);
}

h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

p,
li {
  color: var(--text);
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-strong);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white !important;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: var(--primary-strong);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--primary-strong);
}

.join-steps {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 1.5rem;
}

.join-steps li {
  padding: 1rem;
  background: rgba(31, 94, 168, 0.03);
  border-radius: 12px;
  border: 1px dashed var(--border);
}

.join-steps li p {
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

ol,
ul {
  padding-left: 1.2rem;
  margin-top: 0.4rem;
}

.footer {
  padding: 0.5rem 0 2.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.screenshot-wrapper {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
  background: #ffffff; /* Change wrapper background to white */
  display: flex;
  flex-direction: column;
}

.screenshot-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(31, 94, 168, 0.12);
}

.screenshot-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  margin-top: auto;
  padding-bottom: 12px;
  background: #111; /* Moved the dark 'bar' background to the image itself */
}

.screenshot-caption {
  padding: 0.85rem 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  color: var(--primary);
  background: #ffffff; /* Explicit solid white background */
  letter-spacing: -0.01em;
  border-bottom: 3px solid var(--border); /* Thicker separator line */
  width: 100%;
  height: 4.5rem; /* Fixed height to keep separator line aligned */
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-caption:empty {
  display: none;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
}

.modal-content-wrapper {
  position: relative;
  z-index: 1001;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.modal-img {
  max-width: 100%;
  max-height: calc(90vh - 100px);
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  background: #000;
}

.modal-caption-text {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
  z-index: 1002;
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.modal-prev {
  left: 2rem;
}

.modal-next {
  right: 2rem;
}

@media (max-width: 640px) {
  .modal-nav {
    display: none; /* Hide buttons on mobile in favor of swipes */
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 3rem;
  }

  .card {
    padding: 1rem;
  }
}
