/* PartOut site styles.
   Layout mirrors benthic.io (logo header, centered content box, dark footer
   bar with definition + social icons). Colors come exclusively from
   brand.css, generated from the app theme. No literal hex values here. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: var(--dark-background);
  --bg-deep: var(--dark-surface-lowest);
  --surface: var(--dark-surface);
  --line: var(--dark-outline-variant);
  --text: var(--dark-on-surface);
  --muted: var(--dark-on-surface-variant);
  --accent: var(--lime);
  --accent-ink: var(--dark-on-primary);

  --container: 1400px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, system-ui, -apple-system,
    Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover,
a:focus-visible {
  opacity: 0.8;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header — benthic.io layout: wordmark left, secondary block right. ------ */

.header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem 0;
}

.header .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  margin: 0 auto;
}

.logo img {
  display: block;
  height: 64px;
  width: auto;
  /* The app banner ships on a translucent black plate sized for the app's
     own surface; `lighten` drops the plate against the dark header without
     touching the synced asset (CI checks it byte-for-byte). */
  mix-blend-mode: lighten;
}

/* Main — one centered box holding the paragraph. ----------------------- */

.site-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding: 3rem 0;
}

.content {
  width: 100%;
}

.centered-content .container {
  display: flex;
  justify-content: center;
}

.content-box {
  width: 100%;
  max-width: 40rem;
  padding: 2.5rem 3rem;
  background: var(--surface);
  border: 3px solid var(--dark-outline);
  border-radius: 0.5rem;
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  text-align: left;
}

.content-body p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 0.35vw + 0.98rem, 1.18rem);
  line-height: 1.85;
  text-align: left;
  text-wrap: pretty;
}

/* Footer — header-gray bar: definition, socials, collaboration, Maine. -- */

.footer {
  flex: 0 0 auto;
  padding: 2rem 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.footer .container {
  text-align: center;
}

.definition {
  max-width: 62ch;
  margin: 0 auto 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
}

.definition strong {
  color: var(--accent);
  font-weight: 650;
}

.definition em {
  color: var(--text);
  font-style: italic;
}

.pron {
  color: var(--muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  display: inline-flex;
  color: var(--accent);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  opacity: 0.8;
}

.copyright {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.made-in {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  opacity: 0.75;
}

/* 404 ---------------------------------------------------------------- */

.not-found {
  width: min(100%, 42rem);
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.not-found h1 {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.25;
}

.not-found p {
  margin: 0;
  color: var(--muted);
}

/* Defensive styles for any future content pages ---------------------- */

.page {
  width: min(100%, 58ch);
  margin: 0 auto;
}

.page h1,
.page h2,
.page h3 {
  color: var(--accent);
  line-height: 1.25;
}

.page h2 {
  margin-top: 2.5rem;
}

.page p {
  margin: 0 0 1.15rem;
}

/* Accessibility ------------------------------------------------------ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive — mirrors benthic.io's 768px breakpoint. ----------------- */

@media (max-width: 768px) {
  .logo img {
    height: 36px;
  }

  .site-main {
    padding: 2rem 0;
  }

  .content-box {
    padding: 1.75rem 1.35rem;
  }

  .definition {
    max-width: 34ch;
  }

  .footer-links {
    gap: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
