/*
Theme Name: 5fifi Flow
Theme URI: https://5fifi.com/5fifi-flow
Author: 5fifi
Author URI: https://5fifi.com
Description: Marketing site for 5fifi Flow, a free desktop app that plays private, satisfying keyboard and mouse click sounds. Built from the final_design_handoff_5fifi_flow_website mockups — "Emerald & Cognac" palette, Cormorant Garamond + Inter, calm/private/no-emoji brand tone.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: 5fifi-flow
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --cream: #F5F1E8;
  --bg-page: #EDEAE3;
  --bg-inset: #EDE7D8;
  --sage: #8FA68E;
  --forest: #1B4332;
  --deep-forest: #12211A;
  --ink: #2E2018;
  --ink-dark: #140E0A;
  --burgundy: #7C3B3B;

  --border-soft: rgba(27, 67, 50, 0.12);
  --border-med: rgba(27, 67, 50, 0.15);
  --border-strong: rgba(27, 67, 50, 0.25);
  --hover-tint: rgba(143, 166, 142, 0.15);
  --hover-tint-strong: rgba(143, 166, 142, 0.18);
  --burgundy-tint: rgba(124, 59, 59, 0.15);
  --burgundy-tint-strong: rgba(124, 59, 59, 0.18);
  --watermark-tint: rgba(27, 67, 50, 0.05);
  --error: #B3261E;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --max-width: 1180px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* Hebrew (the only RTL language planned -- see docs/NEW_LANGUAGE_RELEASE_CHECKLIST.md)
   needs its own webfont: neither Cormorant Garamond nor Inter ships Hebrew
   glyphs, so without this override the browser silently substitutes a
   generic system Hebrew font. Frank Ruhl Libre + Rubik (loaded conditionally
   in functions.php's ff_assets() via is_rtl()) are the closest-feeling
   Hebrew-supporting pairing to the brand's serif-heading/geometric-body
   combination. The Latin fallback stays in the stack so any Latin-script
   text (the "5fifi Flow" brand name, English OS-UI quotes) still renders
   in the brand's own font, not Frank Ruhl Libre/Rubik's Latin glyphs. */
[dir="rtl"] {
  --font-heading: 'Frank Ruhl Libre', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Rubik', 'Inter', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--burgundy); text-decoration: none; }
a:hover { color: var(--forest); text-decoration: underline; }
button { font-family: inherit; margin: 0; }
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.ff-wrap { max-width: var(--max-width); margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.ff-page { min-height: 100vh; display: flex; flex-direction: column; }
.ff-page main { flex: 1; }
.ff-eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--burgundy);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ff-watermark {
  position: absolute;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1;
  color: var(--watermark-tint);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.ff-watermark--hero { top: -60px; inset-inline-end: -80px; font-size: 420px; }
.ff-section--relative { position: relative; overflow: hidden; }

/* ==========================================================================
   Header
   ========================================================================== */
.ff-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 234, 227, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-soft);
}
.ff-header__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.ff-logo img { height: 34px; width: auto; }
.ff-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.ff-nav__link {
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
}
.ff-nav__link:hover { color: var(--burgundy); text-decoration: none; }
.ff-dropdown { position: relative; }
.ff-dropdown__trigger {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
}
.ff-dropdown__trigger:hover { color: var(--burgundy); text-decoration: none; }
.ff-dropdown__caret { font-size: 10px; opacity: 0.6; }
.ff-dropdown__menu {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  margin-top: 8px;
  background: var(--cream);
  border: 1px solid var(--border-med);
  box-shadow: 0 8px 24px rgba(27, 67, 50, 0.1);
  border-radius: var(--radius-sm);
  min-width: 230px;
  overflow: hidden;
  display: none;
  z-index: 60;
}
.ff-dropdown.is-open .ff-dropdown__menu { display: block; }
.ff-dropdown__menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.ff-dropdown__menu-item + .ff-dropdown__menu-item { border-top: 1px solid rgba(27, 67, 50, 0.1); }
.ff-dropdown__menu-item:hover { background: var(--hover-tint); color: var(--burgundy); text-decoration: none; }
.ff-dropdown__menu-item svg { flex-shrink: 0; color: var(--sage); }
.ff-lang-pill {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ff-lang-pill:hover { color: var(--burgundy); border-color: var(--burgundy); }
.ff-lang-menu { min-width: 120px; }
.ff-lang-menu a { display: block; padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--ink); }
.ff-lang-menu a:hover { background: var(--hover-tint); color: var(--burgundy); text-decoration: none; }
.ff-lang-menu__item--disabled {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.4;
  cursor: default;
  white-space: nowrap;
}
.ff-lang-menu__item--disabled em { font-style: normal; font-size: 11px; }
.ff-footer .ff-lang-menu__item--disabled { color: var(--cream); }
/* Close (X) affordance -- only shown for the footer language menu on mobile
   (see the @media block); the header/desktop menus close on click-away or
   hover-out, so they don't need it. */
