/* docs.ashling.com landing page (overrides/home.html). Material's root font size is 20px, so 1rem = 20px. */

.ash-home {
  --ash-surface: var(--md-default-bg-color);
  --ash-card-bg: var(--md-default-bg-color);
  --ash-card-border: rgba(10, 13, 33, 0.1);
  --ash-card-shadow: 0 1px 2px rgba(10, 13, 33, 0.04), 0 4px 16px rgba(10, 13, 33, 0.05);
  --ash-card-shadow-hover: 0 2px 4px rgba(10, 13, 33, 0.06), 0 14px 32px rgba(76, 44, 160, 0.14);
  --ash-muted: #5b5f77;                       /* on white 6.3:1 */
  --ash-icon-bg: rgba(107, 63, 217, 0.09);
  --ash-icon-fg: #6b3fd9;
  --ash-ink: #0a0d21;

  font-family: var(--md-text-font-family, sans-serif);
  color: var(--ash-ink);
  -webkit-font-smoothing: antialiased;
}

[data-md-color-scheme="slate"] .ash-home {
  --ash-card-bg: hsla(232, 18%, 16%, 1);
  --ash-card-border: rgba(255, 255, 255, 0.08);
  --ash-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --ash-card-shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(181, 156, 255, 0.25);
  --ash-muted: #a9adc8;
  --ash-icon-bg: rgba(181, 156, 255, 0.12);
  --ash-icon-fg: #c8a8ff;
  --ash-ink: #eef0fa;
}

/* The page body is the template; the empty article Material renders under it is not needed. */
.ash-home ~ .md-main {
  display: none;
}

.ash-home .ash-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.ash-home .ash-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.ash-home a {
  color: inherit;
  text-decoration: none;
}

.ash-home a:focus-visible,
.ash-home .ash-search:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 3px;
}

.ash-home h1,
.ash-home h2,
.ash-home h3 {
  font-family: var(--ash-heading-font);
  margin: 0;
}

/* ---------- Hero ---------- */

.ash-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-color: var(--ash-navy);
  /* faint engineering grid, fading out towards the bottom */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 2.4rem 2.4rem;
  background-position: -1px -1px;
  padding: 3.4rem 0 9.4rem;
}

.ash-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(10, 13, 33, 0), var(--ash-navy));
  pointer-events: none;
}

.ash-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38rem 22rem at 88% 8%, rgba(217, 80, 197, 0.32), transparent 60%),
    radial-gradient(34rem 24rem at 62% 110%, rgba(131, 89, 234, 0.34), transparent 62%),
    radial-gradient(24rem 16rem at 0% 0%, rgba(131, 89, 234, 0.16), transparent 70%);
  pointer-events: none;
}

.ash-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.4rem;
  align-items: center;
  padding: 0 0.8rem;
}

@media screen and (min-width: 60em) {
  .ash-hero__inner {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 2.8rem;
    padding: 0 1.2rem;
  }
}

.ash-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.25rem 0.7rem 0.25rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--ash-heading-font);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d9dbee;
}

.ash-eyebrow__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--ash-gradient);
  box-shadow: 0 0 0 3px rgba(217, 80, 197, 0.18);
}

.ash-hero__title {
  font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #ffffff;
  max-width: 16em;
  text-wrap: balance;
}

.ash-gradient-text {
  background: var(--ash-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ash-hero__lede {
  margin: 1.1rem 0 1.6rem;
  max-width: 32em;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #b9bcd6;                              /* on navy 10.3:1 */
  text-wrap: pretty;
}

/* Search affordance: opens Material's search (the #__search toggle). */
.ash-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 26rem;
  padding: 0.62rem 0.7rem 0.62rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  color: #b9bcd6;
  font-size: 0.8rem;
  cursor: text;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.ash-search:hover {
  border-color: rgba(200, 168, 255, 0.55);
  background: rgba(255, 255, 255, 0.09);
}

.ash-search .ash-icon {
  width: 1.05rem;
  height: 1.05rem;
  color: #c8a8ff;
}

.ash-search__text {
  flex: 1;
}

.ash-search__key {
  min-width: 1.3rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.3rem;
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.65rem;
  text-align: center;
  color: #d9dbee;
}

.ash-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.ash-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.05rem;
  border-radius: 0.55rem;
  font-family: var(--ash-heading-font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.ash-home .ash-btn--primary {
  color: #ffffff;
  background: var(--ash-gradient);
  box-shadow: 0 6px 20px rgba(180, 50, 159, 0.35);
}

.ash-home .ash-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(131, 89, 234, 0.45);
}

.ash-btn .ash-icon {
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 160ms ease;
}

.ash-btn:hover .ash-icon {
  transform: translateX(2px);
}

.ash-home .ash-btn--ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.ash-home .ash-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.36);
}

/* Product screenshot in a soft-glow window */
.ash-hero__shot {
  margin: 0;
  position: relative;
}

