/* © 2026 Zohsik */
/* css/pages/software.css */

body.software-page {
  --sw-ink: #181a1d;
  --sw-muted: #555b62;
  --sw-paper: #fafaf8;
  --sw-rule: #cdd0cc;
  --sw-accent: #087996;
}

body.dark.software-page {
  --sw-ink: #f2f2ed;
  --sw-muted: #b2b6b8;
  --sw-paper: #080909;
  --sw-rule: #333737;
  --sw-accent: #67cce3;
}

body.software-page main {
  width: min(1520px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: clamp(30px, 4vw, 62px) var(--studio-header-pad-x) clamp(44px, 5vw, 78px);
  color: var(--sw-ink);
  background: var(--sw-paper);
  font-family: var(--studio-font);
  text-align: left;
}

.software-index-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px 56px;
  padding-bottom: clamp(28px, 3.4vw, 48px);
  border-bottom: 1px solid var(--sw-rule);
}

.software-index-intro h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -.05em;
  text-wrap: balance;
}

.software-index-lede {
  margin: 0;
  max-width: 46ch;
  color: var(--sw-muted);
  font-size: clamp(.94rem, 1.1vw, 1.06rem);
  line-height: 1.65;
}

.software-index-catalogue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 20px) clamp(24px, 3vw, 52px);
  margin-top: clamp(28px, 3.4vw, 48px);
  border-bottom: 1px solid var(--sw-rule);
}

.software-index-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 0 clamp(28px, 3vw, 40px);
  border-top: 2px solid var(--sw-accent);
}

