/* ============================================================================
   realpomo Website Styles
   Production-ready, minimal, modular CSS
   ============================================================================ */

:root {
  --accent: #ff6347;
  --bg: #fff7f5;
  --ink: #111111;
  --muted: rgba(17, 17, 17, 0.68);
  --max: 1100px;
}

/* Reset & Base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 20% 5%, rgba(255, 99, 71, 0.18), transparent 55%),
    radial-gradient(700px 500px at 85% 15%, rgba(255, 99, 71, 0.12), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(17, 17, 17, 0.05), transparent 55%),
    var(--bg);
  line-height: 1.6;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
}

.navlinks {
  display: flex;
  gap: 20px;
  align-items: center;
}

.navlinks a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.navlinks a:hover {
  color: var(--ink);
}

@media (max-width: 920px) {
  .navlinks {
    display: none;
  }
}

/* Download Container */
.download-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.15s ease, transform 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.btn.loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

/* Secondary Download Link */
.btn-secondary {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: rgba(17, 17, 17, 0.3);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.btn-secondary:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
  opacity: 1;
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.btn-secondary.hidden {
  display: none;
}

.security-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.oss-button-wrapper {
  margin-top: 24px;
}

/* Hero Section */
.hero {
  margin-top: 60px;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  margin: 0 0 16px;
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-weight: 700;
}

@media (max-width: 560px) {
  h1 {
    font-size: 40px;
  }
}

.sub {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-image {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 450px;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Sections */
section {
  margin-top: 80px;
}

.section-head {
  margin: 0 0 32px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.section-head h3 {
  margin-top: 32px;
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* Features */
.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 48px;
}

.features-list li {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 920px) {
  .features-list li {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.features-list li:nth-child(even) {
  direction: rtl;
}

.features-list li:nth-child(even) > * {
  direction: ltr;
}

.feature-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 80px;
}

@media (max-width: 920px) {
  .feature-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.feature-section.reverse {
  direction: rtl;
}

.feature-section.reverse > * {
  direction: ltr;
}

.feature-content h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 700;
}

.section-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.feature-content h3 {
  margin: 16px 0 4px;
  font-size: 20px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.features-list li h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.features-list li p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.feature-image {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.feature-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  filter: brightness(1.02);
}

/* Open Source Section */
.oss-content {
  margin-top: 32px;
}

.oss-content h3 {
  margin: 0 0 12px;
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.oss-content p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

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

/* Footer */
footer {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

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

/* Article Styles (Medium-like) */
.article {
  max-width: 680px;
  margin: 60px auto 0;
  padding: 0 20px;
}

.article-header {
  margin-bottom: 48px;
}

.article-header h1 {
  margin: 0 0 16px;
  font-size: 42px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 700;
}

@media (max-width: 560px) {
  .article-header h1 {
    font-size: 32px;
  }
}

.article-meta {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.article-content {
  font-size: 20px;
  line-height: 1.8;
  color: var(--ink);
}

.article-content p {
  margin: 0 0 24px;
}

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

.article-content .lead {
  font-size: 22px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 32px;
}

.article-content h2 {
  margin: 48px 0 16px;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}

.article-content h2:first-of-type {
  margin-top: 40px;
}

.article-content h2 + p {
  margin-top: 0;
}

.article-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 560px) {
  .article {
    margin-top: 40px;
  }

  .article-content {
    font-size: 18px;
    line-height: 1.75;
  }

  .article-content .lead {
    font-size: 20px;
  }

  .article-content h2 {
    font-size: 24px;
    margin-top: 40px;
  }
}

/* Print Styles */
@media print {
  .nav,
  .btn,
  .hero-image {
    display: none;
  }
  
  body {
    background: white;
  }
}
