@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  color-scheme: light;
  --ink: #101011;
  --paper: #f4f4f2;
  --panel: #ffffff;
  --soft: #eeeeec;
  --line: #deded9;
  --muted: #66666a;
  --violet: #d7a5ff;
  --violet-soft: #efdcff;
  --acid: #c8ff21;
  --display: "Rajdhani", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "Space Mono", monospace;

  /* Compatibility tokens for active page scripts and inline components. */
  --black: #101011;
  --black-2: #ffffff;
  --black-3: #f1f1ee;
  --black-4: #e7e7e3;
  --white: #ffffff;
  --white-2: #4f4f52;
  --white2: #4f4f52;
  --bg: #f4f4f2;
  --bg3: #ffffff;
  --bg4: #eeeeec;
  --green: #6b2f89;
  --green-2: #54236e;
  --green2: #54236e;
  --green-dim: #4b205e;
  --green-glow: rgba(215, 165, 255, .25);
  --border: #deded9;
  --border-g: #c394df;
  --borderg: #c394df;
  --red: #a12a2a;
  --yellow: #8a6500;
  --blue: #305f8d;
  --cream: #f4f4f2;
  --rule: 1px solid #101011;
  --serif: var(--display);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: linear-gradient(145deg, #e9e9e6, #f8f8f6 48%, #e6e6e3);
  color: var(--ink);
  font: 400 15px/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
svg { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--violet); color: #111; }
:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-family: var(--display); letter-spacing: 0; }

.btn, .btn-green, .btn-ghost, .btn-outline, .btn-primary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid #111;
  border-radius: 7px;
  background: #fff;
  color: #111;
  box-shadow: none;
  font: 700 12px var(--display);
  text-decoration: none;
}
.btn-green, .btn-primary { background: var(--violet); }
.btn:hover, .btn-green:hover, .btn-ghost:hover, .btn-outline:hover, .btn-primary:hover { background: #111; color: #fff; }
.btn:disabled, button:disabled { cursor: not-allowed; opacity: .55; }

.form-group { margin-bottom: 18px; }
.form-label, label.form-label {
  display: block;
  margin-bottom: 7px;
  color: #333336;
  font: 700 11px var(--display);
  text-transform: uppercase;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cececa;
  border-radius: 7px;
  background: #fff;
  color: #111;
  outline: none;
}
.form-textarea { min-height: 130px; padding-top: 13px; resize: vertical; }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(215, 165, 255, .24);
}

