/* Utangard / Innangard — shared design tokens & base
   Enclosure: pine fence, iron structure, bone surface, copper boundary */

:root {
  --pine: #1a3d2e;
  --pine-mid: #2a5a42;
  --pine-deep: #0e2218;
  --iron: #1c1f1d;
  --slate: #3a403c;
  --mist: #6b736e;
  --bone: #eef0ec;
  --stone: #e2e5e0;
  --paper: #f7f8f5;
  --copper: #b85c38;
  --copper-soft: #c97a55;
  --ember: #8f3d22;
  --line: rgba(26, 61, 46, 0.18);
  --line-strong: rgba(26, 61, 46, 0.35);
  --focus: #2a5a42;
  --ph-bg: rgba(184, 92, 56, 0.08);
  --ph-border: rgba(184, 92, 56, 0.45);
  --radius: 2px;
  --max: 68rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-body: "Source Serif 4", "Georgia", serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--iron);
  background-color: var(--bone);
  background-image:
    linear-gradient(180deg, rgba(238, 240, 236, 0.92) 0%, rgba(247, 248, 245, 0.88) 40%, rgba(226, 229, 224, 0.95) 100%),
    url("assets/enclosure-wash.png");
  background-size: cover, cover;
  background-attachment: fixed, fixed;
  background-position: center, center;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.variant-tools {
  --pine: #16352a;
  --pine-mid: #1f4d3a;
  --copper: #a3542f;
}

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

a {
  color: var(--pine-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--copper);
}

a:focus-visible,
button:focus-visible,
.lang-toggle button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.85rem;
  background: var(--pine);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ——— Site chrome ——— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  background: rgba(247, 248, 245, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--pine-deep);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

.brand:hover {
  color: var(--pine);
}

.brand-mark {
  width: 1.65rem;
  height: 1.65rem;
  color: var(--pine);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 0.15rem;
  gap: 0.1rem;
}

.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mist);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--pine);
  color: var(--paper);
}

.site-nav {
  display: none;
  gap: 1.15rem;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--slate);
}

.site-nav a:hover {
  color: var(--pine);
}

@media (min-width: 720px) {
  .site-nav {
    display: flex;
  }
}

/* ——— Layout ——— */

main {
  display: block;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.section {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: 0;
}

.section-label {
  display: inline-block;
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pine-mid);
}

.section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--pine-deep);
}

.lede {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  font-size: 1.125rem;
  color: var(--slate);
}

.stack > * + * {
  margin-top: 1rem;
}

/* ——— Hero ——— */

.hero {
  position: relative;
  min-height: min(92vh, 44rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--paper);
  isolation: isolate;
}

.hero-plane {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(105deg, rgba(14, 34, 24, 0.88) 0%, rgba(26, 61, 46, 0.55) 48%, rgba(14, 34, 24, 0.72) 100%),
    url("assets/fence-enclosure-hero.png") center / cover no-repeat;
}

.hero-fence {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  color: var(--bone);
}

.hero-fence svg {
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 8rem) 0 clamp(2.5rem, 6vh, 3.5rem);
}

.hero-shield {
  position: absolute;
  right: 0;
  bottom: clamp(2rem, 6vh, 3.5rem);
  width: min(28vw, 11rem);
  opacity: 0.28;
  pointer-events: none;
  mix-blend-mode: soft-light;
  filter: grayscale(0.2);
}

@media (max-width: 640px) {
  .hero-shield {
    width: 5.5rem;
    opacity: 0.2;
  }
}

