/* Rootgrade — one stylesheet for the whole site. No external fonts or scripts. */

:root {
  --brand: #00aeef;
  --brand-ink: #0077a8;
  --ink: #13202e;
  --ink-2: #44515f;
  --muted: #6b7684;
  --bg: #ffffff;
  --bg-2: #f3f6f9;
  --card: #ffffff;
  --line: #dde3ea;
  --band: #0f1b28;
  --band-ink: #e8eef4;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(15 27 40 / 6%), 0 8px 24px rgb(15 27 40 / 6%);
  --wrap: 72rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #33c3f5;
    --brand-ink: #7fd8f8;
    --ink: #e8eef4;
    --ink-2: #b9c4cf;
    --muted: #8e9aa7;
    --bg: #0b141d;
    --bg-2: #101c28;
    --card: #142231;
    --line: #22344a;
    --band: #07101a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
}

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

a {
  color: var(--brand-ink);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 750;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--card);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.logo img {
  width: 11rem;
}

.nav {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 550;
  font-size: 0.98rem;
}

.nav a:hover {
  color: var(--ink);
  background: var(--bg-2);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-2);
}

.nav .cta {
  background: var(--brand);
  color: #04202d;
}

.nav .cta:hover {
  background: var(--brand-ink);
  color: #04202d;
}

@media (max-width: 40rem) {
  .site-header .wrap {
    flex-wrap: wrap;
    justify-content: center;
    padding-block: 0.6rem;
  }

  .logo img {
    width: 9.5rem;
  }

  .nav a {
    padding: 0.4rem 0.65rem;
    font-size: 0.95rem;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #04202d;
}

.btn-primary:hover {
  background: var(--brand-ink);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--brand);
}

.btn svg {
  width: 1.1em;
  height: 1.1em;
}

/* Hero */

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
    var(--bg);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  color: var(--brand-ink);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 0.9rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink-2);
  max-width: 34rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

/* "Rootgrade es …": the words take turns; a still list without animation. */
.motto {
  display: inline-grid;
  vertical-align: bottom;
}

.motto span {
  grid-area: 1 / 1;
  color: var(--brand-ink);
  opacity: 0;
  animation: motto 18s infinite;
}

.motto span:nth-child(2) { animation-delay: 3s; }
.motto span:nth-child(3) { animation-delay: 6s; }
.motto span:nth-child(4) { animation-delay: 9s; }
.motto span:nth-child(5) { animation-delay: 12s; }
.motto span:nth-child(6) { animation-delay: 15s; }

@keyframes motto {
  0% { opacity: 0; transform: translateY(0.3em); }
  3%, 14% { opacity: 1; transform: none; }
  17%, 100% { opacity: 0; transform: translateY(-0.3em); }
}

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

  .motto span {
    animation: none;
  }

  .motto span:first-child {
    opacity: 1;
  }
}

.shot {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 52rem) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
}

/* Sections */

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-alt {
  background: var(--bg-2);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--ink-2);
  font-size: 1.1rem;
}

/* Clients */

.clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clients li {
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-height: 7rem;
}

.clients img {
  max-height: 4rem;
  width: auto;
}

/* Features: text beside a picture, alternating */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.feature + .feature {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.feature:nth-of-type(even) .feature-media {
  order: -1;
}

.feature-media img {
  margin-inline: auto;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: 0.55rem;
}

.checks li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink-2);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 20%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230077a8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 75% no-repeat;
}

@media (max-width: 52rem) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature:nth-of-type(even) .feature-media {
    order: 0;
  }
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.card p {
  color: var(--ink-2);
  margin: 0;
}

.card .icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand-ink);
}

.card .icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Hosting band */

.band {
  background: var(--band);
  color: var(--band-ink);
}

.band h2 {
  color: #fff;
}

.band .checks li {
  color: var(--band-ink);
}

.band .checks li::before {
  background-color: rgb(0 174 239 / 25%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%2333c3f5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.band .lead {
  color: #b9c4cf;
}

.band-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 52rem) {
  .band-grid {
    grid-template-columns: 1fr;
  }
}

/* Page title for inner pages */

.page-title {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  background:
    radial-gradient(50rem 20rem at 90% -20%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.page-title p {
  color: var(--ink-2);
  font-size: 1.15rem;
  max-width: 44rem;
  margin: 0;
}

/* Portfolio */

.systems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Contact */

.contact {
  text-align: center;
}

.contact .wrap {
  max-width: 44rem;
}

.contact p {
  color: var(--ink-2);
  font-size: 1.15rem;
}

.contact .actions {
  justify-content: center;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer img {
  width: 8.5rem;
}

.site-footer a {
  color: var(--ink-2);
}

/* 404 */

.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.card.invite {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.card.invite .checks {
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.55rem 2rem;
}

.notfound .lead,
.notfound .actions {
  margin-inline: auto;
  justify-content: center;
}

.feature h3,
.card.invite h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
}