.ash-hero__shot::before {
  content: "";
  position: absolute;
  inset: 8% -4% -6% 6%;
  background: var(--ash-gradient);
  filter: blur(42px);
  opacity: 0.45;
  border-radius: 2rem;
}

.ash-window {
  position: relative;
  border-radius: 0.7rem;
  padding: 0.3rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.ash-window img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.ash-hero__shot figcaption {
  position: relative;
  margin-top: 0.8rem;
  font-size: 0.62rem;
  color: #9ea2c2;                              /* on navy 7.7:1 */
  text-align: center;
}

/* ---------- Products: one panel per IDE, overlapping the bottom of the hero ---------- */

.ash-products {
  position: relative;
  z-index: 2;
  margin-top: -6.2rem;
  padding: 0 0.8rem;
}

@media screen and (min-width: 76.25em) {
  .ash-products { padding: 0 1.2rem; }
}

.ash-home .ash-section__head--on-hero h2 { color: #ffffff; }
.ash-home .ash-section__head--on-hero p { color: #b9bcd6; }
.ash-section__head--on-hero { margin-bottom: 1.2rem; }

.ash-ides {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media screen and (min-width: 60em) {
  .ash-ides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ash-ide {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.2rem 1rem;
  border: 1px solid var(--ash-card-border);
  border-radius: 1rem;
  background: var(--ash-card-bg);
  box-shadow: 0 1px 2px rgba(10, 13, 33, 0.05), 0 18px 40px -18px rgba(10, 13, 33, 0.35);
}

.ash-ide::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 1rem 1rem 0 0;
  background: var(--ash-gradient);
}

.ash-ide__head {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.ash-ide__head > .ash-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
  border-radius: 0.7rem;
  color: #ffffff;
  background: var(--ash-gradient);
}

.ash-ide__title {
  flex: 1;
  min-width: 0;
}

.ash-home .ash-ide__title h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ash-ink);
}

.ash-ide__title h3 a:hover { color: var(--ash-icon-fg); }

.ash-ide__archs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.ash-ide__archs li {
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ash-icon-fg);
  background: var(--ash-icon-bg);
}

.ash-ide__text {
  margin: 0.8rem 0 1rem;
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--ash-muted);
}

.ash-tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media screen and (min-width: 30em) {
  .ash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ash-tile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--ash-card-border);
  border-radius: 0.65rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.ash-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(131, 89, 234, 0.35);
  box-shadow: var(--ash-card-shadow-hover);
}

.ash-tile > .ash-icon {
  width: 1.8rem;
  height: 1.8rem;
  padding: 0.38rem;
  border-radius: 0.5rem;
  color: var(--ash-icon-fg);
  background: var(--ash-icon-bg);
}

.ash-tile__body {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  flex: 1;
  min-width: 0;
}

.ash-tile__title {
  font-family: var(--ash-heading-font);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ash-ink);
}

.ash-tile__text {
  font-size: 0.63rem;
  line-height: 1.4;
  color: var(--ash-muted);
}

.ash-tile__arrow .ash-icon {
  width: 0.85rem;
  height: 0.85rem;
  color: var(--ash-muted);
  transition: transform 180ms ease, color 180ms ease;
}

.ash-tile:hover .ash-tile__arrow .ash-icon {
  transform: translateX(3px);
  color: var(--ash-icon-fg);
}

.ash-ide__more {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.9rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ash-icon-fg);
}

.ash-ide__more .ash-icon { width: 0.8rem; height: 0.8rem; transition: transform 180ms ease; }
.ash-ide__more:hover .ash-icon { transform: translateX(3px); }

.ash-products .ash-group { margin-top: 2.2rem; }

/* Architecture matrix inside the navy band */

.ash-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  color: #eef0fa;
}

.ash-matrix th,
.ash-matrix td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.ash-matrix thead th {
  font-family: var(--ash-heading-font);
  font-size: 0.64rem;
  font-weight: 600;
  color: #d9dbee;
}

.ash-matrix tbody th {
  text-align: left;
  font-family: var(--ash-heading-font);
  font-weight: 600;
  color: #ffffff;
}

.ash-matrix tbody tr:last-child th,
.ash-matrix tbody tr:last-child td { border-bottom: 0; }

.ash-matrix__yes .ash-icon {
  width: 1rem;
  height: 1rem;
  color: #c8a8ff;
  vertical-align: middle;
}

.ash-matrix__no { color: #8c90ad; }

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

/* ---------- Sections ---------- */

.ash-section {
  padding: 3.2rem 0.8rem 0;
}

@media screen and (min-width: 76.25em) {
  .ash-section { padding-left: 1.2rem; padding-right: 1.2rem; }
}

.ash-section__head {
  margin-bottom: 1.6rem;
}

.ash-section__head h2,
.ash-band h2 {
  font-size: clamp(1.15rem, 0.9rem + 0.9vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ash-ink);
}

.ash-section__head p {
  margin: 0.45rem 0 0;
  max-width: 40em;
  text-wrap: pretty;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ash-muted);
}

