* {
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #020817;
  --muted: #64708a;
  --line: #edf0f5;
  --navy: #020817;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.moodboard-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.container {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 0;
}

.site-header__inner {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 32px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.04em;
}

.site-logo__img {
  width: 96px;
  display: block;
}

.site-logo__text {
  font-size: 29px;
  line-height: 1;
}

.site-menu {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 54px;
}

.site-nav a {
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: #020617;
}

.site-auth {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-auth__login {
  font-size: 14px;
  font-weight: 600;
  color: #1d2840;
}

.site-auth__signup,
.site-auth__account {
  width: 165px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 14px;
  background: var(--navy);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.16);
}

.site-auth__login[hidden],
.site-auth__signup[hidden],
.site-auth__account[hidden] {
  display: none !important;
}

.site-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.hamburger input {
  display: none;
}

.hamburger svg {
  height: 34px;
  width: 34px;
  display: block;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger .line {
  fill: none;
  stroke: #020817;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  transition:
    stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger .line-top-bottom {
  stroke-dasharray: 12 63;
}

.site-header.menu-open .hamburger svg {
  transform: rotate(-45deg);
}

.site-header.menu-open .hamburger .line-top-bottom {
  stroke-dasharray: 20 300;
  stroke-dashoffset: -32.42;
}

.page-content {
  padding: 72px 0 100px;
}

.page-content h1 {
  margin: 0 0 16px;
  font-size: 56px;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.page-content p {
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted);
}

.site-footer {
  background: #ffffff;
  border-top: 0;
}

.site-footer__inner {
  padding: 32px 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-footer__copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: #7a87a3;
}

.site-footer__copy span[aria-hidden="true"] {
  margin: 0 14px;
  color: #8b7cff;
}

.site-footer__heart {
  display: inline-block;
  margin: 0 4px !important;
  background: linear-gradient(135deg, #8b5cf6 0%, #ff4db8 55%, #ff8a5c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: translateY(1px);
}

.site-footer__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.site-footer__links a {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #e7eaf3;
  border-radius: 999px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5d6785;
  font-size: 14px;
  line-height: 1;
  font-weight: 300;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.site-footer__links a:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.site-footer__links a:active {
  transform: scale(0.98);
  background: #f5f6fb;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.05);
}

.moodboard-page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1080px) {
  .site-header {
    top: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(237, 240, 245, 0.9);
  }

  .site-header__inner {
    position: relative;
    min-height: 74px;
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 16px;
  }

  .site-logo__img {
    width: 96px;
  }

  .site-logo__text {
    font-size: 26px;
  }

  .site-menu-toggle {
    display: inline-flex;
  }

.site-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(340px, calc(100vw - 48px));
  display: none;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid #edf0f5;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

  .site-header.menu-open .site-menu {
    display: grid;
  }

  .site-nav {
    display: grid;
    gap: 4px;
  }

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
}

  .site-nav a:hover {
    background: #f8fafc;
  }

.site-auth {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #edf0f5;
}

.site-auth__login,
.site-auth__signup,
.site-auth__account {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

  .site-auth__login {
    display: inline-flex;
    border: 1px solid #e5e7eb;
    background: #ffffff;
  }

  .page-content {
    padding: 48px 0 72px;
  }

  .page-content h1 {
    font-size: 40px;
  }

  .page-content p {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .site-menu {
    left: 50%;
    right: auto;
    width: calc(100vw - 32px);
    transform: translateX(-50%);
  }
}

.hero {
  padding: 120px 0 80px;
}

.hero h1 {
  font-size: 64px;
  line-height: 0.95;
  margin: 0 0 20px;
  letter-spacing: -0.04em;
}

.hero p {
  font-size: 22px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 15px;
  text-decoration: none;
}

.btn-primary {
  background: #111;
  color: #fff;
}

.btn-secondary {
  background: #eee;
  color: #111;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 100px;
}

.feature {
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 12px;
}

.feature h3 {
  margin: 0 0 10px;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .features {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 44px;
  }
}

.saved-palettes-header {
  margin-bottom: 32px;
}

.saved-palettes-header p {
  color: var(--muted);
  margin-top: 8px;
}

.saved-palettes-list {
  display: grid;
  gap: 20px;
}

.saved-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}

.saved-card__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.saved-card__meta {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.saved-card__title {
  margin: 0;
  font-size: 24px;
}

.saved-card__delete {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  height: 40px;
  padding: 0 14px;
  cursor: pointer;
}

.saved-card__swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.saved-swatch {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fafafa;
}

.saved-swatch__color {
  height: 72px;
}

.saved-swatch__hex,
.saved-swatch__name {
  padding: 8px 10px;
  font-size: 12px;
}

.saved-swatch__hex {
  font-weight: 700;
}

.saved-swatch__name {
  color: var(--muted);
  padding-top: 0;
  padding-bottom: 10px;
}

.saved-empty {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}

.saved-empty h2 {
  margin-top: 0;
}


/* ============================================================
   MOODBOARD
   ============================================================ */

:root{
  --gap: 10px;
  --outer: 10px;
}

#wrap{
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
}

#board{
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
  padding: var(--outer);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  overflow: hidden;
}

.row{
  display: flex;
  gap: var(--gap);
  width: 100%;
  align-items: stretch;
  justify-content: center;
}

.item{
  overflow: hidden;
  border-radius: 10px;
  background: transparent;
  flex: 0 0 auto;
  cursor: grab;
  transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease;
}

.item.dragging{
  opacity: .35;
  transform: scale(.97);
  cursor: grabbing;
}

.item.drag-over{
  box-shadow: 0 0 0 3px #6c47ff, 0 4px 24px rgba(108,71,255,.25);
  transform: scale(1.03);
}

.item img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

#pickerOverlay{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
  pointer-events: none;
}

.pickerBox,
#privacyNote{
  pointer-events: auto;
}

