:root {
  --primary: #E30613;
  --text: #333333;
  --background: #ffffff;
  --muted: #666666;
  --border: #e0e0e0;
  --max-width: 960px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html {
  height: 100%;
}

body {
  margin: 0;
  font-family: inherit;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.page-watermark {
  position: relative;
  overflow: hidden;
}

.page-watermark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/logos/wiglaf-software.png") no-repeat center;
  background-size: clamp(320px, 55vw, 620px);
  opacity: 0.07;
  pointer-events: none;
}

.page-watermark > * {
  position: relative;
  z-index: 1;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  background: var(--primary);
  color: #ffffff;
  border-bottom: 4px solid rgba(0, 0, 0, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.site-header a {
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-title {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.site-nav {
  display: flex;
  gap: 18px;
}

.site-nav a {
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.site-nav a.active {
  border-color: #ffffff;
}

.site-main {
  flex: 1;
  padding: 32px 0;
}

.home-hero {
  padding: 28px 0 44px;
}

.home-hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  margin-bottom: 16px;
}

.home-hero p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions a {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
}

.btn-secondary {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.section {
  padding: 44px 0;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.section p.section-lead {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 24px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.card p {
  color: var(--muted);
  margin-bottom: 12px;
}

.card ul {
  padding-left: 20px;
  margin-top: 12px;
  margin-bottom: 16px;
}

.card ul li {
  margin-bottom: 8px;
}

.content {
  font-size: 1.05rem;
}

.content p {
  margin-bottom: 16px;
}

.content strong {
  color: var(--text);
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  justify-content: flex-start;
}

.card-actions .btn-secondary {
  border-color: var(--primary);
}

.cta-bar {
  margin-bottom: 24px;
}

.cta-bar .btn-primary {
  display: inline-block;
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.app-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-card__body {
  flex: 1 1 280px;
}

.app-card__body h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.app-card__body p {
  margin: 0;
  color: var(--muted);
}

.app-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer {
  background: #f5f5f7;
  color: var(--muted);
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--primary);
}

@media (max-width: 640px) {
  .site-nav {
    width: 100%;
    justify-content: center;
  }

  .site-header .container {
    justify-content: center;
  }
}
