@import url("../assets/fonts/noto-sans-sc/wght.css");
@import url("../assets/fonts/jetbrains-mono/wght.css");

:root {
  --sw-text: #30363b;
  --sw-muted: #667078;
  --sw-line: #d9dfe3;
  --sw-surface: #f6f8f7;
  --sw-accent: #2980b9;
  --sw-accent-dark: #206a98;
}

body,
input,
button,
select,
textarea {
  font-family: "Noto Sans SC", sans-serif;
}

code,
kbd,
pre,
.sw-eyebrow,
.sw-card-kicker {
  font-family: "JetBrains Mono", monospace;
}

.wy-nav-content {
  max-width: 1100px;
}

.rst-content {
  color: var(--sw-text);
  font-size: 16px;
  line-height: 1.78;
}

.rst-content h1,
.rst-content h2,
.rst-content h3 {
  color: #20262b;
  font-weight: 650;
  letter-spacing: 0;
}

.rst-content h1 {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
}

.rst-content h2 {
  margin-top: 2.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--sw-line);
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.16;
}

.rst-content h3 {
  font-size: 20px;
}

.rst-content a {
  color: var(--sw-accent);
}

.rst-content a:hover,
.rst-content a:focus-visible {
  color: var(--sw-accent-dark);
}

.rst-content .md-button {
  display: inline-block;
  margin: 0.25rem 0.35rem 0.25rem 0;
  padding: 0.62rem 1rem;
  border: 1px solid var(--sw-accent);
  border-radius: 4px;
  background: #fff;
  color: var(--sw-accent);
  font-weight: 600;
  text-decoration: none;
}

.rst-content .md-button:hover,
.rst-content .md-button:focus-visible {
  background: #eef6fb;
  color: var(--sw-accent-dark);
}

.rst-content .md-button--primary {
  background: var(--sw-accent);
  color: #fff;
}

.rst-content .md-button--primary:hover,
.rst-content .md-button--primary:focus-visible {
  background: var(--sw-accent-dark);
  color: #fff;
}

.sw-hero {
  position: relative;
  min-height: 420px;
  margin: 0 0 2.8rem;
  padding: clamp(2rem, 6vw, 4.5rem);
  overflow: hidden;
  border: 1px solid var(--sw-line);
  border-radius: 5px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 247, 0.88)),
    url("../assets/images/home-simulation.webp") center / cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sw-hero::after {
  content: "S3  /  S6  /  S7";
  position: absolute;
  right: 1.4rem;
  bottom: 1rem;
  color: #98a2a8;
  font: 500 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.12em;
}

.sw-hero h1 {
  max-width: none;
  margin: 0.45rem 0 1rem;
  border: 0;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.1;
}

.sw-hero h1 .headerlink {
  display: none;
}

.sw-hero p {
  max-width: 760px;
  margin-bottom: 1rem;
  color: #4f5b62;
  font-size: 18px;
}

.sw-eyebrow,
.sw-card-kicker {
  color: var(--sw-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.sw-card-grid {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0 2rem;
}

.sw-card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sw-card-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sw-card-grid > p {
  display: contents;
  margin: 0;
}

.rst-content a.sw-card {
  position: relative;
  min-height: 220px;
  padding: 1.1rem;
  overflow: hidden;
  border: 1px solid var(--sw-line);
  border-radius: 5px;
  background: #fff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(35, 48, 56, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.rst-content a.sw-card:hover,
.rst-content a.sw-card:focus-visible {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 8px 24px rgba(35, 48, 56, 0.14);
}

.sw-card strong,
.sw-card small {
  position: relative;
  z-index: 2;
  display: block;
}

.sw-card strong {
  margin: 0.28rem 0 0.12rem;
  font-size: 23px;
  line-height: 1.16;
}

.sw-card small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.sw-card--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to top, rgba(12, 19, 23, 0.96), rgba(12, 19, 23, 0.08) 70%),
    var(--card-image);
  background-position: center;
  background-size: cover;
}

.rst-content a.sw-card--wide {
  min-height: 150px;
  background: linear-gradient(135deg, #27343c, #3f505a);
}

.rst-content a.sw-card--simulation {
  background:
    linear-gradient(to right, rgba(24, 36, 43, 0.94), rgba(24, 36, 43, 0.5)),
    url("../assets/images/home-simulation.webp") center / cover;
}

.rst-content a.sw-card--product {
  min-height: 120px;
  padding: 0;
  background: #fff;
  color: var(--sw-text);
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.rst-content a.sw-card--product:hover,
.rst-content a.sw-card--product:focus-visible {
  color: var(--sw-text);
}

.sw-card--product img {
  width: 120px;
  height: 120px;
  margin: 0;
  object-fit: cover;
  background: #f0f2f1;
}

.sw-card--product span {
  padding: 1rem;
}

.sw-card--product small {
  color: var(--sw-muted);
}

.sw-product-image,
.sw-wide-image {
  display: block;
  width: 100%;
  margin: 1.2rem 0 2rem;
  border: 1px solid var(--sw-line);
  border-radius: 5px;
  background: var(--sw-surface);
  object-fit: contain;
}

.sw-product-image {
  max-height: 520px;
  aspect-ratio: 16 / 9;
}

.sw-wide-image {
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.rst-content table.docutils {
  border: 1px solid var(--sw-line);
  box-shadow: none;
}

.rst-content table.docutils thead {
  background: #eef3f5;
}

@media screen and (max-width: 900px) {
  .sw-card-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sw-card-grid--three > p:last-child > .sw-card {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 700px) {
  .rst-content {
    font-size: 15px;
  }

  .sw-hero {
    min-height: 390px;
    margin-inline: -1rem;
    padding: 2rem 1.2rem;
    border-radius: 0;
  }

  .sw-hero h1 {
    font-size: clamp(34px, 9vw, 42px);
  }

  .sw-hero p {
    font-size: 16px;
  }

  .sw-card-grid--three,
  .sw-card-grid--two {
    grid-template-columns: 1fr;
  }

  .sw-card-grid--three > p:last-child > .sw-card {
    grid-column: auto;
  }

  .rst-content a.sw-card {
    min-height: 210px;
  }

  .rst-content a.sw-card--product {
    min-height: 104px;
  }

  .sw-card--product img {
    width: 104px;
    height: 104px;
  }

  .sw-product-image,
  .sw-wide-image {
    aspect-ratio: 4 / 3;
  }
}
