body.site-template-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.14), transparent 30%),
    linear-gradient(180deg, #090c11 0%, #06080b 100%);
  color: #edf4fb;
}

body.site-template-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 4rem 4rem;
  opacity: 0.14;
}

body.site-template-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 22%, rgba(96, 165, 250, 0.14), transparent 0 18%),
    radial-gradient(circle at 84% 74%, rgba(45, 212, 191, 0.1), transparent 0 16%);
  filter: blur(18px);
  opacity: 0.75;
  animation: ambient-drift 14s ease-in-out infinite alternate;
}

.site-template-shell {
  position: relative;
  min-height: calc(100vh - 4.8rem);
  display: grid;
  place-items: center;
  padding: 1.75rem 1.25rem 2.4rem;
}

.site-template-canvas {
  width: min(100%, 68rem);
  min-height: clamp(28rem, 74vh, 46rem);
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(10, 14, 20, 0.88), rgba(7, 10, 15, 0.96));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-template-hero {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.35rem;
  animation: rise-in 700ms ease both;
}

.site-template-eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.66);
}

.site-template-title {
  margin: 0;
  max-width: 11ch;
  font-family: "Megrim", sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.96;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-wrap: balance;
}

.site-template-lead {
  margin: 0;
  max-width: 34rem;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.98rem;
  line-height: 1.7;
}

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

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

.template-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-card {
  position: relative;
  overflow: hidden;
  min-height: 10rem;
  padding: 1.1rem 1rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(11, 16, 23, 0.96), rgba(8, 11, 16, 0.94));
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transform: translateY(0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  animation: rise-in 700ms ease both;
}

.template-card:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.3);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(125, 211, 252, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

details.template-card {
  cursor: pointer;
}

details.template-card > summary {
  list-style: none;
}

details.template-card > summary::-webkit-details-marker {
  display: none;
}

details.template-card[open] {
  border-color: rgba(125, 211, 252, 0.28);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(125, 211, 252, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.template-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(115deg, transparent 0 43%, rgba(125, 211, 252, 0.12) 50%, transparent 57% 100%);
  transform: translateX(-48%);
  animation: sweep 8s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.55;
}

.template-grid > .template-card:nth-child(2) {
  animation-delay: 90ms;
}

.template-grid > .template-card:nth-child(3) {
  animation-delay: 180ms;
}

.template-list > .template-card:nth-child(2) {
  animation-delay: 90ms;
}

.template-list > .template-card:nth-child(3) {
  animation-delay: 180ms;
}

.template-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.template-kicker {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.58);
}

.template-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(233, 243, 255, 0.82);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-copy {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.95rem;
  line-height: 1.65;
}

.template-card[open] .template-copy {
  animation: rise-in 240ms ease both;
}

.template-list {
  display: grid;
  gap: 0.8rem;
}

.template-list__item {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.template-list__item strong {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.template-list__item span {
  color: rgba(226, 232, 240, 0.64);
  font-size: 0.9rem;
  line-height: 1.5;
}

.template-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.template-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #edf4fb;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.template-link:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.3);
  background: rgba(125, 211, 252, 0.08);
}

.template-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.template-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(233, 243, 255, 0.76);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.template-divider {
  height: 1px;
  margin: 1rem 0;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.24), transparent);
}

:root[data-theme="light"] body.site-template-page {
  background:
    radial-gradient(circle at top, rgba(14, 165, 233, 0.08), transparent 30%),
    linear-gradient(180deg, #f2f6f8 0%, #e8eef2 100%);
  color: #0f172a;
}

:root[data-theme="light"] body.site-template-page::before {
  opacity: 0.06;
}

:root[data-theme="light"] body.site-template-page::after {
  opacity: 0.45;
}

:root[data-theme="light"] .site-template-canvas {
  border-color: rgba(15, 23, 42, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 248, 251, 0.94));
    box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.page-shell {
  display: grid;
  gap: 1.2rem;
}

.page-hero {
  display: grid;
  gap: 1rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-hero__row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.page-title {
  margin: 0;
  max-width: 13ch;
  font-family: "Megrim", sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-wrap: balance;
}

.page-microcopy {
  max-width: 18rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.58);
  font-size: 0.84rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.page-lead {
  max-width: 42rem;
  margin: 0;
  color: rgba(226, 232, 240, 0.75);
  font-size: 1rem;
  line-height: 1.7;
}

.page-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.page-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.76rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(233, 243, 255, 0.8);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-block {
  display: grid;
  gap: 1rem;
}

.section-block[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.section-block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-label {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.62);
}

.section-title {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.92);
}

.section-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.18), transparent);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.stat-card {
  padding: 1rem 1.05rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.025);
}

.stat-value {
  display: block;
  font-family: "Megrim", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: 0.1em;
  color: #f8fbff;
}

.stat-label {
  display: block;
  margin-top: 0.45rem;
  color: rgba(226, 232, 240, 0.64);
  font-size: 0.82rem;
  line-height: 1.45;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1rem;
}