.pickerBox{
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

#btnPick{
  pointer-events: auto;
  appearance: none;
  border: 1px solid rgba(0,0,0,0.18);
  background: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.10);
}

#btnPick:active{
  transform: translateY(1px);
}

#usageHint{
  pointer-events: none;
  max-width: min(560px, calc(100vw - 40px));
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .2px;
  color: #888888;
  padding-top: 20px;
  margin: 0;
}

#privacyNote{
  position: static;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(0,0,0,0.45);
  margin: 12px 0 0;
  padding-bottom: 12px;
}

.hidden{
  display: none !important;
}

#lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#lightbox.open{
  display: flex;
}

#lightboxInner{
  position: relative;
  max-width: min(92vw, 1400px);
  max-height: 90vh;
  border-radius: 14px;
  overflow: visible;
  box-shadow: none;
  background: transparent;
  transform: scale(0.98);
  opacity: 0;
  transition: transform .16s ease, opacity .16s ease;
}

#lightbox.open #lightboxInner{
  transform: scale(1);
  opacity: 1;
}

#lightboxContent{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  box-sizing: border-box;
}

#lightboxImg{
  display: block;
  width: 100%;
  height: 100%;
  max-width: min(92vw, 1400px);
  max-height: calc(90vh - 18px);
  object-fit: contain;
  background: transparent;
  border-radius: 4px;
}

#lightboxCaption{
  font-size: 11px;
  line-height: 1.2;
  color: rgb(255 255 255 / 44%);
  text-align: center;
  letter-spacing: 0.01em;
  user-select: none;
}

.moodboard-header{
  text-align: center;
  margin-bottom: 24px;
  background: transparent;
  border: 0;
}

