/* =========================================================================
   StudioFolio — shared SEO landing-page design system
   =========================================================================
   Used by every static /features/* and top-level SEO page (free-crm-for-
   photographers.html, features/photography-crm.html, features/client-
   galleries.html, and future ones). Page-specific visuals (hero mockups,
   diagrams, device frames) live in css/pages/<page>.css and load AFTER this
   file, so they can override a shared default when a page genuinely needs
   different sizing.

   Sections below:
     1. Design tokens
     2. Reset & base typography
     3. Kicker / eyebrow label
     4. Layout: .wrap, section rhythm
     5. Header / nav, incl. Features/Resources dropdowns & mobile menu toggle
     6. Buttons + arrow micro-interaction
     7. Breadcrumb
     8. Section heading
     9. Cards & screenshot frames (.ui-panel)
    10. Value point (checkmark list item)
    11. FAQ
    12. Final CTA
    13. Footer (brand + grouped link columns)
    14. Scroll-reveal animation system (respects prefers-reduced-motion)
    15. Shared responsive breakpoints
   ========================================================================= */

/* ---- 1. Design tokens ---- */
:root {
  --gold: #D7B46A;
  --gold-deep: #9B7841;
  --bg: #FDFBF7;
  --bg-alt: #F4EFE6;
  --card: #FFFFFF;
  --border: #E7E0D5;
  --text: #211F1B;
  --text-muted: #716B62;
  --sage: #5C7462;
  --ink: #211F1B;
  --ink-panel: #2A2824;
  --ink-panel-border: #454139;
  --ink-soft: #BEB8AD;
  --green-cta: #3C453B;

  /* Motion tokens: shared timing/easing for hover and reveal transitions. */
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  --ease-out-soft: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: 220ms;
  --dur-base: 260ms;
  --dur-reveal: 550ms;
}

/* ---- 2. Reset & base typography ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Keyboard focus: visible everywhere, restrained, on-brand. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- 3. Kicker / eyebrow label ---- */
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 800; margin-bottom: 14px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--gold-deep); flex: none; }
.kicker.light { color: #E6D8BC; }
.kicker.light::before { background: var(--gold); }

/* ---- 4. Layout: .wrap, section rhythm ---- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Default section padding; a page may override (e.g. a page with a tighter
   hero) in its own css/pages/<page>.css. */
section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }
section.dark { background: var(--ink); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.microcopy { margin: 18px 0 0; color: var(--text-muted); font-size: 12px; font-weight: 600; }

/* ---- 5. Header / nav ---- */
header.nav { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 97%, transparent); backdrop-filter: blur(16px); z-index: 10; }
.nav-inner { position: relative; display: flex; align-items: center; padding: 16px 24px; max-width: 1180px; margin: 0 auto; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; font-family: 'Playfair Display', serif; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--gold); display: flex; align-items: center; justify-content: center; flex: none; }
.brand .logo::before { content: ""; width: 12px; height: 12px; border: 1.6px solid var(--text); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--gold); background: var(--text); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links > a { padding: 9px 14px; border-radius: 8px; color: var(--text-muted); font-size: 14px; transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease; }
.nav-links > a:hover, .nav-links > a[aria-current="page"] { background: var(--bg-alt); color: var(--text); }
.nav-auth { display: flex; align-items: center; gap: 8px; }
.nav-auth-mobile { display: none; }

/* Features / Resources dropdowns — built on <details>, so opening/closing
   works with zero JS (tap or click, native keyboard support). js/studiofolio-
   seo.js layers on progressive enhancements only (closing a sibling dropdown
   when another opens, Escape-to-close) — nothing here depends on it. */
.nav-dropdown { position: relative; }
.nav-dropdown > summary {
  display: flex; align-items: center; gap: 5px; list-style: none; cursor: pointer;
  padding: 9px 14px; border-radius: 8px; color: var(--text-muted); font-size: 14px;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary:hover, .nav-dropdown[open] > summary { background: var(--bg-alt); color: var(--text); }
.nav-dropdown > summary .caret { width: 9px; height: 9px; flex: none; transition: transform var(--dur-fast) ease; }
.nav-dropdown[open] > summary .caret { transform: rotate(180deg); }
.dropdown-panel { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 34px rgba(64,54,38,.16); padding: 8px; z-index: 30; }
.dropdown-panel a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text); transition: background-color var(--dur-fast) ease; }
.dropdown-panel a:hover, .dropdown-panel a:focus-visible { background: var(--bg-alt); }
.dropdown-panel a[aria-current="page"] { background: var(--bg-alt); color: var(--gold-deep); }
.dropdown-panel .dd-desc { display: block; font-size: 11.5px; font-weight: 400; color: var(--text-muted); margin-top: 1px; }

