/* AnyToMD — brand palette from logo & banner */
:root {
  --teal-deep: #1a5e68;
  --teal-mid: #2c8e9b;
  --teal-bright: #3ba7b4;
  --teal-banner: #2c5d63;
  --text-primary: #1a2e32;
  --text-secondary: #4a6268;
  --text-muted: #6b848a;
  --bg-white: #ffffff;
  --bg-subtle: #f4f9fa;
  --border: #d8e8eb;
  --shadow-sm: 0 2px 8px rgba(26, 94, 104, 0.08);
  --shadow-md: 0 8px 32px rgba(26, 94, 104, 0.12);
  --radius: 12px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --max-width: 1120px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal-deep);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--teal-deep);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-desktop a:hover {
  color: var(--teal-mid);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-mid), var(--teal-deep));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

a.btn.btn-primary,
a.btn.btn-primary:hover,
a.btn.btn-primary:visited,
a.btn.btn-primary:focus {
  color: #fff;
  text-decoration: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--teal-bright), var(--teal-mid));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--teal-deep);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-white);
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
}

.nav-mobile .btn {
  margin-top: 0.5rem;
  align-self: flex-start;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .nav-toggle,
  .nav-mobile {
    display: none !important;
  }
}

/* Hero banner */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--teal-banner);
}

.hero-banner {
  width: 100%;
  min-height: 220px;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.25rem 1.5rem 2rem;
  text-align: center;
  background: linear-gradient(
    to bottom,
    rgba(26, 94, 104, 0.55) 0%,
    rgba(44, 93, 99, 0.25) 35%,
    rgba(26, 94, 104, 0.15) 100%
  );
}

.hero-tagline {
  margin: 0;
  white-space: nowrap;
  font-size: clamp(0.8rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  letter-spacing: -0.02em;
}

/* Sections */
main section {
  padding: 4rem 1.25rem;
}

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

.section-alt {
  background: var(--bg-subtle);
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--teal-deep);
}

h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: var(--teal-deep);
}

h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: var(--teal-mid);
}

.lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.intro-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .intro-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.highlight-card {
  background: linear-gradient(145deg, var(--teal-mid), var(--teal-deep));
  color: #fff;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.highlight-card h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.highlight-card p {
  margin: 0;
  opacity: 0.95;
}

/* Screenshots */
.screenshots {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .screenshots {
    grid-template-columns: repeat(3, 1fr);
  }
}

.screenshot-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--bg-white);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

.screenshot-card figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

/* Format lists */
.format-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .format-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .format-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.format-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.section-alt .format-card {
  background: var(--bg-white);
}

.format-card h3 {
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--teal-bright);
}

.format-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.format-card li {
  margin-bottom: 0.35rem;
}

/* Feature columns */
.feature-list {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .feature-list.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-list ul,
.steps-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.feature-list li,
.steps-list li {
  margin-bottom: 0.5rem;
}

.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.steps-list li {
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1rem;
  counter-increment: step;
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: var(--teal-mid);
  border-radius: 50%;
}

.note-box {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-subtle);
  border-left: 4px solid var(--teal-bright);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.note-box strong {
  color: var(--text-primary);
}

/* Perfect for tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag-list li {
  padding: 0.5rem 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 3.5rem 1.25rem;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal-banner));
  color: #fff;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.cta-band p {
  margin: 0 0 1.5rem;
  opacity: 0.9;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.cta-band .btn-primary {
  background: linear-gradient(135deg, var(--teal-mid), var(--teal-deep));
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.cta-band .btn-primary:hover {
  background: linear-gradient(135deg, var(--teal-bright), var(--teal-mid));
  color: #fff;
}

/* Footer */
.site-footer {
  padding: 2.5rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-white);
}

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

.footer-inner p {
  margin: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-inner a {
  font-weight: 500;
}

.ack {
  font-size: 0.85rem !important;
  margin-top: 1.5rem !important;
  max-width: 40rem;
  margin-left: auto !important;
  margin-right: auto !important;
}

.footer-links {
  margin-bottom: 0.5rem !important;
}

/* Legal / privacy policy page */
.legal-page {
  padding: 3rem 1.25rem 4rem;
  background: var(--bg-white);
}

.legal-inner {
  max-width: 42rem;
  margin: 0 auto;
}

.legal-inner h1 {
  margin: 0 0 2rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--teal-deep);
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--teal-bright);
}

.legal-inner h1 sup {
  font-size: 0.55em;
  color: var(--teal-mid);
}

.legal-inner section {
  margin-bottom: 2rem;
}

.legal-inner h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--teal-mid);
}

.legal-inner p {
  margin: 0;
  color: var(--text-secondary);
}

.legal-inner a {
  font-weight: 500;
}

.legal-copyright {
  margin-top: 2.5rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem !important;
  color: var(--text-muted) !important;
  text-align: center;
}
