@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;800&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --night: #001f4d;
  --night-soft: #133560;
  --dawn: #f79332;
  --dawn-deep: #e7771f;
  --cream: #ece7d8;
  --cream-soft: #f7f2e5;
  --paper: #fff9ee;
  --ink: #15253c;
  --ink-soft: #51627a;
  --danger: #bf3e2f;
  --line: rgba(0, 31, 77, 0.14);
  --shadow-xl: 0 22px 50px rgba(0, 23, 56, 0.24);
  --shadow-md: 0 12px 24px rgba(0, 23, 56, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 9%, rgba(255, 178, 93, 0.4), transparent 35%),
    radial-gradient(circle at 88% 0%, rgba(255, 220, 176, 0.35), transparent 32%),
    linear-gradient(180deg, #fffaf0 0%, #f4e7cf 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -35% -15%;
  background: repeating-linear-gradient(
    -24deg,
    rgba(0, 31, 77, 0.04) 0,
    rgba(0, 31, 77, 0.04) 3px,
    transparent 3px,
    transparent 18px
  );
  pointer-events: none;
  z-index: -2;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 2.25rem 0 3.6rem;
  animation: pageIn 0.65s ease-out both;
}

.hero {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-xl);
}

.hero-public {
  min-height: clamp(290px, 45vw, 430px);
  border: 1px solid rgba(236, 231, 216, 0.2);
  background:
    linear-gradient(112deg, rgba(0, 31, 77, 0.88) 4%, rgba(0, 31, 77, 0.52) 50%, rgba(0, 31, 77, 0.15) 100%),
    url("/assets/hero-mountains.png") center 24% / cover no-repeat;
}

.hero-admin {
  background:
    linear-gradient(135deg, rgba(0, 31, 77, 0.95) 0%, rgba(19, 53, 96, 0.9) 68%, rgba(247, 147, 50, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-admin a {
  color: var(--cream-soft);
  text-decoration: underline;
  text-decoration-color: rgba(247, 242, 229, 0.7);
  text-underline-offset: 2px;
}

.hero-admin a:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

.hero.compact {
  margin-bottom: 1rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: inherit;
  padding: clamp(1.2rem, 4vw, 2.1rem);
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.5rem);
}

.hero-copy {
  max-width: 760px;
}

.brand-logo {
  width: clamp(88px, 15vw, 130px);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(236, 231, 216, 0.72);
  background: var(--cream);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  flex-shrink: 0;
}

.brand-logo-small {
  width: 76px;
  border-width: 3px;
}

.kicker {
  margin: 0 0 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cream-soft);
}

h1,
h2 {
  margin: 0 0 0.6rem;
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
}

.hero h1 {
  color: var(--cream-soft);
  font-size: clamp(1.45rem, 3.5vw, 2.45rem);
  line-height: 1.18;
}

.hero p {
  margin: 0;
  max-width: 64ch;
  color: rgba(247, 242, 229, 0.95);
  line-height: 1.55;
}

.section-title {
  margin: 1.8rem 0 1.05rem;
}

.section-title h2 {
  font-size: clamp(1.25rem, 2.7vw, 1.9rem);
  color: var(--night);
}

.section-title p {
  margin: 0;
  color: var(--ink-soft);
}

.grid {
  display: grid;
  gap: 1rem;
}

.software-grid {
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.card {
  background: linear-gradient(180deg, #fffaf1 0%, #f5ecdc 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: var(--shadow-md);
}

.software-card {
  position: relative;
  overflow: hidden;
  transform: translateY(16px);
  opacity: 0;
  animation: cardIn 0.65s ease forwards;
}

.software-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--dawn) 0%, var(--dawn-deep) 100%);
}

.software-card:nth-child(2) {
  animation-delay: 0.08s;
}

.software-card:nth-child(3) {
  animation-delay: 0.16s;
}

.software-card:nth-child(4) {
  animation-delay: 0.24s;
}

.software-card h2 {
  color: var(--night);
  font-size: 1.22rem;
}

p {
  margin: 0 0 0.7rem;
  line-height: 1.55;
}

