/* Theme Name: POPHIES
   Description: Framework stylesheet — the pages of this WordPress site are served by the theme (inc/routes.php, 网站规划.md §6).
   Shared design tokens are in assets/css/tokens.css; page-specific styles belong in assets/css/page-*.css.
   Version: 0.2.0
   Text Domain: pophies */

/* ---------- 1. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header { top: 32px; }

img,
svg,
picture { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-color: var(--brass);
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
}

h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; }

ul { margin: 0; padding: 0; list-style: none; }

/* ---------- 2. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section) 0; }
.section--soft { background: var(--surface-soft); }
.section--white { background: var(--white); }

.site-main { display: block; min-height: 50vh; }

/* ---------- 3. Type helpers ---------- */
.eyebrow {
  margin: 0 0 0.9em;
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--brass);
}

.note {
  max-width: var(--read);
  font-size: var(--fs-small);
  color: var(--graphite);
}

/* ---------- 4. Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.6em;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.button:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--white);
}

.button.secondary,
.button--secondary {
  background: transparent;
  border-color: var(--stone);
  color: var(--ink);
}

.button.secondary:hover,
.button--secondary:hover {
  background: var(--white);
  border-color: var(--ink);
  color: var(--ink);
}

.button--compact { padding: 0.7em 1.1em; }

.arrow { line-height: 1; }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ivory);
  border-bottom: 1px solid var(--stone);
}

.site-header[data-scrolled="true"] { background: var(--white); }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  min-height: var(--header-h);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.brand-mark {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--brass);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-right: auto;
  font-size: var(--fs-small);
}

.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--brass); }
.nav-links a[aria-current="page"] {
  color: var(--brass);
  text-decoration: underline;
}

/* ---------- 6. Planning placeholder ---------- */
.planning { padding: var(--section-sm) 0; }

.planning__title {
  max-width: 24ch;
  margin-bottom: 0.5em;
}

.planning__status {
  display: inline-block;
  margin: 0;
  padding: 0.4em 0.9em;
  border: 1px dashed var(--brass);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brass);
}

.planning__note {
  max-width: var(--read);
  margin: 1.2em 0 0;
  font-size: var(--fs-small);
  color: var(--graphite);
}

/* ---------- 7. Search ---------- */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: var(--read);
  margin: 0 var(--gutter) var(--section-sm);
}

.search-form__input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.8em 1em;
  border: 1px solid var(--stone);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

/* ---------- 8. Footer ---------- */
.site-footer {
  padding: var(--section-sm) 0 2.5rem;
  background: var(--ink);
  color: var(--ivory);
}

.site-footer a { color: inherit; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--on-dark-line);
}

.footer-title {
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: var(--track-tight);
}

.footer-note {
  max-width: 30ch;
  font-size: var(--fs-small);
  color: var(--on-dark-muted);
}

.footer-links {
  display: grid;
  gap: 0.5rem;
  font-size: var(--fs-small);
  text-decoration: none;
}

.footer-contact__row { margin-bottom: 0.5rem; font-size: var(--fs-small); }
.footer-contact__sep { color: var(--on-dark-dim); }

.footer-contact__row--address {
  max-width: 32ch;
  color: var(--on-dark-muted);
}

.footer-legal {
  padding-top: 1.5rem;
  font-size: var(--fs-small);
  color: var(--on-dark-muted);
}

/* ---------- 9. Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 40;
  padding: 0.8em 1.2em;
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus { left: 0; }

/* ---------- 10. Motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
