/* Matches devices.luxriot.com: same fonts, colours, spacing and breakpoints. */
:root {
  --ink: #0b0e10;
  --navy: #002338;
  --teal: #075975;
  --teal-light: #0d778c;
  --green: #24977f;
  --text: #3f4247;
  --muted: #797b7e;
  --fog: #edf1f3;
  --white: #fff;
  --radius: 3px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Inter, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.main-container { min-height: 100vh; display: flex; flex-direction: column; }
main { flex-grow: 1; }

.ps-section { padding-left: 56px; padding-right: 56px; }
.ps-content { margin: 0 auto; max-width: 1328px; }

/* Underline that grows on hover, as on the devices site */
.link-with-arrow .label,
.bottom-links a,
.conditions a {
  position: relative;
  transition: color .2s ease-out;
}

.link-with-arrow .label::after,
.bottom-links a::after,
.conditions a::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -1px;
  width: 0;
  height: 1px;
  background-color: var(--teal);
  transition: width .3s ease-out;
}

.link-with-arrow:hover .label::after,
.bottom-links a:hover::after,
.conditions a:hover::after {
  width: calc(100% + 6px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px var(--fog);
}

.header-inner { display: flex; align-items: center; padding: 18px 0; }
.header-brand { display: flex; align-items: center; gap: 40px; }

.site-purpose {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}

.link-with-arrow {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.link-with-arrow .label { font-weight: 600; color: var(--navy); }
.link-with-arrow:hover .label { color: var(--teal); }

.link-with-arrow::after {
  content: "";
  width: 24px;
  height: 24px;
  background: url(assets/arrow-right.svg) center / contain no-repeat;
  filter: invert(97%) sepia(6%) saturate(103%) hue-rotate(155deg) brightness(95%) contrast(102%);
  transition: transform .2s ease-out, filter .2s ease-out;
}

.link-with-arrow:hover::after {
  transform: translateX(8px);
  filter: invert(25%) sepia(99%) saturate(454%) hue-rotate(150deg) brightness(93%) contrast(98%);
}

.header-inner .to-main-site { margin-left: auto; }

/* Hero */
.hero {
  margin-top: 24px;
  padding: 104px 40px 64px;
  text-align: center;
  background-color: var(--navy);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(27, 48, 57, .6) 100%), url(assets/hero.jpg);
  background-position: center;
  background-size: cover;
  background-blend-mode: multiply, normal;
}

.hero-title {
  font-family: "Titillium Web", sans-serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--white);
  margin: 0 auto 40px;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.005em;
  color: var(--white);
  max-width: 880px;
  margin: 0 auto;
}

/* Search band */
.search-band {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 40px;
  background-color: var(--fog);
  border-radius: var(--radius);
  margin: 0;
}

.search-band[hidden] { display: none; }

.field {
  font-family: Inter, sans-serif;
  height: 56px;
  border-radius: var(--radius);
  transition: box-shadow .2s ease-in;
}

.field-search {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background-color: var(--white);
  padding-right: 16px;
}

.field-search input {
  flex-grow: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 11px 16px;
  font: inherit;
  font-size: 18px;
  line-height: 24px;
  color: var(--ink);
}

.field-search input::placeholder { color: rgba(121, 123, 126, .5); opacity: 1; }
.field-search input::-webkit-search-cancel-button { cursor: pointer; }

.field-search:focus-within { box-shadow: 0 0 6px rgba(7, 89, 117, .5), 0 0 0 2px var(--teal); }
.field-search.not-empty:not(:focus-within) { box-shadow: 0 0 0 2px var(--green); }

/* Country picker styled like the devices site's outlined "Search by specs" button */
.field-country {
  flex-shrink: 0;
  width: 280px;
  max-width: 40%;
  border: 0;
  outline: 0;
  padding: 0 48px 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--teal);
  background-color: transparent;
  box-shadow: inset 0 0 0 3px var(--teal);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23075975' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

.field-country:focus { box-shadow: inset 0 0 6px rgba(7, 89, 117, .5), inset 0 0 0 4px var(--teal); }

