/* Shared, dependency-free presentation for the Breeze static pages. */
:root {
  color-scheme: light dark;
  --page: #f5f8f6;
  --surface: #ffffff;
  --surface-alt: #eaf1ed;
  --text: #17211d;
  --muted: #53645c;
  --line: #cbd8d0;
  --brand: #147a4c;
  --brand-strong: #0d5d39;
  --on-brand: #ffffff;
  --focus: #ad6500;
  --radius: 8px;
  --shadow: 0 12px 30px rgb(23 33 29 / 10%);
  --content-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #101815;
    --surface: #17231e;
    --surface-alt: #203029;
    --text: #f1f7f3;
    --muted: #b3c2ba;
    --line: #3b5046;
    --brand: #83d5a2;
    --brand-strong: #a5e6bb;
    --on-brand: #102117;
    --focus: #ffd36d;
    --shadow: 0 12px 30px rgb(0 0 0 / 25%);
  }
}

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

html {
  min-width: 320px;
  background: var(--page);
  color: var(--text);
  font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.55;
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--page);
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--brand-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--brand);
}

button,
input,
textarea,
select {
  color: inherit;
}

button,
[role="button"] {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  color: #1c1605;
  background: #ffd36d;
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.page-shell,
.site-footer {
  width: min(var(--content-width), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav,
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav ul {
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 0.75rem;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--brand-strong);
}

.page-shell {
  padding-block: clamp(1.5rem, 4vw, 3.5rem);
}

.site-footer {
  padding-block: 1.25rem 1.75rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  text-align: center;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--brand-strong);
  font-size: 0.9375rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.1875rem;
}

.lede,
.intro-copy {
  max-width: 68ch;
  margin-top: 1rem;
  color: var(--muted);
}

.section {
  margin-top: clamp(2rem, 5vw, 4rem);
}

.section-heading {
  margin-bottom: 1.25rem;
}

.two-column,
.three-column {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

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

.three-column,
.downloads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.archive-story {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.archive-image-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: start;
}

.card,
.download-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.card > p + p,
.prose > p + p,
.card > :is(h1, h2, h3, h4) + p,
.prose > :is(h1, h2, h3, h4) + p {
  margin-top: 0.875rem;
}

.download-card {
  display: flex;
  min-height: 250px;
  padding: clamp(1.25rem, 3vw, 1.625rem);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.download-card:hover {
  color: var(--text);
  border-color: var(--brand);
  box-shadow: 0 16px 34px rgb(23 33 29 / 16%);
  transform: translateY(-2px);
}

.card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.software-icon {
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.software-name {
  margin-top: 1.125rem;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
}

.software-description {
  margin-top: 0.625rem;
  color: var(--muted);
}

.download-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  padding: 0.625rem 1rem;
  color: var(--on-brand);
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 5px;
  font-weight: 800;
  text-decoration: none;
}

.download-card:hover .download-action,
.button:hover {
  color: var(--on-brand);
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.media-frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.media-frame--portrait {
  aspect-ratio: 3 / 4;
}

.media-frame--contain {
  aspect-ratio: 640 / 605;
  background: var(--surface);
}

.card > .media-frame + :is(h2, h3, h4) {
  margin-top: 1rem;
}

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--contain > img {
  object-fit: contain;
}

.dialogue {
  padding-left: 1rem;
  color: var(--muted);
  border-left: 2px solid var(--brand);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius);
}

.video-frame > iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-featured {
  max-width: 880px;
}

.video-featured .card {
  padding: clamp(1rem, 2vw, 1.25rem);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.video-card h2 {
  margin-top: 0.75rem;
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  font-weight: 800;
}

.video-source {
  margin-top: 0.875rem;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 720px) {
  .site-header,
  .page-shell,
  .site-footer {
    width: min(var(--content-width), calc(100% - 32px));
  }

  .site-header {
    flex-wrap: wrap;
    padding-block: 0.5rem;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }

  .two-column,
  .three-column,
  .downloads,
  .video-grid,
  .archive-image-strip,
  .shelf-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .download-card {
    min-height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
