body.site-section-page[data-site-page="software"] {
  background: #fff8ec url("./assets/software/landing-meadow-background.webp") center bottom / cover fixed no-repeat;
}

body.site-section-page[data-site-page="software"]::before,
body.site-section-page[data-site-page="software"]::after {
  display: none;
}

.site-section-page .software-showcase {
  display: block;
  position: relative;
  min-height: calc(100vh - 150px);
  padding: clamp(56px, 4.2vw, 76px) 0 clamp(52px, 5vw, 82px);
  overflow: clip;
}

.software-showcase.is-data-loading .software-showcase__copy,
.software-showcase.is-data-loading .software-showcase__visual,
.software-showcase.is-data-loading .software-showcase__footer,
.software-showcase.is-data-loading .software-showcase__developing,
.software-showcase.is-data-loading .software-app-switcher {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.software-showcase.is-empty .software-showcase__copy,
.software-showcase.is-empty .software-showcase__visual,
.software-showcase.is-empty .software-showcase__footer {
  display: none;
}

.software-showcase__developing {
  grid-column: 2 / -1;
  grid-row: 1 / span 2;
  display: none;
  place-content: center;
  min-height: clamp(420px, 36vw, 560px);
  margin: 0;
  padding: clamp(24px, 4vw, 48px);
  text-align: center;
}

.software-showcase.is-empty .software-showcase__developing {
  display: grid;
}

.software-showcase__developing-text {
  margin: 0;
  color: rgba(90, 51, 15, 0.72);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.72);
}

.software-preview-manual-download[hidden] {
  display: none !important;
}

.software-showcase::before,
.software-showcase::after {
  display: none;
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.software-showcase::before {
  inset: 8% auto auto -14%;
  width: min(48vw, 760px);
  height: min(48vw, 760px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 199, 125, 0.19), rgba(255, 238, 210, 0) 68%);
}

.software-showcase::after {
  right: -9%;
  bottom: -18%;
  width: min(54vw, 840px);
  height: min(34vw, 520px);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(180, 207, 165, 0.2), rgba(255, 244, 229, 0) 70%);
}

.software-showcase__inner {
  display: grid;
  grid-template-areas:
    "switcher copy visual"
    "footer footer footer";
  grid-template-columns: clamp(64px, 5.8vw, 100px) minmax(270px, 0.6fr) minmax(520px, 1.5fr);
  align-items: center;
  column-gap: clamp(38px, 4vw, 96px);
  row-gap: clamp(24px, 2.4vw, 34px);
  width: min(calc(100% - clamp(32px, 5vw, 72px)), 1320px);
  min-height: clamp(560px, 42vw, 680px);
  margin: 0 auto;
}

.software-app-switcher {
  grid-area: switcher;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 1.8vw, 25px);
  min-height: 450px;
  background: transparent;
}

.software-app-switcher__arrow {
  width: 22px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(199, 137, 70, 0.66);
  cursor: default;
}

.software-app-switcher__arrow::before {
  display: block;
  width: 12px;
  height: 12px;
  margin: auto;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  border-radius: 2px;
  content: "";
  transform: rotate(-45deg);
}

.software-app-switcher__arrow--down::before {
  transform: rotate(135deg);
}

