/* Happ wiki network — shared styles */

:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --text: #1a2420;
  --text-muted: #5a6b63;
  --border: #dce6e0;
  --accent: #0f766e;
  --accent-hover: #0d5f58;
  --accent-soft: #ecfdf5;
  --accent-border: #99f6e4;
  --accent-dark: #115e59;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 40, 30, 0.06), 0 8px 24px rgba(15, 40, 30, 0.05);
  --max-width: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.site-nav a.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav a.btn-primary {
  color: #fff;
}

.site-nav a.btn-primary:hover {
  color: #fff;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* CTA strip */

.cta-strip {
  max-width: var(--max-width);
  margin: 0 auto 16px;
  padding: 0 20px;
}

.cta-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow);
}

.cta-strip-text h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  color: #fff;
}

.cta-strip-text p {
  margin: 0 0 16px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
}

.cta-steps {
  margin: 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}

.cta-steps li {
  margin-bottom: 4px;
}

.cta-strip-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cta-strip-action .btn-primary {
  background: #fff;
  color: var(--accent);
  font-weight: 700;
}

.cta-strip-action .btn-primary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.cta-strip-note {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}

/* Hero */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px 32px;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 24px;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Main sections */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 48px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

/* Article cards */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.article-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.article-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.article-card-category {
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.article-card p {
  margin: 0 0 12px;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.article-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Article page */

.article-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.article-page article h1 {
  margin: 0 0 20px;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.article-page article h2 {
  margin: 32px 0 12px;
  font-size: 1.25rem;
  line-height: 1.35;
}

.article-page article p {
  margin: 0 0 16px;
}

.article-page article a {
  word-break: break-word;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-meta-bar span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.article-cta {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
}

.article-cta p {
  margin: 0;
  font-size: 1rem;
}

.article-cta a {
  font-weight: 600;
}

/* Inline CTA in articles */

.inline-cta {
  margin: 28px 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.inline-cta p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.inline-cta .btn-sm {
  padding: 9px 16px;
  font-size: 0.9rem;
}

.back-link {
  display: inline-block;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Contact page */

.contact-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.contact-page h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.5vw, 2rem);
}

.contact-lead,
.contact-note {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.contact-lead {
  margin: 0 0 24px;
}

.contact-note {
  margin: 20px 0 0;
  font-size: 0.9rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-notice {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.form-notice--success {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-hover);
}

.form-notice--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Footer */

.site-footer {
  margin-top: 48px;
  padding: 40px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text);
  font-size: 0.92rem;
}

.footer-disclaimer {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-copy {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Homepage FAQ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 20px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Sticky mobile CTA */

.mobile-cta-bar {
  display: none;
}

.btn-block {
  width: 100%;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 76px;
  }

  .mobile-cta-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(15, 40, 30, 0.1);
  }

  .mobile-cta-bar .btn-primary {
    color: #fff;
  }
}

@media (max-width: 640px) {
  .site-nav .nav-link {
    display: none;
  }

  .header-inner {
    padding: 12px 16px;
  }

  .hero {
    padding-top: 32px;
  }
}
