/* IoT Open – static site styles */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: "Maven Pro"; font-weight: 400; font-display: swap; src: url(/assets/fonts/maven-pro-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Maven Pro"; font-weight: 500; font-display: swap; src: url(/assets/fonts/maven-pro-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Maven Pro"; font-weight: 700; font-display: swap; src: url(/assets/fonts/maven-pro-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url(/assets/fonts/roboto-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url(/assets/fonts/roboto-latin-500-normal.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --navy: #0D3E53;
  --navy-light: #156587;
  --teal: #1BB2BC;
  --teal-light: #33CFDA;
  --yellow: #FFC153;
  --yellow-dark: #FDB542;
  --blue: #315D9F;
  --sky: #B4DBEA;
  --bg: #EDF6FA;
  --white: #FFFFFF;
  --text: #0D3E53;
  --text-soft: #374151;
  --line: #CFDDE3;
  --shadow: 0 10px 40px rgba(111, 163, 192, 0.25);
  --radius: 8px;
  --radius-lg: 16px;
  --container: 1280px;
  --gutter: 20px;
  --font-head: "Maven Pro", system-ui, sans-serif;
  --font-body: "Roboto", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 14px;
}
h1 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 24px; }
h2 { font-size: clamp(24px, 2.6vw, 32px); }
h3 { font-size: clamp(18px, 1.8vw, 22px); }

p { margin: 0 0 16px; }

::selection { background: rgba(255, 193, 83, 0.4); }

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

.hl { color: var(--teal); }
.center { text-align: center; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--sm { max-width: 840px; }
.container--lg { max-width: 1100px; }

.section { padding: 48px 0; }
@media (min-width: 992px) { .section { padding: 72px 0; } }

.panel {
  background: linear-gradient(180deg, rgba(250, 252, 254, 0.65), rgba(255, 255, 255, 0.9));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ---------- Small text helpers ---------- */
.eyebrow {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.eyebrow--teal { color: var(--teal); }
.eyebrow--blue { color: var(--blue); }

.tag {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--teal);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 12px;
}
.tag__icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(27, 178, 188, 0.18);
}

/* ---------- Prose (rich text from former CMS) ---------- */
.prose { color: var(--text-soft); }
.prose h1, .prose h2, .prose h3 { color: var(--navy); }
.prose h2, .prose h3 { margin-top: 32px; }
.prose > :first-child, .prose .tag + * { margin-top: 0; }
.prose ul { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--navy-light); text-underline-offset: 2px; }
.prose a:hover { color: var(--teal); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.actions--center { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 24px;
  border: 2px solid transparent;
  border-radius: 50vw;
  font: 700 14px/1.2 var(--font-head);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--large { min-height: 52px; padding: 12px 32px; font-size: 16px; }

.btn--primary1 { background: var(--navy); color: var(--white); }
.btn--primary1:hover { background: var(--navy-light); }
.btn--primary2 { background: var(--yellow); color: var(--navy); }
.btn--primary2:hover { background: var(--yellow-dark); }
.btn--primary3 { background: var(--teal); color: var(--white); }
.btn--primary3:hover { background: var(--teal-light); }
.btn--white { background: var(--white); color: var(--navy); }
.btn--white:hover { background: var(--sky); }

.btn--outlined { background: transparent; border-color: currentColor; }
.btn--primary1.btn--outlined { color: var(--navy); }
.btn--primary1.btn--outlined:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 246, 250, 0.92);
  backdrop-filter: blur(8px);
}
.site-header__bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 84px;
}
.logo { flex-shrink: 0; }
.logo img { width: 180px; height: auto; }

.nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }

.nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px;
  border: 0;
  background: none;
  color: var(--navy);
  font: 500 15px/1 var(--font-head);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--teal); }
.nav__item--mega > .nav__link::after {
  content: "";
  width: 12px;
  height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath fill='%230D3E53' fill-rule='evenodd' d='M.74.837a.75.75 0 0 1 1.061 0l3.97 3.97L9.74.837a.75.75 0 0 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E") no-repeat center;
  transition: transform .2s;
}

.mega {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 580px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  grid-template-columns: 1fr 230px;
  gap: 8px 24px;
}
.nav__item--mega:last-child .mega { left: auto; right: 0; transform: none; }
.mega::before { /* hover bridge between button and panel */
  content: "";
  position: absolute;
  inset: -12px 0 auto 0;
  height: 12px;
}
.mega__title {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  font: 700 18px/1.3 var(--font-head);
}
.mega__links { list-style: none; margin: 0; padding: 0; }
.mega__links a {
  display: block;
  padding: 7px 10px;
  margin: 0 -10px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 15px;
}
.mega__links a:hover, .mega__links a[aria-current="page"] { background: var(--bg); color: var(--teal); }
.mega__campaign { align-self: center; }
.mega__campaign img { width: 100%; max-height: 200px; object-fit: contain; }

