/* ── Design tokens (Hand-Drawn) ── */
:root {
  --paper: #fdfbf7;
  --ink: #2d2d2d;
  --muted: #e5e0d8;
  --accent: #ff4d4d;
  --pen-blue: #2d5da1;
  --post-it: #fff9c4;
  --white: #ffffff;

  --font-heading: 'Kalam', cursive;
  --font-body: 'Patrick Hand', cursive;

  --radius-wobbly: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --radius-wobbly-md: 185px 12px 165px 10px / 12px 165px 10px 185px;
  --radius-wobbly-sm: 95px 8px 85px 6px / 8px 85px 6px 95px;
  --radius-wobbly-pill: 999px 999px 999px 999px / 999px 999px 999px 999px;

  --shadow-hard: 4px 4px 0 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 0 rgba(45, 45, 45, 0.1);
  --shadow-hard-lg: 8px 8px 0 0 var(--ink);
  --shadow-hard-hover: 2px 2px 0 0 var(--ink);
}

.site-body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--muted) 1px, transparent 1px);
  background-size: 24px 24px;
}

.font-heading {
  font-family: var(--font-heading);
  font-weight: 700;
}

.site-header {
  border-bottom: 3px dashed var(--ink);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

@media (min-width: 640px) {
  .site-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-wobbly-pill);
  box-shadow: 2px 2px 0 0 var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.1s ease, background-color 0.1s ease, box-shadow 0.1s ease,
    color 0.1s ease;
}

.nav-link:hover {
  background: var(--post-it);
  transform: rotate(-1deg) translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--ink);
}

.nav-link--active {
  background: var(--ink);
  color: var(--white);
  box-shadow: 3px 3px 0 0 var(--accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  list-style: none;
  cursor: pointer;
}

.nav-dropdown-trigger::-webkit-details-marker {
  display: none;
}

.nav-dropdown-trigger::before {
  content: '+ ';
  font-weight: 700;
  color: var(--accent);
}

.nav-dropdown[open] .nav-dropdown-trigger::before {
  content: '− ';
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 60;
  min-width: 11rem;
  padding: 0.5rem;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-wobbly-md);
  box-shadow: var(--shadow-hard);
}

.nav-dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-wobbly-sm);
  transition: transform 0.1s ease, background-color 0.1s ease;
}

.nav-dropdown-item:hover {
  background: var(--post-it);
  transform: rotate(-1deg);
}

.nav-dropdown-item--active {
  background: var(--ink);
  color: var(--white);
}

.nav-dropdown-item--active:hover {
  background: var(--ink);
  color: var(--white);
  transform: none;
}

.site-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  line-height: 1;
  color: var(--ink);
  transition: transform 0.1s ease, opacity 0.1s ease;
}

.site-logo img {
  height: 2.75rem;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.site-logo__text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .site-logo img {
    height: 3.25rem;
  }

  .site-logo__text {
    font-size: 1.5rem;
  }
}

.site-logo:hover {
  opacity: 0.9;
  transform: rotate(-1deg);
}

.site-logo:hover .site-logo__text {
  color: var(--accent);
}

.site-tagline {
  font-size: 1rem;
  color: var(--ink);
  opacity: 0.65;
}

.site-footer {
  border-top: 3px dashed var(--ink);
  background: var(--white);
}

.footer-link {
  color: var(--ink);
  opacity: 0.75;
  text-decoration: none;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

.footer-link:hover {
  opacity: 1;
  text-decoration: line-through;
  transform: rotate(-1deg);
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.1;
  transform: rotate(-0.5deg);
}

.hero-title .hero-bang {
  display: inline-block;
  color: var(--accent);
  transform: rotate(8deg);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: 0.85;
}

@media (min-width: 768px) {
  .lead {
    font-size: 1.25rem;
  }
}

.card {
  position: relative;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-wobbly-md);
  box-shadow: var(--shadow-hard-sm);
  padding: 1.5rem;
  transition: transform 0.1s ease;
}

.card:hover {
  transform: rotate(0.3deg);
}

.card--tape::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  width: 88px;
  height: 28px;
  margin-left: -44px;
  background: rgba(229, 224, 216, 0.85);
  border: 1px solid rgba(45, 45, 45, 0.2);
  transform: rotate(-2deg);
  z-index: 2;
  pointer-events: none;
}

