﻿/* =========================================================
   COLOR PICKER
   Main Stylesheet
   ========================================================= */

:root {
  --pastel-pink: #F8C8DC;
  --pastel-lavender: #D8C4F1;
  --pastel-blue: #BFDFF5;

  --background: #FCFCFD;
  --surface: #FFFFFF;
  --text: #27313D;
  --text-light: #2b2b2b;
  --border: #E8EAF0;

  --shadow-sm: 0 4px 16px rgba(39, 49, 61, 0.06);
  --shadow-md: 0 12px 35px rgba(39, 49, 61, 0.09);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --container: 1120px;
}

/* =========================
   RESET
========================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at 10% 8%,
      rgba(216, 196, 241, 0.42) 0%,
      rgba(216, 196, 241, 0.18) 24%,
      transparent 52%
    ),
    radial-gradient(
      circle at 92% 28%,
      rgba(248, 200, 220, 0.36) 0%,
      rgba(248, 200, 220, 0.14) 26%,
      transparent 55%
    ),
    radial-gradient(
      circle at 15% 72%,
      rgba(191, 223, 245, 0.34) 0%,
      rgba(191, 223, 245, 0.13) 25%,
      transparent 54%
    ),
    radial-gradient(
      circle at 88% 92%,
      rgba(216, 196, 241, 0.32) 0%,
      rgba(216, 196, 241, 0.12) 25%,
      transparent 54%
    ),
    #FBFAFD;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

/* =========================
   CONTAINER
========================= */

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/* =========================
   HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(232, 234, 240, 0.8);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* =========================
   LOGO
========================= */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.logo-icon {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(
    135deg,
    var(--pastel-pink),
    var(--pastel-lavender),
    var(--pastel-blue)
  );
  box-shadow: var(--shadow-sm);
}

.logo-text {
  white-space: nowrap;
}

/* =========================
   NAVIGATION
========================= */

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--text-light);
  font-size: 0.92rem;
  font-weight: 600;
}

.main-nav a {
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 58px;
  text-align: center;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.28;
  pointer-events: none;
}

.hero::before {
  background: var(--pastel-pink);
  top: -120px;
  left: 5%;
}

.hero::after {
  background: var(--pastel-blue);
  top: -100px;
  right: 5%;
}

.eyebrow {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(248, 200, 220, 0.45),
    rgba(216, 196, 241, 0.45),
    rgba(191, 223, 245, 0.45)
  );
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-inline: auto;
  font-size: clamp(2.15rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-description {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 20px auto 0;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* =========================
   PICKER SECTION
========================= */

.picker-section {
  padding: 0 0 70px;
}

.picker-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 34px);
  box-shadow: var(--shadow-md);
}

/* =========================
   UPLOAD AREA
========================= */

.upload-area {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  border: 2px dashed #DCDCE8;
  border-radius: var(--radius-md);
  background:
    linear-gradient(
      135deg,
      rgba(248, 200, 220, 0.12),
      rgba(216, 196, 241, 0.12),
      rgba(191, 223, 245, 0.12)
    );
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.upload-area:hover,
.upload-area:focus-visible,
.upload-area.dragover {
  border-color: var(--pastel-lavender);
  background:
    linear-gradient(
      135deg,
      rgba(248, 200, 220, 0.2),
      rgba(216, 196, 241, 0.2),
      rgba(191, 223, 245, 0.2)
    );
  outline: none;
}

.upload-area.dragover {
  transform: scale(1.005);
}

.upload-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    var(--pastel-pink),
    var(--pastel-lavender),
    var(--pastel-blue)
  );
  font-size: 1.8rem;
  box-shadow: var(--shadow-sm);
}

.upload-area h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.upload-area p {
  max-width: 500px;
  margin: 8px auto 20px;
  color: var(--text-light);
  font-size: 0.94rem;
}

.upload-hint {
  margin-top: 11px;
  color: #8993A1;
  font-size: 0.78rem;
}

/* =========================
   BUTTONS
========================= */

