/* PandaInk — shared stylesheet */

/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  line-height: 1.6;
}

/* ── Typography ── */
h1, h2, h3 {
  color: #1a7f37;
  line-height: 1.25;
}

h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p  { margin-bottom: 1rem; }

a  { color: #1a7f37; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout helpers ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 3rem 0;
}

/* ── Navigation ── */
nav {
  background: #fff;
  border-bottom: 2px solid #1a7f37;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .container {
  display: flex;
  align-items: center;
  gap: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: #1a7f37;
  margin-right: auto;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: #1a1a1a;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #1a7f37;
  text-decoration: none;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: #1a7f37;
  color: #fff;
  border-color: #1a7f37;
}

.btn-primary:hover {
  background: #155d28;
  border-color: #155d28;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: #1a7f37;
  border-color: #1a7f37;
}

.btn-outline:hover {
  background: #f0faf3;
  text-decoration: none;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ── Hero ── */
.hero {
  background: #f7fdf9;
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid #d3ead9;
  text-align: center;
}

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

.hero .tagline {
  font-size: 1.3rem;
  color: #444;
  margin: 0.75rem 0 1.25rem;
}

.hero .description {
  max-width: 600px;
  margin: 0 auto 0.5rem;
  color: #555;
}

.hero .btn-group {
  justify-content: center;
}

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  border: 1px solid #d3ead9;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  background: #f7fdf9;
}

.feature-card h3 {
  margin-bottom: 0.4rem;
}

.feature-card p {
  color: #555;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ── Screenshots placeholders ── */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.screenshot-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: #d0d0d0;
  border-radius: 6px;
  border: 1px solid #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.9rem;
}

.screenshot-caption {
  font-size: 0.9rem;
  color: #555;
  font-style: italic;
}

/* ── Download page ── */
.download-card {
  border: 2px solid #1a7f37;
  border-radius: 8px;
  padding: 2rem;
  max-width: 520px;
  background: #f7fdf9;
  margin-bottom: 2rem;
}

.download-card h3 {
  margin-bottom: 0.25rem;
}

.download-card .meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.requirements-list,
.steps-list,
.feature-list {
  list-style: none;
  padding: 0;
}

.requirements-list li,
.steps-list li,
.feature-list li {
  padding: 0.35rem 0 0.35rem 1.4rem;
  position: relative;
  color: #333;
}

.requirements-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #1a7f37;
  font-weight: 700;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #1a7f37;
  font-weight: 700;
}

.steps-list { counter-reset: steps; }

.steps-list li {
  counter-increment: steps;
  padding-left: 2rem;
  margin-bottom: 0.5rem;
}

.steps-list li::before {
  content: counter(steps) ".";
  position: absolute;
  left: 0;
  color: #1a7f37;
  font-weight: 700;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  background: #f0f0f0;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background: #1a1a1a;
  color: #e8e8e8;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ── Dividers ── */
.section-divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 0;
}

/* ── Footer ── */
footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 1.5rem 0;
  font-size: 0.9rem;
  text-align: center;
}

footer a {
  color: #6fcf97;
}

footer a:hover {
  color: #fff;
  text-decoration: underline;
}

footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  margin-top: 0.4rem;
}

/* ── Web App page ── */
.app-hero {
  background: #f7fdf9;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid #d3ead9;
}

.app-compat-note {
  color: #b45309;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.app-card {
  border: 1px solid #d3ead9;
  border-radius: 8px;
  padding: 1.5rem;
  background: #f7fdf9;
}

.app-status-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.app-status {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}

.app-log {
  background: #1a1a1a;
  color: #e8e8e8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  min-height: 180px;
  max-height: 360px;
  overflow-y: auto;
}

.app-log div {
  padding: 0.1rem 0;
  border-bottom: 1px solid #2a2a2a;
}

/* ── App controller UI (W11) ── */

.app-root {
  font-family: inherit;
}

.app-toolbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #ddd;
  flex-wrap: wrap;
}

.device-label {
  font-weight: 600;
  color: #1a7f37;
  min-width: 10rem;
}

.mode-selector,
.orientation-selector {
  display: flex;
  gap: 0.75rem;
}

.action-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.status-bar {
  font-size: 0.875rem;
  color: #555;
  padding: 0.25rem 0 0.5rem;
  min-height: 1.5rem;
}

.drawing-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tab-list {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  border-bottom: 2px solid #1a7f37;
  padding-bottom: 2px;
}

.tab-btn {
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-bottom: none;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: 4px 4px 0 0;
}

.tab-btn.active {
  background: #fff;
  border-color: #1a7f37;
  color: #1a7f37;
  font-weight: 600;
}

.tab-content {
  border: 1px solid #ddd;
  border-top: none;
  padding: 0.75rem;
  min-height: 200px;
}

.tab-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.drawing-canvas {
  width: 100%;
  height: 500px;
  display: block;
  border: 1px solid #eee;
  background: #fafafa;
}

.live-canvas {
  width: 100%;
  height: 600px;
  display: block;
  border: 1px solid #eee;
  background: #fafafa;
  margin-top: 0.5rem;
}

.placeholder {
  color: #888;
  font-style: italic;
  padding: 2rem;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero .tagline { font-size: 1.1rem; }

  .nav-links {
    gap: 1rem;
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .download-card {
    padding: 1.25rem;
  }
}