.moodboard-header-title{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.moodboard-header-logo{
  height: 64px;
  max-height: 64px;
  width: auto;
  display: block;
  padding-bottom: 11px;
  flex-shrink: 0;
}

.moodboard-header-heading{
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 0 0 10px;
  line-height: 1.1;
  background: linear-gradient(135deg, #110623 0%, #4a4a4a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.moodboard-header-subtitle{
  font-size: 18px;
  color: #666;
  font-weight: 400;
  letter-spacing: .2px;
  margin: 0;
}

.usage-hint-icon{
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
  opacity: 0.75;
}

@media (max-width: 1024px) {
  :root {
    --gap: 8px;
    --outer: 8px;
  }

  .moodboard-header-heading {
    font-size: 38px;
    letter-spacing: -1px;
  }

  .moodboard-header-subtitle {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  :root {
    --gap: 6px;
    --outer: 12px;
  }

  html, body {
    min-height: 100dvh;
  }

  #wrap {
    min-height: 100dvh;
    height: auto;
  }

  #board {
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: max(var(--outer), env(safe-area-inset-top));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    align-items: stretch;
    justify-content: flex-start;
    overscroll-behavior-y: contain;
  }

  .row {
    justify-content: stretch;
  }

  .item {
    background: rgba(255,255,255,0.72);
    box-shadow: 0 10px 24px rgba(17, 6, 35, 0.08);
    border-radius: 8px;
  }

  .item img {
    object-fit: cover;
  }

  .moodboard-header {
    margin-bottom: 20px;
    padding: 0 16px;
  }

  .moodboard-header-title {
    gap: 10px;
    flex-wrap: wrap;
  }

  .moodboard-header-logo {
    height: 48px;
  }

  .moodboard-header-heading {
    font-size: 32px;
    letter-spacing: -0.8px;
    margin: 0 0 8px;
  }

  .moodboard-header-subtitle {
    font-size: 15px;
  }

  #btnPick {
    font-size: 15px;
    padding: 13px 20px;
    border-radius: 12px;
  }

  #usageHint {
    font-size: 13px;
    padding-top: 14px;
  }

  #privacyNote {
    font-size: 12px;
    bottom: 16px;
    padding: 0 16px;
  }

  #lightbox {
    padding: 16px;
  }

  #lightboxImg {
    max-height: calc(90vh - 14px);
  }
}

@media (max-width: 480px) {
  :root {
    --gap: 5px;
    --outer: 10px;
  }

  #board {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .moodboard-header {
    margin-bottom: 16px;
    padding: 0 12px;
  }

  .moodboard-header-title {
    flex-direction: column;
    gap: 8px;
  }

  .moodboard-header-logo {
    height: 40px;
  }

  .moodboard-header-heading {
    font-size: 26px;
    letter-spacing: -0.5px;
    margin: 0 0 6px;
    text-align: center;
  }

  .moodboard-header-subtitle {
    font-size: 14px;
    line-height: 1.4;
  }

  .pickerBox {
    gap: 8px;
    padding: 0 12px;
  }

  #btnPick {
    font-size: 15px;
    padding: 14px 24px;
    border-radius: 12px;
    width: 100%;
    max-width: 280px;
  }

  #usageHint {
    font-size: 13px;
    padding-top: 12px;
    line-height: 1.45;
  }

  #privacyNote {
    font-size: 11px;
    bottom: 14px;
    padding: 0 20px;
    line-height: 1.4;
  }

  .item {
    border-radius: 12px;
  }

  #lightbox {
    padding: 12px;
  }

  #lightboxImg {
    max-height: calc(88vh - 14px);
  }

  #lightboxCaption {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  :root {
    --gap: 4px;
    --outer: 8px;
  }

  .moodboard-header-logo {
    height: 34px;
  }

  .moodboard-header-heading {
    font-size: 22px;
    letter-spacing: -0.3px;
  }

  .moodboard-header-subtitle {
    font-size: 13px;
  }

  #btnPick {
    font-size: 14px;
    padding: 13px 20px;
    max-width: 260px;
  }

  #usageHint {
    font-size: 12px;
  }

  #privacyNote {
    font-size: 11px;
    bottom: 10px;
  }
}

