:root {
  --ink: #1a2421;
  --ink-soft: #3d4a45;
  --muted: #6b7a74;
  --paper: #f3f6f4;
  --paper-deep: #e4ebe6;
  --line: #c5d0c9;
  --accent: #0f6b4c;
  --accent-hover: #0a523a;
  --accent-wash: rgba(15, 107, 76, 0.08);
  --danger: #9b2c2c;
  --radius: 10px;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --shadow: 0 1px 0 rgba(26, 36, 33, 0.04), 0 18px 40px rgba(26, 36, 33, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 15% -10%, rgba(15, 107, 76, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 10%, rgba(90, 120, 140, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(196, 180, 140, 0.18), transparent 55%),
    linear-gradient(165deg, #f7faf8 0%, #eef3f0 45%, #e8efe9 100%);
  animation: atmosphere-drift 18s ease-in-out infinite alternate;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

@keyframes atmosphere-drift {
  from {
    transform: scale(1) translate(0, 0);
  }
  to {
    transform: scale(1.04) translate(-1.5%, 1%);
  }
}

.stage {
  position: relative;
  z-index: 1;
  width: min(100% - 1.25rem, 26rem);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 0 2rem;
  animation: stage-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes stage-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes swipe-out-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-28%);
  }
}

@keyframes swipe-in-right {
  from {
    opacity: 0;
    transform: translateX(28%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.brand {
  margin-bottom: 1.15rem;
}

.brand__mark {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 3.1rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--ink);
}

.brand__headline {
  margin: 0 0 0.35rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand__sub {
  margin: 0;
  max-width: 26ch;
  font-size: 0.95rem;
  color: var(--muted);
}

.signup {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.95rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(197, 208, 201, 0.85);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: form-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes form-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field__label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.field__input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.field__input::placeholder {
  color: #9aa8a1;
}

.field__input:hover {
  border-color: #a8b6af;
}

.field__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.field__input:invalid:not(:placeholder-shown):not(:focus),
.field__input.is-conflict {
  border-color: var(--danger);
}

.field__input.is-conflict:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(155, 44, 44, 0.12);
}

.ram {
  margin: 0;
  padding: 0.65rem 0.75rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.ram legend {
  padding: 0 0.2rem;
  float: left;
  width: 100%;
}

.ram legend + * {
  clear: both;
}

.ram__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.1rem 0 0.55rem;
}

.ram__value {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.ram__price {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.ram__price span {
  margin-left: 0.1rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.ram__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin: 0;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--ram-progress, 0%),
    var(--paper-deep) var(--ram-progress, 0%),
    var(--paper-deep) 100%
  );
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.ram__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(26, 36, 33, 0.16);
  transition: transform 0.15s ease;
}

.ram__slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(26, 36, 33, 0.16);
}

.ram__slider:hover::-webkit-slider-thumb,
.ram__slider:focus-visible::-webkit-slider-thumb {
  transform: scale(1.08);
}

.ram__slider:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.ram__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.form-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-note:empty {
  display: none;
}

.form-note.is-error {
  color: var(--danger);
}

.form-note.is-success {
  color: var(--accent);
}

.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f7faf8;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.submit:hover {
  background: var(--accent-hover);
}

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

.submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.submit__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.submit:hover .submit__arrow {
  transform: translateX(3px);
}

.signup.is-done .submit {
  background: var(--ink-soft);
  pointer-events: none;
}

.not-found {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.95rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(197, 208, 201, 0.85);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.not-found__code {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 14vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--accent);
}

a.submit {
  text-decoration: none;
}

.checkout-panel {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.95rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(197, 208, 201, 0.85);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

a.polar-trigger {
  text-decoration: none;
}

body.is-leaving .stage {
  animation: swipe-out-left 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.is-entering .stage {
  animation: none;
  opacity: 0;
  transform: translateX(28%);
}

body.is-entering.is-entered .stage {
  animation: swipe-in-right 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .stage {
    padding: 1rem 0 1.5rem;
  }

  .brand__mark {
    margin-bottom: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .stage,
  .signup,
  .submit,
  .submit__arrow,
  .field__input {
    animation: none !important;
    transition: none !important;
  }

  body.is-leaving .stage,
  body.is-entering .stage,
  body.is-entering.is-entered .stage {
    opacity: 1;
    transform: none;
  }
}