.card--tack::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 1px 2px 0 0 var(--ink);
  z-index: 2;
  pointer-events: none;
}

.card--post-it {
  background: var(--post-it);
}

.card--generator {
  transform: rotate(0.5deg);
}

.card--generator:hover {
  transform: rotate(0.8deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.2;
  border: 3px solid var(--ink);
  border-radius: var(--radius-wobbly-sm);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease,
    color 0.1s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--white);
  color: var(--ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-hard-hover);
  transform: translate(2px, 2px);
}

.btn-primary:active:not(:disabled) {
  box-shadow: none;
  transform: translate(4px, 4px);
}

.btn-secondary {
  background: var(--muted);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--pen-blue);
  color: var(--white);
  box-shadow: var(--shadow-hard-hover);
  transform: translate(2px, 2px);
}

.btn-secondary:active:not(:disabled) {
  box-shadow: none;
  transform: translate(4px, 4px);
}

.btn-block {
  width: 100%;
}

.field-label {
  display: block;
  margin-bottom: 0.375rem;
  font-family: var(--font-heading);
  font-size: 1rem;
}

.input-wobbly {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-wobbly-sm);
  appearance: none;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.input-wobbly::placeholder {
  color: rgba(45, 45, 45, 0.4);
}

.input-wobbly:focus {
  outline: none;
  border-color: var(--pen-blue);
  box-shadow: 0 0 0 3px rgba(45, 93, 161, 0.2);
}

#output-text {
  word-break: break-word;
  font-size: 1.25rem;
  line-height: 1.5;
}

.prompt-output {
  min-height: 5rem;
  resize: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 1.5rem;
  }
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-wobbly-md);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease;
}

.category-card:nth-child(odd) {
  transform: rotate(-0.5deg);
}

.category-card:nth-child(even) {
  transform: rotate(0.5deg);
}

.category-card:hover {
  background: var(--post-it);
  transform: rotate(1deg) translate(2px, 2px);
  box-shadow: var(--shadow-hard-hover);
}

.category-card:nth-child(even):hover {
  transform: rotate(-1deg) translate(2px, 2px);
}

.category-card:active {
  box-shadow: none;
  transform: translate(4px, 4px);
}

.category-card--active {
  background: var(--ink);
  color: var(--white);
  box-shadow: 3px 3px 0 0 var(--accent);
  transform: rotate(0deg);
}

.category-card--active:hover {
  background: var(--ink);
  color: var(--white);
  transform: rotate(0deg);
  box-shadow: 3px 3px 0 0 var(--accent);
}

.category-card--active:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

.category-card__img {
  width: 100%;
  max-width: 4.5rem;
  aspect-ratio: 1;
  object-fit: contain;
  pointer-events: none;
}

.category-card__label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: center;
}

.output-error {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1.0625rem;
}

.tag-link {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-wobbly-pill);
  box-shadow: 2px 2px 0 0 var(--ink);
  text-decoration: none;
  transition: transform 0.1s ease, background-color 0.1s ease, box-shadow 0.1s ease;
}

.tag-link:hover {
  background: var(--post-it);
  transform: rotate(-2deg) translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--ink);
}

.tag-link:nth-child(even):hover {
  transform: rotate(2deg) translate(1px, 1px);
}

.faq-item {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-wobbly-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-hard-sm);
}

.faq-item:nth-child(odd) {
  transform: rotate(-0.4deg);
}

.faq-item:nth-child(even) {
  transform: rotate(0.4deg);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
}

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

.faq-item summary::before {
  content: '+ ';
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: '− ';
}

.faq-item p {
  margin-top: 0.75rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  opacity: 0.9;
}

.deco-arrow {
  display: none;
  position: absolute;
  right: -1.5rem;
  bottom: -1.25rem;
  width: 100px;
  height: 70px;
  pointer-events: none;
  opacity: 0.85;
}

@media (min-width: 768px) {
  .deco-arrow {
    display: block;
  }
}

.btn-wrap {
  position: relative;
}

.deco-scribble {
  display: none;
  position: absolute;
  top: -1.5rem;
  right: -1rem;
  width: 3rem;
  height: 3rem;
  border: 3px dashed var(--accent);
  border-radius: var(--radius-wobbly);
  animation: gentle-bounce 3s ease-in-out infinite;
  pointer-events: none;
}

@media (min-width: 768px) {
  .deco-scribble {
    display: block;
  }
}