.header-btns { display: flex; gap: 10px; }
.header-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 20px;
  border: 1.5px solid var(--navy);
  border-radius: 50vw;
  text-decoration: none;
  line-height: 1.25;
  transition: background-color .2s, color .2s;
}
.header-btn strong { font: 700 14px/1.3 var(--font-head); }
.header-btn span { font: 500 13px/1.3 var(--font-head); }
.header-btn:hover { background: var(--navy); color: var(--white); }

.nav-toggle, .nav-burger { display: none; }

@media (min-width: 1181px) {
  .nav__item--mega:hover > .mega,
  .nav__item--mega:focus-within > .mega { display: grid; }
  .nav__item--mega:hover > .nav__link::after,
  .nav__item--mega:focus-within > .nav__link::after { transform: rotate(180deg); }
}

/* Mobile / tablet navigation: CSS-only toggle */
@media (max-width: 1180px) {
  .site-header__bar { min-height: 72px; justify-content: space-between; }
  .logo img { width: 150px; }

  .nav-toggle {
    display: block;
    position: absolute;
    right: var(--gutter);
    top: 14px;
    width: 46px;
    height: 46px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
  }
  .nav-burger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font: 500 10px/1 var(--font-head);
    text-transform: uppercase;
  }
  .nav-burger span {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy);
    background-image: linear-gradient(var(--white), var(--white)), linear-gradient(var(--white), var(--white)), linear-gradient(var(--white), var(--white));
    background-size: 20px 2px;
    background-repeat: no-repeat;
    background-position: center 15px, center 21px, center 27px;
  }
  .nav-toggle:focus-visible + .nav-burger span { outline: 3px solid var(--teal); outline-offset: 2px; }
  .nav-toggle:checked + .nav-burger span {
    background-image: linear-gradient(var(--white), var(--white));
    background-size: 20px 2px;
    background-position: center;
    transform: rotate(45deg);
  }
  .nav-toggle:checked + .nav-burger span::after {
    content: "";
    position: absolute;
    inset: 21px 12px;
    background: var(--white);
    transform: rotate(90deg);
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 8px var(--gutter) 28px;
    background: var(--white);
    box-shadow: var(--shadow);
  }
  .nav-toggle:checked ~ .nav { display: flex; }

  .nav__list { flex-direction: column; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--line); }
  .nav__link { width: 100%; padding: 16px 0; font-size: 17px; font-weight: 700; cursor: default; }
  a.nav__link { cursor: pointer; }
  .nav__item--mega > .nav__link::after { display: none; }

  .mega {
    display: block;
    position: static;
    transform: none;
    width: auto;
    padding: 0 0 12px;
    box-shadow: none;
  }
  .mega__title, .mega__campaign { display: none; }
  .mega__links a { margin: 0; padding: 8px 12px; }

  .header-btns { flex-direction: column; margin-top: 20px; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 8px 0 16px;
  padding: 0;
  font-size: 13px;
}
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--teal); }

/* ---------- Homepage hero ---------- */
.hero-home { padding: 40px 0 56px; }
.hero-home__grid { display: grid; gap: 40px; align-items: center; }
.hero-home h1 { color: var(--text-soft); max-width: 620px; }
@media (min-width: 992px) {
  .hero-home__grid { grid-template-columns: 1fr 1fr; }
  .hero-home h1 { font-size: 52px; }
}

.hero-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.hero-list li { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.hero-list strong { display: block; font: 700 16px/1.4 var(--font-head); }
.hero-list__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  transform: rotate(45deg);
  border-radius: 10px;
  background: linear-gradient(135deg, #DCEFF6, #C7E6F1);
  box-shadow: 0 6px 16px rgba(111, 163, 192, 0.3);
}
.hero-list__icon img { width: 26px; height: 26px; transform: rotate(-45deg); }

/* ---------- Brands ---------- */
.brands { background: var(--white); padding: 24px 0; }
.brands__heading {
  font: 700 12px/1 var(--font-head);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
}
.brands__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.brands__list img { height: 34px; width: auto; max-width: 120px; object-fit: contain; filter: grayscale(1); opacity: .75; }
@media (max-width: 767px) {
  .brands__list { justify-content: center; }
  .brands__list img { height: 26px; }
}

/* ---------- Cards / shortcuts ---------- */
.shortcuts__grid { display: grid; gap: 32px; }
@media (min-width: 992px) {
  .shortcuts__grid { grid-template-columns: 300px 1fr; gap: 48px; }
}
.shortcuts__intro h2 { font-size: clamp(24px, 2.4vw, 30px); }
.shortcuts__cards { display: grid; gap: 20px; }

.cards { display: grid; gap: 20px; }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 24px 0; }

.card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 14px;
}
.card h3 { font-size: 20px; }
.card p:last-child { margin-bottom: 0; }
.card .eyebrow { font-size: 12px; }
.card--secondary1 { background: var(--blue); color: var(--white); }
.card--secondary2 { background: var(--teal); }
.card--secondary3 { background: var(--sky); }
.card--primary2 { background: var(--yellow); }