.feature-stack {
  display: grid;
  gap: 0.9rem;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.feature-item {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.feature-item strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feature-item span {
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.9rem;
  line-height: 1.55;
}

.detail-stack {
  display: grid;
  gap: 0.85rem;
}

.detail-card {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.detail-card h2,
.detail-card h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-card p {
  margin: 0;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.92rem;
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1rem;
  align-items: start;
}

.contact-panel {
  display: grid;
  gap: 0.85rem;
}

.contact-list {
  display: grid;
  gap: 0.75rem;
}

.contact-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.contact-item small {
  color: rgba(226, 232, 240, 0.58);
  font-size: 0.73rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.contact-item strong,
.contact-item a {
  color: #f7fbff;
  text-decoration: none;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  color: rgba(226, 232, 240, 0.74);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.95rem;
  padding: 0.88rem 0.95rem;
  background: rgba(4, 8, 14, 0.52);
  color: #f8fbff;
  font: inherit;
}

.contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(125, 211, 252, 0.38);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.1);
}

.contact-form button {
  justify-self: start;
  min-height: 2.9rem;
  padding: 0 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #f8fbff;
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-footer {
  display: grid;
  gap: 1rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  gap: 1rem;
}

.footer-brand {
  display: grid;
  gap: 0.55rem;
}

.footer-brand strong {
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-brand p {
  margin: 0;
  color: rgba(226, 232, 240, 0.66);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.footer-links a {
  color: rgba(233, 243, 255, 0.82);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-meta {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.footer-meta span {
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.82rem;
  line-height: 1.55;
}

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.18), transparent);
}

:root[data-theme="light"] .site-template-eyebrow,
:root[data-theme="light"] .site-template-lead,
:root[data-theme="light"] .template-kicker,
:root[data-theme="light"] .template-copy,
:root[data-theme="light"] .template-list__item span,
:root[data-theme="light"] .template-tag,
:root[data-theme="light"] .template-badge,
:root[data-theme="light"] .template-link {
  color: #0f172a;
}

:root[data-theme="light"] .template-card,
:root[data-theme="light"] .template-list__item,
:root[data-theme="light"] .template-link,
:root[data-theme="light"] .template-badge,
:root[data-theme="light"] .template-tag {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.66);
}

:root[data-theme="light"] .template-card::before {
  background:
    linear-gradient(115deg, transparent 0 43%, rgba(14, 165, 233, 0.12) 50%, transparent 57% 100%);
}

:root[data-theme="light"] .page-hero,
:root[data-theme="light"] .page-footer,
:root[data-theme="light"] .section-block,
:root[data-theme="light"] .detail-card,
:root[data-theme="light"] .feature-item,
:root[data-theme="light"] .contact-form,
:root[data-theme="light"] .contact-item,
:root[data-theme="light"] .stat-card,
:root[data-theme="light"] .page-chip,
:root[data-theme="light"] .template-card {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

:root[data-theme="light"] .page-title,
:root[data-theme="light"] .page-microcopy,
:root[data-theme="light"] .page-lead,
:root[data-theme="light"] .section-label,
:root[data-theme="light"] .section-title,
:root[data-theme="light"] .footer-brand p,
:root[data-theme="light"] .footer-meta span,
:root[data-theme="light"] .footer-links a,
:root[data-theme="light"] .feature-item span,
:root[data-theme="light"] .detail-card p,
:root[data-theme="light"] .contact-item small,
:root[data-theme="light"] .contact-item strong,
:root[data-theme="light"] .contact-item a,
:root[data-theme="light"] .template-copy,
:root[data-theme="light"] .template-list__item span,
:root[data-theme="light"] .template-kicker,
:root[data-theme="light"] .template-tag,
:root[data-theme="light"] .template-badge,
:root[data-theme="light"] .template-link {
  color: #0f172a;
}

:root[data-theme="light"] .contact-form input,
:root[data-theme="light"] .contact-form textarea {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] .contact-form button,
:root[data-theme="light"] .template-link {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] .template-link:hover {
  background: rgba(14, 165, 233, 0.08);
}

@keyframes sweep {
  0%,
  100% {
    transform: translateX(-54%);
    opacity: 0.22;
  }

  50% {
    transform: translateX(54%);
    opacity: 0.7;
  }
}

@keyframes ambient-drift {
  from {
    transform: translate3d(-0.4rem, -0.2rem, 0);
  }

  to {
    transform: translate3d(0.7rem, 0.5rem, 0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .template-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-strip,
  .footer-grid,
  .contact-grid,
  .two-column,
  .stat-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-template-shell {
    min-height: calc(100vh - 4.6rem);
    padding: 1.1rem 0.9rem 1.7rem;
  }

  .site-template-canvas {
    min-height: auto;
    border-radius: 1.25rem;
  }

  .template-grid--two,
  .template-grid--three {
    grid-template-columns: 1fr;
  }

  .site-template-title {
    max-width: 100%;
    font-size: clamp(1.8rem, 9vw, 3rem);
  }

  .page-hero__row,
  .section-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.site-template-page::after,
  .site-template-hero,
  .template-card::before,
  .template-card[open] .template-copy {
    animation: none;
  }
}