/* Directory */
.directory { padding: 64px 0 0; }

.block-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--navy);
  text-align: center;
  margin: 0;
}

.block-subtitle {
  color: var(--text);
  text-align: center;
  max-width: 880px;
  margin: 16px auto;
}

.country-group { margin-top: 48px; }

.country-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fog);
}

.installer-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px 24px;
}

.installer {
  padding: 20px 24px;
  background-color: var(--white);
  border: 1px solid var(--fog);
  border-radius: var(--radius);
}

.installer-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
  margin: 0;
  overflow-wrap: anywhere;
}

/* Company name links to its website; the arrow marks it as external */
.installer-link {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease-out;
}

.installer-link::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M5 2H2v10h10V9M8 2h4v4M12 2L6 8' fill='none' stroke='%23075975' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .6;
  transition: opacity .2s ease-out;
}

.installer-link:hover,
.installer-link:focus-visible { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.installer-link:hover::after { opacity: 1; }

.installer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text);
}

.installer-meta::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") center no-repeat;
}

.empty {
  text-align: center;
  color: var(--text);
  margin: 48px 0 0;
}

/* Bottom links, like the devices site's "New devices / New brands" row */
.bottom-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px auto;
  padding: 64px 0;
}

.bottom-links .additional-info { color: var(--muted); }
.bottom-links .additional-info:empty { display: none; }

.bottom-links a {
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.bottom-links a:hover { color: var(--teal-light); }

/* Footer */
.site-footer { background-color: var(--ink); padding-top: 104px; padding-bottom: 64px; }
.footer-inner { display: flex; justify-content: space-between; }
.site-footer .site-logo img { margin-top: -8px; }

.copyright {
  margin-top: 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.copyright br { display: none; }

.conditions { display: flex; gap: 24px; margin-top: 24px; }
.conditions a { font-size: 12px; color: var(--muted); text-decoration: none; }
.conditions a:hover { color: var(--teal); }

.social { display: flex; justify-content: flex-end; align-items: center; gap: 24px; }

.footer-to-main { display: none; }
.footer-to-main .label { color: var(--white); }

@media (max-width: 1000px) {
  .ps-section { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 719px) {
  .ps-section { padding-left: 15px; padding-right: 15px; }

  .header-inner { padding: 9px 0; }
  .header-brand { width: 100%; justify-content: space-between; }
  .site-purpose { text-align: right; font-size: 10px; }
  .site-header .site-logo img { width: 94px; height: auto; }
  .header-inner .to-main-site { display: none; }

  .hero { padding: 104px 16px 64px; }
  .hero-title { font-size: 40px; }
  .hero-subtitle { font-size: 18px; }

  .search-band { flex-direction: column; align-items: stretch; padding: 16px; gap: 16px; }
  .field-search { padding-right: 0; }
  .field-search .icon-search { display: none; }
  .field-country { width: 100%; max-width: none; }

  .directory { padding-top: 48px; }
  .block-title { font-size: 36px; }
  .country-group { margin-top: 32px; }
  .installer-grid { grid-template-columns: 1fr; }

  .site-footer { padding-top: 64px; }
  .footer-inner { flex-direction: column; }
  .footer-wrapper { display: contents; }
  .site-footer .site-logo { margin: 0 auto; }
  .site-footer .site-logo img { margin-top: 0; }
  .social { margin-top: 40px; justify-content: center; gap: 8px; }
  .single-social {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 76px;
    padding: 12px 16px;
    border: 1px solid var(--text);
    border-radius: var(--radius);
  }
  .footer-to-main {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    padding: 16px;
    border: 1px solid var(--text);
    border-radius: var(--radius);
  }
  .site-footer .site-logo { order: 1; }
  .social { order: 2; }
  .footer-to-main { order: 3; }
  .conditions { order: 4; justify-content: center; }
  .copyright { order: 9; text-align: center; }
  .copyright br { display: block; }
}

@media (max-width: 450px) {
  .bottom-links { flex-direction: column; }
}