.fade-up { opacity: 0; transform: translateY(20px); transition: opacity .45s ease, transform .45s ease; }
.fade-up.in, .fade-up.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .fade-up { opacity: 1; transform: none; }
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 16px auto;
  border: 2px solid #d6d6d1;
  border-top-color: #111;
  border-radius: 50%;
  animation: studio-spin .75s linear infinite;
}
@keyframes studio-spin { to { transform: rotate(360deg); } }
.loading-state, .loading, .blog-load-state, .resource-state { color: #666; text-align: center; }
.success-msg, .acct-msg.success, .auth-status.success, .delete-status.success {
  color: #254c00 !important;
  border-color: #b4cf66 !important;
  background: #f0ffd0 !important;
}
.error-msg, .acct-msg.error, .auth-status.error, .delete-status.error {
  color: #8f1d1d !important;
  border-color: #d99c9c !important;
  background: #fff0f0 !important;
}

#footer-placeholder,
body.molvrix-studio-page > footer { width: min(1440px, calc(100% - 44px)); margin: 0 auto 24px; }
#footer-placeholder footer,
body.molvrix-studio-page > footer {
  overflow: hidden;
  border: 1px solid #111;
  border-radius: 8px;
  background: #111;
  color: #fff;
}
.footer-grid { display: grid; grid-template-columns: 1.45fr repeat(5, minmax(105px, .75fr)); }
.footer-grid > div { min-width: 0; padding: 38px 28px; border-right: 1px solid rgba(255,255,255,.11); }
.footer-grid > div:last-child { border-right: 0; }
.footer-brand .logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font: 700 13px var(--mono); letter-spacing: .13em; text-decoration: none; }
.footer-brand .logo-mark { width: 34px; height: 34px; object-fit: contain; }
.footer-brand p { max-width: 300px; margin: 18px 0 22px; color: rgba(255,255,255,.65); font-size: 12px; line-height: 1.7; }
.footer-social { display: flex; flex-wrap: wrap; gap: 7px; }
.social-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; color: #fff; text-decoration: none; }
.social-btn:hover { border-color: var(--violet); background: var(--violet); color: #111; }
.footer-col h4 { margin: 0 0 18px; color: rgba(255,255,255,.55); font: 700 10px var(--display); text-transform: uppercase; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 0 0 9px; }
.footer-links a { color: rgba(255,255,255,.72); font-size: 11px; text-decoration: none; }
.footer-links a:hover { color: var(--violet); }
.footer-newsletter { border-top: 1px solid rgba(255,255,255,.11); }
.footer-newsletter .nl-inner { display: grid; grid-template-columns: 1fr 1fr; }
.footer-newsletter .nl-copy, .footer-newsletter .nl-form { padding: 34px 38px; }
.footer-newsletter .nl-copy { border-right: 1px solid rgba(255,255,255,.11); }
.footer-newsletter .nl-label { margin: 0 0 8px; color: var(--violet); font: 700 10px var(--display); text-transform: uppercase; }
.footer-newsletter h3 { margin: 0; color: #fff; font: 600 24px/1.05 var(--display); text-transform: uppercase; }
.footer-newsletter .nl-sub { margin: 10px 0 0; color: rgba(255,255,255,.58); font-size: 11px; }
.footer-newsletter .nl-row { display: flex; }
.footer-newsletter .nl-input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid rgba(255,255,255,.28); border-radius: 7px 0 0 7px; background: transparent; color: #fff; outline: none; }
.footer-newsletter .nl-btn { min-height: 48px; padding: 0 18px; border: 1px solid #fff; border-radius: 0 7px 7px 0; background: #fff; color: #111; font: 700 11px var(--display); }
.footer-newsletter .nl-status { margin: 9px 0 0; color: rgba(255,255,255,.65); font-size: 10px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 28px; border-top: 1px solid rgba(255,255,255,.11); }
.footer-bottom p { margin: 0; color: rgba(255,255,255,.48); font-size: 10px; }
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-bottom-links a { color: rgba(255,255,255,.65); font-size: 10px; text-decoration: none; }

.toast {
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: 24px;
  max-width: min(460px, calc(100% - 28px));
  padding: 13px 18px;
  transform: translate(-50%, 18px);
  border: 1px solid #111;
  border-radius: 7px;
  background: #111;
  color: #fff;
  box-shadow: 0 14px 36px rgba(0,0,0,.2);
  font-size: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
#cookieBanner { color: #fff !important; background: #111 !important; border-top-color: rgba(255,255,255,.15) !important; }
#cookieBanner p { color: rgba(255,255,255,.72) !important; }
#cookieBanner a { color: var(--violet) !important; }
#cookieBanner button { background: var(--violet) !important; color: #111 !important; }

@media (max-width: 1120px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid > div { border-bottom: 1px solid rgba(255,255,255,.11); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  #footer-placeholder,
  body.molvrix-studio-page > footer { width: calc(100% - 20px); margin-bottom: 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div { padding: 28px 22px; border-bottom: 1px solid rgba(255,255,255,.11); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-newsletter .nl-inner { grid-template-columns: 1fr; }
  .footer-newsletter .nl-copy { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.11); }
  .footer-newsletter .nl-copy, .footer-newsletter .nl-form { padding: 28px 22px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; padding: 18px 22px; }
}
@media (max-width: 440px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-newsletter .nl-row { flex-direction: column; gap: 8px; }
  .footer-newsletter .nl-input, .footer-newsletter .nl-btn { border-radius: 7px; }
}
