/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body,
.page {
  height: 100%;
}

body {
  font-family: 'Libertinus Math', 'Georgia', serif;
  background: #fdfdfc;
  color: #d73b0d;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100vh;
}

/* Edge gradients behind side borders and content */
.edge-gradient {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 30%;
  pointer-events: none;
  --edge-gradient-color: rgb(246, 232, 232);
  z-index: 0;
}

.edge-gradient.left {
  left: 0;
  background: linear-gradient(to right, var(--edge-gradient-color), transparent);
}

.edge-gradient.right {
  right: 0;
  background: linear-gradient(to left, var(--edge-gradient-color), transparent);
}

/* Halftone square-shading side borders */
.side-border {
  position: fixed;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 232px;
  max-width: 12vw;
  pointer-events: none;
  opacity: 0.19;
  --dot-color: #e10f0f;
  --space: 28px;
  background-repeat: repeat-y;
}

.side-border.left {
  left: 1rem;
  background-image:
    linear-gradient(to bottom, var(--dot-color) 7px, transparent 7px),
    linear-gradient(to bottom, var(--dot-color) 6.5px, transparent 6.5px),
    linear-gradient(to bottom, var(--dot-color) 6px, transparent 6px),
    linear-gradient(to bottom, var(--dot-color) 5.5px, transparent 5.5px),
    linear-gradient(to bottom, var(--dot-color) 5px, transparent 5px),
    linear-gradient(to bottom, var(--dot-color) 4.5px, transparent 4.5px),
    linear-gradient(to bottom, var(--dot-color) 4px, transparent 4px),
    linear-gradient(to bottom, var(--dot-color) 3.5px, transparent 3.5px),
    linear-gradient(to bottom, var(--dot-color) 3px, transparent 3px),
    linear-gradient(to bottom, var(--dot-color) 2.5px, transparent 2.5px);
  background-size:
    7px var(--space),
    6.5px var(--space),
    6px var(--space),
    5.5px var(--space),
    5px var(--space),
    4.5px var(--space),
    4px var(--space),
    3.5px var(--space),
    3px var(--space),
    2.5px var(--space);
  background-position:
    0 0,
    28px calc(var(--space) / 2),
    56px 0,
    84px calc(var(--space) / 2),
    112px 0,
    140px calc(var(--space) / 2),
    168px 0,
    196px calc(var(--space) / 2),
    224px 0,
    252px calc(var(--space) / 2);
}

.side-border.right {
  right: 1rem;
  background-image:
    linear-gradient(to bottom, var(--dot-color) 7px, transparent 7px),
    linear-gradient(to bottom, var(--dot-color) 6.5px, transparent 6.5px),
    linear-gradient(to bottom, var(--dot-color) 6px, transparent 6px),
    linear-gradient(to bottom, var(--dot-color) 5.5px, transparent 5.5px),
    linear-gradient(to bottom, var(--dot-color) 5px, transparent 5px),
    linear-gradient(to bottom, var(--dot-color) 4.5px, transparent 4.5px),
    linear-gradient(to bottom, var(--dot-color) 4px, transparent 4px),
    linear-gradient(to bottom, var(--dot-color) 3.5px, transparent 3.5px),
    linear-gradient(to bottom, var(--dot-color) 3px, transparent 3px),
    linear-gradient(to bottom, var(--dot-color) 2.5px, transparent 2.5px);
  background-size:
    7px var(--space),
    6.5px var(--space),
    6px var(--space),
    5.5px var(--space),
    5px var(--space),
    4.5px var(--space),
    4px var(--space),
    3.5px var(--space),
    3px var(--space),
    2.5px var(--space);
  background-position:
    right 0 top 0,
    right 28px top calc(var(--space) / 2),
    right 56px top 0,
    right 84px top calc(var(--space) / 2),
    right 112px top 0,
    right 140px top calc(var(--space) / 2),
    right 168px top 0,
    right 196px top calc(var(--space) / 2),
    right 224px top 0,
    right 252px top calc(var(--space) / 2);
}

/* Top header */
.top-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2.5rem;
  z-index: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.heart {
  width: 62px;
  height: auto;
  display: block;
}

.logo-text {
  font-size: 3.5rem;
  line-height: 1;
  color: #d73b0d;
}

/* Horizontal rule divider */
.divider {
  width: 100%;
  max-width: 560px;
  border: 0;
  height: 2px;
  background: #d73b0d;
  margin-top: 3rem;
  align-self: center;
}

/* Main content area */
.content {
  width: 38%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 4rem;
  z-index: 1;
}

/* Blog post section (hidden by default) */
.blog-post {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
/*
.blog-post[hidden] {
  display: none;
}

.blog-title {
  font-size: 1.75rem;
  color: #d73b0d;
  line-height: 1.2;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
  color: #a0300a;
}
*/
.blog-body {
  font-size: 1.5rem;
  line-height: 1.6;
  color: #d73b0d;
}

/* Demo section */
.demo-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4.5rem;
  margin-top: 2rem;
}

.demo-heading {
  font-size: 1.75rem;
  color: #d73b0d;
  text-align: center;
}

.demo-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  width: 100%;
}

.demo-video {
  width: 15vw;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.download-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.download-label {
  font-size: 1.25rem;
  color: #d73b0d;
  margin: 0;
}

.download-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #d73b0d;
  color: #fdfdfc;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.download-button:hover {
  background: #a0300a;
}

.download-button.secondary {
  background: transparent;
  color: #d73b0d;
  border: 2px solid #d73b0d;
}

.download-button.secondary:hover {
  background: #d73b0d;
  color: #fdfdfc;
}

.download-hint {
  font-size: 0.9rem;
  color: #a0300a;
  margin: 0;
}

.checksum-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  text-align: center;
}

.checksum-label {
  font-size: 0.85rem;
  color: #a0300a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.checksum-value {
  font-size: 0.75rem;
  color: #d73b0d;
  word-break: break-all;
  font-family: 'Courier New', Courier, monospace;
  background: rgba(215, 59, 13, 0.08);
  padding: 0.5rem;
  border-radius: 6px;
  width: 40%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
}

/* Footer */
.site-footer {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  margin-top: auto;
  z-index: 1;
}

.footer-link {
  color: #d73b0d;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #a0300a;
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .top-header {
    padding-top: 3rem;
  }

  .heart {
    width: 48px;
  }

  .edge-gradient {
    width: 18%;
  }

  .side-border {
    width: 48px;
    max-width: 9vw;
  }

  .divider {
    max-width: 280px;
  }

  .content {
    width: 76%;
  }

  .blog-body {
    font-size: 1.2rem;
    width: 90%;
    align-self: center;
  }

  .demo-row {
    flex-direction: column;
  }

  .demo-video {
    width: 50vw;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}