.ff-lang-menu__close {
  display: none;
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--cream);
  opacity: 0.75;
  cursor: pointer;
}
.ff-lang-menu__close:hover { opacity: 1; background: rgba(245, 241, 232, 0.1); }
.ff-nav__link.is-active,
.ff-dropdown.is-active > .ff-dropdown__trigger {
  font-weight: 600;
  color: var(--forest);
}
.ff-nav__cta {
  font-weight: 600;
  font-size: 15px;
  background: var(--forest);
  color: var(--cream);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
}
.ff-nav__cta:hover { background: var(--burgundy); color: var(--cream); text-decoration: none; }

.ff-nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--forest);
}
.ff-nav__toggle-icon--close { display: none; }
.ff-nav__toggle[aria-expanded="true"] .ff-nav__toggle-icon--open { display: none; }
.ff-nav__toggle[aria-expanded="true"] .ff-nav__toggle-icon--close { display: block; }

@media (max-width: 900px) {
  /* backdrop-filter on .ff-header makes it the containing block for any
     position:fixed descendant (per spec, same as `filter`) -- without this
     override, .ff-nav's "inset: 62px 0 0 0" below resolves against the
     ~62px-tall header itself instead of the viewport, collapsing the open
     mobile menu to almost no height. */
  .ff-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ff-header__inner { padding-left: 20px; padding-right: 20px; }
  .ff-nav__toggle { display: flex; }
  .ff-nav {
    position: fixed;
    inset: 62px 0 0 0;
    background: var(--bg-page);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 20px 28px 32px;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .ff-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .ff-nav__link, .ff-dropdown__trigger { padding: 12px 0; width: 100%; font-size: 16px; }
  .ff-dropdown { width: 100%; }
  .ff-dropdown__menu { position: static; margin-top: 0; box-shadow: none; border: none; background: transparent; }
  .ff-dropdown__menu-item { padding: 10px 0 10px 12px; }
  .ff-lang-pill { margin: 8px 0; }
  .ff-lang-menu { position: static; box-shadow: none; }
  .ff-nav__cta { width: 100%; text-align: center; margin-top: 8px; }

  /* The footer language pill is a standalone popover, NOT part of the
     mobile hamburger accordion, so it must not inherit the flattened
     `position: static` above. It sits at the very bottom of the page, so
     it opens UPWARD, hugging the pill, with a visible close button. */
  .ff-footer .ff-dropdown {
    display: flex;              /* height == the pill, so bottom:100% hugs it */
    width: 100%;
  }
  .ff-footer .ff-dropdown__menu.ff-lang-menu {   /* 0,3,0 -- beats the desktop rule below */
    position: absolute;
    top: auto;
    bottom: calc(100% + 6px);
    inset-inline-start: 0;
    inset-inline-end: auto;
    margin: 0;
    padding-top: 34px;         /* room for the close button */
    min-width: 200px;
    max-width: calc(100vw - 40px);
    max-height: 60vh;
    overflow-y: auto;
    background: var(--forest);
    border: 1px solid rgba(245, 241, 232, 0.28);
    border-radius: var(--radius-sm);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  }
  .ff-footer .ff-lang-menu__close { display: flex; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.ff-footer { background: var(--deep-forest); color: var(--cream); padding: 30px 0 20px; }
.ff-footer__wrap { max-width: 900px; padding-left: 0; padding-right: 0; }
@media (max-width: 900px) {
  .ff-footer__wrap { padding-left: 20px; padding-right: 20px; }
}
.ff-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(245, 241, 232, 0.15);
}
.ff-footer__logo img { height: 42px; width: auto; margin-bottom: 14px; }
.ff-footer__tagline { font-size: 14px; opacity: 0.7; }
.ff-footer__tagline a { color: var(--cream); text-decoration: underline; }
.ff-footer__tagline a:hover { color: var(--burgundy); }
.ff-footer__nav { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; min-height: 42px; }
.ff-footer__nav a { font-size: 14px; font-weight: 500; color: var(--cream); opacity: 0.85; }
.ff-footer__nav a:hover { color: var(--burgundy); text-decoration: none; }
.ff-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 22px;
}
.ff-footer__legal { display: flex; gap: 24px; flex-wrap: wrap; }
.ff-footer__legal a { font-size: 13px; color: var(--cream); opacity: 0.6; }
.ff-footer__legal a:hover { color: var(--burgundy); text-decoration: none; }
.ff-footer .ff-dropdown__trigger,
.ff-footer .ff-lang-pill {
  font-size: 13px;
  color: var(--cream);
  opacity: 0.85;
  border-color: rgba(245, 241, 232, 0.3);
}
.ff-footer .ff-lang-pill { padding: 5px 12px; }
.ff-footer .ff-lang-pill:hover { color: var(--burgundy); border-color: var(--burgundy); }
.ff-footer .ff-dropdown__menu {
  top: auto;
  bottom: 100%;
  inset-inline-start: auto;
  inset-inline-end: 0;
  margin-top: 0;
  margin-bottom: 8px;
  background: var(--deep-forest);
  border-color: rgba(245, 241, 232, 0.2);
}
.ff-footer .ff-dropdown__menu a { color: var(--cream); }
.ff-footer .ff-dropdown__menu a:hover { background: rgba(245, 241, 232, 0.08); color: var(--burgundy); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.ff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.ff-btn--primary { background: var(--forest); color: var(--cream); }
.ff-btn--primary:hover { background: var(--burgundy); color: var(--cream); text-decoration: none; }
.ff-btn--outline { background: rgba(27, 67, 50, 0.08); color: var(--forest); }
.ff-btn--outline:hover { background: var(--burgundy-tint); color: var(--burgundy); text-decoration: none; }
.ff-btn--ghost {
  background: rgba(245, 241, 232, 0.1);
  color: var(--cream);
  border: 1px solid rgba(245, 241, 232, 0.35);
}
.ff-btn--ghost:hover { background: var(--burgundy); border-color: var(--burgundy); color: var(--cream); text-decoration: none; }
.ff-btn--cream { background: var(--cream); color: var(--forest); }
.ff-btn--cream:hover { background: var(--burgundy); color: var(--cream); text-decoration: none; }
/* full-width buttons may wrap: localized labels (JA/KO) are longer than EN
   and `white-space: nowrap` on .ff-btn forced the download grid to overflow */
.ff-btn--block { width: 100%; white-space: normal; text-align: center; }
.ff-btn--sm { padding: 10px 18px; font-size: 13px; }
.ff-btn--disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.ff-btn--disabled em { font-style: normal; font-weight: 500; font-size: 12px; }

/* ==========================================================================
   Cookie consent banner
   ========================================================================== */
.ff-consent-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 90;
  max-width: 640px; margin: 0 auto;
  background: var(--cream); border: 1px solid var(--border-med); border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(0,0,0,0.16); padding: 20px 22px;
}
.ff-consent-banner[hidden] { display: none; }
.ff-consent-banner__inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ff-consent-banner__text { flex: 1 1 280px; font-size: 13px; line-height: 1.6; color: var(--ink); opacity: 0.85; margin: 0; }
.ff-consent-banner__text a { color: var(--forest); text-decoration: underline; }
.ff-consent-banner__text a:hover { color: var(--burgundy); }
.ff-consent-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }

