:root {
  color-scheme: dark;
  --bg: #101415;
  --panel: #1d2a2e;
  --panel-2: #26383e;
  --ink: #f6f3ea;
  --muted: #b8c3c5;
  --line: #526a72;
  --orange: #ff8a2b;
  --cyan: #6bc4d8;
  --yellow: #ffe45e;
  --green: #72c06a;
  --button-ink: #17100b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(transparent 0, rgba(255,255,255,.025) 1px, transparent 2px),
    radial-gradient(circle at 12% 15%, rgba(255,138,43,.14), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(107,196,216,.12), transparent 30rem),
    var(--bg);
  background-size: 100% 4px, auto, auto, auto;
  color: var(--ink);
  font: 16px/1.55 Consolas, "Courier New", monospace;
}

body.ape-site-theme-minimal {
  color-scheme: light;
  --bg: #f7f6f1;
  --panel: #ffffff;
  --panel-2: #f0eee6;
  --ink: #1f2526;
  --muted: #697476;
  --line: #c7cec9;
  --orange: #2764c5;
  --cyan: #0f8b8d;
  --yellow: #8b5d00;
  --green: #2f7d42;
  --button-ink: #ffffff;
  background: var(--bg);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

body.ape-site-theme-modern {
  --bg: #07110f;
  --panel: #13221f;
  --panel-2: #1d302c;
  --ink: #edf7f2;
  --muted: #a8bab2;
  --line: #3c5f56;
  --orange: #ff7a59;
  --cyan: #52d6c6;
  --yellow: #f7d36a;
  --green: #86dc93;
  --button-ink: #15100b;
  background:
    linear-gradient(135deg, rgba(82, 214, 198, .12), transparent 34rem),
    linear-gradient(315deg, rgba(255, 122, 89, .11), transparent 28rem),
    var(--bg);
  font-family: Segoe UI, Inter, Arial, sans-serif;
}

body.ape-site-theme-terminal {
  --bg: #120d06;
  --panel: #24180b;
  --panel-2: #30200f;
  --ink: #ffe8b8;
  --muted: #c5a06a;
  --line: #7e5724;
  --orange: #ffb13b;
  --cyan: #ffd27a;
  --yellow: #fff1a8;
  --green: #a7d86a;
  --button-ink: #1f1304;
  background:
    linear-gradient(transparent 0, rgba(255, 177, 59, .035) 1px, transparent 2px),
    radial-gradient(circle at 50% -10%, rgba(255, 177, 59, .16), transparent 30rem),
    var(--bg);
  background-size: 100% 5px, auto, auto;
}

a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }

.is-hidden {
  display: none !important;
}

header {
  border-bottom: 1px solid rgba(82,106,114,.55);
  padding: 28px clamp(18px, 5vw, 76px) 34px;
}

nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.brand img {
  height: 32px;
  image-rendering: pixelated;
  width: 32px;
}

.navlinks,
.actions,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.navlinks a,
.button {
  align-items: center;
  background: rgba(14, 20, 22, .8);
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  padding: 7px 12px;
  text-decoration: none;
}

.button.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--button-ink);
  font-weight: 700;
}

.navlinks a:hover,
.button:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--button-ink);
  text-decoration: none;
}

.button.primary:hover {
  color: var(--button-ink);
}

.hero,
.wide {
  align-items: center;
  display: grid;
  gap: clamp(24px, 6vw, 74px);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 680px);
}

.hero.media-none,
.wide.media-none {
  grid-template-columns: 1fr;
}

