/* WANfear — minimal accessible stylesheet */

:root {
  --color-bg: #f7f6f3;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #555555;
  --color-border: #d4d0c8;
  --color-link: #0b5fff;
  --color-link-visited: #5a3d9a;
  --color-focus: #0b5fff;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  --measure: 42rem;
  --space: 1rem;
  --radius: 0.25rem;
  /* Shared edge padding — matches hero title inset */
  --page-pad-x: clamp(1rem, 4vw, 2.5rem);
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space);
  top: -100%;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface);
  color: var(--color-link);
  border: 2px solid var(--color-focus);
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space);
}

/* Focus styles */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

a:focus:not(:focus-visible) {
  outline: none;
}

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

a:visited {
  color: var(--color-link-visited);
}

/* Header — full viewport width, nav right with shared pad */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  width: 100%;
  margin: 0;
  padding: var(--space) var(--page-pad-x);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space) 1.5rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: flex-end;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.site-nav__list--external {
  border-left: 1px solid var(--color-border);
  padding-left: 1rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: underline;
  color: var(--color-link);
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
}

/* Main (inner pages) */
main {
  flex: 1;
  max-width: var(--measure);
  width: 100%;
  margin: 0 auto;
  padding: 2rem var(--page-pad-x);
}

main h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}

main h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

main p,
main li {
  color: var(--color-text);
}

main .lede,
main .note {
  color: var(--color-muted);
}

.note {
  font-size: 0.95rem;
  border-left: 3px solid var(--color-border);
  padding-left: 0.75rem;
  margin: 1.5rem 0;
}

/* Home: full-bleed Tortuga hero — band height = image only */
.page-home {
  background: var(--color-surface);
}

.hero-band {
  position: relative;
  width: 100%;
  margin: 0;
  line-height: 0;
  overflow: hidden;
  background: #1a1a1a;
}

.hero-band__img {
  display: block;
  width: 100%;
  height: auto;
  min-height: clamp(14rem, 42vw, 28rem);
  max-height: 70vh;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.hero-band__title {
  position: absolute;
  left: var(--page-pad-x);
  bottom: clamp(1rem, 3vw, 2rem);
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* Tables (Help / Settings) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

th {
  background: #efece6;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Footer — full viewport width, left-aligned with shared pad */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-top: auto;
}

.site-footer__inner {
  width: 100%;
  margin: 0;
  padding: var(--space) var(--page-pad-x);
  color: var(--color-muted);
  font-size: 0.9rem;
  text-align: left;
}

.site-footer p {
  margin: 0;
}

/* Small screens */
@media (max-width: 40rem) {
  .site-header__inner,
  .site-nav {
    justify-content: flex-end;
    width: 100%;
  }

  .site-nav__list--external {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 0.5rem;
    width: 100%;
    justify-content: flex-end;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
