/*
Theme Name: Penlify — Home
Theme URI: https://penlify.com
Author: Penlify
Author URI: https://penlify.com
Description: Marketing landing theme for penlify.com — a warm, editorial, high-converting one-page site for Penlify, the blog writer built to rank in search and get cited by AI answer engines. Styled with Tailwind (matching the app's "shuttle" palette).
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: penlify-home
*/

/* --------------------------------------------------------------------------
   Tailwind (Play CDN + inline config in functions.php) does the layout. This
   file carries the theme header plus the hand-crafted, editorial details that
   utilities can't express — the texture and imperfection that keep the page
   from reading as a generic AI template.
   -------------------------------------------------------------------------- */

html { scroll-behavior: smooth; }
body { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
.font-display { font-family: 'Fraunces', ui-serif, Georgia, serif; }

/* Balance short headlines so ragged line-breaks don't look accidental. */
.text-balance { text-wrap: balance; }

/* Faint warm paper grain — barely-there texture over flat sections. */
.grain { position: relative; }
.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.grain > * { position: relative; z-index: 1; }

/* Hand-drawn underline accent (for one word in the hero headline). */
.mark-underline {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='18' viewBox='0 0 240 18' fill='none'%3E%3Cpath d='M3 12C50 5 120 4 168 8s55 6 69 2' stroke='%23a3c07f' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 88%;
  background-size: 100% 0.42em;
  padding-bottom: 0.06em;
}

/* Soft marker highlight behind key inline phrases. */
.mark-highlight {
  background: linear-gradient(180deg, transparent 58%, #e2ecd3 58%);
  padding: 0 0.12em;
}

/* Editorial dotted rule. */
.rule-dotted {
  border: 0;
  border-top: 2px dotted #d5c4ab;
}

/* Ticket-notch corners for the pricing "most popular" card — a small crafted detail. */
.notch {
  -webkit-mask:
    radial-gradient(0.6rem at 0 50%, transparent 98%, #000) left,
    radial-gradient(0.6rem at 100% 50%, transparent 98%, #000) right;
  -webkit-mask-size: 51% 100%;
  -webkit-mask-repeat: no-repeat;
}

/* conic-gradient score ring */
.ring {
  position: relative;
  background: conic-gradient(var(--ring-color) calc(var(--val) * 1%), #e7dbc9 0);
}
.ring::after { content: ''; position: absolute; inset: 6px; border-radius: 9999px; background: #fdfbf7; }
.ring > span { position: relative; z-index: 1; }

/* scroll reveal — used sparingly, section-level only */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* faq accordion */
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }

/* Long-form / legal prose (Tailwind Play CDN has no typography plugin). */
.prose-penlify { color: #5e4f3b; font-size: 1rem; line-height: 1.75; }
.prose-penlify h2 {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em;
  color: #2c2620; margin: 2.5rem 0 0.75rem;
}
.prose-penlify h3 {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-weight: 600; font-size: 1.15rem; color: #2c2620; margin: 1.75rem 0 0.5rem;
}
.prose-penlify p { margin: 0 0 1rem; }
.prose-penlify a { color: #3c5622; text-decoration: underline; text-underline-offset: 3px; }
.prose-penlify ul { margin: 0 0 1rem 1.25rem; list-style: disc; }
.prose-penlify li { margin: 0.35rem 0; }
.prose-penlify strong { color: #2c2620; }
.prose-penlify hr { border: 0; border-top: 1px solid #e7dbc9; margin: 2.5rem 0; }
.prose-penlify > :first-child { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