/* ===== Moodboard fullscreen mode ===== */

body.moodboard-fullscreen {
  overflow: hidden;
}

body.moodboard-fullscreen .site-header,
body.moodboard-fullscreen .site-footer,
body.moodboard-fullscreen #privacyNote {
  display: none;
}

body.moodboard-fullscreen #wrap,
body.moodboard-fullscreen #board {
  height: 100vh;
  min-height: 100vh;
}

body.moodboard-fullscreen #board {
  padding-top: var(--outer);
  padding-bottom: var(--outer);
}

.account-page {
  display: grid;
  gap: 28px;
}

.account-page.is-loading #authView,
.account-page.is-loading #accountView {
  display: none !important;
}

.account-page:not(.is-loading) .account-loading {
  display: none;
}

.account-loading {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  font-size: 15px;
}

.account-heading p {
  margin-top: 10px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.account-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}

.account-card h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.account-form {
  display: grid;
  gap: 16px;
}

.account-label {
  display: grid;
  gap: 8px;
}

.account-label span {
  font-size: 14px;
  color: var(--muted);
}

.account-label input {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
  background: #fff;
}

.account-message {
  min-height: 20px;
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

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

.account-row__label {
  color: var(--muted);
}

.account-actions {
  padding-top: 20px;
}

@media (max-width: 900px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== Auth save modal ===== */

.auth-save-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-save-modal.show {
  display: flex;
}

.auth-save-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
}

.auth-save-modal__dialog {
  position: relative;
  width: min(560px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.auth-save-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.auth-save-modal h2,
.auth-save-modal h3 {
  margin: 0;
}

.auth-save-modal__text {
  margin: 12px 0 20px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-save-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  background: #f2f2f2;
  border-radius: 16px;
}

.auth-save-tab {
  border: 0;
  border-radius: 12px;
  padding: 12px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}

.auth-save-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.auth-save-form {
  display: grid;
  gap: 14px;
}

.auth-save-form label {
  display: grid;
  gap: 8px;
}

.auth-save-form span {
  color: var(--muted);
  font-size: 14px;
}

.auth-save-form input {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
}

.auth-save-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-save-success {
  padding-top: 8px;
}

.auth-save-success p {
  color: var(--muted);
}

.auth-save-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* ============================================================
   HOME HERO
   ============================================================ */

.home-page {
  overflow: hidden;
}

.home-hero {
  position: relative;
  padding: 34px 0 72px;
  background: #ffffff;
}

.home-hero__inner {
  width: min(1280px, calc(100% - 48px));
  display: grid;
  grid-template-columns: minmax(650px, 1.05fr) minmax(470px, 0.95fr);
  align-items: center;
  gap: 18px;
}

.home-hero__content {
  padding-top: 12px;
}

.home-hero__title {
  margin: 0;
  display: flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  letter-spacing: -0.06em;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
}

.home-hero__find {
  font-size: clamp(120px, 10.5vw, 168px);
  line-height: 0.88;
  font-weight: 800;
  color: #020617;
}

.home-hero__color-word {
  display: block;
  width: clamp(420px, 43vw, 680px);
  max-width: none;
  height: auto;
  transform: translateY(12px) rotate(356deg);
}

.home-hero__text {
  margin: 26px 0 0;
  max-width: 620px;
  font-size: 21px;
  line-height: 1.6;
  color: #64748b;
  letter-spacing: -0.02em;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 38px;
}

.hero-btn {
  min-height: 64px;
  padding: 0 24px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.hero-btn__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: block;
}

.hero-btn__arrow {
  width: 20px;
  height: 20px;
  margin-left: 2px;
  flex: 0 0 auto;
}


.hero-btn--primary {
  --hero-primary-gradient: linear-gradient(110deg, #FF8C00 0%, #FF5B2E 20%, #FF2F86 42%, #9B42FF 62%, #2563EB 82%, #16C7E8 100%);
  --hero-primary-dance-width: 260px;
  --hero-primary-dance-timing: 2s;

  position: relative;
  color: #ffffff;
  background: var(--hero-primary-gradient);
  background-size: 100% 100%;
  border: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s ease;
}

.hero-btn--primary:hover {
  background-image: linear-gradient(
    to right,
    #FF8C00,
    #FF8C00 16.65%,
    #FF5B2E 16.65%,
    #FF5B2E 33.3%,
    #FF2F86 33.3%,
    #FF2F86 49.95%,
    #9B42FF 49.95%,
    #9B42FF 66.6%,
    #2563EB 66.6%,
    #2563EB 83.25%,
    #16C7E8 83.25%,
    #16C7E8 100%,
    #FF8C00 100%
  );
  background-size: var(--hero-primary-dance-width) 100%;
  animation: heroPrimaryDance var(--hero-primary-dance-timing) linear infinite;
  transform: scale(1.04) translateY(-1px);
}

.hero-btn--primary:active {
  transform: scale(0.96);
}

@keyframes heroPrimaryDance {
  to {
    background-position: var(--hero-primary-dance-width) 0;
  }
}


.hero-btn--secondary {
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.hero-btn--secondary:active {
  transform: scale(0.96);
}

.home-proof {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.home-proof__avatars {
  display: flex;
  align-items: center;
}

.home-proof__avatar {
  width: 42px;
  height: 42px;
  margin-left: -8px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.home-proof__avatar:first-child {
  margin-left: 0;
}

.home-proof__avatar:nth-child(1) {
  background: linear-gradient(135deg, #fb923c, #f43f5e);
}

.home-proof__avatar:nth-child(2) {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.home-proof__avatar:nth-child(3) {
  background: linear-gradient(135deg, #a78bfa, #ec4899);
}

.home-proof__avatar:nth-child(4) {
  background: linear-gradient(135deg, #34d399, #14b8a6);
}

.home-proof__rating {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.home-proof__stars {
  font-size: 18px;
  line-height: 1;
  color: #f59e0b;
  letter-spacing: 0.08em;
}

.home-proof__caption {
  font-size: 16px;
  color: #64748b;
  letter-spacing: -0.02em;
}

.home-hero__visual {
  position: relative;
  min-height: 540px;
  overflow: visible;
}

.hero-badge {
  position: absolute;
  right: 30px;
  min-width: 128px;
  height: 50px;
  padding: 0 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  z-index: 3;
}

.hero-badge--top {
  top: 54px;
  right: 114px;
}

.hero-badge--bottom {
  top: 120px;
  right: 48px;
}

.hero-badge__icon-svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: block;
  color: #334155;
}

.hero-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-left: 6px;
}

.hero-badge__dot--pink {
  background: #ff4db8;
}

.hero-badge__dot--violet {
  background: #635bff;
}

.home-hero__arrow {
  position: absolute;
  top: 162px;
  left: 190px;
  width: 144px;
  height: 108px;
  z-index: 2;
  color: #233252;
}

.home-hero__arrow-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-hero__arrow marker path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.palette-preview {
  position: absolute;
  right: 0;
  top: 258px;
  width: min(100%, 570px);
  padding: 26px 22px 18px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #eef2f7;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  transform: rotate(-4deg);
  z-index: 2;
}

.palette-preview__swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.palette-preview__swatch {
  height: 190px;
  border-radius: 16px;
}

.palette-preview__codes {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.palette-preview__codes span {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  text-align: center;
  letter-spacing: -0.02em;
}

.hero-splash {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.hero-splash--left {
  left: -44px;
  bottom: 8px;
  width: 90px;
  z-index: 1;
  opacity: 0.98;
}

.hero-splash--right {
  right: -92px;
  bottom: -34px;
  width: 248px;
  z-index: 1;
  opacity: 0.98;
}

.hero-dropper {
  position: absolute;
  right: 42px;
  bottom: -44px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #e9eef5;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #635bff;
  z-index: 4;
}

.hero-dropper::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  border: 0.5px solid #c8c6f6;
  pointer-events: none;
}

.hero-dropper img {
  width: 32px;
  height: 32px;
  display: block;
  position: relative;
  z-index: 1;
}


@media (max-width: 1240px) {
  .home-hero {
    padding: 24px 0 64px;
  }

  .home-hero__inner {
    grid-template-columns: 1fr;
  }

  .home-hero__content {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-hero__title {
  transform-origin: center bottom;
  margin: 0 auto;
}

  .home-hero__find {
    font-size: clamp(92px, 14vw, 148px);
  }

  .home-hero__color-word {
    width: clamp(340px, 48vw, 600px);
  }

.home-hero__visual {
  width: min(760px, 100%);
  min-height: 390px;
  margin: -40px auto 0;
}
  
  .home-hero__text {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.home-hero__actions {
  justify-content: center;
}

.home-proof {
  justify-content: center;
}

  .hero-badge {
    display: none;
  }

.home-hero__arrow {
  display: block;
  top: 18px;
  left: 42%;
  width: 130px;
  height: 96px;
}

.palette-preview {
  top: 112px;
  right: 50%;
  width: min(570px, 86vw);
  transform: translateX(50%) rotate(-4deg);
}

  .hero-splash--left {
    left: 8%;
    bottom: 92px;
    width: 82px;
  }

  .hero-splash--right {
    right: 2%;
    bottom: 38px;
    width: 210px;
  }

.hero-dropper {
  right: calc(50% - 235px);
  bottom: -46px;
}

  }

@media (max-width: 900px) {
  .home-hero__content {
    max-width: 680px;
  }
  
  

  .home-hero__find {
    font-size: clamp(78px, 15vw, 118px);
  }

  .home-hero__color-word {
    width: clamp(300px, 52vw, 500px);
    transform: translateY(8px) rotate(356deg);
  }

  .home-hero__actions {
    flex-direction: column;
    align-items: center;
    margin-top: 32px;
  }

  .hero-btn {
    width: auto;
    min-width: 320px;
    justify-content: center;
  }

  .home-proof {
    justify-content: center;
  }

  .home-hero__visual {
    min-height: 390px;
  }

  .home-hero__arrow {
    top: 36px;
    left: 39%;
    width: 118px;
    height: 88px;
  }

  .palette-preview {
    top: 132px;
    width: min(520px, 88vw);
  }

  .palette-preview__swatch {
    height: 160px;
  }

  .hero-splash--right {
    width: 180px;
    right: 0;
    bottom: 42px;
  }
  
    .hero-dropper {
    display: none;
  }

  .hero-dropper img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 760px) {
  .home-hero {
    padding: 22px 0 0;
  }

  .home-hero__inner {
    width: min(100%, calc(100% - 48px));
    gap: 30px;
  }

  .home-hero__content {
    max-width: 100%;
  }

  .home-hero__title {
    gap: 4px;
  }

  .home-hero__find {
    font-size: clamp(56px, 22vw, 96px);
  }

  .home-hero__color-word {
    width: clamp(230px, 56vw, 390px);
    transform: translateY(5px) rotate(356deg);
  }

  .home-hero__text {
    margin-top: 22px;
    font-size: 20px;
    line-height: 1.55;
  }

  .home-hero__actions {
    align-items: center;
    gap: 16px;
    margin-top: 32px;
  }

  .hero-btn {
    min-width: 300px;
    min-height: 58px;
    padding: 0 22px;
    font-size: 16px;
  }

  .home-proof {
    justify-content: center;
    gap: 16px;
  }

  .home-hero__visual {
    min-height: 325px;
    margin-top: 0;
  }

  .home-hero__arrow {
    top: -12px;
    left: 38%;
    width: 104px;
    height: 78px;
  }

  .palette-preview {
    top: 72px;
    width: min(480px, 88vw);
    padding: 20px 16px 14px;
    border-radius: 26px;
  }

  .palette-preview__swatches {
    gap: 10px;
  }

  .palette-preview__swatch {
    height: 132px;
    border-radius: 14px;
  }

  .palette-preview__codes {
    gap: 10px;
  }

  .palette-preview__codes span {
    font-size: 11px;
  }

  .hero-splash--left {
    left: 0;
    bottom: 76px;
    width: 74px;
  }

  .hero-splash--right {
    right: -8px;
    bottom: 42px;
    width: 150px;
  }

.hero-dropper {
  width: 66px;
  height: 66px;
  right: calc(50% - 190px);
  bottom: 40px;
}

  .hero-dropper img {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 560px) {
  .home-hero__inner {
    width: min(100%, calc(100% - 32px));
  }

  .home-hero__find {
    font-size: clamp(48px, 23vw, 76px);
  }

  .home-hero__color-word {
    width: clamp(190px, 58vw, 300px);
    transform: translateY(4px) rotate(356deg);
  }

  .home-hero__text {
    font-size: 18px;
  }

  .hero-btn {
    min-width: 280px;
  }

.home-proof {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .home-proof__avatars {
    justify-content: center;
  }

  .home-proof__rating {
    justify-content: center;
  }

  .home-hero__visual {
    min-height: 265px;
  }

  .home-hero__arrow {
    top: -14px;
    width: 92px;
    height: 68px;
  }

  .palette-preview {
    top: 44px;
    width: min(420px, 90vw);
    padding: 16px 12px 12px;
    border-radius: 22px;
  }

  .palette-preview__swatches {
    gap: 8px;
  }

  .palette-preview__swatch {
    height: 110px;
    border-radius: 12px;
  }

  .palette-preview__codes span {
    font-size: 9px;
  }

  .hero-splash--left {
    width: 58px;
    bottom: 70px;
  }

  .hero-splash--right {
    width: 170px;
    right: -18px;
    bottom: 74px;
  }

.hero-dropper {
  width: 58px;
  height: 58px;
  right: calc(50% - 170px);
  bottom: 65px;
}

  .hero-dropper img {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 420px) {
  .home-hero__find {
    font-size: clamp(42px, 22vw, 58px);
  }

  .home-hero__color-word {
    width: clamp(165px, 56vw, 230px);
  }

  .home-hero__text {
    font-size: 17px;
  }

  .hero-btn {
    min-width: 260px;
    min-height: 56px;
    font-size: 15px;
  }

  .home-proof {
    gap: 14px;
  }

  .home-proof__caption {
    font-size: 15px;
  }

  .home-hero__visual {
    min-height: 280px;
  }

  .palette-preview {
    width: min(360px, 90vw);
  }

  .palette-preview__swatch {
    height: 92px;
  }

.hero-dropper {
  right: calc(50% - 176px);
  bottom: -2px;
}
}
  
/* ===== Home hero: narrow phones ===== */

@media (max-width: 430px) {
  .home-hero {
    padding-top: 18px;
  }

  .home-hero__inner {
    width: calc(100% - 28px);
    gap: 26px;
  }

  .home-hero__title {
    max-width: 100%;
    justify-content: center;
  }

  .home-hero__find {
    font-size: clamp(40px, 18vw, 56px);
  }

  .home-hero__color-word {
    width: clamp(150px, 48vw, 210px);
    transform: translateY(3px) rotate(356deg);
  }

  .home-hero__text {
    max-width: 320px;
    font-size: 16px;
    line-height: 1.5;
  }

  .hero-btn {
    min-width: 0;
    width: min(320px, 100%);
    min-height: 54px;
    font-size: 15px;
  }

  .home-proof {
    width: 100%;
    justify-content: center;
    gap: 14px;
  }

  .home-proof__avatars {
    width: 100%;
    justify-content: center;
  }

  .home-proof__rating {
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .home-proof__caption {
    font-size: 14px;
    white-space: nowrap;
  }

  .home-hero__visual {
    width: 100%;
    max-width: 360px;
    min-height: 255px;
    left: auto;
    margin: -18px auto 0;
    transform: none;
    transform-origin: top center;
  }

  .home-hero__arrow {
    top: 8px;
    left: 50%;
    width: 82px;
    height: 62px;
    transform: translateX(-50%);
  }

  .palette-preview {
    top: 64px;
    right: 50%;
    width: 300px;
    max-width: calc(100vw - 36px);
    padding: 14px 10px 10px;
    border-radius: 20px;
    transform: translateX(50%) rotate(-4deg);
  }

  .palette-preview__swatches {
    gap: 7px;
  }

  .palette-preview__swatch {
    height: 84px;
    border-radius: 11px;
  }

  .palette-preview__codes {
    gap: 7px;
    margin-top: 10px;
  }

  .palette-preview__codes span {
    font-size: 8px;
  }

  .hero-splash--left {
    left: 2px;
    bottom: 58px;
    width: 50px;
  }

  .hero-splash--right {
    right: -10px;
    bottom: 40px;
    width: 120px;
  }

  .hero-dropper {
    width: 50px;
    height: 50px;
    right: calc(50% - 128px);
    bottom: 30px;
  }

  .hero-dropper img {
    width: 19px;
    height: 19px;
  }
}

@media (max-width: 380px) {
  .container {
    width: calc(100% - 28px);
  }

  .site-header__inner {
    min-height: 68px;
  }

  .site-logo__img {
    width: 70px;
  }

  .site-logo__text {
    font-size: 23px;
  }

  .site-menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .home-hero__inner {
    width: calc(100% - 24px);
  }

  .home-hero__find {
    font-size: clamp(38px, 17vw, 50px);
  }

  .home-hero__color-word {
    width: clamp(140px, 46vw, 180px);
  }

  .home-hero__text {
    max-width: 300px;
    font-size: 15px;
  }

  .hero-btn {
    width: min(300px, 100%);
    min-height: 52px;
    font-size: 14px;
  }

  .home-proof__caption {
    font-size: 13px;
  }

  .home-hero__visual {
    max-width: 330px;
    min-height: 208px;
    margin-top: -22px;
  }

  .palette-preview {
    top: 60px;
    width: 278px;
    padding: 13px 9px 9px;
  }

  .palette-preview__swatch {
    height: 76px;
    border-radius: 10px;
  }

  .palette-preview__codes span {
    font-size: 7.5px;
  }

  .hero-splash--left {
    width: 44px;
    bottom: 54px;
  }

  .hero-splash--right {
    width: 104px;
    right: -6px;
    bottom: 48px;
  }

  .hero-dropper {
    width: 46px;
    height: 46px;
    bottom: 33px;
  }

  .hero-dropper img {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 340px) {
  .home-hero__find {
    font-size: 36px;
  }

  .home-hero__color-word {
    width: 150px;
  }

  .palette-preview {
    width: 258px;
  }

  .palette-preview__swatch {
    height: 70px;
  }

  .hero-dropper {
    right: calc(50% - 108px);
  }
}

@media (max-width: 980px) {
  .site-footer__inner {
    padding: 30px 0 38px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
  }

  .site-footer__copy {
    width: 100%;
  }

  .site-footer__copy p {
    max-width: none;
    margin: 0 auto;
    font-size: 14px;
    text-align: center;
  }

  .site-footer__links {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .site-footer__links {
    gap: 8px;
  }

  .site-footer__links a {
    min-height: 34px;
    padding: 0 13px;
    font-size: 13px;
  }

  .site-footer__copy p {
    max-width: 300px;
  }

  .site-footer__copy span[aria-hidden="true"] {
    margin: 0 8px;
  }
}