/* ChordFinding — light, modern shell (Songscription-inspired) */
:root {
  --cf-bg: #f7f8fb;
  --cf-surface: #ffffff;
  --cf-ink: #0f172a;
  --cf-muted: #64748b;
  --cf-line: #e8ecf2;
  --cf-accent: #0f766e;
  --cf-accent-soft: #ccfbf1;
  --cf-accent-hover: #0d9488;
  --cf-max: 1120px;
  --cf-radius: 16px;
  --cf-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
  --cf-font: "Plus Jakarta Sans", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body.cf-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--cf-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cf-ink);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(15, 118, 110, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(14, 165, 233, 0.05), transparent 45%),
    var(--cf-bg);
}

.cf-skip {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  background: var(--cf-ink);
  color: #fff;
  padding: 8px 12px;
}
.cf-skip:focus { left: 12px; top: 12px; }

.cf-container {
  width: min(100% - 32px, var(--cf-max));
  margin-inline: auto;
}

/* Header */
.cf-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(247, 248, 251, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.cf-header:hover { border-bottom-color: var(--cf-line); }

.cf-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  min-height: 64px;
}

.cf-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--cf-ink);
  text-decoration: none;
}
.cf-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--cf-accent) 0%, #14b8a6 55%, #38bdf8 100%);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.cf-nav {
  display: flex;
  align-items: center;
  gap: 6px 18px;
  flex-wrap: wrap;
}
.cf-nav a {
  color: var(--cf-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.cf-nav a:hover,
.cf-nav a.is-active { color: var(--cf-ink); }

.cf-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--cf-line);
  border-radius: 10px;
  background: var(--cf-surface);
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.cf-nav-toggle span {
  display: block;
  height: 2px;
  background: var(--cf-ink);
  border-radius: 2px;
}

/* Buttons */
.cf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.cf-btn:hover { transform: translateY(-1px); }
.cf-btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.cf-btn-primary {
  background: var(--cf-accent);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.25);
}
.cf-btn-primary:hover { background: var(--cf-accent-hover); }
.cf-btn-ghost {
  background: var(--cf-surface);
  color: var(--cf-ink);
  border-color: var(--cf-line);
}
.cf-btn-ghost:hover { border-color: #cbd5e1; }

/* Hero */
.cf-hero {
  padding: 48px 0 28px;
  text-align: center;
}
.cf-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cf-accent-soft);
  color: var(--cf-accent);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.cf-hero h1 {
  margin: 0 auto 14px;
  max-width: 18ch;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--cf-ink);
}
.cf-hero h1 .cf-rotator {
  color: var(--cf-accent);
}
.cf-hero-lead {
  margin: 0 auto 22px;
  max-width: 36rem;
  color: var(--cf-muted);
  font-size: 1.08rem;
}
.cf-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}

/* Tool panel */
.cf-tool-panel {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: calc(var(--cf-radius) + 4px);
  box-shadow: var(--cf-shadow);
  padding: 20px 16px 28px;
  margin: 8px auto 48px;
}
.cf-tool-panel-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cf-muted);
  margin: 0 0 12px;
}

/* Sections */
.cf-section {
  padding: 56px 0;
}
.cf-section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 36px;
}
.cf-section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}
.cf-section-head p {
  margin: 0;
  color: var(--cf-muted);
}

.cf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cf-card {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-radius);
  padding: 22px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cf-card:hover {
  border-color: #c7d2de;
  box-shadow: var(--cf-shadow);
}
.cf-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--cf-accent-soft);
  color: var(--cf-accent);
  margin-bottom: 14px;
  font-size: 1.1rem;
}
.cf-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.cf-card p {
  margin: 0;
  color: var(--cf-muted);
  font-size: 0.95rem;
}
.cf-card a.cf-card-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cf-accent);
  text-decoration: none;
}
.cf-card a.cf-card-link:hover { text-decoration: underline; }

.cf-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}
.cf-step {
  position: relative;
  padding: 8px 8px 8px 0;
}
.cf-step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--cf-ink);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.cf-step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.cf-step p {
  margin: 0;
  color: var(--cf-muted);
  font-size: 0.95rem;
}

.cf-faq details {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.cf-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--cf-ink);
}
.cf-faq details[open] summary { margin-bottom: 8px; }
.cf-faq p {
  margin: 0;
  color: var(--cf-muted);
  font-size: 0.95rem;
}

