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

html {
  font-size: 62.5%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1.6;
  letter-spacing: 0.06rem;
  color: var(--color-muted);
  background: var(--color-bg);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 1rem;
}

p {
  margin: 0 0 1.2rem;
}

ul {
  margin: 0;
  padding: 0;
}

.page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 3.5rem 0;
}

.center {
  text-align: center;
}

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

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

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--color-surface);
  padding: 1rem;
  z-index: 10;
}

.btn {
  display: inline-block;
  padding: 1.2rem 2.4rem;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  font: inherit;
  font-weight: 500;
  font-size: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(106, 87, 164, 0.25);
}

.btn--secondary {
  background: var(--color-bg);
  color: var(--color-primary);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 250, 252, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(37, 37, 37, 0.08);
  box-shadow: var(--shadow-sm);
}

.header .page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.logo {
  display: inline-block;
}

.logo img {
  width: 160px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
  list-style: none;
}

.nav>li {
  position: relative;
}

.nav a,
.nav summary {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  list-style: none;
}

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

.nav a:hover,
.nav summary:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.nav .active {
  color: var(--color-primary);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  min-width: 240px;
  margin: 0.5rem 0 0;
  padding: 1rem 0;
  list-style: none;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.submenu a {
  display: block;
  padding: 0.6rem 1.6rem;
  white-space: nowrap;
}

.submenu a:hover {
  background: var(--color-soft);
}

.header-tools {
  display: flex;
  gap: 1.5rem;
}

.header-tools a {
  color: var(--color-text);
  font-size: 1.5rem;
}

.header-tools a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Page hero */
.page-hero {
  position: relative;
}

.page-hero img {
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 10, 36, 0.35), transparent 60%);
  pointer-events: none;
}

.page-hero__box {
  position: absolute;
  z-index: 1;
  left: 5%;
  bottom: 10%;
  max-width: 620px;
  padding: 3rem 3.5rem;
  background: var(--color-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: #fff;
}

.page-hero__box h1 {
  color: #fff;
  font-size: 3.6rem;
  margin-bottom: 1rem;
}

.page-hero__box p {
  color: #fff;
  font-size: 1.8rem;
  margin: 0;
}

/* Typography blocks */
.intro {
  text-align: center;
}

.intro h2 {
  font-size: 3.6rem;
}

.intro p {
  font-size: 1.8rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.title {
  position: relative;
  font-size: 3.2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.2rem;
}

.title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-accent);
}

.prose {
  max-width: 880px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 2.8rem;
  margin-top: 3rem;
}

.prose h3 {
  font-size: 2rem;
  margin-top: 2rem;
}

.prose p {
  font-size: 1.7rem;
}

.prose ul {
  margin: 0 0 1.5rem;
  padding-left: 2rem;
}

.prose li {
  margin-bottom: 0.6rem;
}

.prose a {
  text-decoration: underline;
}

/* Cards */
.grid {
  display: grid;
  gap: 2rem;
  list-style: none;
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card__body {
  padding: 2rem;
}

.card__title {
  font-size: 1.8rem;
  font-weight: 500;
  margin: 0 0 0.8rem;
}

.card__title a {
  color: var(--color-text);
}

.card__title a:hover {
  color: var(--color-primary);
}

.card__text {
  font-size: 1.5rem;
  margin: 0;
}

/* Product and split layouts */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split img {
  width: 100%;
  border-radius: var(--radius);
}

.split h2 {
  font-size: 3.2rem;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.price-tag {
  display: inline-block;
  margin: 0.5rem 0 1.5rem;
  padding: 0.4rem 1.2rem;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.cta {
  background: linear-gradient(135deg, #e9f6ff 0%, #ece8f7 100%);
  color: var(--color-dark);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
}

.cta h2 {
  color: var(--color-dark);
  font-size: 3rem;
}

.cta p {
  color: var(--color-dark);
}

.cta .btn {
  margin: 0.5rem;
}

/* Footer */
.footer {
  background: var(--color-dark);
  color: #fff;
  padding: 4rem 0 2rem;
}

.footer a {
  color: #fff;
}

.footer h2 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
}

.footer p {
  color: rgba(255, 255, 255, 0.8);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.footer__grid ul {
  list-style: none;
}

.footer__grid li {
  margin-bottom: 0.6rem;
}

.footer__logo {
  width: 100px;
}

.footer__bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer__bottom ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__bottom a {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 989px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 749px) {
  .section {
    padding: 2.5rem 0;
  }

  .grid--4,
  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .page-hero img {
    aspect-ratio: auto;
    height: 260px;
  }

  .page-hero__box {
    position: static;
    max-width: none;
    margin: 0 1.5rem;
    transform: translateY(-2rem);
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .header-tools {
    width: 100%;
    justify-content: flex-end;
  }
}