.ff-footer__legal-link {
  font-size: 13px; color: var(--cream); opacity: 0.6; background: none; border: none; padding: 0;
  font-family: var(--font-body); cursor: pointer;
}
.ff-footer__legal-link:hover { color: var(--burgundy); opacity: 1; }

/* ==========================================================================
   Cards
   ========================================================================== */
.ff-card {
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  color: var(--ink);
}
.ff-card:hover { border-color: var(--burgundy); text-decoration: none; }
.ff-card__icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; color: var(--sage); }
.ff-card__title { font-weight: 600; font-size: 19px; color: var(--forest); }
.ff-card__desc { font-size: 14px; color: var(--ink); opacity: 0.75; line-height: 1.6; }

/* ==========================================================================
   Hero / section heading patterns
   ========================================================================== */
.ff-page-hero { max-width: 900px; margin: 0 auto; padding: 40px 28px 12px; position: relative; text-align: center; }
.ff-page-hero--narrow { max-width: 680px; }
.ff-page-hero--tight { padding-bottom: 0; }
.ff-page-hero h1 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 40px;
  color: var(--forest);
  margin: 0 0 6px;
  text-wrap: pretty;
}
.ff-page-hero p:not(.ff-post-signature) { font-size: 17px; line-height: 1.6; color: var(--ink); opacity: 0.8; margin: 0; text-wrap: pretty; }

.ff-h2 { font-family: var(--font-heading); font-weight: 600; font-size: 32px; color: var(--forest); margin: 0 0 10px; text-align: center; }
.ff-h2-sub { font-size: 16px; color: var(--ink); opacity: 0.7; margin: 0 0 44px; text-align: center; }

/* ==========================================================================
   Grids
   ========================================================================== */
.ff-grid { display: grid; gap: 24px; }
/* let 1fr tracks shrink below their content so a long localized label
   inside a card can't push the whole grid wider than its container */
