:root {
  color-scheme: light;
  --background: #faf9f6;
  --surface: #f0ede7;
  --text: #262b2f;
  --muted: #5c656d;
  --line: #c9c6bf;
  --accent: #a84621;
  --accent-hover: #883719;
  --button-text: #ffffff;
  --focus: #0b6195;
  --image-wash-strong: rgba(250, 249, 246, 0.98);
  --image-wash: rgba(250, 249, 246, 0.88);
  --image-wash-soft: rgba(250, 249, 246, 0.48);
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #2a2f34;
  --surface: #363c42;
  --text: #fbfaf7;
  --muted: #c6cbd0;
  --line: #626970;
  --accent: #f08a54;
  --accent-hover: #ff9b66;
  --button-text: #251d18;
  --focus: #9cd5ff;
  --image-wash-strong: rgba(42, 47, 52, 0.97);
  --image-wash: rgba(42, 47, 52, 0.84);
  --image-wash-soft: rgba(42, 47, 52, 0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #2a2f34;
    --surface: #363c42;
    --text: #fbfaf7;
    --muted: #c6cbd0;
    --line: #626970;
    --accent: #f08a54;
    --accent-hover: #ff9b66;
    --button-text: #251d18;
    --focus: #9cd5ff;
    --image-wash-strong: rgba(42, 47, 52, 0.97);
    --image-wash: rgba(42, 47, 52, 0.84);
    --image-wash-soft: rgba(42, 47, 52, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  transition: background-color 180ms ease, color 180ms ease;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(
      90deg,
      var(--image-wash-strong) 0%,
      var(--image-wash) 56%,
      var(--image-wash-soft) 100%
    ),
    url("../assets/server-room.jpg");
  background-position: center;
  background-size: cover;
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.65rem 0.9rem;
  background: var(--text);
  color: var(--background);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100% - 3rem, 76rem);
  min-height: 100vh;
  margin: 0 auto;
  isolation: isolate;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  width: 0.85rem;
  height: 0.85rem;
  background: var(--accent);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.established {
  padding: 0.2rem 0.45rem;
  background: var(--background);
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-icon {
  font-size: 1.05rem;
  line-height: 1;
}

main {
  position: relative;
  z-index: 1;
  flex: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.55fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
  padding: clamp(5rem, 12vh, 8.5rem) 0 clamp(4.5rem, 11vh, 7rem);
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3.25rem, 8vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.93;
}

.accent-rule {
  width: 5rem;
  height: 0.3rem;
  margin: 2.25rem 0;
  background: var(--accent);
}

.intro {
  max-width: 38rem;
  margin: 0 0 2.25rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-width: 12.5rem;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  background: var(--accent);
  color: var(--button-text);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.contact-button:hover {
  background: var(--accent-hover);
}

.principles {
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--background);
}

.principles-label {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.principles li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.principles li::before {
  width: 0.4rem;
  height: 0.4rem;
  background: var(--accent);
  content: "";
  flex: 0 0 auto;
}

.principles li:last-child {
  border-bottom: 1px solid var(--line);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1.5rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
  padding: 0.15rem 0.3rem;
  background: var(--background);
}

@media (max-width: 800px) {
  .site-shell {
    width: min(100% - 2rem, 76rem);
  }

  .site-header {
    align-items: flex-start;
  }

  .header-meta {
    align-items: flex-end;
    flex-direction: column;
    gap: 0.55rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding: 4.5rem 0;
  }

  .principles {
    max-width: 28rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  body::before {
    background-image:
      linear-gradient(
        90deg,
        var(--image-wash-strong) 0%,
        var(--image-wash) 72%,
        var(--image-wash-soft) 100%
      ),
      url("../assets/server-room.jpg");
    background-position: 62% center;
  }
}

@media (max-width: 520px) {
  .site-header {
    gap: 1rem;
  }

  .brand {
    max-width: 13rem;
    line-height: 1.35;
  }

  .established {
    display: none;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.5rem);
  }

  .contact-button {
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body {
    transition: none;
  }
}