/* Product groups: label column + card grid (after segger.com/support/online-documentation) */

.ash-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--ash-card-border);
}

@media screen and (min-width: 60em) {
  .ash-group {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1.6rem;
  }
}

.ash-group__label h3 {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash-icon-fg);
}

.ash-group__label p {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--ash-muted);
}

.ash-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media screen and (min-width: 45em) {
  .ash-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (min-width: 76.25em) {
  .ash-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ash-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem 1rem 0.9rem;
  border: 1px solid var(--ash-card-border);
  border-radius: 0.8rem;
  background: var(--ash-card-bg);
  box-shadow: var(--ash-card-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

/* gradient hairline on hover */
.ash-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 0.8rem 0.8rem 0 0;
  background: var(--ash-gradient);
  opacity: 0;
  transition: opacity 180ms ease;
}

.ash-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ash-card-shadow-hover);
  border-color: rgba(131, 89, 234, 0.3);
}

.ash-card:hover::before {
  opacity: 1;
}

.ash-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.ash-card__top .ash-icon {
  width: 2.1rem;
  height: 2.1rem;
  padding: 0.45rem;
  border-radius: 0.55rem;
  color: var(--ash-icon-fg);
  background: var(--ash-icon-bg);
}

.ash-badge {
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--ash-card-border);
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ash-muted);
  white-space: nowrap;
}

.ash-badge--new {
  border-color: transparent;
  color: #ffffff;
  background: var(--ash-gradient);
}

.ash-card__title {
  font-family: var(--ash-heading-font);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ash-ink);
}

.ash-card__text {
  flex: 1;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  line-height: 1.55;
  color: var(--ash-muted);
}

.ash-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.9rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ash-icon-fg);
}

.ash-card__more .ash-icon {
  width: 0.8rem;
  height: 0.8rem;
  transition: transform 180ms ease;
}

.ash-card:hover .ash-card__more .ash-icon {
  transform: translateX(3px);
}

/* Architectures band */

.ash-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
  padding: 1.6rem 1.4rem;
  border-radius: 1rem;
  color: #ffffff;
  background:
    radial-gradient(26rem 14rem at 100% 0%, rgba(217, 80, 197, 0.28), transparent 60%),
    radial-gradient(22rem 14rem at 0% 100%, rgba(131, 89, 234, 0.3), transparent 60%),
    var(--ash-navy);
}

@media screen and (min-width: 60em) {
  .ash-band {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    padding: 2rem 2.2rem;
  }
}

.ash-home .ash-band h2 {
  color: #ffffff;
}

.ash-band p {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #b9bcd6;
}

.ash-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ash-pills li {
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--ash-heading-font);
  font-size: 0.68rem;
  font-weight: 600;
  color: #eef0fa;
}

/* Help */

.ash-help {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media screen and (min-width: 45em) {
  .ash-help { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ash-help__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  height: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--ash-card-border);
  border-radius: 0.8rem;
  background: var(--ash-card-bg);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.ash-help__item:hover {
  border-color: rgba(131, 89, 234, 0.35);
  box-shadow: var(--ash-card-shadow-hover);
}

.ash-help__item > .ash-icon {
  grid-row: 1 / span 2;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0.4rem;
  border-radius: 0.5rem;
  color: var(--ash-icon-fg);
  background: var(--ash-icon-bg);
}

.ash-help__title {
  font-family: var(--ash-heading-font);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ash-ink);
}

.ash-help__text {
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--ash-muted);
}

/* About line */

.ash-about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.6rem;
  margin-top: 3.2rem;
  padding: 1.4rem 0.8rem 2.4rem;
  border-top: 1px solid var(--ash-card-border);
  font-size: 0.66rem;
  color: var(--ash-muted);
}

@media screen and (min-width: 76.25em) {
  .ash-about { padding-left: 1.2rem; padding-right: 1.2rem; }
}

.ash-about p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0;
}

.ash-about p span + span::before {
  content: "·";
  margin: 0 0.6rem;
  opacity: 0.6;
}

.ash-about a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--ash-icon-fg);
}

.ash-about a .ash-icon {
  width: 0.8rem;
  height: 0.8rem;
}

/* ---------- Entrance motion (respecting reduced-motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .ash-hero__copy,
  .ash-hero__shot,
  .ash-ide {
    animation: ash-rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .ash-hero__shot { animation-delay: 120ms; }
  .ash-ide:nth-child(1) { animation-delay: 180ms; }
  .ash-ide:nth-child(2) { animation-delay: 260ms; }
}

@media (prefers-reduced-motion: reduce) {
  .ash-home * {
    transition: none !important;
  }
}

@keyframes ash-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* One product: the panel spans the full width and its four tiles sit in one row on wide screens. */
@media screen and (min-width: 60em) {
  .ash-ides.ash-ides--single { grid-template-columns: minmax(0, 1fr); }
  .ash-ides--single .ash-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.ash-home .rf { font-weight: 700; }