@keyframes gentle-bounce {
  0%,
  100% {
    transform: translateY(0) rotate(12deg);
  }
  50% {
    transform: translateY(-6px) rotate(8deg);
  }
}

.hero-wrap {
  position: relative;
  text-align: center;
  margin-bottom: 2.5rem;
}

.home-link {
  color: var(--ink);
  opacity: 0.7;
  text-decoration: none;
  font-size: 1.0625rem;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

.home-link:hover {
  opacity: 1;
  color: var(--pen-blue);
  transform: rotate(-2deg);
}

.wavy-underline {
  text-decoration: underline wavy var(--accent);
  text-underline-offset: 4px;
}

.generator-wrap {
  position: relative;
}

.page-intro {
  margin-bottom: 2.5rem;
}

.page-intro h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  transform: rotate(-0.5deg);
}

.page-intro p {
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: 0.85;
}

.blog-card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-wobbly-md);
  box-shadow: var(--shadow-hard-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.blog-card:hover {
  transform: rotate(0.5deg) translate(2px, 2px);
  box-shadow: var(--shadow-hard-hover);
  background: var(--post-it);
}

.blog-card:nth-child(even):hover {
  transform: rotate(-0.5deg) translate(2px, 2px);
}

.blog-date {
  display: block;
  font-size: 0.95rem;
  opacity: 0.65;
  margin-bottom: 0.35rem;
}

.blog-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

.blog-card-excerpt {
  margin-top: 0.5rem;
  font-size: 1.0625rem;
  line-height: 1.5;
  opacity: 0.85;
}

/* Home blog preview — image tile + caption below */
.blog-tiles-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  width: 100%;
}

.blog-tile-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.blog-tile-item:nth-child(odd) .blog-tile {
  transform: rotate(-1deg);
}

.blog-tile-item:nth-child(even) .blog-tile {
  transform: rotate(1deg);
}

.blog-tile-item--alt .blog-tile {
  border-color: var(--accent);
  box-shadow: 2px 2px 0 0 var(--accent);
}

.blog-tile {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.375rem;
  background: var(--white);
  border: 2px dashed var(--pen-blue);
  border-radius: var(--radius-wobbly-sm);
  box-shadow: 2px 2px 0 0 var(--pen-blue);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.blog-tile__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.blog-tile-item:hover .blog-tile {
  background: var(--post-it);
  transform: rotate(0deg) translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--ink);
}

.blog-tile__caption {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  transition: color 0.1s ease;
}

.blog-tile-item:hover .blog-tile__caption {
  color: var(--pen-blue);
}

@media (min-width: 640px) {
  .blog-tiles-row {
    gap: 1.25rem;
  }

  .blog-tile-item {
    gap: 0.625rem;
  }

  .blog-tile__caption {
    font-size: 0.85rem;
  }
}

.blog-article {
  font-size: 1.125rem;
  line-height: 1.65;
}

.blog-article h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-article p {
  margin-bottom: 1rem;
}

.blog-meta {
  font-size: 1rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

.blog-empty {
  font-size: 1.125rem;
  line-height: 1.6;
  padding: 1.25rem;
  border: 3px dashed var(--ink);
  border-radius: var(--radius-wobbly-sm);
  background: var(--white);
}

.blog-empty code {
  font-family: ui-monospace, monospace;
  font-size: 0.95em;
  background: var(--muted);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.price-grid {
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

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

  .price-card--featured {
    transform: rotate(-0.5deg) scale(1.04);
  }
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-wobbly-md);
  box-shadow: var(--shadow-hard-sm);
  padding: 1.5rem 1.25rem 1.75rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.price-card:hover {
  box-shadow: var(--shadow-hard);
}

.price-card--featured {
  background: var(--post-it);
  box-shadow: var(--shadow-hard);
}

.price-card__badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  padding: 0.2rem 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--white);
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: var(--radius-wobbly-pill);
  box-shadow: 2px 2px 0 0 var(--ink);
  white-space: nowrap;
}

.price-card__name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.price-card__amount {
  margin-top: 0.5rem;
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.price-card__currency {
  font-size: 1.25rem;
  vertical-align: super;
}

.price-card__period {
  margin-top: 0.25rem;
  text-align: center;
  font-size: 1rem;
  opacity: 0.7;
}

.price-card__features {
  flex: 1;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.price-card__features li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.price-card__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--pen-blue);
  font-weight: 700;
}