.hero-brand {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.hero h1 {
  margin: 0 0 0.85rem;
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hero-support {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: 1.08rem;
  color: rgba(247, 248, 245, 0.88);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.15rem;
  background: transparent;
  border: 1px solid rgba(247, 248, 245, 0.55);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.hero-cta:hover {
  background: rgba(247, 248, 245, 0.12);
  border-color: var(--paper);
  color: var(--paper);
}

/* Compact hero for mail / mta-sts pages */

.hero-compact {
  position: relative;
  padding: clamp(3.5rem, 8vw, 5rem) 0 clamp(2rem, 4vw, 2.75rem);
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}

.hero-compact .hero-plane {
  background:
    linear-gradient(120deg, rgba(14, 34, 24, 0.94) 0%, rgba(26, 61, 46, 0.82) 100%),
    url("assets/enclosure-wash.png") center / cover;
}

.hero-compact .hero-brand {
  font-size: clamp(1.85rem, 4.5vw, 2.6rem);
  margin-bottom: 0.65rem;
}

.hero-compact h1 {
  margin: 0 0 0.65rem;
  max-width: 28ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.3;
}

.hero-compact .hero-support {
  margin: 0;
  max-width: 40rem;
  font-size: 1.02rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.badge {
  display: inline-block;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(247, 248, 245, 0.35);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 248, 245, 0.9);
}

.badge-copper {
  border-color: var(--copper-soft);
  color: #f0d0c0;
}

/* ——— Content blocks ——— */

.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.fact-list li {
  display: grid;
  grid-template-columns: minmax(7rem, 12rem) 1fr;
  gap: 0.75rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.fact-list dt,
.fact-list .k {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pine);
}

.fact-list dd,
.fact-list .v {
  margin: 0;
  color: var(--slate);
}

@media (max-width: 560px) {
  .fact-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.5rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.project-list li:first-child {
  border-top: 1px solid var(--line);
}

.project-list a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--pine-deep);
}

.project-list a:hover {
  color: var(--copper);
}

.project-list .status {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}

.project-list p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--slate);
  font-size: 0.98rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.tech-item {
  padding: 1.1rem 1.15rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 245, 0.55);
}

.tech-item h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pine-deep);
}

.tech-item p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--slate);
}

.tech-item .meta {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mist);
}

/* Abuse — firm boundary */

.abuse-panel {
  position: relative;
  padding: 1.5rem 1.35rem 1.5rem 1.5rem;
  background: rgba(14, 34, 24, 0.04);
  border-left: 3px solid var(--copper);
}

.abuse-panel h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ember);
}

.abuse-panel p {
  margin: 0 0 0.75rem;
  color: var(--slate);
}

.abuse-panel p:last-child {
  margin-bottom: 0;
}

/* Platzhalter */

.ph {
  display: inline;
  padding: 0.05em 0.2em;
  background: var(--ph-bg);
  border-bottom: 1px dashed var(--ph-border);
  color: var(--ember);
  font-style: normal;
}

.ph-block {
  display: block;
  margin: 0.5rem 0;
  padding: 0.65rem 0.8rem;
  background: var(--ph-bg);
  border: 1px dashed var(--ph-border);
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.policy-box {
  margin: 1.25rem 0 0;
  padding: 1.15rem 1.25rem;
  background: var(--pine-deep);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}

.policy-box a {
  color: #d4c4a8;
}

.quiet-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--mist);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
}

.inline-links a {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Footer */

.site-footer {
  margin-top: 2rem;
  padding: 2rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line-strong);
  background: rgba(14, 34, 24, 0.04);
  font-size: 0.92rem;
  color: var(--slate);
}

.site-footer .wrap {
  display: grid;
  gap: 1rem;
}

.site-footer strong {
  font-family: var(--font-display);
  color: var(--pine-deep);
  text-transform: lowercase;
}

.footer-disclaimer {
  margin: 0;
  max-width: 42rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--mist);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ——— Motion ——— */

@keyframes fence-draw {
  from {
    stroke-dashoffset: 420;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(0.85rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-swap {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}

.hero-fence .draw-path {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: fence-draw 1.6s var(--ease) 0.2s forwards;
}

.reveal {
  opacity: 0;
  animation: rise-in 0.75s var(--ease) forwards;
}

.reveal-d1 { animation-delay: 0.1s; }
.reveal-d2 { animation-delay: 0.22s; }
.reveal-d3 { animation-delay: 0.34s; }
.reveal-d4 { animation-delay: 0.46s; }

[data-i18n-root].lang-switching [data-i18n],
[data-i18n-root].lang-switching [data-i18n-html] {
  animation: fade-swap 0.35s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
  }

  .hero-fence .draw-path {
    stroke-dashoffset: 0;
  }
}

/* ——— Navigator (top-level index) ——— */

.nav-page {
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 3rem;
}

.nav-page h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--pine-deep);
  letter-spacing: -0.03em;
}

.nav-page .intro {
  max-width: 40rem;
  margin: 0 0 2rem;
  color: var(--slate);
}

.host-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.host-list li {
  border-bottom: 1px solid var(--line);
}

.host-list a {
  display: grid;
  grid-template-columns: minmax(10rem, 18rem) 1fr;
  gap: 0.5rem 1.5rem;
  padding: 1.15rem 0.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s var(--ease);
}

.host-list a:hover {
  background: rgba(26, 61, 46, 0.05);
}

.host-list .host {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--pine);
}

.host-list .desc {
  color: var(--slate);
  font-size: 0.98rem;
}

@media (max-width: 640px) {
  .host-list a {
    grid-template-columns: 1fr;
  }
}