.version {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

a {
  color: var(--night);
}

.ghost-link {
  display: inline-flex;
  margin-top: 1rem;
  text-decoration: none;
  color: var(--cream-soft);
  border: 1px solid rgba(247, 242, 229, 0.5);
  border-radius: 999px;
  padding: 0.52rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(1px);
}

.ghost-link:hover {
  border-color: rgba(247, 242, 229, 0.9);
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1.08rem;
  text-decoration: none;
  cursor: pointer;
  color: #fff8ea;
  background: linear-gradient(180deg, var(--dawn) 0%, var(--dawn-deep) 100%);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.14s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 8px 16px rgba(231, 119, 31, 0.35);
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.button:active,
button:active {
  transform: translateY(1px);
}

.button-secondary {
  background: linear-gradient(180deg, #20456f 0%, #0f2e53 100%);
  box-shadow: 0 8px 16px rgba(15, 46, 83, 0.35);
}

button.danger {
  background: linear-gradient(180deg, #cc4a3b 0%, #ab2f23 100%);
  box-shadow: 0 8px 16px rgba(171, 47, 35, 0.34);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.2rem;
  margin-bottom: 0.65rem;
}

.install-help {
  width: 100%;
}

.usage-help {
  width: 100%;
  margin-top: 0.6rem;
}

.install-help summary {
  list-style: none;
  width: fit-content;
}

.usage-help summary {
  list-style: none;
  width: fit-content;
}

.install-help summary::-webkit-details-marker {
  display: none;
}

.usage-help summary::-webkit-details-marker {
  display: none;
}

.install-help[open] summary {
  margin-bottom: 0.7rem;
}

.usage-help[open] summary {
  margin-bottom: 0.7rem;
}

.install-content {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 31, 77, 0.16);
  border-radius: 14px;
  padding: 0.78rem;
}

.usage-content {
  background: rgba(236, 243, 255, 0.74);
}

.install-content p {
  color: var(--ink);
}

.usage-list {
  margin: 0;
  padding-left: 1.1rem;
}

.usage-step {
  margin-bottom: 0.95rem;
}

.usage-step h3 {
  margin: 0 0 0.34rem;
  font-size: 1.02rem;
  color: var(--night);
}

.usage-step p {
  margin: 0 0 0.5rem;
  color: var(--night-soft);
}

.install-content ol {
  margin: 0 0 0.8rem;
  padding-left: 1.05rem;
}

.install-content li {
  margin-bottom: 0.38rem;
  color: var(--night-soft);
}

.install-image {
  width: min(100%, 330px);
  border-radius: 12px;
  border: 1px solid rgba(0, 31, 77, 0.18);
  box-shadow: 0 6px 14px rgba(0, 31, 77, 0.18);
  margin: 0.2rem 0 0.58rem;
}

.install-note {
  margin: 0;
  font-size: 0.88rem;
  color: #3a4f6a;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.admin-edit {
  width: 100%;
}

.admin-edit summary {
  list-style: none;
  width: fit-content;
}

.admin-edit summary::-webkit-details-marker {
  display: none;
}

.admin-edit[open] summary {
  margin-bottom: 0.7rem;
}

.compact-stack {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 31, 77, 0.15);
  border-radius: 12px;
  padding: 0.7rem;
}

.field-help {
  margin: -0.25rem 0 0.25rem;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.inline-form {
  display: block;
}

form {
  display: grid;
  gap: 0.82rem;
}

form.stack {
  max-width: 760px;
}

label {
  display: grid;
  gap: 0.32rem;
  font-weight: 600;
  color: var(--night-soft);
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(0, 31, 77, 0.2);
  border-radius: 12px;
  padding: 0.62rem 0.78rem;
  font: inherit;
  color: var(--ink);
  background: #fffdf8;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(247, 147, 50, 0.27);
  border-color: rgba(247, 147, 50, 0.85);
}

.auth {
  max-width: 500px;
  margin: 2.5rem auto 0;
}

.auth h1 {
  color: var(--night);
}

.error {
  color: #9b231b;
  font-weight: 700;
}

.success {
  margin: 0.8rem 0 1rem;
  background: #edf4ff;
  border: 1px solid rgba(0, 31, 77, 0.25);
  border-radius: 12px;
  padding: 0.68rem 0.9rem;
}

.site-footer {
  margin-top: 1.8rem;
  text-align: center;
}

.site-footer a {
  font-weight: 700;
}

@keyframes pageIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes cardIn {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1120px, 94vw);
    padding-top: 1rem;
  }

  .hero-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .software-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
