/* Custom Font */
@font-face {
  font-family: 'SuperCartoon';
  src: url('../assets/font/SuperCartoon-6R791.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent-color: #EBDBC8;
  --primary-color: #46ACBF;
  --primary-dark-color: #2F737F;
  --primary-light-color: #84C8D4;
  --text-color: #000;
  --bg-color: #ffffff;
  --white: #ffffff;
  --spacing: 1rem;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

h1,
h2,
h3 {
  font-family: 'Poppins', sans-serif;
}

/* Header and Navigation */
header {
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

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

.logo h1 {
  font-size: 1.5rem;
}

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

.nav-links {
  font-size: 1.2rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Main Content */
main {
  max-width: 960px;
  margin: 0.5rem auto;
  padding: 0 1rem;
  min-height: calc(100vh - 200px);
  box-sizing: border-box;
}

section {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0;
  /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 0;
  width: 100%;
  border-radius: 0;
  margin-bottom: 0;
  border-top: 4px solid var(--primary-dark-color);
  border-bottom: 4px solid var(--primary-light-color);
}

@media (min-width: 601px) {
  .hero {
    background-color: #46ACBF;
  }
}

.hero-title {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  margin: 0 auto;
}

/* Hero Nav */
.hero-nav {
  display: flex;
  justify-content: center;
  padding: 0.5rem 2rem;
  border-bottom: 1px solid var(--primary-light-color);
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  /* Override global nav rule so the bar fills the full viewport width */
  width: 100%;
  max-width: none;
  margin: 0;
}

.hero-nav .nav-links {
  font-family: 'SuperCartoon', sans-serif;
  font-size: 1.4rem;
  align-items: center;
  flex-direction: row;  /* horizontal so JS wrapping detection works correctly */
  flex-wrap: wrap;      /* wrap when no room — detected by JS to trigger collapse */
  gap: 2rem;
}

.hero-nav .nav-links img {
  height: 3rem;
  width: auto;
  display: block;
}


/* Hamburger button — hidden until JS adds .nav-collapsed */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  margin-right: auto;   /* keeps nav-links centered */
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Animate hamburger → X when open */
.hamburger.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* Dropdown panel */
.hamburger-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--white);
  border-left: 1px solid var(--primary-light-color);
  border-bottom: 1px solid var(--primary-light-color);
  box-shadow: -2px 4px 8px rgba(0, 0, 0, 0.1);
  flex-direction: column;
  padding: 0.5rem 0;
  min-width: 180px;
  z-index: 99;
}

.hamburger-dropdown.open {
  display: flex;
}

.hamburger-dropdown a {
  display: block;
  padding: 0.5rem 1.5rem;
  text-decoration: none;
  color: var(--text-color);
  font-family: 'SuperCartoon', sans-serif;
  font-size: 1.4rem;
  transition: background-color 0.2s ease;
}

.hamburger-dropdown a:hover {
  background-color: var(--accent-color);
}

/* Collapsed state — toggled by JS when links wrap */
.hero-nav.nav-collapsed {
  flex-direction: row;        /* override responsive nav { flex-direction: column } */
  flex-wrap: nowrap;          /* keep items on one line */
  justify-content: center;    /* center the remaining visible link */
  align-items: center;
  gap: 2rem;                  /* space between nav-links and hamburger */
}

.hero-nav.nav-collapsed .nav-collapsible {
  display: none;
}

.hero-nav.nav-collapsed .hamburger {
  display: flex;
  position: absolute;         /* removed from flow so the link stays truly centered */
  right: 2rem;                /* align with nav's right padding */
  margin-right: 0;
}

.hero-nav.nav-collapsed .nav-links {
  order: 1;
}

/* Screenshots Section */
.screenshots {
  text-align: center;
  padding-left: 2rem;
  padding-right: 2rem;
  color: var(--white);
  background-color: var(--primary-light-color);
  border-radius: 8px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.screenshot-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.screenshot-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.screenshot-item img:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.screenshot-item p {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Get the App Section */
.get-the-app {
  text-align: center;
  padding: 2rem;
  margin-bottom: 1rem;
}

.get-the-app h1 {
  font-size: 1.55rem;
  padding: 0.5rem 0;
}

.get-the-app h2 {
  font-size: 1.35rem;
  padding: 0.3rem 0;
}

.get-the-app h3 {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.get-the-app p {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.get-the-app a {
  display: inline-block;
  margin: 0 0.5rem;
}

.get-the-app img {
  height: 60px;
  width: auto;
}

.no-ads-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.35em;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

button[type="submit"] {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #2980b9;
}

/* Footer */
footer {
  background-color: var(--accent-color);
  color: var(--text-color);
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 0.7;
}

/* Responsive Design */
@media (min-width: 481px) {
  .screenshot-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 769px) {
  nav {
    flex-direction: row;
  }

  .nav-links {
    flex-direction: row;
    gap: 2rem;
    text-align: unset;
  }

  .screenshot-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  main {
    padding: 0 2rem;
  }

  .get-the-app h1 {
    font-size: revert;
    padding: revert;
  }

  .get-the-app h2 {
    font-size: revert;
    padding: revert;
  }
}

/* Legal Section - Must be last to override reset */
.legal p {
  margin-bottom: 1.5rem !important;
}

.legal p + ul {
  margin-top: -1rem !important;
}

.legal ul {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 1.5rem !important;
  padding-left: 0 !important;
  list-style-position: inside !important;
}

.legal li {
  margin-bottom: 0.5rem !important;
}

.legal ul.plain {
  margin-top: 1rem !important;
}

.legal .plain {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-top: 0 !important;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

.content-header {
  text-align: center;
  padding: 1rem 1rem;
  background-color: var(--primary-color);
  border-top: 4px solid var(--primary-dark-color);
  border-bottom: 4px solid var(--primary-light-color);
  color: var(--white);
}

.content-header h1 {
  font-family: 'SuperCartoon', sans-serif;
  font-size: 3em;
  font-weight: normal;
  -webkit-text-stroke: 2px black;
}

.support-subtitle {
  text-align: center;
  font-size: 1.85rem;
  color: var(--primary-dark-color);
  margin: 1.25rem 0 2.25rem;
  font-weight: bold;
}

/* Support Page */
.support-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 700px) {
  .support-grid {
    flex-direction: row;
    align-items: stretch;
  }
}

.support-column {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.support-section {
  background-color: var(--accent-color);
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.support-heading {
  font-size: 1.35rem;
  color: var(--text-color);
  text-align: center;
  margin: 0 0 0.75rem;
}

.support-section p {
  margin-bottom: 1rem;
  line-height: 1.65;
}

.support-section a:not(.tutorial-link) {
  color: var(--primary-dark-color);
  font-weight: 600;
}

.support-section .tutorial-link {
  display: block;
  width: fit-content;
  margin: auto auto 0;
  font-size: 1.1rem;
}

.support-section ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
  line-height: 1.65;
}

.support-section li {
  margin-bottom: 0.4rem;
}

.support-section p:has(+ ul) {
  margin-bottom: 0;
}

/* FAQ Section */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0;          /* override base section padding — items carry their own */
}

.faq-item {
  border: 1px solid var(--text-color);
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--white);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--black);
  background-color: var(--accent-color);
  user-select: none;
  list-style: none;           /* remove default triangle */
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Remove webkit default marker */
.faq-question::-webkit-details-marker { display: none; }

/* Custom +/× expand indicator */
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-color);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: color 0.2s ease;
}

.faq-question:hover {
  background-color: var(--primary-light-color);
  color: var(--white);
}

.faq-question:hover::after {
  color: var(--white);
}

details[open] .faq-question {
  background-color: var(--primary-color);
  color: var(--white);
}

details[open] .faq-question::after {
  content: '×';
  color: var(--white);
}

.faq-answer {
  padding: 1rem 1.25rem;
  line-height: 1.7;
}

.faq-answer .price {
  font-size: 1.15em;
  font-weight: bold;
}

/* Tutorial Items */
.tutorial-item {
  display: grid;
  grid-template-columns: 1fr;   /* mobile: single column */
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--primary-light-color);
}

.tutorial-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

@media (min-width: 600px) {
  .tutorial-item {
    grid-template-columns: 200px 1fr;  /* first column matches the fixed image width */
  }
}

.tutorial-preview img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tutorial-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tutorial-title {
  font-size: 1.5rem;
  color: var(--primary-dark-color);
  margin: 0;
}

.tutorial-title a {
  color: var(--primary-dark-color);
  text-decoration: none;
}

.tutorial-title a:hover {
  color: var(--primary-light-color);
}

.tutorial-tagline {
  font-style: italic;
  line-height: 1.7;
  margin: 0;
}

.tutorial-description {
  line-height: 1.7;
  margin: 0;
}

.tutorial-link {
  display: inline-block;
  align-self: flex-start;
  padding: 0.5rem 1.25rem;
  background-color: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.tutorial-link:hover {
  background-color: var(--primary-dark-color);
}

/* Back link (e.g. "← Back to Tutorials") */
.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--primary-dark-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.15s ease, color 0.15s ease;
}

.back-link:hover {
  color: var(--primary-color);
  transform: translateX(-3px);
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  padding: 0;
  margin: 0;
}

/* › separator between items */
.breadcrumb li + li::before {
  content: '›';
  margin-right: 0.25rem;
  color: var(--primary-light-color);
}

.breadcrumb a {
  color: var(--primary-dark-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Current page — not a link, visually muted */
.breadcrumb li[aria-current="page"] {
  color: var(--text-color);
  opacity: 0.6;
}

/* ── Tutorial Step ──────────────────────────────────────────── */
.tutorial-step {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--primary-light-color);
}

.tutorial-step:last-child {
  border-bottom: none;
}

/* Numbered step title */
.step-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  color: var(--primary-dark-color);
  margin-bottom: 1rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Scene: positioning context for the image and overlaid callouts.
   Must shrink to the image's size so callout % positions map to the image. */
.step-scene {
  position: relative;
  display: inline-block; /* shrinks to image width — keeps % callouts accurate */
}

.step-img {
  width: 300px;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* ── Callout box ──────────────────────────────────────────────
   Position with inline style: top/left as % of the image size.
   The callout is centered on that point via transform.
   Arrow direction set by modifier class.
   ──────────────────────────────────────────────────────────── */
.callout {
  position: absolute;
  transform: translate(-50%, -50%);  /* center box on the top/left point */
  background-color: var(--primary-dark-color);
  color: var(--white);
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.45;
  width: 240px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  z-index: 10;
  pointer-events: none;
}

.callout p { margin: 0; }

/* Shared arrow base */
.callout::after {
  content: '';
  position: absolute;
  border: 9px solid transparent;
}

/* Arrow points DOWN from the bottom of the callout (callout sits above feature) */
.callout--arrow-down::after {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: var(--primary-dark-color);
  border-bottom: 0;
  margin-top: 0;
}

/* Arrow points UP from the top of the callout (callout sits below feature) */
.callout--arrow-up::after {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: var(--primary-dark-color);
  border-top: 0;
  margin-bottom: 0;
}

/* Arrow points LEFT from the left side (callout sits to the right of feature) */
.callout--arrow-left::after {
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: var(--primary-dark-color);
  border-left: 0;
}

/* Arrow points RIGHT from the right side (callout sits to the left of feature) */
.callout--arrow-right::after {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: var(--primary-dark-color);
  border-right: 0;
}

.coming-soon {
  text-align: center;
}

.success {
  font-size: 1.5em;
  color: darkgreen;
  font-weight: bold;
}

.error {
  font-size: 1.5em;
  color: darkred;
  font-weight: bold;
}