.eyebrow {
  color: var(--cyan);
  font-size: 14px;
  letter-spacing: .08em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

h1 {
  color: var(--orange);
  font-size: clamp(38px, 7vw, 86px);
  line-height: .95;
  margin: 0 0 18px;
}

h2 {
  color: var(--orange);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  margin: 0 0 18px;
}

h3 {
  color: var(--cyan);
  font-size: 17px;
  margin: 0 0 8px;
}

p { margin: 0 0 14px; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.lead {
  font-size: clamp(18px, 2.2vw, 24px);
  max-width: 720px;
}

.lead p {
  margin-bottom: 14px;
}

.muted { color: var(--muted); }

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 clamp(16px, 4vw, 34px) 64px;
}

section {
  border-bottom: 1px solid rgba(82,106,114,.55);
  padding: 38px 0;
}

.home-hero-block {
  border-bottom: 4px solid var(--orange);
  display: grid;
  min-height: calc(88vh - 96px);
  place-items: center;
}

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

.card {
  background: rgba(29, 42, 46, .86);
  border: 1px solid var(--line);
  padding: 16px;
}

.card.has-record-image {
  cursor: default;
}

.card.has-record-image:hover,
.card.has-record-image:focus {
  border-color: var(--cyan);
  box-shadow: inset 4px 0 0 var(--cyan);
  outline: 0;
}

.card strong,
.price {
  color: var(--yellow);
}

.price {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1;
}

.screen {
  background: #060808;
  border: 1px solid var(--line);
  box-shadow: 0 18px 55px rgba(0,0,0,.36);
  padding: 10px;
}

.screen img {
  display: block;
  height: auto;
  max-width: 100%;
}

.home-block-media.is-record-preview {
  border-color: var(--cyan);
}

ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

ol {
  margin: 10px 0 0 24px;
  padding: 0;
}

li { margin: 6px 0; }

li p {
  display: inline;
  margin: 0;
}

code {
  background: #080d0f;
  border: 1px solid var(--line);
  color: #fff;
  padding: 1px 5px;
}

pre {
  background: #080d0f;
  border: 1px solid var(--line);
  overflow-x: auto;
  padding: 12px;
}

pre code {
  border: 0;
  padding: 0;
}

body.ape-site-theme-minimal header,
body.ape-site-theme-minimal section,
body.ape-site-theme-modern header,
body.ape-site-theme-modern section,
body.ape-site-theme-terminal header,
body.ape-site-theme-terminal section {
  border-color: var(--line);
}

body.ape-site-theme-minimal .navlinks a,
body.ape-site-theme-minimal .button {
  background: #ffffff;
}

body.ape-site-theme-modern .navlinks a,
body.ape-site-theme-modern .button,
body.ape-site-theme-terminal .navlinks a,
body.ape-site-theme-terminal .button {
  background: var(--panel);
}

body.ape-site-theme-minimal .card,
body.ape-site-theme-minimal .ape-dialog-panel,
body.ape-site-theme-minimal .screen {
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(31, 37, 38, .09);
}

body.ape-site-theme-modern .card,
body.ape-site-theme-modern .ape-dialog-panel {
  background: var(--panel);
}

body.ape-site-theme-terminal .card,
body.ape-site-theme-terminal .ape-dialog-panel {
  background: var(--panel);
}

body.ape-site-theme-minimal .screen {
  background: #f1f4f2;
}

body.ape-site-theme-modern .screen,
body.ape-site-theme-terminal .screen {
  background: #050706;
}

body.ape-site-theme-minimal code,
body.ape-site-theme-minimal pre,
body.ape-site-theme-minimal .ape-dialog-content input,
body.ape-site-theme-minimal .ape-dialog-content textarea,
body.ape-site-theme-minimal .contact-form input,
body.ape-site-theme-minimal .contact-form textarea {
  background: var(--panel-2);
  color: var(--ink);
}

blockquote {
  border-left: 3px solid var(--orange);
  color: var(--muted);
  margin: 16px 0;
  padding: 4px 0 4px 14px;
}

.chip {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 5px 8px;
}

.footer {
  color: var(--muted);
  padding: 28px clamp(16px, 4vw, 34px) 40px;
  text-align: center;
}

.ape-modal {
  align-items: center;
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 16px;
  position: fixed;
  z-index: 50;
}

.ape-modal-backdrop {
  background: rgba(4, 7, 8, .78);
  inset: 0;
  position: absolute;
}

.ape-modal-open {
  overflow: hidden;
}

.ape-dialog-panel {
  background:
    linear-gradient(90deg, rgba(255, 138, 43, .12), transparent 48%),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  max-height: min(86vh, 820px);
  max-width: 860px;
  overflow: auto;
  padding: clamp(16px, 3vw, 24px);
  position: relative;
  width: min(860px, calc(100vw - 32px));
  z-index: 2;
}

.ape-dialog-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ape-dialog-head h2 {
  margin-bottom: 0;
}

.ape-dialog-content .ape-card,
.ape-dialog-content .box,
.ape-dialog-content .card {
  max-width: none;
}

.ape-dialog-content .ape-registration-card input,
.ape-dialog-content .ape-registration-card button,
.ape-dialog-content form input,
.ape-dialog-content form button,
.ape-dialog-content form textarea {
  width: 100%;
}

.ape-dialog-content label {
  color: var(--muted);
  display: block;
  margin-top: 12px;
}

.ape-dialog-content input,
.ape-dialog-content textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  display: block;
  font: inherit;
  margin-top: 6px;
  padding: 10px 12px;
}

.ape-dialog-content button,
.ape-dialog-content .ape-button-primary {
  background: var(--orange);
  border: 1px solid var(--orange);
  color: var(--button-ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  margin-top: 12px;
  min-height: 38px;
  padding: 8px 12px;
}

.ape-dialog-content .ape-registration-price,
.ape-dialog-content .ape-message {
  background: rgba(14, 20, 22, .62);
  border: 1px solid var(--line);
  color: var(--yellow);
  padding: 10px 12px;
}

.simple-page {
  margin: 0 auto;
  max-width: 900px;
  padding: 34px clamp(16px, 4vw, 40px) 64px;
}

.simple-page .card {
  margin-bottom: 18px;
}

.contact-card {
  margin-top: 18px;
}

.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.contact-form label {
  color: var(--muted);
  display: block;
}

.contact-form input,
.contact-form textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  display: block;
  font: inherit;
  margin-top: 6px;
  padding: 10px 12px;
  width: 100%;
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
  outline: 2px solid rgba(255, 138, 43, .24);
}

.contact-form button {
  border: 0;
  cursor: pointer;
  font: inherit;
  justify-self: end;
}

.contact-form button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.recaptcha-widget {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 138, 43, .2), transparent 44%),
    rgba(8, 13, 15, .62);
  border: 1px solid var(--line);
  display: inline-flex;
  justify-self: start;
  min-height: 98px;
  padding: 10px;
  position: relative;
}

.recaptcha-widget::before {
  background: var(--orange);
  content: "";
  height: calc(100% + 2px);
  left: -1px;
  position: absolute;
  top: -1px;
  width: 4px;
}

.recaptcha-widget .g-recaptcha {
  position: relative;
  z-index: 1;
}

.honeypot {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.form-message {
  border: 1px solid var(--line);
  margin: 14px 0 0;
  padding: 10px 12px;
}

.form-message.success {
  border-color: rgba(114, 192, 106, .72);
  color: var(--green);
}

.form-message.error {
  border-color: rgba(255, 138, 43, .78);
  color: var(--yellow);
}

.form-message p {
  margin: 0;
}

.form-message p + p {
  margin-top: 6px;
}

.simple-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.section-note {
  margin-top: 14px;
}

@media (max-width: 860px) {
  header { min-height: auto; }
  .hero,
  .wide {
    grid-template-columns: 1fr;
  }
  .screen { order: -1; }
}
