/*
Theme Name: FamTree Theme
Theme URI: https://example.com/famtree
Description: Clean, modern theme for a private family tree site. Works with the FamTree Core plugin. Light and dark mode, always-visible language switcher, hero banner with login and registration forms.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Author: FamTree
License: GPL-2.0-or-later
Text Domain: famtree-theme
*/

:root {
  --ft-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --ft-head: "Fraunces", Georgia, "Noto Serif", "Noto Serif SC", serif;
  --ft-maxw: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--ft-font); font-size: 17px; line-height: 1.6; background: var(--ft-bg); color: var(--ft-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--ft-head); line-height: 1.2; color: var(--ft-text); letter-spacing: -.01em; }
a { color: var(--ft-primary); }
img { max-width: 100%; height: auto; }
.ftt-wrap { width: min(100% - 32px, var(--ft-maxw)); margin-inline: auto; }
.ftt-skip { position: absolute; left: -9999px; top: 8px; background: var(--ft-primary); color: var(--ft-primary-text); padding: 10px 16px; border-radius: 8px; z-index: 100000; }
.ftt-skip:focus { left: 8px; }

/* header */
.ftt-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ft-bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--ft-border); }
.ftt-header__in { display: flex; align-items: center; gap: 16px; padding: 12px 0; flex-wrap: wrap; }
.ftt-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ft-head); font-weight: 700; font-size: 1.3rem; color: var(--ft-text); text-decoration: none; }
.ftt-brand svg { width: 30px; height: 30px; color: var(--ft-primary); }
.ftt-nav { margin-inline: auto; }
.ftt-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.ftt-nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ft-text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.ftt-nav a:hover { background: var(--ft-surface-2); }
.ftt-nav a[aria-current="page"] { background: var(--ft-surface-2); color: var(--ft-primary); }
.ftt-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ftt-toggle { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--ft-border); background: var(--ft-surface); color: var(--ft-text); border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.ftt-toggle:hover { border-color: var(--ft-primary); }
.ftt-menu-btn { display: none; }
.ftt-weather { padding: 6px 12px; border: 1.5px solid var(--ft-border); border-radius: 999px; background: var(--ft-surface); min-height: 34px; min-width: 70px; font-size: .88rem; color: var(--ft-text); }
.ftt-weather:empty { display: none; }

/* hero */
.ftt-hero { position: relative; overflow: hidden; padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 64px);
  background: radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--ft-accent) 22%, transparent), transparent 70%),
              radial-gradient(800px 460px at 0% 0%, color-mix(in srgb, var(--ft-primary) 20%, transparent), transparent 70%); }
.ftt-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.ftt-kicker { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--ft-surface-2); color: var(--ft-primary); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--ft-border); }
.ftt-hero h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); margin: 16px 0 14px; }
.ftt-hero p.lead { font-size: 1.15rem; color: var(--ft-muted); max-width: 54ch; }
.ftt-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.ftt-hero__art { margin-top: 28px; color: var(--ft-primary); opacity: .9; max-width: 420px; }
.ftt-auth { display: grid; gap: 16px; scroll-margin-top: 100px; }
.ftt-auth-tabs { display: none; }
.ftt-tabs { display: none; }

/* features */
.ftt-features { padding: 24px 0 64px; }
.ftt-features__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ftt-feature { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius); padding: 22px; box-shadow: var(--ft-shadow); }
.ftt-feature h3 { margin: 10px 0 6px; font-size: 1.1rem; }
.ftt-feature p { margin: 0; color: var(--ft-muted); font-size: .95rem; }
.ftt-feature svg { width: 34px; height: 34px; color: var(--ft-accent); }

/* page content */
.ftt-main { padding: clamp(28px, 5vw, 56px) 0 72px; min-height: 50vh; }
.ftt-main > .ftt-wrap > h1.ftt-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 20px; }
.ftt-content { max-width: 100%; }
.ftt-content--narrow { max-width: 760px; }

/* footer */
.ftt-footer { border-top: 1px solid var(--ft-border); background: var(--ft-surface); padding: 32px 0; color: var(--ft-muted); }
.ftt-footer__in { display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.ftt-footer a { color: var(--ft-muted); }
.ftt-footer a:hover { color: var(--ft-primary); }
.ftt-footer ul { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; flex-wrap: wrap; }

@media (max-width: 980px) {
  .ftt-hero__grid { grid-template-columns: 1fr; }
  .ftt-features__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .ftt-menu-btn { display: inline-flex; margin-left: auto; }
  .ftt-nav { display: none; width: 100%; order: 5; margin: 0; }
  .ftt-nav.is-open { display: block; }
  .ftt-nav ul { flex-direction: column; }
  .ftt-tools { width: 100%; order: 4; }
}
@media (max-width: 520px) { .ftt-features__grid { grid-template-columns: 1fr; } body { font-size: 16px; } }

/* The page title already names these pages; keep the app's own heading for screen readers only. */
.ftt-content #ft-profile > h2:first-child,
.ftt-content #ft-gallery > h2:first-child,
.ftt-content #ft-chat > h2:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
