/* Base Stolon Typography, Reset & Primitives */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--app-text-text-primary);
  background-color: var(--app-background-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility: Skip-to-content link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 16px;
  padding: 8px 16px;
  background: var(--app-background-bg-inverse);
  color: var(--app-text-text-inverse);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: 9999;
}
.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--app-border-border-focus);
}

/* Focus visibility with Windows High Contrast fallback */
:focus-visible {
  outline: 2px solid var(--app-border-border-focus);
  outline-offset: 2px;
}
@media (forced-colors: active) {
  :focus-visible {
    outline: 2px solid Highlight;
  }
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--app-border-border-muted);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
a:hover {
  text-decoration-color: var(--app-text-text-primary);
}

/* Minimal Editorial Container */
.page-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  flex: 1;
}

@media (max-width: 640px) {
  .page-container {
    padding: 48px 20px 64px;
  }
}

/* Typography Hierarchy */
h1, h2, h3, h4 {
  color: var(--app-text-text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

p {
  color: var(--app-text-text-secondary);
  margin-bottom: 1.25rem;
}

/* Clean Button Primitives */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-contrast {
  background-color: var(--app-background-bg-button-contrast);
  color: var(--app-text-text-inverse);
  border-color: var(--app-border-border-strong);
}
.btn-contrast:hover {
  opacity: 0.92;
}
.btn-neutral {
  background-color: var(--app-background-bg-button-neutral);
  color: var(--app-text-text-primary);
  border-color: var(--app-border-border-base);
}
.btn-neutral:hover {
  background-color: var(--app-background-bg-layer-02);
}

/* Stolon Universal/Editorial Footer */
.app-footer {
  border-top: 1px solid var(--app-border-border-muted);
  padding: 32px 0 48px;
  margin-top: auto;
  font-size: 0.8125rem;
  color: var(--app-text-text-muted);
}
.footer-row-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
}
.footer-links a {
  text-decoration: none;
  color: var(--app-text-text-secondary);
}
.footer-links a:hover {
  color: var(--app-text-text-primary);
  text-decoration: underline;
}
.footer-row-colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--app-text-text-muted);
  padding-top: 12px;
  border-top: 1px dashed var(--app-border-border-muted);
}
.gpc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--app-text-text-secondary);
}
.gpc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--site-accent);
}

/* Modal Dialog Primitives (Contact & Partnership Modal) */
dialog.app-dialog {
  border: 1px solid var(--app-border-border-base);
  border-radius: var(--radius-md);
  background: var(--app-background-bg-base);
  color: var(--app-text-text-primary);
  box-shadow: var(--app-elevation-overlay);
  padding: 32px;
  max-width: 520px;
  width: 90vw;
  margin: auto;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--app-text-text-primary);
}
.form-control {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 1rem; /* 16px min on mobile prevents iOS zoom */
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--app-border-border-base);
  background: var(--app-background-bg-layer-01);
  color: var(--app-text-text-primary);
}
.form-control:focus {
  border-color: var(--app-border-border-focus);
}
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}
.form-help {
  font-size: 0.75rem;
  color: var(--app-text-text-muted);
  margin-top: 4px;
}
.hp-field {
  display: none !important;
  visibility: hidden !important;
}