.software-app-switcher__list {
  display: grid;
  justify-items: center;
  gap: clamp(14px, 1.5vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.software-app-switcher__button {
  display: grid;
  place-items: center;
  width: clamp(52px, 4vw, 62px);
  height: clamp(52px, 4vw, 62px);
  padding: 1px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.62;
  transform: scale(1);
  box-sizing: border-box;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.software-app-switcher__button:hover:not([disabled]),
.software-app-switcher__button:focus-visible:not([disabled]) {
  background: #ff851a;
  opacity: 1;
  box-shadow: 0 10px 20px rgba(255, 133, 26, 0.24);
  transform: scale(1.06);
}

.software-app-switcher__button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.software-app-switcher__button.is-active {
  background: #ff851a;
  opacity: 1;
  box-shadow: 0 10px 20px rgba(255, 133, 26, 0.28);
  transform: scale(1.15);
}

.software-app-switcher__button.is-active:hover:not([disabled]),
.software-app-switcher__button.is-active:focus-visible:not([disabled]) {
  background: #ff851a;
  box-shadow: 0 12px 22px rgba(255, 133, 26, 0.32);
  transform: scale(1.2);
}

.software-app-switcher__button[disabled] {
  cursor: default;
}

.software-app-switcher__placeholder {
  display: grid;
  place-items: center;
  width: clamp(52px, 4vw, 62px);
  height: clamp(52px, 4vw, 62px);
  opacity: 0.72;
}

.software-app-switcher__icon {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 17px;
  object-fit: cover;
}

.software-app-switcher__placeholder-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.software-showcase__copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 360px;
}

.software-showcase__heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  transform: none;
  text-align: left;
}

.software-showcase__eyebrow {
  margin: clamp(26px, 2vw, 32px) 0 0;
  color: #ff851a;
  font-size: clamp(16px, 1.25vw, 18px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
}

.software-showcase__title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 4.3vw, 68px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
  text-align: left;
}

.software-showcase__description {
  max-width: 16.5em;
  margin: clamp(10px, 1.3vw, 16px) 0 0;
  color: rgba(90, 51, 15, 0.68);
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 600;
  line-height: 1.75;
}

.software-showcase__features {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: clamp(20px, 2.2vw, 28px) 0 0;
  padding: 0;
  list-style: none;
}

.software-showcase__features li {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 154, 52, 0.22);
  border-radius: 999px;
  background: rgba(255, 245, 232, 0.58);
  color: rgba(90, 51, 15, 0.82);
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 700;
  white-space: nowrap;
}

.software-showcase__features li::before {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 154, 52, 0.13);
  content: "";
}

.software-showcase__downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 3.5vw, 56px);
  width: min(100%, 620px);
  margin: 0;
}

.software-showcase__download-status {
  grid-column: 1 / -1;
  margin: -8px 0 0;
  color: #8a5a2b;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.software-showcase__download-status.is-error {
  color: #b42318;
}

.software-showcase__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  gap: 12px;
  padding: 0 20px;
  border: 2px solid #ff851a;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff9c31, #ff7416);
  box-shadow: 0 15px 28px rgba(230, 113, 25, 0.2);
  font-size: clamp(16px, 1.38vw, 20px);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.software-showcase__download--mac {
  color: #e56f1a;
  background: rgba(255, 252, 247, 0.74);
  box-shadow: none;
}

.software-showcase__download:hover {
  box-shadow: 0 19px 34px rgba(230, 113, 25, 0.27);
  transform: translateY(-2px);
}

.software-showcase__download--mac:hover {
  background: #fffaf3;
  box-shadow: 0 14px 26px rgba(141, 84, 29, 0.12);
}

.software-showcase__download:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.software-showcase__system-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.software-showcase__system-icon--windows {
  --icon: url("./assets/software/windows.svg");
}

.software-showcase__system-icon--mac {
  --icon: url("./assets/software/macos.svg");
}

.software-showcase__visual {
  grid-area: visual;
  position: relative;
  min-width: 0;
  margin: 0;
}

.software-showcase__visual::after {
  position: absolute;
  right: -4%;
  bottom: -4%;
  z-index: -1;
  width: 64%;
  height: 22%;
  border-radius: 50%;
  background: rgba(246, 184, 101, 0.23);
  filter: blur(30px);
  content: "";
}

.software-showcase__preview {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: clamp(22px, 2.5vw, 34px);
  background: #d5e7f0;
  box-shadow: 0 26px 56px rgba(103, 71, 30, 0.2);
  object-fit: contain;
}

.software-showcase__footer {
  grid-area: footer;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 28px;
  min-width: 0;
}

