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

:root {
  --bg: #f8fafc;
  --bg2: #0f172a;
  --soft: #ffffff;
  --soft2: #ffffff;
  --card: rgba(255, 255, 255, 0.7);
  --line: rgba(15, 23, 42, 0.08);
  --line-soft: rgba(15, 23, 42, 0.04);
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --brand: #2563eb;
  --brand2: #1d4ed8;
  --brand-bg: #eff6ff;
  --white: #ffffff;
  --accent: #10b981;
  --sky: #7dd3fc;
  --hero-start: #f8fafc;
  --hero-mid: #f1f5f9;
  --hero-end: #f8fafc;
  --hero-text: #0f172a;
  --hero-muted: #475569;
  --hero-dim: rgba(255, 255, 255, 0.6);
  --hero-border: rgba(255, 255, 255, 0.8);
  --hero-sep: rgba(15, 23, 42, 0.05);

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 80px;
  --space-8: 120px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.wrap {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section {
  padding: var(--space-6) 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-top: 0;
  color: var(--text);
}

h1 {
  margin-bottom: var(--space-3);
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-2);
}

h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-1);
}

.lead {
  font-size: clamp(1rem, 1.75vw, 1.125rem);
  color: var(--muted);
  margin: 0 0 var(--space-4);
  line-height: 1.6;
  font-weight: 400;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

ul {
  padding-left: 1.5rem;
  margin: var(--space-2) 0;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1;
}

.lang-switcher a {
  color: var(--muted, #64748b);
  text-decoration: none;
  padding: 0.35rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.lang-switcher a:hover,
.lang-switcher a:focus-visible {
  color: var(--ink, #0f172a);
}

.lang-switcher a.is-active {
  color: var(--ink, #0f172a);
  font-weight: 700;
}

.nav-tools .lang-switcher {
  margin-right: 0.15rem;
}

html[data-theme="dark"] .lang-switcher a,
html:not([data-theme="light"]) .lang-switcher a {
  color: var(--muted, #94a3b8);
}

html[data-theme="dark"] .lang-switcher a:hover,
html[data-theme="dark"] .lang-switcher a:focus-visible,
html[data-theme="dark"] .lang-switcher a.is-active,
html:not([data-theme="light"]) .lang-switcher a:hover,
html:not([data-theme="light"]) .lang-switcher a:focus-visible,
html:not([data-theme="light"]) .lang-switcher a.is-active {
  color: var(--text, #e2e8f0);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: var(--space-2);
  padding: 0.25rem 0.75rem;
  background: var(--brand-bg);
  border-radius: 999px;
}

.eyebrow::before {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-base);
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn.primary:hover {
  background: var(--brand2);
  box-shadow: var(--shadow-md);
}

.btn.secondary {
  background: var(--soft2);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn.secondary:hover {
  background: var(--bg);
  border-color: var(--muted);
}

.cta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--space-4);
}

.hero {
  padding: var(--space-8) 0 var(--space-6);
  background: var(--hero-start);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero p {
  font-size: clamp(1rem, 1.75vw, 1.125rem);
  color: var(--hero-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  max-width: 65ch;
}

.hero-main {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-5);
  align-items: stretch;
  margin-bottom: var(--space-2);
}

.hero-intro,
.hero-visual {
  min-height: 0;
}

.hero-intro .cta {
  margin-top: 0;
}

.hero-visual {
  margin: 0;
  align-self: start;
}

.hero-visual img,
.hero-visual video {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  border-radius: var(--r-lg);
  object-fit: initial;
  object-position: center;
}

.hero-grid {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-3);
}

.hero-card,
.hero-side {
  border-radius: var(--r-lg);
  background: var(--hero-dim);
  border: 1px solid var(--hero-border);
  padding: var(--space-4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
}

.hero-side ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.hero-side li {
  color: var(--hero-muted);
  padding: 0.75rem 0 0.75rem 2rem;
  position: relative;
  margin: 0;
  border-bottom: 1px solid var(--hero-sep);
}

.hero-side li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-3);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--brand);
}

.card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kpi strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.kpi span {
  color: var(--muted);
  font-size: 0.875rem;
}

.price-box {
  background: var(--bg2);
  color: var(--white);
  border-radius: var(--r-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-2xl);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-5);
  align-items: center;
  position: relative;
  overflow: hidden;
}

.price-box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.price-box h2,
.price-box p {
  color: var(--white);
}

.price-box p {
  opacity: 0.8;
}

.price-box-info ul {
  padding-left: 0;
  list-style: none;
  margin: 0 0 var(--space-4);
}

.price-box-info li {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 0 0.75rem 2rem;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.price-box-info li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.price-box .btn.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header .nav {
  position: relative;
}

.nav-container {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0.75rem var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo img {
  width: 2rem;
  height: 2rem;
}

.nav-logo .logo-text {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-links .btn-primary {
  background: var(--brand);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 0.625rem;
}

.nav-links .btn-primary:hover {
  background: var(--brand2);
  box-shadow: var(--shadow-md);
}

.nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.nav-user-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 0.625rem;
  border: 1px solid var(--line);
  background: var(--soft2);
  color: var(--text);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  transition: var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.theme-toggle--floating {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 60;
  box-shadow: var(--shadow-md);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0.5rem;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.hamburger-line {
  width: 1.5rem;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.contact-section {
  background: var(--soft);
  border-top: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-6);
}

.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-xl);
}

.contact-form-wrap .sub {
  margin-bottom: var(--space-3);
  color: var(--muted);
  font-size: 0.875rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
  color: var(--text-2);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: var(--transition-base);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  background: var(--white);
  color: var(--text);
  box-shadow: 0 0 0 4px var(--brand-bg);
  outline: none;
}

.field.field--invalid input,
.field.field--invalid textarea {
  border-color: #b91c1c;
  background: #fffafa;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12);
}

.field.field--invalid label {
  color: #b91c1c;
}

.field-error {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #b91c1c;
  font-weight: 500;
}

.field-error[hidden] {
  display: none;
}

.captcha-wrap.field--invalid {
  padding: 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid #b91c1c;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12);
}

.captcha-wrap .field-error {
  margin-top: 0.75rem;
}

.form-status {
  margin: var(--space-3) 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

.form-status.success {
  color: #15803d;
}

.form-status.error {
  color: #b91c1c;
  font-weight: 500;
}

html[data-theme="dark"] .field.field--invalid input,
html[data-theme="dark"] .field.field--invalid textarea {
  background: rgba(127, 29, 29, 0.15);
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15);
}

html[data-theme="dark"] .field.field--invalid label,
html[data-theme="dark"] .field-error,
html[data-theme="dark"] .form-status.error {
  color: #fca5a5;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  border: 0;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  background: var(--brand);
  color: var(--white);
  transition: var(--transition-base);
}

.btn-submit:hover {
  background: var(--brand2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.contact-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contact-modal-card {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-2xl);
  width: min(100%, 28rem);
  max-height: min(90vh, 32rem);
  overflow-y: auto;
  box-sizing: border-box;
}

.contact-modal-card h2 {
  margin: 0 0 var(--space-3);
  font-size: 1.25rem;
}

.contact-modal-card p {
  margin: 0 0 var(--space-4);
  color: var(--text-2);
  line-height: 1.5;
}

.contact-modal-card .btn {
  width: 100%;
}

.footer {
  background: var(--bg2);
  color: var(--muted);
  padding: var(--space-4) 0 var(--space-3);
}

.footer .container {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: start;
}

.footer-col--legal {
  justify-self: end;
  text-align: right;
}

.footer-brand h3 {
  color: var(--white);
  margin: 0;
  font-size: 1.125rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  margin-bottom: 0.375rem;
  transition: var(--transition-fast);
}

.footer-col a:last-child {
  margin-bottom: 0;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-logo-lockup {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-logo-lockup img {
  height: 1.5rem;
}

.footer-brand > p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.footer-brand strong {
  color: var(--white);
}

.legal-main {
  padding: var(--space-5) var(--space-4) var(--space-6);
  max-width: 1024px;
  margin: var(--space-5) auto var(--space-7);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
}

.legal-main--wide {
  max-width: 1280px;
}

.legal-main h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.legal-main .legal-updated {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.legal-main h2 {
  font-size: 1.25rem;
  margin: 2.5rem 0 1rem;
}

.legal-main section {
  padding: 0;
}

.legal-main p,
.legal-main li {
  color: var(--text-2);
  line-height: 1.7;
}

.legal-main a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}

.legal-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.legal-index {
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  background: var(--brand-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.legal-index h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.legal-index ol {
  margin: 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: var(--space-4);
}

.legal-index li {
  margin-bottom: 0.35rem;
  break-inside: avoid;
}

.legal-main h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}

.legal-main code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  background: var(--brand-bg);
  padding: 0.1em 0.35em;
  border-radius: var(--r-sm);
}

.legal-main section {
  scroll-margin-top: 5rem;
}

.legal-copyright {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.legal-copyright h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.legal-copyright p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.legal-copyright p:last-child {
  margin-bottom: 0;
}

.registro-alias-doc .legal-index ol {
  columns: 1;
}

@media (min-width: 768px) {
  .registro-alias-doc .legal-index ol {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .registro-alias-doc .legal-index ol {
    columns: 3;
  }
}

.pg-wrap {
  max-width: 1536px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-7);
}

.pg-hero {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.pg-banner {
  background: var(--brand-bg);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: var(--r-md);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  color: var(--brand2);
  font-weight: 500;
}

.pg-config {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.pg-config code {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  color: var(--text);
  font-weight: 600;
}

.pg-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.pg-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.pg-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--brand);
}

.pg-meta {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.pg-fields {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pg-fields label {
  display: grid;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
}

.pg-fields input,
.pg-fields select,
.pg-fields textarea {
  font: inherit;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition-base);
}

.pg-fields input:focus,
.pg-fields select:focus,
.pg-fields textarea:focus {
  border-color: var(--brand);
  background: var(--white);
  color: var(--text);
  box-shadow: 0 0 0 4px var(--brand-bg);
  outline: none;
}

.pg-actions button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 0;
  background: var(--brand);
  color: var(--white);
  transition: var(--transition-base);
}

.pg-actions button:hover:not(:disabled) {
  background: var(--brand2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.pg-out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
}

.pg-copy-btn {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  transition: var(--transition-base);
}

.pg-copy-btn:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--muted);
}

.pg-out {
  margin-top: 1rem;
  background: var(--bg2);
  color: #e2e8f0;
  border-radius: var(--r-lg);
  padding: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  overflow: auto;
  max-height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.5;
}

.pg-foot {
  margin-top: var(--space-4);
  font-size: 0.8125rem;
  color: var(--muted);
}

.app-shell {
  max-width: 1536px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-7);
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: var(--space-4);
}

.app-topbar h1 {
  margin: 0;
  font-size: 1.75rem;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-topbar-actions button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  border: 0;
  background: var(--brand);
  color: var(--white);
  transition: var(--transition-base);
}

.app-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.app-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.app-login-card {
  max-width: 450px;
  margin: 0 auto;
}

.app-form {
  display: grid;
  gap: 1rem;
  margin-top: var(--space-3);
}

.app-form label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
}

.app-form input,
.app-form select,
.app-form textarea {
  font: inherit;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition-base);
}

.app-form select {
  cursor: pointer;
}

.app-form textarea {
  min-height: 6rem;
  resize: vertical;
}

.app-form input:focus,
.app-form select:focus,
.app-form textarea:focus {
  border-color: var(--brand);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--brand-bg);
  outline: none;
}

.app-form button {
  margin-top: 0.5rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  border: 0;
  background: var(--brand);
  color: var(--white);
  transition: var(--transition-base);
}

.app-form button:hover {
  background: var(--brand2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem var(--space-3) 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-xl);
    gap: 0.5rem;
  }

  .nav-links.mobile-menu {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-auth {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--line-soft);
    gap: 1rem;
  }

  .nav-user-label {
    text-align: center;
  }

  .hero-main,
  .hero-grid,
  .contact-grid,
  .price-box {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .hero-visual img,
  .hero-visual video {
    height: auto;
    min-height: 0;
  }

  .hero {
    padding-top: var(--space-6);
    padding-bottom: var(--space-5);
  }

  .price-box {
    padding: var(--space-4);
    gap: var(--space-4);
  }

  .app-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  section {
    padding: var(--space-5) 0;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .cta {
    flex-direction: column;
    align-items: stretch;
  }

  .cta .btn {
    width: 100%;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .hero-visual {
    order: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Dark palette: default is dark (data-theme on html); light only when data-theme="light" or legacy system-dark rules below */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f172a;
    --bg2: #020617;
    --soft: #1e293b;
    --soft2: #1e293b;
    --card: rgba(30, 41, 59, 0.7);
    --line: rgba(255, 255, 255, 0.1);
    --line-soft: rgba(255, 255, 255, 0.05);
    --text: #f8fafc;
    --text-2: #cbd5e1;
    --muted: #94a3b8;
    --brand-bg: rgba(37, 99, 235, 0.1);
    --hero-start: #0f172a;
    --hero-mid: #020617;
    --hero-end: #0f172a;
    --hero-muted: #cbd5e1;
    --hero-dim: rgba(30, 41, 59, 0.6);
    --hero-border: rgba(255, 255, 255, 0.1);
    --hero-sep: rgba(255, 255, 255, 0.05);
  }

  html:not([data-theme="light"]) .header {
    background: rgba(15, 23, 42, 0.8);
  }

  html:not([data-theme="light"]) .nav-links {
    background: #0f172a;
  }

  html:not([data-theme="light"]) .contact-form-wrap,
  html:not([data-theme="light"]) .pg-hero,
  html:not([data-theme="light"]) .pg-card,
  html:not([data-theme="light"]) .app-card,
  html:not([data-theme="light"]) .legal-main {
    background: #1e293b;
  }

  html:not([data-theme="light"]) .field input,
  html:not([data-theme="light"]) .field textarea,
  html:not([data-theme="light"]) .pg-fields input,
  html:not([data-theme="light"]) .pg-fields select,
  html:not([data-theme="light"]) .pg-fields textarea,
  html:not([data-theme="light"]) .app-form input,
  html:not([data-theme="light"]) .app-form select,
  html:not([data-theme="light"]) .app-form textarea {
    background: #0f172a;
    color: var(--white);
  }

  html:not([data-theme="light"]) .app-form input:focus,
  html:not([data-theme="light"]) .app-form select:focus,
  html:not([data-theme="light"]) .app-form textarea:focus {
    background: #0f172a;
    color: var(--white);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-bg);
    outline: none;
  }

  html:not([data-theme="light"]) .pg-fields input:focus,
  html:not([data-theme="light"]) .pg-fields select:focus,
  html:not([data-theme="light"]) .pg-fields textarea:focus {
    background: #0f172a;
    color: var(--white);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-bg);
    outline: none;
  }

  html:not([data-theme="light"]) .app-form input::placeholder,
  html:not([data-theme="light"]) .app-form textarea::placeholder,
  html:not([data-theme="light"]) .pg-fields input::placeholder,
  html:not([data-theme="light"]) .pg-fields textarea::placeholder,
  html:not([data-theme="light"]) .field input::placeholder,
  html:not([data-theme="light"]) .field textarea::placeholder {
    color: #64748b;
  }

  html:not([data-theme="light"]) .field input:focus,
  html:not([data-theme="light"]) .field textarea:focus {
    background: #0f172a;
    color: var(--white);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-bg);
    outline: none;
  }

  html:not([data-theme="light"]) .footer {
    background: #020617;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --bg2: #020617;
  --soft: #1e293b;
  --soft2: #1e293b;
  --card: rgba(30, 41, 59, 0.7);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #f8fafc;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --brand-bg: rgba(37, 99, 235, 0.1);
  --hero-start: #0f172a;
  --hero-mid: #020617;
  --hero-end: #0f172a;
  --hero-muted: #cbd5e1;
  --hero-dim: rgba(30, 41, 59, 0.6);
  --hero-border: rgba(255, 255, 255, 0.1);
  --hero-sep: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .header {
  background: rgba(15, 23, 42, 0.8);
}

html[data-theme="dark"] .nav-links {
  background: #0f172a;
}

html[data-theme="dark"] .contact-form-wrap,
html[data-theme="dark"] .pg-hero,
html[data-theme="dark"] .pg-card,
html[data-theme="dark"] .app-card,
html[data-theme="dark"] .legal-main {
  background: #1e293b;
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .pg-fields input,
html[data-theme="dark"] .pg-fields select,
html[data-theme="dark"] .pg-fields textarea,
html[data-theme="dark"] .app-form input,
html[data-theme="dark"] .app-form select,
html[data-theme="dark"] .app-form textarea {
  background: #0f172a;
  color: var(--white);
}

html[data-theme="dark"] .app-form input:focus,
html[data-theme="dark"] .app-form select:focus,
html[data-theme="dark"] .app-form textarea:focus {
  background: #0f172a;
  color: var(--white);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-bg);
  outline: none;
}

html[data-theme="dark"] .pg-fields input:focus,
html[data-theme="dark"] .pg-fields select:focus,
html[data-theme="dark"] .pg-fields textarea:focus {
  background: #0f172a;
  color: var(--white);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-bg);
  outline: none;
}

html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field textarea:focus {
  background: #0f172a;
  color: var(--white);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-bg);
  outline: none;
}

html[data-theme="dark"] .app-form input::placeholder,
html[data-theme="dark"] .app-form textarea::placeholder,
html[data-theme="dark"] .pg-fields input::placeholder,
html[data-theme="dark"] .pg-fields textarea::placeholder,
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder {
  color: #64748b;
}

html[data-theme="dark"] .footer {
  background: #020617;
}

html[data-theme="light"] {
  color-scheme: light;
}
