:root {
  --bg: #faf9f6;
  --bg-alt: #f1efe9;
  --surface: #ffffff;
  --ink: #1b1d1f;
  --ink-2: #3a3f45;
  --muted: #5b6168;
  --line: #e5e1d8;
  --dark: #16181b;
  --dark-2: #0e1012;
  --dark-line: rgba(255, 255, 255, .1);
  --accent: #ea580c;
  --accent-2: #c2410c;
  --accent-soft: rgba(234, 88, 12, .12);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px -12px rgba(20, 22, 26, .18);
  --shadow-lg: 0 24px 60px -24px rgba(20, 22, 26, .35);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 76px;
  --header-bg: rgba(250, 249, 246, .88);
  --mark-bg: #16181b;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121416;
  --bg-alt: #191c1f;
  --surface: #1f2226;
  --ink: #f3f1ec;
  --ink-2: #d0d3d7;
  --muted: #a0a6ad;
  --line: #2c3036;
  --dark: #0b0d0f;
  --dark-2: #070809;
  --accent-soft: rgba(234, 88, 12, .2);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --header-bg: rgba(18, 20, 22, .86);
  --mark-bg: #2a2e33;
  color-scheme: dark;
}

*, *::before, *::after {
  box-sizing: border-box;
  border: 0 solid var(--line);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

html.js {
  scroll-behavior: auto;
}

[tabindex="-1"]:focus {
  outline: none;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

img, svg, picture {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.2rem, 6.2vw, 4.5rem);
  letter-spacing: -.03em;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
}

.eyebrow {
  margin-bottom: .9rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow--light {
  color: #fb923c;
}

.lead {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--ink-2);
}

.section--dark .lead {
  color: rgba(255, 255, 255, .86);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(234, 88, 12, .8);
}

.btn-primary:hover {
  background: var(--accent-2);
}

.btn-glass {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, .18);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--bg-alt);
}

.btn-sm {
  padding: .6rem 1.1rem;
  font-size: .88rem;
}

.btn-lg {
  padding: 1.05rem 1.8rem;
  font-size: 1.02rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:focus-visible,
.menu-btn:focus-visible,
.sheet__close:focus-visible,
.faq summary:focus-visible {
  outline: 3px solid rgba(234, 88, 12, .45);
  outline-offset: 2px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.link-arrow .icon {
  width: 1rem;
  height: 1rem;
  transition: transform .2s;
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease-out, transform .7s ease-out;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}

.header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -16px rgba(20, 22, 26, .25);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--mark-bg);
  flex-shrink: 0;
}

.brand__mark img {
  width: 32px;
  height: 32px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.brand__sub {
  font-size: .78rem;
  color: var(--muted);
}

.nav {
  display: none;
  align-items: center;
  gap: .15rem;
}

.nav__link {
  padding: .55rem .9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink-2);
  transition: background-color .2s, color .2s;
}

.nav__link:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.nav .btn {
  margin-left: .5rem;
}

.header__tools {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.menu-btn,
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--ink);
  transition: background-color .2s;
}

.menu-btn:hover,
.theme-btn:hover {
  background: var(--accent-soft);
}

.menu-btn .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.theme-btn.is-switching {
  animation: theme-spin .45s cubic-bezier(.4, 0, .2, 1);
}

@keyframes theme-spin {
  from { transform: rotate(-120deg) scale(.6); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, fill .4s ease, stroke .4s ease !important;
  transition-delay: 0s !important;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2;
}

.theme-btn .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-btn .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-btn .icon-moon {
  display: none;
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(14, 16, 18, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 61;
  background: var(--bg);
  color: var(--ink);
  padding: 1rem 1.25rem 1.5rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform .4s ease-in-out, visibility 0s linear .4s;
}

body.menu-open .sheet-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.menu-open .sheet {
  transform: none;
  visibility: visible;
  transition: transform .4s ease-in-out, visibility 0s;
}

.sheet__header {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: var(--header-h);
  margin-top: -1rem;
}

.sheet__close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  transition: background-color .2s;
}

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

.sheet__links {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .5rem 0 1rem;
}

.sheet__links a {
  padding: .85rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: background-color .2s, color .2s;
}

.sheet__links a:hover {
  background: var(--accent-soft);
}

.sheet__actions {
  display: grid;
  gap: .6rem;
}

.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section--dark {
  background: var(--dark);
  color: #fff;
}

.section__head {
  max-width: 44rem;
  margin-bottom: 3rem;
}

.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.form {
  display: grid;
  gap: 1.25rem;
}

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

.field label {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink-2);
}

