:root {
  --nimo-orange: #ff6b2c;
  --nimo-orange-dark: #c94c1f;
  --nimo-coral: #ff8057;
  --nimo-orange-soft: #fff3e8;
  --nimo-purple: #6f45d8;
  --nimo-mint: #00c4a7;
  --nimo-charcoal: #1a1a1a;
  --nimo-ink: #1a1a1a;
  --nimo-muted: #64748b;
  --nimo-line: #e5e7eb;
  --nimo-paper: #fbfaf8;
  --nimo-surface: #ffffff;
  --nimo-surface-2: #f9fafb;
  --shadow-soft: 0 12px 30px rgba(17, 24, 39, 0.06);
  --shadow-lift: 0 20px 54px rgba(17, 24, 39, 0.12);
  --shadow-glow: 0 8px 20px rgba(255, 107, 44, 0.22);
  --radius: 14px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--nimo-ink);
  background: var(--nimo-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.is-modal-open {
  overflow: hidden;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 58px);
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.04);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  min-width: 80px;
  height: 40px;
  place-items: center;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--nimo-orange), var(--nimo-coral));
  color: white;
  box-shadow: 0 9px 20px rgba(255, 107, 44, 0.2);
  font-weight: 950;
  letter-spacing: 0;
  text-transform: lowercase;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px 5px auto;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.brand span:not(.brand-mark) {
  color: #475569;
  font-size: 0.95rem;
  font-weight: 750;
}

.brand-product::before {
  content: "/";
  margin-right: 10px;
  color: #cbd5e1;
  font-weight: 650;
}

.header-actions,
.button-row,
.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.container {
  width: min(var(--max-width), calc(100vw - 36px));
  margin: 0 auto;
  padding: 0 14px;
}

.section {
  padding: 56px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.display-title {
  margin: 0;
  font-size: clamp(3rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.7vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.lead {
  max-width: 690px;
  margin: 16px 0 0;
  color: var(--nimo-muted);
  font-size: 1.08rem;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--nimo-surface);
  color: var(--nimo-ink);
  font-weight: 750;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.btn.primary {
  background: var(--nimo-orange);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn.glow {
  background: var(--nimo-orange);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn[data-generate],
.btn[data-ask-ai],
.hero-copy .button-row .btn {
  isolation: isolate;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(255, 107, 44, 0.22), 0 0 0 1px rgba(255, 107, 44, 0.08);
  animation: buttonGlowPulse 2200ms ease-in-out infinite;
}

.btn[data-generate]::before,
.btn[data-ask-ai]::before,
.hero-copy .button-row .btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.35), #ff6b2c, #ffb15f, #f0523d, rgba(255, 255, 255, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: movingButtonBorder 2600ms linear infinite;
  pointer-events: none;
}

.hero-copy .button-row .btn.secondary {
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08), 0 0 0 1px rgba(255, 107, 44, 0.08);
}

.hero-copy .button-row .btn.secondary::before {
  background: conic-gradient(from 0deg, rgba(255, 107, 44, 0.12), #ff6b2c, rgba(17, 24, 39, 0.16), #ffb15f, rgba(255, 107, 44, 0.12));
}

.btn[data-generate]::after,
.btn[data-ask-ai]::after,
.hero-copy .button-row .btn::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -40%;
  width: 34%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  animation: shimmer 3600ms ease-in-out infinite;
  pointer-events: none;
}

.btn.purple {
  border-color: var(--nimo-line);
  background: var(--nimo-surface);
  color: var(--nimo-ink);
}

.btn.secondary {
  border-color: var(--nimo-line);
  background: var(--nimo-surface);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.btn.ghost {
  background: transparent;
  color: var(--nimo-muted);
}

.btn.small {
  min-height: 36px;
  padding: 0 13px;
  font-size: 0.9rem;
}

.btn.icon {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 12px;
}

.btn.danger {
  color: #b42318;
  border-color: #fee4e2;
  background: #fff7f6;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
}

.card,
.panel,
.template-card,
.upload-card,
.generated-card {
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 20px;
  background: var(--nimo-surface);
  box-shadow: var(--shadow-soft);
}

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

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: none;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  width: min(390px, calc(100vw - 32px));
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #172033;
  box-shadow: 0 22px 50px rgba(17, 24, 39, 0.14), 0 0 0 6px rgba(255, 107, 44, 0.06);
  backdrop-filter: blur(18px) saturate(1.2);
  font-weight: 800;
  overflow: hidden;
}

.toast::before {
  content: "n";
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--nimo-orange), var(--nimo-coral));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(255, 107, 44, 0.26);
  font-size: 1.15rem;
  font-weight: 950;
}

.toast::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--nimo-orange), #ffb15f, var(--nimo-coral));
}

.toast.is-visible {
  display: grid;
  animation: toastSlideIn 260ms cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

body.is-generating {
  cursor: wait;
}

body.is-generating button,
body.is-generating input,
body.is-generating textarea,
body.is-generating select,
body.is-generating a {
  cursor: wait;
}

body.is-generating .site-header a,
body.is-generating .tool-strip,
body.is-generating .canvas-scroll,
body.is-generating .side-dock,
body.is-generating .adapt-grid,
body.is-generating .page-hero .btn:not([data-generate]) {
  pointer-events: none;
}

body.is-generating .tool-strip,
body.is-generating .canvas-scroll,
body.is-generating .side-dock,
body.is-generating .adapt-grid > aside,
body.is-generating .adapt-grid > section > .panel:first-child {
  opacity: 0.58;
  filter: saturate(0.86);
}

body.is-generating::before {
  content: "Nimo is generating...";
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 95;
  transform: translateX(-50%);
  padding: 11px 15px;
  border: 1px solid rgba(255, 122, 26, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--nimo-orange-dark);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(14px);
  font-weight: 900;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  padding: 24px;
  overflow: auto;
  background: rgba(23, 19, 33, 0.62);
}

.modal.is-open {
  display: grid;
  place-items: start center;
}

.modal-dialog {
  width: min(1080px, 100%);
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--nimo-line);
}

.modal-body {
  padding: 22px;
  overflow: auto;
}

.nav-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--nimo-orange-dark);
  font-weight: 900;
}

@keyframes shimmer {
  0%, 55% {
    left: -45%;
  }
  75%, 100% {
    left: 120%;
  }
}

@keyframes movingButtonBorder {
  to {
    transform: rotate(1turn);
  }
}

@keyframes buttonGlowPulse {
  0%, 100% {
    box-shadow: 0 8px 20px rgba(255, 107, 44, 0.2), 0 0 0 1px rgba(255, 107, 44, 0.08);
  }

  50% {
    box-shadow: 0 12px 28px rgba(255, 107, 44, 0.32), 0 0 0 4px rgba(255, 107, 44, 0.08);
  }
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  .btn[data-generate],
  .btn[data-ask-ai],
  .hero-copy .button-row .btn,
  .btn[data-generate]::before,
  .btn[data-ask-ai]::before,
  .hero-copy .button-row .btn::before,
  .btn[data-generate]::after,
  .btn[data-ask-ai]::after,
  .hero-copy .button-row .btn::after {
    animation: none;
  }
}