.primary-button,
.secondary-button,
.copy-button,
.text-button {
  border: 0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.primary-button {
  padding: 12px 22px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--pastel-lavender),
    var(--pastel-blue)
  );
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

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

.secondary-button {
  padding: 9px 14px;
  border-radius: 10px;
  background: #F4F5F8;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 650;
}

.secondary-button:hover {
  background: #ECEEF3;
}

.copy-button {
  flex-shrink: 0;
  padding: 7px 11px;
  border-radius: 9px;
  background: var(--pastel-blue);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.text-button {
  background: transparent;
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 650;
}

.text-button:hover {
  color: var(--text);
}

/* =========================
   WORKSPACE
========================= */

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  gap: 26px;
}

.image-panel {
  min-width: 0;
}

.panel-header,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-header {
  margin-bottom: 16px;
}

.panel-header h2,
.section-heading h2 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #F1F2F5;
  border: 1px solid var(--border);
  cursor: crosshair;
}

#image-canvas {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.picker-hint {
  margin-top: 10px;
  color: var(--text-light);
  font-size: 0.8rem;
}

/* =========================
   LOUPE
========================= */

.loupe {
  position: absolute;
  width: 104px;
  height: 104px;
  display: none;
  overflow: hidden;
  border: 4px solid #FFFFFF;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgba(39, 49, 61, 0.2);
  pointer-events: none;
  transform: translate(-50%, -115%);
  z-index: 5;
}

.loupe canvas {
  width: 100%;
  height: 100%;
}

/* =========================
   COLOR RESULTS
========================= */

.color-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.selected-color-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.selected-color-preview {
  min-height: 145px;
  background: var(--pastel-pink);
}

.selected-color-info {
  padding: 16px;
}

.result-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.selected-color-info strong {
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.color-value {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FAFAFC;
}

.color-value strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
}

/* =========================
   RECENT COLORS
========================= */

.recent-colors-section,
.palette-section {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.recent-colors,
.palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.color-item {
  position: relative;
  min-width: 0;
}

.color-item .recent-color,
.color-item .palette-color {
  width: 100%;
}

.color-delete-button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333333;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.color-delete-button:hover {
  transform: scale(1.08);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.color-delete-button:active {
  transform: scale(0.96);
}

.color-delete-button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.recent-color,
.palette-color {
  width: 100%;
  min-width: 0;
  height: 62px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  display: block;
  padding: 0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.palette-download-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.palette-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    #F8C8DC,
    #D8C4F1,
    #BFDFF5
  );
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

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

.palette-download-button:active {
  transform: translateY(0);
}

.palette-download-button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.palette-download-button[hidden] {
  display: none;
}
.recent-color:hover,
.palette-color:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.color-swatch {
  height: 62px;
}

.color-swatch-value {
  padding: 8px;
  font-size: 0.7rem;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  text-align: center;
  overflow-wrap: anywhere;
}

/* =========================
   CONTENT
========================= */

.content-section {
  background: transparent;
  border: 0;
}

.content-container {
  max-width: 820px;
}

.content-container h2 {
  margin-top: 42px;
  margin-bottom: 12px;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.content-container h2:first-child {
  margin-top: 0;
}

.content-container p {
  color: var(--text-light);
  font-size: 0.98rem;
}

/* =========================
   FAQ/* =========================
   FAQ
========================= */

.faq-section {
  background: transparent;
  border: 0;
  padding-top: 96px;
  padding-bottom: 48px;
}

.faq-section > .container > h2 {
  margin-bottom: 32px;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  text-align: center;
}

details {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(232, 234, 240, 0.72);
  border-radius: 14px;
  margin-bottom: 12px;
  padding: 0 20px;
  box-shadow: 0 4px 16px rgba(39, 49, 61, 0.035);
}

details:first-of-type {
  border-top: 1px solid rgba(232, 234, 240, 0.72);
}

summary {
  position: relative;
  padding: 20px 36px 20px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 650;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.25rem;
  font-weight: 400;
}

details[open] summary::after {
  content: "−";
}

details p {
  max-width: 720px;
  padding: 0 0 20px;
  color: #2b2b2b;
  font-size: 0.92rem;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  background: rgba(255, 255, 255, 0.42);
  border-top: 1px solid rgba(232, 234, 240, 0.65);
  padding-top: 0;
}

.footer-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-light);
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--text);
}