.card--lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.card--lead .card__body { flex: 1 1 320px; }
.card--lead h3 { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.card__icon { width: 36px; height: 36px; }

/* ---------- Card prose (e.g. developers grid) ---------- */
.prose .card { color: var(--text); }
.prose .card h3 { margin-top: 0; }
.prose .card ul { margin-bottom: 0; }

/* ---------- Intro ---------- */
.intro__text { max-width: 560px; }
.intro__text h2 { font-size: clamp(28px, 3vw, 40px); color: var(--text-soft); }

/* ---------- Split (image + text) ---------- */
.split__grid { display: grid; gap: 32px; align-items: center; }
.split__media img { margin: 0 auto; max-height: 460px; object-fit: contain; }
.split__media img.rounded { width: 100%; max-height: none; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
@media (min-width: 992px) {
  .split__grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split--image-right .split__media { order: 2; }
}

/* ---------- Rich hero (sub pages) ---------- */
.hero { padding: 24px 0 24px; }
.hero__grid { display: grid; gap: 32px; align-items: center; padding: 32px 24px; }
.hero__media img { margin: 0 auto; max-height: 420px; object-fit: contain; }
.hero__media img[src$=".jpg"], .hero__media img[src$=".jpeg"] { width: 100%; border-radius: var(--radius-lg); object-fit: cover; max-height: 360px; }
@media (min-width: 992px) {
  .hero__grid { grid-template-columns: 1fr 1fr; gap: 64px; padding: 56px 64px; }
  .hero--image-left .hero__media { order: -1; }
}
.hero h1 { font-size: clamp(30px, 3.4vw, 44px); }

.hero-simple { padding: 32px 24px; }
.hero-simple__image { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 32px; }
@media (min-width: 992px) { .hero-simple { padding: 56px 64px; } }

/* ---------- Features ---------- */
.features { padding: 40px 24px; }
@media (min-width: 992px) { .features { padding: 64px 96px; } }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.section-head__lead { margin-top: 12px; }
.features__list {
  display: grid;
  gap: 40px 96px;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 760px;
}
@media (min-width: 768px) { .features__list { grid-template-columns: 1fr 1fr; } }
.feature { position: relative; font-size: 14px; }
.feature__icon { position: absolute; left: -44px; top: 0; width: 28px; height: 28px; object-fit: contain; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
@media (max-width: 1100px) {
  .feature__icon { position: static; margin-bottom: 10px; }
}

/* ---------- IoT feature grid (icons in circles) ---------- */
.iot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 48px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.iot-item { font-size: 14px; }
.iot-item__icon {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.iot-item__icon img { max-width: 60%; max-height: 60%; object-fit: contain; }
.iot-item h3 { font-size: 19px; margin-bottom: 10px; }

/* ---------- Case ---------- */
.case__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 992px) { .case__grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.case__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.case h2 { color: var(--text-soft); }

.quote {
  position: relative;
  margin: 24px 0 0;
  padding: 28px 28px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.quote::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 24px;
  width: 36px;
  height: 28px;
  background: url(/assets/icons/quote.svg) no-repeat center / contain;
}
.quote p { font-style: italic; }
.quote footer { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.quote footer strong { display: block; font-family: var(--font-head); }
.quote__avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }

/* ---------- Contact (dark panel) ---------- */
.contact {
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--white);
  text-align: center;
}
.contact h1, .contact h2 { font-size: clamp(24px, 2.4vw, 30px); max-width: 520px; margin: 0 auto 16px; }
.contact > p:not(.eyebrow) { max-width: 560px; margin: 0 auto 20px; font-size: 15px; }
.contact .eyebrow { opacity: .7; font-size: 12px; }
.contact__image { width: 140px; height: 140px; margin: 0 auto 24px; border-radius: var(--radius); object-fit: cover; }
.contact__image[src$=".svg"] { object-fit: contain; }

.checklist {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 36px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  font-size: 15px;
}
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: url(/assets/icons/check.svg) no-repeat center / contain;
}
@media (min-width: 992px) { .contact { padding: 64px; } }

/* ---------- Tables (fallback for CMS tables) ---------- */
.prose table { width: 100%; border-collapse: collapse; }
.prose td { padding: 8px; vertical-align: top; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  padding: 64px 0 32px;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
}
.footer__grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (min-width: 992px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__brand img { width: 200px; }
.footer__social { display: flex; gap: 12px; margin-top: 24px; }
.footer__social img { width: 36px; height: 36px; }
.footer__col h2 { font-size: 18px; margin-bottom: 16px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__col a, .footer__bottom a { text-decoration: none; opacity: .85; }
.footer__col a:hover, .footer__bottom a:hover { opacity: 1; color: var(--yellow); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  opacity: .8;
}
.footer__bottom p { margin: 0; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
