/* RazTech Innovations AB
   One stylesheet, no build step. Tokens first, then layout top to bottom. */

@font-face {
  font-family: "Overpass";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/overpass-latin-wght-normal.woff2") format("woff2");
}

:root {
  /* Surfaces and text: cool Nordic daylight, deep fjord ink */
  --paper: #f2f5f7;
  --surface: #ffffff;
  --tint: #e6ecf0;
  --ink: #0e2233;
  --muted: #4c5c6a;
  --rule: #cfd8df;

  /* The four lines. Each color means one product area, everywhere on the page. */
  --city: #1560c0;
  --care: #c42d26;
  --play: #7445bd;
  --home: #17794e;

  /* The departure board keeps its dark face in both themes */
  --board: #0e2233;
  --board-ink: #f2f5f7;
  --board-muted: #a9b9c6;
  --board-rule: #26405a;
  --board-time: #ffd166;

  --font: "Overpass", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(2.5rem, 5vw, 4rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1824;
    --surface: #12232f;
    --tint: #102030;
    --ink: #eaf1f6;
    --muted: #a3b3c0;
    --rule: #25394b;

    --city: #62a8ff;
    --care: #ff7a70;
    --play: #b594ff;
    --home: #4fce93;

    --board: #060f18;
    --board-rule: #1c3044;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.1;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0.5rem;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

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

.brand {
  display: inline-flex;
  flex: none;
  text-decoration: none;
}

/* The wordmark, assets/logo.png: black lettering with the slogan, on a white ground with a
   margin of its own. Multiply drops the white on the light theme; invert plus screen does
   the same on the dark theme, so one file serves both. The negative margin pulls the
   lettering, not the file's own margin, onto the page's left edge. */
.brand__logo {
  --logo-height: 3rem;
  width: auto;
  height: var(--logo-height);
  margin-left: calc(var(--logo-height) * -0.26);
  mix-blend-mode: multiply;
}

@media (min-width: 48rem) {
  .brand__logo {
    --logo-height: 3.6rem;
  }
}

@media (prefers-color-scheme: dark) {
  .brand__logo {
    filter: invert(1);
    mix-blend-mode: screen;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 1.9rem);
  font-size: 0.98rem;
  font-weight: 600;
}

.nav a {
  padding-block: 0.5rem;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

.nav .nav__cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}

/* Language menu: a flag and a code that open a short list. A <details>, so it needs no script. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
}

.flag {
  flex: none;
  width: 1.5rem;
  height: 1rem;
  border-radius: 0.2rem;
  box-shadow: 0 0 0 1px var(--rule);
}

.lang {
  position: relative;
  flex: none;
}

.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.3rem 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang__caret {
  width: 0.65rem;
  height: 0.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang[open] .lang__caret {
  transform: rotate(180deg);
}

.lang__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 20;
  min-width: 11rem;
  padding: 0.35rem;
  border: 1px solid var(--rule);
  border-radius: 0.9rem;
  background: var(--surface);
  box-shadow: 0 0.6rem 1.5rem rgb(14 34 51 / 0.16);
}

.nav .lang__menu a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  font-weight: 600;
  text-decoration: none;
}

.nav .lang__menu a:hover,
.nav .lang__menu a[aria-current="true"] {
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  text-decoration: none;
}

.nav .lang__menu a[aria-current="true"] {
  font-weight: 800;
}

/* Below desktop width the header keeps the language switch and the contact button;
   the sections are a scroll away. On phones the contact button gives way too: the
   same call to action is the first thing in the page. */
@media (max-width: 63.99rem) {
  .nav > a:not(.nav__cta) {
    display: none;
  }
}

@media (max-width: 29.99rem) {
  .nav .nav__cta {
    display: none;
  }
}

@media (max-width: 22.49rem) {
  .brand__logo {
    --logo-height: 2.5rem;
  }
}

/* Line colors, shared by the logo, the map and the product list */

.l-city {
  stroke: var(--city);
}

.l-care {
  stroke: var(--care);
}

.l-play {
  stroke: var(--play);
}

.l-home {
  stroke: var(--home);
}

.hub {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 3;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(1.75rem, 3.5vw, 2.75rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.slogan {
  margin-bottom: 0.6rem;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--city);
}

.hero h1 {
  max-width: 20ch;
  font-size: clamp(2.4rem, 5.6vw, 4.25rem);
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 44rem;
  margin-top: 1rem;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.45;
  color: var(--muted);
}

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

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.35rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.button:hover {
  background: transparent;
  color: var(--ink);
}

.button--quiet {
  background: transparent;
  color: var(--ink);
}

.button--quiet:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- The network map ---------- */

.map {
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.map svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.map .map__compact {
  display: none;
}

.map .line {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map__compact .line {
  stroke-width: 7;
}

.map .hub {
  stroke-width: 5;
}

.map__compact .hub {
  stroke-width: 4;
}

.stop-dot {
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 4;
}

.stop-dot--soon {
  fill: var(--paper);
  stroke: var(--ink);
}

.map__compact .stop-dot {
  stroke-width: 2.5;
}

.map text {
  fill: var(--ink);
  font-family: var(--font);
}

.stations text {
  font-size: 19px;
  font-weight: 750;
  text-anchor: middle;
}

.stations a,
.map__hub {
  text-decoration: none;
}

.stations a:hover text,
.map__hub:hover .map__hub-name {
  text-decoration: underline;
}

.map__names text {
  font-size: 15px;
  font-weight: 700;
}

.map__names .t-city {
  fill: var(--city);
}

.map__names .t-care {
  fill: var(--care);
}

.map__names .t-play {
  fill: var(--play);
}

.map__names .t-home {
  fill: var(--home);
}

.map__hub-name {
  font-size: 22px;
  font-weight: 850;
  text-anchor: middle;
}

.map__hub-sub {
  font-size: 15px;
  font-weight: 500;
  text-anchor: middle;
  fill: var(--muted) !important;
}

.map__key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.key {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.dot {
  width: 0.95rem;
  height: 0.95rem;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
}

.dot--soon {
  background: transparent;
}

@media (max-width: 47.99rem) {
  .map .map__wide {
    display: none;
  }

  .map .map__compact {
    display: block;
  }
}

/* One orchestrated moment: the lines run out from the hub, then the stations arrive. */

@media (prefers-reduced-motion: no-preference) {
  .map .line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: run-line 1.3s cubic-bezier(0.6, 0, 0.2, 1) 0.15s forwards;
  }

  .map .stations,
  .map__names {
    opacity: 0;
    animation: arrive 0.5s ease-out 1.2s forwards;
  }
}

@keyframes run-line {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes arrive {
  to {
    opacity: 1;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section);
}

.section--tint {
  background: var(--tint);
}

.section__head {
  max-width: 50rem;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.section h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section__head p {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  color: var(--muted);
}

/* ---------- Products: each area is a line, each product a station on it ---------- */

.line-group {
  display: grid;
  gap: 1rem 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--rule);
}

.line-group--city {
  --line: var(--city);
}

.line-group--home {
  --line: var(--home);
}

.line-group--care {
  --line: var(--care);
}

.line-group--play {
  --line: var(--play);
}

.line-group__head h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--line);
}

.line-group__head p {
  max-width: 26rem;
  margin-top: 0.4rem;
  color: var(--muted);
}

.stops {
  position: relative;
  display: grid;
  gap: 1.6rem;
  padding-left: 3rem;
}

.stops::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 0.5rem;
  border-radius: 999px;
  background: var(--line);
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  scroll-margin-top: 6rem;
}

.stop::before {
  content: "";
  position: absolute;
  left: -2.875rem;
  top: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 0.25rem solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
}

.stop--soon::before {
  border-color: var(--ink);
  background: var(--paper);
}

.stop__icon {
  width: 4rem;
  height: 4rem;
  border-radius: 0.9rem;
  box-shadow: 0 0 0 1px var(--rule);
}

.stop__icon--pixel {
  image-rendering: pixelated;
}

.stop__icon--mono {
  display: grid;
  place-items: center;
  background: var(--line);
  color: var(--paper);
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  box-shadow: none;
}

.stop__body h4 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.status {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--line);
}

.status--soon {
  color: var(--muted);
}

.stop__body > p:not(.status):not(.links) {
  max-width: 42rem;
  margin-top: 0.45rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-top: 0.5rem;
  font-weight: 700;
}

.links a {
  color: var(--line);
}

.stop:target .stop__body h4 {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 0.18em;
  text-underline-offset: 0.25em;
}

/* Narrow screens: icon beside the name, description across the full width */
@media (max-width: 39.99rem) {
  .stops {
    padding-left: 2.25rem;
  }

  .stops::before {
    left: 0.25rem;
  }

  .stop {
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 0 0.9rem;
  }

  .stop::before {
    left: -2.375rem;
    top: 1rem;
  }

  .stop__body {
    display: contents;
  }

  .stop__icon {
    grid-row: 1 / span 2;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
  }

  .stop__body h4 {
    grid-column: 2;
    align-self: end;
  }

  .stop__body .status {
    grid-column: 2;
    align-self: start;
  }

  .stop__body > p:not(.status) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 56rem) {
  .line-group {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }

  .line-group__head {
    position: sticky;
    top: 5.5rem;
    align-self: start;
  }
}

/* ---------- IoT: one signal line, five links in order ---------- */

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

.signal .section__head p,
.signal .chain__step p,
.signal .fields p {
  color: var(--board-muted);
}

.chain {
  position: relative;
  display: grid;
  gap: 1.4rem;
  margin: 0;
  padding: 0 0 0 3.25rem;
  list-style: none;
  counter-reset: link;
}

/* The line the signal travels along */
.chain::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 0.4rem;
  border-radius: 999px;
  background: var(--board-time);
}

.chain__step {
  position: relative;
  counter-increment: link;
}

.chain__step::before {
  content: counter(link);
  position: absolute;
  left: -3.25rem;
  top: -0.2rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0.2rem solid var(--board-time);
  border-radius: 50%;
  background: var(--board);
  color: var(--board-time);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.chain__step h3,
.fields h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.chain__step p,
.fields p {
  max-width: 34rem;
  margin-top: 0.4rem;
}

.fields {
  display: grid;
  gap: 1.4rem 3rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--board-rule);
}

@media (min-width: 48rem) {
  .fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Wide screens: the line runs left to right */
@media (min-width: 64rem) {
  .chain {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.75rem;
    padding: 3rem 0 0;
  }

  .chain::before {
    left: 0;
    right: 0;
    top: 0.8rem;
    bottom: auto;
    width: auto;
    height: 0.4rem;
  }

  .chain__step::before {
    left: 0;
    top: -3rem;
  }

  .chain__step p {
    font-size: 1rem;
  }
}

/* ---------- Consulting ---------- */

.services {
  display: grid;
  gap: 0 3rem;
}

.service {
  padding-block: 1rem;
  border-top: 2px solid var(--ink);
}

.service dt {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.service dd {
  max-width: 34rem;
  margin-top: 0.35rem;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 68rem) {
  .services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Client work is confidential: said once, plainly, where a buyer looks for references */
.private {
  max-width: 50rem;
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  padding: 0.15rem 0 0.15rem 1.25rem;
  border-left: 0.5rem solid var(--ink);
}

.private h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.private p {
  margin-top: 0.45rem;
  font-size: 1.05rem;
}

/* ---------- Smart city: a departure board of real feeds ---------- */

.board-layout {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

.board-layout__text p {
  max-width: 34rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.board-layout__text h2 {
  max-width: 16ch;
}

.text-link {
  font-weight: 700;
  color: var(--city);
}

.board {
  padding: 0.4rem clamp(1rem, 2.5vw, 1.5rem) 0.5rem;
  border-radius: 1.1rem;
  background: var(--board);
  color: var(--board-ink);
  font-variant-numeric: tabular-nums;
}

.board__row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.15rem 1.25rem;
  padding-block: 0.6rem;
  border-top: 1px solid var(--board-rule);
}

.board__row--head {
  border-top: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--board-muted);
}

.board__time {
  font-weight: 800;
  color: var(--board-time);
}

.board__src {
  grid-column: 2;
  font-size: 0.92rem;
  color: var(--board-muted);
}

.board__row--head span:last-child {
  display: none;
}

@media (min-width: 40rem) {
  .board__row {
    grid-template-columns: 9rem minmax(0, 1.5fr) minmax(0, 1fr);
  }

  .board__src {
    grid-column: auto;
    align-self: center;
    text-align: right;
  }

  .board__row--head span:last-child {
    display: block;
    text-align: right;
  }
}

@media (min-width: 64rem) {
  .board-layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
  }
}

/* ---------- Sustainability ---------- */

.eco {
  display: grid;
  gap: 1.25rem 3rem;
  padding-left: 1.25rem;
  border-left: 0.5rem solid var(--home);
}

.eco__item h3,
.principles h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.eco__item p,
.principles p {
  max-width: 34rem;
  margin-top: 0.35rem;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .eco {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 2rem;
  }
}

@media (min-width: 68rem) {
  .eco {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- How we work ---------- */

.principles {
  display: grid;
  gap: 1.4rem 3rem;
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Contact and footer ---------- */

.contact h2 {
  max-width: 24ch;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.03em;
}

.contact__note {
  max-width: 40rem;
  margin-top: 1.1rem;
  font-size: 0.98rem;
  color: var(--muted);
}

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

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
}

.site-footer__slogan {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

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

@media print {
  .site-header,
  .skip {
    display: none;
  }
}