/* Mobile menu toggle — a visually-hidden checkbox + its <label>, so the
   panel opens/closes with zero JS (the checkbox stays in the tab order and
   toggles on Space/click same as any checkbox; JS only adds aria-expanded
   sync and auto-close-on-navigate as enhancements). */
.nav-toggle-checkbox {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px; cursor: pointer; flex: none;
  margin-left: auto; color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .icon-close { display: none; }
.nav-toggle-checkbox:checked ~ .menu-toggle .icon-open { display: none; }
.nav-toggle-checkbox:checked ~ .menu-toggle .icon-close { display: block; }
.nav-toggle-checkbox:focus-visible ~ .menu-toggle { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

/* ---- 6. Buttons + arrow micro-interaction ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 22px; border-radius: 9px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard),
              background-color var(--dur-base) ease,
              border-color var(--dur-base) ease,
              color var(--dur-base) ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(33,31,27,.14); }
.btn:active { transform: translateY(0); box-shadow: 0 4px 10px rgba(33,31,27,.12); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #34312C; box-shadow: 0 10px 24px rgba(33,31,27,.3); }

.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #E2C179; box-shadow: 0 10px 24px rgba(155,120,65,.32); }

.btn-outline { border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-alt); border-color: #C9BEA8; box-shadow: 0 6px 16px rgba(64,54,38,.08); }

.btn-outline-dark { border-color: #7F8B7F; color: #fff; }
.btn-outline-dark:hover { background: rgba(255,255,255,.08); border-color: #fff; box-shadow: none; }

.btn-sm { padding: 8px 16px; font-size: 14px; }

/* A trailing/leading → or ↓ glyph, wrapped in <span class="arrow">, nudges a
   few pixels in its pointing direction on hover/focus — used inside .btn and
   inline text links alike. transform composes with any page-specific
   rotate() set on a particular arrow (see e.g. free-crm.css's downward one). */
.arrow { display: inline-block; transition: transform var(--dur-base) var(--ease-standard); }
a:hover .arrow, a:focus-visible .arrow { transform: translateX(3px); }

/* Restrained hover for inline text links that aren't full buttons. */
.free-cta-link, .chain-cta a { transition: color var(--dur-fast) ease; }
.free-cta-link:hover, .chain-cta a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover, .btn:active, .arrow, a:hover .arrow {
    transition: none !important;
    transform: none !important;
  }
}

/* ---- 7. Breadcrumb ---- */
.breadcrumb { padding: 14px 0 0; font-size: 12px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); transition: color var(--dur-fast) ease; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span.sep { margin: 0 6px; color: var(--border); }
.breadcrumb span.current { color: var(--text); font-weight: 600; }

/* ---- 8. Section heading ----
   Default is left-aligned with an opt-in .center modifier (the convention
   introduced by the CRM/galleries pages). free-crm-for-photographers.html
   predates that convention and is always centered, so it fully restates
   this block in its own page CSS rather than composing with .center. */
.section-heading { max-width: 720px; margin: 0 0 48px; }
.section-heading.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-heading .kicker.center { justify-content: center; }
.section-heading h2 { font-size: 40px; letter-spacing: -.8px; line-height: 1.12; }
.section-heading p { color: var(--text-muted); font-size: 15.5px; margin: 15px 0 0; line-height: 1.65; max-width: 620px; }
.section-heading.light h2 { color: #fff; }
.section-heading.light p { color: var(--ink-soft); }

/* ---- 9. Cards & screenshot frames ---- */
.ui-panel { border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 18px 36px rgba(69,58,41,.08); overflow: hidden; background: #fff; }

/* ---- 10. Value point (checkmark list item) & free-entry footer links ---- */
.value-point { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; margin-bottom: 11px; }
.value-point svg { width: 17px; height: 17px; color: var(--sage); stroke-width: 2; flex: none; }

.free-cta-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 28px; }
.free-cta-link { font-size: 14px; font-weight: 700; color: var(--gold-deep); }
.free-cta-link.secondary { color: var(--text-muted); font-weight: 600; }

/* ---- 11. FAQ ---- */
.faq-grid { display: grid; grid-template-columns: 4fr 6fr; gap: 56px; align-items: start; }
.faq-grid h2 { font-size: 36px; line-height: 1.12; }
details { border-bottom: 1px solid var(--border); padding: 16px 0; }
details summary { font-weight: 700; font-size: 15px; cursor: pointer; list-style: none; transition: color var(--dur-fast) ease; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--gold-deep); font-size: 19px; transition: transform var(--dur-fast) ease; }
details[open] summary::after { content: "\2013"; }
details p { color: var(--text-muted); margin: 13px 0 0; font-size: 13.5px; line-height: 1.6; }
details p a { color: var(--gold-deep); font-weight: 700; }

/* ---- 12. Final CTA ---- */
.final-cta-wrap { padding: 0 20px 20px; }
.final-cta { background: var(--green-cta); border-radius: 22px; padding: 55px 20px; text-align: center; }
.final-cta h2 { color: #fff; font-size: 44px; line-height: 1.1; letter-spacing: -1px; }
.final-cta p { max-width: 560px; margin: 18px auto 0; color: #D8DED8; font-size: 16px; line-height: 1.6; }
.final-cta .cta-row { justify-content: center; margin-top: 30px; }

/* ---- 13. Footer ----
   A wider site-navigation area: brand/tagline plus grouped link columns.
   Columns only appear when they have real, non-broken destinations — see
   each page's HTML for which columns it actually renders. */
footer.site-footer { padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-tagline { color: var(--text-muted); font-size: 13px; line-height: 1.65; max-width: 260px; margin: 0; }
.footer-col-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 1px; }
.footer-col a { padding: 6px 0; font-size: 13.5px; color: var(--text-muted); transition: color var(--dur-fast) ease; }
.footer-col a:hover, .footer-col a:focus-visible { color: var(--text); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border); }
.copyright { color: var(--text-muted); font-size: 11px; }

/* ---- 14. Scroll-reveal animation system ----
   Progressive enhancement: elements are fully visible by default. Only once
   js/studiofolio-seo.js confirms (a) JS ran and (b) the visitor has not
   requested reduced motion does it add .has-motion to <html>, at which point
   [data-reveal]/[data-reveal-scale] elements start hidden and fade/lift into
   place as js/studiofolio-seo.js's IntersectionObserver marks them
   .is-revealed. Nothing here can hide content from a visitor whose browser
   doesn't run the script (crawlers, disabled JS, script errors). */
.has-motion [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-reveal) var(--ease-out-soft),
              transform var(--dur-reveal) var(--ease-out-soft);
}
.has-motion [data-reveal].is-revealed { opacity: 1; transform: none; }

.has-motion [data-reveal-scale] {
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity var(--dur-reveal) var(--ease-out-soft),
              transform var(--dur-reveal) var(--ease-out-soft);
}
.has-motion [data-reveal-scale].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-scale] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- 15. Shared responsive breakpoints ----
   Only the rules identical across every page live here; page-specific pixel
   overrides (hero font sizes, mockup rescaling, etc.) stay in css/pages. */
@media (max-width: 980px) {
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  section { padding: 56px 0; }
  .hero { text-align: center; padding-top: 24px; }
  .hero .cta-row { justify-content: center; }

  /* Nav collapses to a hamburger; .nav-links becomes the slide-down panel it
     opens, and .nav-auth's buttons move inside that panel (.nav-auth-mobile)
     since a single DOM node can't render in two places at once. */
  .menu-toggle { display: flex; }
  .nav-auth { display: none; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px; box-shadow: 0 20px 34px rgba(64,54,38,.12);
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav-toggle-checkbox:checked ~ .nav-links { display: flex; }
  .nav-links > a { padding: 13px 4px; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 15px; }
  .nav-dropdown > summary { padding: 13px 4px; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 15px; }
  .nav-dropdown[open] > summary { border-bottom-color: transparent; }
  .dropdown-panel { position: static; top: auto; left: auto; min-width: 0; border: none; box-shadow: none; border-radius: 0; padding: 0 0 8px 10px; background: transparent; }
  .dropdown-panel a { border-bottom: 1px solid var(--border); }
  .dropdown-panel a:last-child { border-bottom: none; }
  .nav-auth-mobile { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