.ff-grid > * { min-width: 0; }
.ff-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ff-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ff-grid--4 { grid-template-columns: repeat(4, 1fr); }
.ff-grid--5 { grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 820px) {
  .ff-grid--3, .ff-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .ff-grid--5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .ff-grid--2, .ff-grid--3, .ff-grid--4 { grid-template-columns: 1fr; }
  .ff-grid--5 { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.ff-faq-list { display: flex; flex-direction: column; gap: 16px; }
.ff-faq-item { background: #FFFFFF; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 24px 28px; }
.ff-faq-item__q { font-weight: 600; font-size: 17px; color: var(--forest); margin-bottom: 8px; }
.ff-faq-item__a { font-size: 15px; line-height: 1.6; color: var(--ink); opacity: 0.8; text-wrap: pretty; }

/* ==========================================================================
   Dark CTA band (used on FAQ / Contact "I'd love to hear from you")
   ========================================================================== */
.ff-cta-band { background: var(--forest); padding: 40px 28px 24px; position: relative; overflow: hidden; }
.ff-cta-band .ff-watermark { color: rgba(245, 241, 232, 0.05); }
.ff-cta-band .ff-watermark--1 { top: 50%; inset-inline-end: -80px; transform: translateY(-50%); font-size: 420px; }
.ff-cta-band .ff-watermark--2 { top: -190px; inset-inline-start: -100px; font-size: 420px; }
.ff-cta-band__inner { max-width: 680px; margin: 0 auto; text-align: center; position: relative; }
.ff-cta-band h2 { font-family: var(--font-heading); font-weight: 600; font-size: 30px; line-height: 1.35; color: var(--cream); margin: 0 0 16px; text-wrap: balance; line-break: strict; word-break: keep-all; overflow-wrap: anywhere; }
.ff-cta-band p { font-size: 15px; color: var(--cream); opacity: 0.75; margin: 0 auto 22px; max-width: 560px; line-height: 1.6; text-wrap: pretty; }
.ff-cta-band__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Forms (Feedback page)
   ========================================================================== */
.ff-form-card { background: #FFFFFF; border: 1px solid var(--border-soft); border-radius: var(--radius-xl); padding: 40px 36px; }
.ff-star-row { display: flex; justify-content: center; gap: 6px; }
.ff-star {
  background: none; border: none; cursor: pointer; padding: 2px;
  font-size: 34px; line-height: 1; color: rgba(27, 67, 50, 0.2);
}
.ff-star.is-active, .ff-star.is-hover { color: var(--burgundy); }
.ff-rating-note { font-size: 13px; color: var(--burgundy); margin-top: 8px; font-weight: 500; min-height: 18px; }
.ff-rating-note:empty { margin-top: 0; min-height: 0; }
.ff-field-label { font-weight: 600; font-size: 15px; color: var(--forest); margin-bottom: 10px; }
.ff-textarea, .ff-input {
  width: 100%;
  border: 1px solid var(--border-med);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.ff-textarea { min-height: 120px; resize: vertical; margin-bottom: 24px; }
.ff-input { margin-bottom: 6px; }
.ff-textarea::placeholder, .ff-input::placeholder { color: rgba(46, 32, 24, 0.4); }
.ff-textarea:focus, .ff-input:focus { outline: none; border-color: var(--burgundy); }
.ff-input.has-error, .ff-textarea.has-error { border-color: var(--error); }
.ff-field-error { font-size: 13px; color: var(--error); margin-bottom: 18px; }
.ff-field-error:empty { margin-bottom: 0; }
.ff-form-note { text-align: center; font-size: 13px; color: var(--ink); opacity: 0.5; margin: 20px 0 0; }

.ff-modal-overlay {
  position: fixed; inset: 0; background: rgba(27, 67, 50, 0.35);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.ff-modal-overlay.is-open { display: flex; }
.ff-modal {
  background: var(--cream); border-radius: var(--radius-xl); padding: 44px 40px;
  max-width: 380px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.ff-modal__icon { font-size: 40px; margin-bottom: 16px; }
.ff-modal h2 { font-family: var(--font-heading); font-weight: 600; font-size: 26px; color: var(--forest); margin: 0 0 10px; }
.ff-modal p { font-size: 15px; color: var(--ink); opacity: 0.8; line-height: 1.6; margin: 0 0 24px; }

/* ==========================================================================
   Download page
   ========================================================================== */
.ff-download-card { gap: 14px; }
.ff-download-card__platform { font-weight: 600; font-size: 20px; color: var(--forest); }
.ff-download-card__req { font-size: 14px; color: var(--ink); opacity: 0.65; }
/* Legacy wrapper -- kept as a harmless no-op in case any old markup or a
   cached page still has it; layout now comes from the subgrid below. */
.ff-download-card__actions { display: contents; }

/* Align the icon / platform / requirement / primary button / secondary
   button of all three cards onto shared row lines, so the two button rows
   line up across every column no matter how many lines a localized
   requirement or button label wraps to (was: buttons drifted down by
   different amounts on VI/JA). Every card is a 5-row subgrid of the
   .ff-grid--3 track set. */
.ff-download-grid { row-gap: 14px; align-items: start; }
.ff-download-grid .ff-download-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  row-gap: 14px;
  align-items: start;
  justify-items: center;
}
.ff-download-grid .ff-download-card > .ff-btn {
  width: 100%;
  align-self: stretch;   /* fill the shared row so all primary (and all
                            secondary) buttons render the same height */
  height: 100%;
  margin: 0;
}
.ff-free-line { text-align: center; font-size: 13px; color: var(--ink); opacity: 0.5; margin: 16px 0 0; }
.ff-free-line--dark { color: var(--cream); opacity: 0.6; }
.ff-free-line--small { font-size: 11px; margin-top: 3px; }
@media (min-width: 900px) {
  .ff-free-line--small { white-space: nowrap; }
}
.ff-free-line a { color: var(--forest); font-weight: 500; opacity: 1; }
.ff-free-line a:hover { color: var(--burgundy); text-decoration: none; }

/* Shared vertical rhythm for a plain content section that follows a
   .ff-page-hero and precedes the footer (Download/Help/Feedback, etc.) —
   keeps that spacing centrally adjustable instead of re-guessed per page. */
.ff-page-section { padding-top: 18px; padding-bottom: 16px; }

.ff-mobile-download-note {
  display: none;
  max-width: 560px; margin: 0 auto 32px; text-align: center;
  background: #FFFFFF; border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 20px 24px; font-size: 14px; line-height: 1.6; color: var(--ink); opacity: 0.85;
}
.ff-mobile-download-note.is-visible { display: block; }

/* ==========================================================================
   Hero (Home)
   ========================================================================== */
.ff-hero {
  max-width: var(--max-width); margin: 0 auto; padding: 55px 28px 0;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center;
}
.ff-hero__title { font-family: var(--font-heading); font-weight: 600; font-size: 56px; line-height: 1.12; margin: 0 0 24px; color: var(--forest); text-wrap: pretty; }
.ff-hero__sub { font-size: 19px; line-height: 1.6; color: var(--ink); margin: 0 0 36px; max-width: 480px; }
.ff-hero__download { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ff-hero__also { font-size: 14px; color: var(--ink); opacity: 0.65; }
.ff-hero__free { font-size: 14px; color: var(--sage); font-weight: 500; margin: 22px 0 0; letter-spacing: 0.02em; }
.ff-hero__choose { font-size: 14px; color: var(--ink); opacity: 0.7; margin-bottom: 12px; }
.ff-hero__choose-row { display: flex; gap: 12px; flex-wrap: wrap; }

.ff-hero-mock {
  border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px rgba(27,67,50,0.18);
  border: 1px solid var(--border-soft); background: var(--cream);
  /* This is a screenshot-style mockup of the actual desktop app's window
     chrome (traffic-light dots, toggle switch, "5" watermark), which isn't
     itself localized/mirrored -- macOS traffic lights sit top-left
     regardless of system language. Isolating direction here keeps this
     block rendering exactly as designed even on a right-to-left page,
     instead of mirroring a screenshot of software that doesn't mirror. */
  direction: ltr;
}
.ff-hero-mock__bar { height: 34px; background: var(--bg-inset); border-bottom: 1px solid rgba(27,67,50,0.1); display: flex; align-items: center; padding: 0 12px; position: relative; }
.ff-hero-mock__dots { display: flex; gap: 7px; }
.ff-hero-mock__dots span { width: 10px; height: 10px; border-radius: 50%; }
.ff-hero-mock__dots span:nth-child(1) { background: #E9776A; }
.ff-hero-mock__dots span:nth-child(2) { background: #E8C15C; }
.ff-hero-mock__dots span:nth-child(3) { background: var(--sage); }
.ff-hero-mock__bar img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 20px; width: auto; }
.ff-hero-mock__body { position: relative; overflow: hidden; padding: 26px 30px 22px; }
.ff-hero-mock__watermark { position: absolute; bottom: -45px; right: -14px; font-family: var(--font-heading); font-weight: 600; font-size: 140px; color: var(--watermark-tint); line-height: 1; pointer-events: none; }
.ff-hero-mock__inner { position: relative; display: flex; flex-direction: column; gap: 16px; }
.ff-hero-mock__label { font-family: var(--font-heading); font-weight: 600; font-size: 18px; color: var(--forest); }
.ff-hero-mock__caption { font-size: 12px; color: var(--ink); opacity: 0.6; margin-top: 3px; }
.ff-hero-mock__toggle-row { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px 14px; }
.ff-hero-mock__toggle-title { font-weight: 600; font-size: 13px; color: var(--forest); }
.ff-hero-mock__toggle-desc { font-size: 11px; color: var(--ink); opacity: 0.6; margin-top: 2px; }
.ff-hero-mock__switch { width: 32px; height: 18px; border-radius: 20px; background: var(--forest); position: relative; flex-shrink: 0; }
.ff-hero-mock__switch span { width: 13px; height: 13px; border-radius: 50%; background: var(--cream); position: absolute; top: 2.5px; right: 2.5px; }
.ff-hero-mock__pack-label { font-weight: 600; font-size: 10px; color: var(--ink); opacity: 0.55; letter-spacing: 0.04em; margin-bottom: 7px; }
.ff-hero-mock__packs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.ff-hero-mock__pack { border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px 4px; display: flex; align-items: center; justify-content: center; }
.ff-hero-mock__pack--active { border: 1.5px solid var(--forest); background: rgba(143,166,142,0.08); }
@media (max-width: 900px) {
  .ff-hero { grid-template-columns: 1fr; padding-top: 36px; }
  .ff-hero__title { font-size: 40px; }
}

/* ==========================================================================
   Sound demo cards
   ========================================================================== */
.ff-sound-card {
  font-family: var(--font-body); cursor: pointer; background: #fff; border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 28px 16px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.ff-sound-card:hover, .ff-sound-card.is-playing { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(27,67,50,0.12); border-color: var(--sage); }
.ff-sound-card__icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--hover-tint); color: var(--forest); transition: background 0.15s; }
.ff-sound-card.is-playing .ff-sound-card__icon { background: var(--burgundy-tint); }
.ff-sound-card__label { font-weight: 600; font-size: 15px; color: var(--forest); }
.ff-sound-card__kind { font-size: 12px; color: var(--sage); font-weight: 500; }

/* ==========================================================================
   Trust section
   ========================================================================== */
.ff-trust-section { background: #EFE9DB; padding: 55px 55px; }
.ff-trust-item { text-align: center; }
.ff-trust-item__icon { display: flex; justify-content: center; margin-bottom: 14px; height: 32px; color: var(--forest); }
.ff-trust-item__title { font-family: var(--font-heading); font-weight: 600; font-size: 22px; color: var(--forest); margin-bottom: 10px; }
.ff-trust-item__desc { font-size: 15px; line-height: 1.6; color: var(--ink); opacity: 0.85; }

/* ==========================================================================
   Story / founder-teaser section
   ========================================================================== */
.ff-story-section { background: #DCE6DB; position: relative; overflow: hidden; padding: 55px 28px; }
.ff-story-section .ff-watermark { bottom: -30px; inset-inline-end: -30px; font-size: 460px; color: rgba(245,241,232,0.08); }
.ff-story-section__inner { max-width: 720px; margin: 0 auto; position: relative; }
.ff-story-section__bar { width: 44px; height: 3px; background: #214B3A; margin-bottom: 24px; }
.ff-story-section h2 { font-family: var(--font-heading); font-weight: 600; font-size: 32px; color: #214B3A; margin: 0 0 28px; text-align: start; text-wrap: pretty; }
.ff-story-section p { font-family: var(--font-heading); font-weight: 500; font-size: 20px; line-height: 1.6; color: #34483D; margin: 0 0 12px; text-align: start; }
.ff-story-section__link { margin-top: 28px; }
.ff-story-section__link a { font-weight: 600; font-size: 16px; color: #214B3A; }
.ff-story-section__link a:hover { color: var(--burgundy); text-decoration: none; }

/* ==========================================================================
   Pull-quote section
   ========================================================================== */
.ff-quote-section { max-width: var(--max-width); margin: 0 auto; padding: 55px 28px; text-align: center; }
.ff-quote-section__deco { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 11px; }
.ff-quote-bars { display: flex; align-items: center; gap: 3px; height: 26px; }
.ff-quote-bars span { width: 3px; background: var(--forest); opacity: 0.4; border-radius: 2px; }
.ff-quote-section__divider { width: 1px; height: 22px; background: rgba(27,67,50,0.25); }
.ff-quote-section p.ff-quote-text {
  font-family: var(--font-heading); font-weight: 600; font-size: clamp(18px, 2.2vw, 26px); line-height: 1.4;
  color: var(--forest); margin: 0 auto 22px; max-width: 100%; text-wrap: balance;
}
/* The source string has a hard-coded <br> (a deliberate 2-line break
   written for the original English copy); every language now targets a
   single line in the widened section above instead, so the break is
   neutralized here rather than re-keying the Polylang string across
   every already-released language.
   Font size is sized to fit the LONGEST known translation (Japanese,
   ~32 full-width characters) on one line within this section's own
   width -- deliberately smaller than the original 44px cap, which
   overflowed off the right edge for JA (real bug, caught live
   2026-09-04: white-space:nowrap + too-large a cap let it run past the
   viewport instead of wrapping). text-wrap: balance is kept as a safety
   net rather than white-space: nowrap -- if a future language's
   translation is still too long at this size, it wraps to a balanced
   2-line pair instead of silently overflowing again. */
.ff-quote-section p.ff-quote-text br { display: none; }
@media (max-width: 900px) {
  .ff-quote-section p.ff-quote-text { font-size: clamp(20px, 5vw, 28px); }
}
.ff-quote-mark { color: var(--burgundy); font-size: 1.4em; }
.ff-quote-caption { font-family: var(--font-body); font-weight: 300; font-size: 12px; letter-spacing: 0.2em; color: rgba(124,59,59,0.55); }

/* ==========================================================================
   Final CTA (download) band
   ========================================================================== */
.ff-final-cta { background: var(--forest); padding: 55px 55px 55px; text-align: center; position: relative; overflow: hidden; }
.ff-final-cta .ff-watermark { color: rgba(245,241,232,0.05); }
.ff-final-cta .ff-watermark--1 { top: 50%; inset-inline-end: -80px; transform: translateY(-50%); font-size: 620px; }
.ff-final-cta .ff-watermark--2 { top: -280px; inset-inline-start: -140px; font-size: 620px; }
.ff-final-cta__inner { max-width: var(--max-width); margin: 0 auto; position: relative; }
/* Widened from a flat 860px/38px (which wrapped JA's longer headline to 2
   lines, per the Founder's request) to give every language room for one
   line. font-size is a clamp rather than staying flat, for the same
   headroom reason as the quote-section fix above; flex-wrap: wrap +
   text-wrap: balance stay in place as the safety net -- no white-space:
   nowrap here, so a language that still doesn't fit wraps gracefully
   instead of overflowing (see the quote-section JA overflow bug this
   same session for why that matters). */
.ff-final-cta h2 { font-family: var(--font-heading); font-weight: 600; font-size: clamp(24px, 2.8vw, 34px); color: var(--cream); margin: 0 0 16px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-wrap: balance; }
.ff-final-cta__sub { font-size: 16px; color: var(--cream); opacity: 0.75; margin: 0 auto 36px; max-width: 900px; }
.ff-final-cta__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }

/* ==========================================================================
   404
   ========================================================================== */
.ff-404-code { font-family: var(--font-heading); font-weight: 600; font-size: 96px; color: var(--sage); line-height: 1; margin-bottom: 8px; }

/* ==========================================================================
   Post template (single)
   ========================================================================== */
.ff-post-header { max-width: 700px; margin: 0 auto; padding: 40px 28px 0; position: relative; text-align: center; }
.ff-post-tags { display: flex; justify-content: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.ff-tag-pill {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--forest);
  background: var(--hover-tint-strong); padding: 6px 14px; border-radius: 20px;
}
.ff-tag-pill:hover { background: var(--burgundy-tint-strong); color: var(--burgundy); text-decoration: none; }
.ff-post-header h1 { font-family: var(--font-heading); font-weight: 600; font-size: 38px; line-height: 1.4; color: var(--forest); margin: 0 0 6px; text-wrap: pretty; }
.ff-post-excerpt { font-size: 16px; line-height: 1.6; color: var(--ink); opacity: 0.7; margin: 0 0 40px; text-wrap: pretty; }
.ff-post-featured { max-width: 700px; margin: 0 auto; padding: 0 28px; }
/* Featured images are authored at exactly 1200x630 (and WP's ff-post-featured
   crop is 780x410, same ratio), so display them at natural ratio -- do NOT
   force aspect-ratio + object-fit:cover here: the box can render taller than
   40/21, and cover then zooms in and clips the left/right edge of the image
   (accent bar + headline). The empty-state .ff-image-slot below still needs
   a fixed ratio because it has no intrinsic size. */
.ff-post-featured img { width: 100%; height: auto; border-radius: 16px; display: block; }
.ff-image-slot { width: 100%; aspect-ratio: 40 / 21; border-radius: 16px; object-fit: cover; display: block; }
.ff-image-slot {
  background: var(--bg-inset); border: 1px dashed var(--border-strong); display: flex; align-items: center; justify-content: center;
  color: rgba(27,67,50,0.4); font-size: 13px; text-align: center; padding: 12px;
}
.ff-post-body { max-width: 700px; margin: 0 auto; padding: 24px 28px; position: relative; }
.ff-post-body__divider { height: 1px; background: rgba(27,67,50,0.15); margin-bottom: 24px; }
.ff-post-body-content { display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.6; color: var(--ink); }
.ff-post-body-content p { margin: 0; opacity: 0.8; text-wrap: pretty; }
/* Auto-hyphenation smooths the ragged right edge for space-delimited
   European scripts; deliberately NOT applied to Vietnamese (monosyllabic
   words), CJK, or Hebrew, which don't hyphenate. */
.ff-post-body-content:lang(en) p,
.ff-post-body-content:lang(es) p { hyphens: auto; }
.ff-post-body-content ol, .ff-post-body-content h4, .ff-post-body-content h5, .ff-post-body-content h6 { margin: 0; }
.ff-post-body-content h1, .ff-post-body-content h2, .ff-post-body-content h3,
.ff-post-body-content h4, .ff-post-body-content h5, .ff-post-body-content h6 { color: var(--forest); }
.ff-post-body-content blockquote { margin: 16px 0; padding-inline-start: 24px; border-inline-start: 2px solid var(--sage); }
.ff-post-body-content blockquote p { font-family: var(--font-heading); font-weight: 600; font-style: italic; font-size: 24px; line-height: 1.5; color: var(--forest); }
.ff-post-closing { font-size: 15px; color: var(--sage); font-weight: 500; text-align: center; margin: 28px 0 0; }
.ff-post-signature { font-family: var(--font-heading); font-size: 18px; color: var(--forest); font-weight: 600; text-align: center; margin: 12px 0 0; }

.ff-related { max-width: 900px; margin: 0 auto; padding: 0 28px 55px; position: relative; }
.ff-related__divider { height: 1px; background: rgba(27,67,50,0.15); margin-bottom: 48px; }
.ff-related h2 { font-family: var(--font-heading); font-weight: 600; font-size: 26px; color: var(--forest); margin: 0 0 28px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }
.ff-related h2 svg { color: var(--sage); }
.ff-related__scroll { display: flex; gap: 20px; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.ff-related__card { display: flex; flex-direction: column; gap: 14px; flex: 0 0 230px; scroll-snap-align: center; text-decoration: none !important; color: inherit; }
.ff-related__card-title { font-weight: 600; font-size: 16px; color: var(--forest); line-height: 1.4; }
.ff-related__card:hover .ff-related__card-title { color: var(--burgundy); }
.ff-related__card-excerpt { font-size: 13px; color: var(--ink); opacity: 0.65; line-height: 1.5; }
.ff-related__card-more { color: var(--burgundy); font-weight: 600; opacity: 1; }
.ff-related__card:hover .ff-related__card-more { color: var(--forest); }

/* ==========================================================================
   Tag archive template
   ========================================================================== */
.ff-tag-filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ff-tag-filter {
  font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  padding: 8px 18px; border-radius: 20px; border: none; cursor: pointer;
  background: var(--hover-tint-strong); color: var(--forest);
}
.ff-tag-filter:hover { background: var(--burgundy-tint-strong); color: var(--burgundy); }
.ff-tag-filter.is-active { background: var(--forest); color: var(--cream); }
.ff-tag-filter.is-active:hover { color: var(--cream); }

.ff-post-list { display: flex; flex-direction: column; gap: 28px; }
.ff-post-row {
  display: flex; gap: 24px; align-items: center; padding-bottom: 28px;
  border-bottom: 1px solid rgba(27,67,50,0.1); text-decoration: none !important; color: inherit;
}
.ff-post-row__thumb { width: 200px; flex-shrink: 0; }
.ff-post-row__thumb .ff-image-slot, .ff-post-row__thumb img { aspect-ratio: 40 / 21; border-radius: 12px; }
.ff-post-row__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ff-post-row__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ff-post-row__tags span { font-size: 11px; font-weight: 600; color: var(--forest); background: var(--hover-tint-strong); padding: 4px 10px; border-radius: 20px; }
.ff-post-row__title { font-weight: 600; font-size: 19px; color: var(--forest); line-height: 1.4; }
.ff-post-row:hover .ff-post-row__title { color: var(--burgundy); text-decoration: underline; }
.ff-post-row__excerpt { font-size: 14px; color: var(--ink); opacity: 0.65; line-height: 1.5; }
.ff-post-row__more { color: var(--burgundy); font-weight: 600; }
@media (max-width: 640px) {
  .ff-post-row { flex-direction: column; align-items: flex-start; }
  .ff-post-row__thumb { width: 100%; }
}
.ff-show-more-wrap { text-align: center; margin-top: 8px; }
.ff-show-more-btn {
  font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--forest);
  background: rgba(27,67,50,0.08); border: none; cursor: pointer; padding: 12px 24px; border-radius: var(--radius-md);
}
.ff-show-more-btn:hover { background: var(--burgundy-tint); color: var(--burgundy); }

/* ==========================================================================
   Utilities
   ========================================================================== */
.ff-text-center { text-align: center; }
.ff-mt-0 { margin-top: 0; }
.ff-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 640px) {
  .ff-hero__title { font-size: 34px; }
  .ff-final-cta__actions { flex-direction: column; align-items: stretch; }
  .ff-final-cta__actions .ff-btn { width: 100%; }
}