.input,
.textarea,
.select,
.select-trigger {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: .8rem 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.input,
.select,
.select-trigger {
  height: 3.1rem;
}

.textarea {
  min-height: 7rem;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible,
.select-trigger:focus-visible,
.select-trigger[aria-expanded="true"] {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px var(--surface) inset !important;
  -webkit-text-fill-color: var(--ink) !important;
}

.form-note {
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}

.dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
}

.dialog::backdrop {
  background: rgba(14, 16, 18, .55);
}

.dialog__box {
  width: min(28rem, calc(100vw - 2rem));
  padding: 1.75rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 1rem;
  animation: dialog-in .2s ease-out;
}

.dialog h2 {
  font-size: 1.25rem;
}

.dialog p {
  color: var(--ink-2);
}

.dialog--fallback[open] {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  background: rgba(14, 16, 18, .55);
}

.btn-danger--solid {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn-danger--solid:hover {
  background: #b91c1c;
}

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: .25rem;
}

@keyframes dialog-in {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: none; }
}

.toasts {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  width: min(22.5rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: .9rem;
  box-shadow: var(--shadow-lg);
  animation: toast-in .3s ease-out;
}

.toast.is-leaving {
  animation: toast-out .25s ease-in forwards;
}

.toast .icon {
  margin-top: .1rem;
}

.toast--success .icon { color: #16a34a; }

.toast--error   .icon { color: #dc2626; }

.toast__title {
  font-weight: 700;
}

.toast__desc {
  margin-top: .1rem;
  color: var(--ink-2);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-1rem); }
  to   { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(1rem); }
}

.footer {
  padding: 3.5rem 0 2rem;
  background: var(--dark-2);
  color: rgba(255, 255, 255, .82);
}

.footer__grid {
  display: grid;
  gap: 2rem;
}

.footer .brand__name {
  color: #fff;
}

.footer__brand p {
  margin-top: 1rem;
  max-width: 20rem;
  font-size: .95rem;
}

.footer h3 {
  margin-bottom: 1rem;
  font-size: .95rem;
  color: #fff;
}

.footer li {
  margin-bottom: .55rem;
  font-size: .95rem;
}

.footer a {
  transition: color .2s;
}

.footer a:hover {
  color: #fb923c;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--dark-line);
  font-size: .88rem;
}

.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
}

.prose {
  max-width: 46rem;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  margin: 2rem 0 .75rem;
  color: var(--ink);
}

.prose h1 { font-size: 2rem; }

.prose h2 { font-size: 1.7rem; }

.prose h3 { font-size: 1.35rem; }

.prose h4 { font-size: 1.1rem; }

.prose > :first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1.1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1rem 1.4rem;
  padding: 0;
}

.prose ul { list-style: disc; }

.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: .35rem;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose strong {
  color: var(--ink);
}

.prose img {
  margin: 1.5rem 0;
  border-radius: var(--radius);
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: .75rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose pre {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--dark);
  color: #f3f1ec;
  border-radius: var(--radius);
  overflow: auto;
  font-size: .9rem;
  line-height: 1.6;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  padding: .15em .4em;
  background: var(--bg-alt);
  border-radius: 6px;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.status {
  display: inline-flex;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}

.status--on {
  background: rgba(22, 163, 74, .12);
  color: #15803d;
}

.status--off {
  background: var(--bg-alt);
  color: var(--ink-2);
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(220, 38, 38, .35);
  color: #dc2626;
}

.btn-danger:hover {
  background: rgba(220, 38, 38, .08);
}

.field-error {
  margin: 0;
  font-size: .85rem;
  font-weight: 600;
  color: #dc2626;
}

:root[data-theme="dark"] .field-error {
  color: #f87171;
}

.has-error .input,
.has-error .textarea,
.has-error .select,
.has-error .select-trigger,
.has-error .input:focus-visible,
.has-error .textarea:focus-visible,
.has-error .select-trigger:focus-visible {
  border-color: #dc2626;
}

.has-error .input:focus-visible,
.has-error .textarea:focus-visible,
.has-error .select-trigger:focus-visible {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .15);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121416;
    --bg-alt: #191c1f;
    --surface: #1f2226;
    --ink: #f3f1ec;
    --ink-2: #d0d3d7;
    --muted: #a0a6ad;
    --line: #2c3036;
    --dark: #0b0d0f;
    --dark-2: #070809;
    --accent-soft: rgba(234, 88, 12, .2);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, .7);
    --header-bg: rgba(18, 20, 22, .86);
    --mark-bg: #2a2e33;
    color-scheme: dark;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (min-width: 1024px) {
  .nav { display: flex; }
  .menu-btn,
  .sheet,
  .sheet-overlay { display: none; }
}

@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