.software-index-card[data-product="turnweave"],
.software-discovery-product[data-product="turnweave"] { --sw-accent: #516dcc; }
.software-index-card[data-product="wordlyte"],
.software-discovery-product[data-product="wordlyte"] { --sw-accent: #7653ad; }
body.dark .software-index-card[data-product="turnweave"],
body.dark .software-discovery-product[data-product="turnweave"] { --sw-accent: #a0b3ff; }
body.dark .software-index-card[data-product="wordlyte"],
body.dark .software-discovery-product[data-product="wordlyte"] { --sw-accent: #c5a2f2; }

.software-index-marks {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.software-index-number {
  color: var(--sw-muted);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.software-index-featured {
  color: var(--sw-ink);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.software-index-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin-top: 22px;
  object-fit: contain;
}

.software-index-card[data-product="mixurly"] .software-index-icon {
  transform: scale(.88);
  transform-origin: left center;
}

.software-index-card h2 {
  margin: 20px 0 0;
  font-size: clamp(25px, 2.1vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.software-index-card h2 sup {
  font-size: .46em;
  font-weight: 600;
  line-height: 1;
}

.software-index-standfirst {
  margin: 10px 0 0;
  color: var(--sw-accent);
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.45;
}

.software-index-copy {
  margin: 16px 0 0;
  color: var(--sw-muted);
  font-size: .92rem;
  line-height: 1.62;
}

.software-index-meta {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--sw-rule);
  color: var(--sw-muted);
  font-size: .75rem;
  line-height: 1.55;
}

.software-index-meta span {
  display: block;
  margin-top: 4px;
}

.software-index-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: auto;
  padding-top: clamp(20px, 2.4vw, 28px);
}

@media (min-width: 1081px) {
  html[lang="de"] .software-index-card[data-product="turnweave"] .software-index-actions {
    flex-wrap: nowrap;
    gap: 8px 12px;
  }

  html[lang="de"] .software-index-card[data-product="turnweave"] .software-index-action {
    padding-inline: 13px;
    white-space: nowrap;
  }

  html[lang="de"] .software-index-card[data-product="turnweave"] .software-index-link {
    gap: 6px;
    white-space: nowrap;
  }
}

.software-index-action,
.software-index-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--sw-ink);
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.software-index-action {
  padding: 12px 17px;
  border: 1px solid var(--sw-ink);
  border-radius: 3px;
  color: var(--sw-paper);
  background: var(--sw-ink);
  transition: color .18s ease, background .18s ease;
}

.software-index-action:hover {
  color: var(--sw-ink);
  background: var(--sw-paper);
}

.software-index-link {
  padding: 10px 0;
  text-decoration: underline;
  text-decoration-color: var(--sw-rule);
  text-underline-offset: 6px;
  transition: text-decoration-color .18s ease;
}

.software-index-link:hover {
  text-decoration-color: currentColor;
}

body.software-page main a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

body.software-page .software-index-action:focus-visible {
  outline-color: var(--sw-ink);
}

.software-discovery[hidden] {
  display: none;
}

.software-discovery {
  padding-block: clamp(36px, 5vw, 72px);
  border-bottom: 1px solid var(--sw-rule);
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.software-discovery-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 20px clamp(24px, 4vw, 56px);
  margin-bottom: clamp(24px, 3vw, 36px);
}

.software-discovery-eyebrow {
  margin: 0 0 12px;
  color: var(--sw-muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.software-discovery-intro h2 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.software-discovery-lede {
  margin: 0;
  max-width: 60ch;
  color: var(--sw-muted);
  font-size: .94rem;
  line-height: 1.65;
}

.software-discovery-product {
  min-width: 0;
  padding-top: 22px;
  border-top: 2px solid var(--sw-accent);
}

.software-discovery-identity {
  display: flex;
  align-items: start;
  gap: 16px;
  min-width: 0;
}

.software-discovery-identity > div {
  min-width: 0;
}

.software-discovery-icon {
  display: block;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.software-discovery-product h3 {
  margin: 0;
  font-size: clamp(23px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.software-discovery .software-index-link {
  min-width: 44px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.software-discovery a > span:first-child {
  min-width: 0;
}

.software-discovery a > [aria-hidden="true"] {
  flex-shrink: 0;
}

.software-comparison-profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 36px clamp(24px, 3vw, 52px);
}

.software-comparison-product {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.software-comparison-facts {
  width: 100%;
  margin: 24px 0 12px;
}

.software-comparison-facts > div {
  padding-block: 16px;
  border-top: 1px solid var(--sw-rule);
}

.software-comparison-facts dt {
  margin: 0 0 6px;
  color: var(--sw-ink);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.5;
}

.software-comparison-facts dd {
  margin: 0;
  color: var(--sw-muted);
  font-size: .92rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.software-comparison-product > .software-index-link {
  margin-top: auto;
}

html[lang="ja"] .software-discovery h2,
html[lang="ja"] .software-discovery h3 {
  letter-spacing: normal;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .software-discovery-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 760px) {
  .software-comparison-profiles {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1080px) {
  .software-index-catalogue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .software-index-intro {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 18px;
  }

  .software-index-lede {
    max-width: 58ch;
  }
}

/* German needs more of the intro row than the 1.5fr/1fr split leaves the
   lede, so the two tracks are equalized and the lede uses its whole column. */
@media (min-width: 901px) {
  html[lang="de"] .software-index-intro {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  html[lang="de"] .software-index-lede {
    max-width: none;
    text-wrap: balance;
  }
}

@media (max-width: 760px) {
  .software-index-catalogue {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }

  .software-index-copy {
    max-width: 58ch;
  }
}

@media (max-width: 560px) {
  body.software-page main {
    padding-inline: 18px;
  }

  .software-index-intro h1 {
    font-size: clamp(30px, 8vw, 40px);
  }

  .software-index-icon {
    width: 60px;
    height: 60px;
    margin-top: 18px;
  }

  .software-index-card h2 {
    font-size: 25px;
  }

  .software-index-actions {
    gap: 6px 16px;
  }

  .software-index-action,
  .software-index-link {
    font-size: .82rem;
  }

  .software-index-action {
    padding: 11px 15px;
  }
}

@media (orientation: landscape) and (min-width: 600px) and (max-height: 500px) {
  body.software-page main {
    padding-block: clamp(22px, 3vw, 40px) clamp(32px, 4vw, 56px);
  }

  .software-index-intro {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: end;
    gap: 20px 36px;
    padding-bottom: 26px;
  }

  .software-index-intro h1 {
    font-size: clamp(28px, 3.4vw, 42px);
  }

  .software-index-lede {
    font-size: .88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .software-index-action,
  .software-index-link {
    transition: none;
  }
}

@media (forced-colors: active) {
  .software-index-action {
    border-color: LinkText;
  }

  .software-discovery-product,
  .software-comparison-facts > div {
    border-color: CanvasText;
  }

  .software-discovery a {
    color: LinkText;
    text-decoration-color: LinkText;
  }

  body.software-page .software-discovery a:focus-visible {
    outline-color: Highlight;
  }
}