.software-showcase__product-note {
  position: absolute;
  right: clamp(14px, 2.3vw, 30px);
  bottom: clamp(14px, 2.2vw, 28px);
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #6d4721;
  background: rgba(255, 252, 245, 0.88);
  box-shadow: 0 10px 24px rgba(100, 64, 22, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.software-showcase__product-note::before {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f06a55;
  content: "";
}

.software-showcase.is-pomodoro .software-showcase__preview {
  filter: saturate(0.88) hue-rotate(-7deg);
}

.software-showcase.is-pomodoro .software-showcase__product-note {
  display: inline-flex;
}

/* Keep the compact laptop composition, then let the product preview claim more room on wide displays. */
@media (min-width: 1600px) {
  body.site-section-page[data-site-page="software"] .site-shell {
    width: min(100%, 2200px);
  }

  body.site-section-page[data-site-page="software"] .site-header {
    width: min(calc(100% - 68px), 1372px);
    margin-right: auto;
    margin-left: auto;
  }

  .site-section-page .software-showcase {
    padding-top: clamp(66px, 5.2vh, 100px);
    padding-bottom: clamp(62px, 5vh, 96px);
  }

  .software-showcase__inner {
    grid-template-columns: 92px minmax(370px, 0.72fr) minmax(700px, 1.48fr);
    column-gap: clamp(50px, 3.8vw, 88px);
    row-gap: clamp(28px, 2.8vh, 42px);
    width: min(calc(100% - clamp(96px, 9vw, 220px)), 1840px);
    min-height: clamp(600px, 43vw, 760px);
  }

  .software-app-switcher {
    min-height: 500px;
  }

  .software-showcase__copy {
    max-width: none;
    min-height: 390px;
    justify-content: space-between;
  }

  .software-showcase__heading {
    gap: 4px;
    transform: none;
  }

  .software-showcase__title {
    font-size: 78px;
  }

  .software-showcase__eyebrow {
    margin-top: 32px;
    font-size: 20px;
  }

  .software-showcase__description {
    max-width: 21em;
    margin: 0;
    font-size: 22px;
    line-height: 1.78;
  }

  .software-showcase__features {
    gap: 12px;
    margin: 0;
  }

  .software-showcase__features li {
    min-height: 50px;
    padding: 0 16px;
    font-size: 17px;
  }

  .software-showcase__visual {
    width: min(100%, calc(159.88vh - 527.6px));
    justify-self: end;
  }

  .software-showcase__downloads {
    width: min(100%, 760px);
    gap: clamp(48px, 4vw, 76px);
  }
}

@media (min-width: 2000px) {
  .software-showcase__inner {
    grid-template-columns: 108px minmax(420px, 0.72fr) minmax(820px, 1.48fr);
    column-gap: clamp(66px, 4vw, 108px);
    width: min(calc(100% - clamp(140px, 10vw, 280px)), 2080px);
    min-height: clamp(640px, 40vw, 820px);
  }

  .software-app-switcher {
    min-height: 540px;
  }

  .software-showcase__copy {
    max-width: none;
  }
}

@media (max-width: 1100px) {
  .software-showcase__inner {
    grid-template-columns: 64px minmax(250px, 0.62fr) minmax(430px, 1.26fr);
    column-gap: clamp(30px, 4vw, 50px);
    width: min(calc(100% - 58px), 1120px);
  }

  .software-showcase__downloads {
    gap: 12px;
  }

  .software-showcase__download {
    min-height: 60px;
    padding: 0 14px;
  }

}

@media (max-width: 820px) {
  body.site-section-page[data-site-page="software"] {
    background-attachment: scroll;
  }

  .site-section-page .software-showcase {
    padding-top: 26px;
  }

  .software-showcase__inner {
    grid-template-areas:
      "switcher"
      "visual"
      "copy"
      "footer";
    grid-template-columns: 1fr;
    row-gap: 34px;
    width: min(calc(100% - 36px), 620px);
    min-height: 0;
  }

  .software-app-switcher {
    flex-direction: row;
    justify-content: flex-start;
    min-height: 62px;
    gap: 18px;
  }

  .software-app-switcher__arrow {
    display: none;
  }

  .software-app-switcher__list {
    grid-auto-flow: column;
    grid-template-columns: repeat(2, auto);
    gap: 18px;
  }

  .software-showcase__copy {
    max-width: none;
  }

  .software-showcase__eyebrow {
    margin-top: 16px;
    font-size: 14px;
  }

  .software-showcase__heading {
    transform: none;
  }

  .software-showcase__title {
    font-size: clamp(42px, 10vw, 64px);
  }

  .software-showcase__description {
    max-width: 24em;
  }

  .software-showcase__preview {
    height: auto;
    aspect-ratio: auto;
  }
}

@media (max-width: 480px) {
  .software-showcase__inner {
    width: min(calc(100% - 30px), 430px);
  }

  .software-showcase__features {
    gap: 8px;
  }

  .software-showcase__features li {
    min-height: 38px;
    padding: 0 9px;
    font-size: 13px;
  }

  .software-showcase__downloads {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .software-showcase__download {
    min-height: 58px;
  }
}

.software-showcase__changelog-link {
  display: inline;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e8752a;
  font: inherit;
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(232, 117, 42, 0.42);
  text-underline-offset: 3px;
  box-shadow: none;
}

.software-showcase__changelog-link:hover {
  color: #c85f18;
  text-decoration-color: currentColor;
}

.software-changelog-dialog {
  border: 0;
  padding: 0;
  max-width: min(92vw, 640px);
  width: 100%;
  background: transparent;
}

.software-changelog-dialog::backdrop {
  background: rgba(24, 20, 16, 0.42);
}

.software-changelog-dialog__panel {
  position: relative;
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #fffaf5;
  border: 1px solid rgba(232, 117, 42, 0.22);
  box-shadow: 0 24px 60px rgba(58, 34, 12, 0.18);
  overflow: hidden;
}

.software-changelog-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7a4518;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.software-changelog-dialog__close:focus,
.software-changelog-dialog__close:focus-visible {
  outline: none;
  box-shadow: none;
}

.software-changelog-dialog__head {
  padding: 22px 24px 12px;
}

.software-changelog-dialog__title {
  margin: 0;
  font-size: 20px;
  color: #4a2b12;
}

.software-changelog-dialog__body {
  flex: 1;
  overflow: auto;
  padding: 8px 24px 24px;
}

.software-changelog-dialog__body:focus {
  outline: none;
}

.software-changelog-dialog__item + .software-changelog-dialog__item {
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}

.software-changelog-dialog__item-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid rgba(232, 117, 42, 0.16);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.software-changelog-dialog__item-toggle:focus {
  outline: none;
}

.software-changelog-dialog__item-toggle:focus-visible {
  outline: 2px solid rgba(232, 117, 42, 0.45);
  outline-offset: 2px;
  border-radius: 8px;
}

.software-changelog-dialog__item-title {
  margin: 0;
  font-size: 16px;
  color: #e8752a;
  font-weight: 700;
}

.software-changelog-dialog__item-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(122, 69, 24, 0.72);
  border-bottom: 2px solid rgba(122, 69, 24, 0.72);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.software-changelog-dialog__item.is-expanded .software-changelog-dialog__item-chevron {
  transform: rotate(-135deg);
}

.software-changelog-dialog__item-content {
  margin: 0;
  padding: 12px 0 4px;
  line-height: 1.75;
  color: #4a2b12;
  white-space: pre-wrap;
}

.software-changelog-dialog__item:not(.is-expanded) .software-changelog-dialog__item-content {
  display: none;
}

.software-changelog-dialog__empty,
.software-changelog-dialog__loading {
  margin: 0;
  padding: 8px 24px 24px;
  color: rgba(74, 43, 18, 0.72);
}