.cf-cta-band {
  margin: 24px 0 48px;
  padding: 40px 28px;
  border-radius: calc(var(--cf-radius) + 4px);
  background: linear-gradient(135deg, #0f766e 0%, #0e7490 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 16px 40px rgba(15, 118, 110, 0.25);
}
.cf-cta-band h2 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
}
.cf-cta-band p {
  margin: 0 auto 18px;
  max-width: 32rem;
  opacity: 0.9;
}
.cf-cta-band .cf-btn-primary {
  background: #fff;
  color: var(--cf-accent) !important;
  box-shadow: none;
}
.cf-cta-band .cf-btn-primary:hover {
  background: #f0fdfa;
}

/* Page hero (inner pages) */
.cf-page-hero {
  padding: 40px 0 20px;
  text-align: center;
}
.cf-page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.035em;
  font-weight: 800;
}
.cf-page-hero p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--cf-muted);
}

.cf-prose {
  max-width: 40rem;
  margin: 0 auto;
  color: var(--cf-muted);
}
.cf-prose h2 {
  color: var(--cf-ink);
  letter-spacing: -0.02em;
  margin: 28px 0 10px;
}
.cf-prose p { margin: 0 0 12px; }
.cf-prose ul { padding-left: 1.2rem; }

.cf-pricing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.cf-price-card {
  background: var(--cf-surface);
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-radius);
  padding: 28px 24px;
}
.cf-price-card.is-featured {
  border-color: var(--cf-accent);
  box-shadow: 0 0 0 1px var(--cf-accent), var(--cf-shadow);
}
.cf-price-card h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}
.cf-price-amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 12px 0;
}
.cf-price-card ul {
  margin: 0 0 20px;
  padding-left: 1.1rem;
  color: var(--cf-muted);
  font-size: 0.95rem;
}
.cf-price-card li { margin-bottom: 6px; }

/* Footer */
.cf-footer {
  margin-top: 40px;
  padding: 48px 0 28px;
  background: #0b1220;
  color: #94a3b8;
}
.cf-footer .cf-logo { color: #fff; }
.cf-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.cf-footer-brand p {
  margin: 12px 0 16px;
  font-size: 0.92rem;
  max-width: 28ch;
  line-height: 1.55;
}
.cf-footer-heading {
  margin: 0 0 12px;
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.cf-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cf-footer-links li { margin-bottom: 8px; }
.cf-footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
}
.cf-footer-links a:hover { color: #fff; }
.cf-footer-bottom {
  padding-top: 20px;
  font-size: 0.85rem;
}
.cf-footer-bottom p { margin: 0 0 6px; }
.cf-footer-note a { color: #5eead4; }

.cf-404 {
  text-align: center;
  padding: 80px 0;
}
.cf-404 h1 {
  font-size: 3rem;
  margin: 0 0 8px;
  letter-spacing: -0.04em;
}

@media (max-width: 900px) {
  .cf-grid-3,
  .cf-steps,
  .cf-footer-grid,
  .cf-pricing {
    grid-template-columns: 1fr;
  }
  .cf-nav-toggle { display: flex; }
  .cf-nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    flex-direction: column;
    align-items: stretch;
    background: var(--cf-surface);
    border: 1px solid var(--cf-line);
    border-radius: 14px;
    padding: 12px;
    box-shadow: var(--cf-shadow);
  }
  .cf-nav.is-open { display: flex; }
  .cf-nav a { padding: 10px 12px; border-radius: 8px; }
  .cf-nav a:hover { background: var(--cf-bg); }
  .cf-header { position: relative; }
  .cf-header-inner { position: static; }
}

@keyframes cf-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.cf-hero,
.cf-tool-panel {
  animation: cf-fade-up 0.55s ease both;
}
.cf-tool-panel { animation-delay: 0.08s; }

@keyframes cf-swap {
  0%, 20% { opacity: 1; transform: translateY(0); }
  25%, 95% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 0; }
}
.cf-rotator-wrap {
  display: inline-grid;
  vertical-align: bottom;
}
.cf-rotator-wrap > span {
  grid-area: 1 / 1;
  opacity: 0;
  animation: cf-word 12s infinite;
}
.cf-rotator-wrap > span:nth-child(1) { animation-delay: 0s; }
.cf-rotator-wrap > span:nth-child(2) { animation-delay: 3s; }
.cf-rotator-wrap > span:nth-child(3) { animation-delay: 6s; }
.cf-rotator-wrap > span:nth-child(4) { animation-delay: 9s; }

@keyframes cf-word {
  0% { opacity: 0; transform: translateY(8px); }
  4% { opacity: 1; transform: translateY(0); }
  22% { opacity: 1; transform: translateY(0); }
  28% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 0; }
}
