/* MilliSec - public website */

.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Header */

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-block: var(--space-2);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* Hero: the Azerbaijani letter Ə is the brand's single bold element */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-6);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__text {
  max-width: 34rem;
}

.hero h1 {
  font-size: var(--fs-h1);
  margin-bottom: var(--space-3);
}

.hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--muted);
  max-width: 33rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.hero__glyph {
  position: absolute;
  right: -0.06em;
  bottom: -0.17em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(16rem, 44vw, 46rem);
  line-height: 0.8;
  color: var(--brand);
  pointer-events: none;
  user-select: none;
  animation: glyph-rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes glyph-rise {
  from {
    clip-path: inset(100% 0 0 0);
    transform: translateY(8%);
  }
  to {
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

@media (max-width: 60rem) {
  .hero {
    padding-block: var(--space-5);
  }

  .hero__glyph {
    font-size: 17rem;
    right: -0.12em;
    bottom: auto;
    top: -0.05em;
    opacity: 0.1;
  }
}

/* Sections */

.section {
  padding-block: var(--space-6);
  border-top: 1px solid var(--line);
}

.section__head {
  max-width: var(--measure);
}

.section__head h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-2);
}

.section__head p {
  font-size: 1.125rem;
  color: var(--muted);
}

@media (max-width: 40rem) {
  .section {
    padding-block: var(--space-5);
  }
}

/* Services: a ruled list, name on the left and description on the right */

.services {
  margin: var(--space-4) 0 0;
}

.service {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) 1fr;
  gap: var(--space-1) var(--space-4);
  padding-block: var(--space-3);
  border-top: 1px solid var(--line);
}

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

.service dt {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
}

.service dd {
  margin: 0;
  color: var(--muted);
  max-width: var(--measure);
}

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

/* Protection layers: a real sequence (the path of a request), so it is numbered */

.section--band {
  background: var(--band);
  color: var(--on-band);
  border-top: 0;
}

.section--band .section__head p {
  color: color-mix(in srgb, var(--on-band) 78%, transparent);
}

.layers {
  counter-reset: layer;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.layer {
  counter-increment: layer;
  position: relative;
  padding-top: 3.75rem;
}

.layer::before {
  content: counter(layer);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--focus);
  border-radius: 50%;
  background: var(--band);
  color: var(--focus);
  font-family: var(--font-display);
  font-weight: 700;
  z-index: 1;
}

.layer:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: 2.5rem;
  right: calc(-1 * var(--space-4));
  border-top: 2px dashed color-mix(in srgb, var(--on-band) 30%, transparent);
}

.layer h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.layer p {
  color: color-mix(in srgb, var(--on-band) 78%, transparent);
  font-size: 0.975rem;
}

@media (max-width: 56rem) {
  .layers {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .layer {
    padding-top: 0;
    padding-left: 3.75rem;
    min-height: 2.5rem;
  }

  .layer:not(:last-child)::after {
    top: 2.5rem;
    bottom: calc(-1 * var(--space-3));
    left: 1.2rem;
    right: auto;
    border-top: 0;
    border-left: 2px dashed color-mix(in srgb, var(--on-band) 30%, transparent);
  }
}

/* Password strength tool */

.pw {
  display: grid;
  grid-template-columns: 1fr minmax(0, 30rem);
  gap: var(--space-5);
  align-items: start;
}

.pw > * {
  min-width: 0;
}

.pw__privacy {
  margin-top: var(--space-3);
  padding-left: var(--space-2);
  border-left: 3px solid var(--focus);
  font-size: var(--fs-small) !important;
}

.pw__tool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: var(--space-4);
}

.pw__label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.pw__field {
  display: flex;
  border: 2px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--bg);
}

.pw__field:focus-within {
  border-color: var(--text);
}

.pw__field input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 500 1.1rem/1.3 var(--font-body);
}

.pw__field input:focus {
  outline: none;
}

.pw__toggle {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--brand);
  padding: 0 1rem;
  font: 600 0.95rem var(--font-body);
  cursor: pointer;
}

.pw__meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: var(--space-3);
}

.pw__meter span {
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}

.pw__meter.level-0 span:nth-child(-n + 1),
.pw__meter.level-1 span:nth-child(-n + 2) {
  background: var(--brand);
}

.pw__meter.level-2 span:nth-child(-n + 3) {
  background: var(--focus);
}

.pw__meter.level-3 span,
.pw__meter.level-4 span {
  background: var(--ok);
}

.pw__verdict {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.pw__verdict--empty {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  color: var(--muted);
}

.pw__time {
  margin-top: 0.35rem;
  color: var(--muted);
}

.pw__tips {
  margin: var(--space-2) 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.pw__tips li + li {
  margin-top: 0.3rem;
}

@media (max-width: 56rem) {
  .pw {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .pw__tool {
    padding: var(--space-3);
  }
}

/* Contact */

.contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0 0;
}

.contacts dt {
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.contacts dd {
  margin: 0;
  font-size: 1.1rem;
}

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

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-small);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding-block: var(--space-3);
}

/* 404 */

.notfound {
  min-height: 70vh;
  display: grid;
  align-content: center;
  padding-block: var(--space-5);
}

.notfound__code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 0.9;
  color: var(--brand);
}

.notfound h1 {
  font-size: var(--fs-h2);
  margin-top: var(--space-3);
}

.notfound p {
  margin-top: var(--space-2);
  color: var(--muted);
  max-width: var(--measure);
}

.notfound .button {
  margin-top: var(--space-4);
  justify-self: start;
}
