/* Shared shell, typography, and form styles for every photoquo.com page
 * (spec FR-018 through FR-024, FR-026, FR-044, FR-047). Uses only the
 * semantic tokens defined in tokens.css — no literal color values below. */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text-primary);
  background: var(--color-background);
  line-height: 1.5;
}

a {
  color: var(--color-highlight);
}

/* Visible focus states everywhere, satisfying spec FR-047. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-highlight);
  outline-offset: 2px;
}

/* ---------- Page shell ---------- */

.pq-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  color: var(--color-highlight);
  border-bottom: 1px solid var(--color-border);
}

.pq-header__row {
  max-width: 1024px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pq-header__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-highlight);
  flex: 0 0 auto;
}

.pq-header__brand img {
  height: 51px;
  width: auto;
}

.pq-header__menu-button {
  flex: 0 0 auto;
  background: none;
  border: 1px solid var(--color-highlight);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font: inherit;
  color: var(--color-highlight);
  cursor: pointer;
}

/* ---------- Navigation menu ---------- */

.pq-menu {
  position: relative;
}

.pq-menu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--color-text-primary);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.pq-menu__toggle-icon {
  position: relative;
  display: block;
  width: 26px;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
}

.pq-menu__toggle-icon::before,
.pq-menu__toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
}

.pq-menu__toggle-icon::before {
  top: -8px;
}

.pq-menu__toggle-icon::after {
  top: 8px;
}

.pq-menu__inline {
  gap: 0.75rem;
}

.pq-menu__inline a,
.pq-menu__link--button {
  color: var(--color-highlight);
  font-weight: 700;
  text-decoration: none;
}

.pq-menu__link--button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pq-menu__sep {
  color: var(--color-highlight);
}

.pq-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0.25rem;
  z-index: 10;
}

.pq-menu__panel[hidden] {
  display: none;
}

.pq-menu__panel a,
.pq-menu__panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--color-text-primary);
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Main content ---------- */

.pq-main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ---------- Footer ---------- */

.pq-footer {
  border-top: 1px solid var(--color-border);
  padding: 1rem;
  background: var(--color-highlight);
  color: var(--color-surface);
  font-weight: 700;
  font-size: 0.9rem;
}

.pq-footer a {
  color: var(--color-surface);
}

.pq-footer__row {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.pq-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

/* ---------- Typography hierarchy ---------- */

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1rem;
  text-align: center;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.pq-button {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-highlight);
  color: var(--color-surface);
  text-decoration: none;
}

.pq-button--destructive {
  background: var(--color-error);
}

/* ---------- Responsive / narrow-viewport behavior (spec FR-019, FR-020, FR-024) ---------- */

@media (max-width: 480px) {
  .pq-header {
    padding: 0.6rem 0.75rem;
  }

  .pq-footer__row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Reduced motion (spec FR-047) ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