/* =========================
   ACCESSIBILITY
========================= */

button:focus-visible,
a:focus-visible,
summary:focus-visible,
.upload-area:focus-visible {
  outline: 3px solid rgba(191, 223, 245, 0.9);
  outline-offset: 3px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 800px) {

  .header-inner {
    min-height: 64px;
  }

  .main-nav {
    gap: 14px;
    font-size: 0.82rem;
  }

  .hero {
    padding: 58px 0 42px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .selected-color-preview {
    min-height: 120px;
  }

}

@media (max-width: 560px) {

  .container {
    width: min(100% - 20px, var(--container));
  }

  .logo {
    font-size: 1rem;
  }

  .logo-icon {
    width: 31px;
    height: 31px;
  }

  .main-nav {
    gap: 10px;
    font-size: 0.76rem;
  }

  .main-nav a:nth-child(2) {
    display: none;
  }

  .hero {
    padding: 48px 0 34px;
  }

  .hero h1 {
    font-size: 2.05rem;
  }

  .hero-description {
    font-size: 0.92rem;
  }

  .picker-card {
    padding: 12px;
    border-radius: 18px;
  }

  .upload-area {
    min-height: 290px;
    padding: 30px 16px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-header .secondary-button {
    width: 100%;
  }

  .loupe {
    width: 88px;
    height: 88px;
  }

  .recent-colors,
  .palette {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .recent-color,
  .palette-color {
    height: 52px;
  }

  .color-swatch {
    height: 52px;
  }

  .color-swatch-value {
    padding: 7px 4px;
    font-size: 0.64rem;
  }

  .content-section,
  .faq-section {
    padding-top: 72px;
    padding-bottom: 40px;
  }

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

}
}


/* FAQ layout */
.faq-section > .container {
  max-width: 820px;
}

/* =========================================================
   SHARED CONTENT PAGE DESIGN
   Used by Privacy, Terms, Cookies, Disclaimer, About, Contact
   ========================================================= */

.content-page-section {
  background: transparent;
  border: 0;
  padding: 64px 0 80px;
}

.content-page-container {
  max-width: 820px;
}

.content-page-header {
  padding: 0 0 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(232, 234, 240, 0.58);
}

.content-page-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(248, 200, 220, 0.42);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.content-page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text);
}

.content-page-subtitle {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.7;
}

.content-page-body h2 {
  margin: 30px 0 10px;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}

.content-page-body h2:first-of-type {
  margin-top: 0;
}

.content-page-body h3 {
  margin: 24px 0 9px;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text);
}

.content-page-body p {
  margin: 0 0 14px;
  color: #000000;
  font-size: 0.97rem;
  line-height: 1.75;
}

.content-page-body ul,
.content-page-body ol {
  margin: 0 0 16px 22px;
  color: var(--text-light);
  line-height: 1.75;
}

.content-page-body li {
  margin-bottom: 6px;
}

.content-page-body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(216, 196, 241, 0.9);
  text-underline-offset: 3px;
}

.content-page-body a:hover {
  text-decoration-color: var(--text);
}



/* =========================================================
   FAQ HEADING
   ========================================================= */

.faq-heading {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 42px;
  padding: 0;
  text-align: center;
  transform: translateX(-7px);
}

.faq-heading h2 {
  margin: 0;
  padding: 0;
  text-align: center;
  line-height: 1.2;
}

/* =========================================================
   PICKER SPACING ADJUSTMENT
   Adds a little breathing room between image upload
   and selected color areas.
   ========================================================= */

.upload-area {
  margin-bottom: 18px;
}



