/* dalgo.css — shared styles for DALGO app pages */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.6;
}

/* ── Header ── */
header {
  padding: 10px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

header a img { display: block; height: 32px; }

/* ── Page container ── */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ── Intro / page title (index page) ── */
.intro { margin-bottom: 40px; }

.intro h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.intro p { font-size: 1.05rem; color: #555; }

/* ── Hero ── */
.hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-icon {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.hero-text h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.hero-text p {
  font-size: 1.05rem;
  color: #555;
  max-width: 480px;
}

/* ── App Store badge ── */
.app-store-badge { margin: 28px 0; }

.app-store-badge img {
  height: 48px;
  transition: opacity 0.2s;
}

.app-store-badge img:hover { opacity: 0.8; }

/* ── Content card ── */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 16px;
}

.card p {
  color: #555;
  margin-bottom: 10px;
}

.card p:last-child { margin-bottom: 0; }

/* ── Algorithm list (monospace grid) ── */
.algo-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.algo-list li {
  background: #f0f0f5;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: "SF Mono", "Menlo", "Courier New", monospace;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Screenshot ── */
.screenshot {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  margin: 28px 0;
  display: block;
}

/* ── Screenshot grid (multiple images) ── */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.screenshot-grid img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  display: block;
}

/* ── Privacy section ── */
.privacy {
  background: #fff;
  border-left: 4px solid #0071e3;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.privacy h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.privacy p { font-size: 0.95rem; color: #555; }

/* ── App grid (index page) ── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.app-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.app-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.app-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.app-card-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.app-card-body p {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 10px;
  line-height: 1.5;
}

.app-card-link {
  font-size: 0.85rem;
  color: #0071e3;
  font-weight: 500;
}

/* ── Dark mode (must come last to override light styles above) ── */
@media (prefers-color-scheme: dark) {
  body              { background: #1c1c1e; color: #f5f5f7; }
  header            { border-bottom-color: rgba(255,255,255,0.08); }
  .intro p          { color: #aaa; }
  .hero-text p      { color: #aaa; }
  .card             { background: #2c2c2e; }
  .card h2          { color: #999; }
  .card p           { color: #ccc; }
  .algo-list li     { background: #3a3a3c; }
  .privacy          { background: #2c2c2e; border-left-color: #0a84ff; }
  .privacy p        { color: #ccc; }
  .app-card         { background: #3a3a3c; }
  .app-card-body p  { color: #bbb; }
  .app-card-link    { color: #0a84ff; }
  code              { background: #3a3a3c; color: #f5f5f7; }
}
