/* Divohne shared styles */

:root {
  --accent: #ff8c42;
  --accent-hover: #ffaa66;
  --accent-soft: rgba(255, 140, 66, 0.15);
  --accent-warn: #f87171;
  --success: #4ade80;

  --bg-start: #0f0f0f;
  --bg-end: #1a1a1a;
  --surface: #1f1f1f;
  --code-bg: #0f0f0f;
  --code-border: #2a2a2a;

  --text: #f5f5f5;
  --text-soft: #e2e8f0;
  --text-body: #d1d5db;
  --text-muted: #9ca3af;
  --text-faint: #6b7280;
  --text-emphasis: #f8fafc;

  --shadow-card: 0 6px 20px rgba(255, 255, 255, 0.05);
  --radius: 1rem;
  --radius-sm: 0.5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text);
  padding: 2rem;
}

/* Skip-to-content link (visible on focus) */
a.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--accent);
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s ease;
}

a.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* Top navigation */
nav.top-nav {
  width: 100%;
  max-width: 1100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

nav.top-nav .brand {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.25rem;
}

nav.top-nav .brand:hover { text-decoration: none; }

nav.top-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

nav.top-nav ul a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

nav.top-nav ul a:hover {
  color: var(--accent);
}

nav.top-nav ul a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

/* Main landmark */
main {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Headings */
h1 {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  text-align: center;
}

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

h2 {
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Paragraphs */
p {
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 1rem;
}

main > p { max-width: 700px; margin: 1rem auto 1.5rem; }

/* Sections */
section {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 2rem;
  max-width: 800px;
  width: 100%;
  margin-bottom: 1.5rem;
  text-align: left;
}

section h2 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  text-align: left;
  font-weight: 600;
}

section h3 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-align: center;
}

/* Lists */
ul { padding-left: 1.5rem; margin-bottom: 0.8rem; }
li { color: var(--text-body); line-height: 1.7; margin-bottom: 0.4rem; }

/* Emphasis */
em { color: var(--text-soft); }
strong { color: var(--text-emphasis); }

/* Inline links */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Buttons */
a.button {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  background: var(--accent);
  color: #000;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

a.button:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
  text-decoration: none;
}

/* Subtitle / last-updated */
.subtitle, .last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* Tool card grid (homepage) */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 1rem;
}

.tool-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease;
  text-align: left;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.tool-card h4 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.tool-card .tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 0.3rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.tool-card p {
  color: var(--text-body);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.tool-card .card-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.tool-card .card-link:hover { text-decoration: underline; }

/* Code blocks */
pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.6;
}

code {
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  color: var(--accent-hover);
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Numbered step list (for tool pages) */
ol.steps {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
  margin-bottom: 1rem;
}

ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
  color: var(--text-body);
}

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

ol.steps > li strong {
  display: block;
  color: var(--text-emphasis);
  margin-bottom: 0.2rem;
}

/* Footer */
footer {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2rem;
  text-align: center;
}

footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--accent); text-decoration: none; }
