/* ============================================================
   AI Hairstyle — local clone of aihairstyle.design (paid parts removed).
   Tokens lifted from the original Tailwind v4 + shadcn/ui build.
   Light is default; .dark via html.dark class for the theme toggle.
   ============================================================ */

:root {
  /* shadcn/ui tokens (light) */
  --background: oklch(0.9399 0.0203 345.699);
  --foreground: oklch(0.4712 0 0);
  --card: oklch(0.9498 0.05 86.8891);
  --card-foreground: oklch(0.4712 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.4712 0 0);
  --primary: oklch(0.6209 0.1801 348.139);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.8095 0.0694 198.186);
  --secondary-foreground: oklch(0.4712 0 0);
  --muted: oklch(0.88 0.0504 212.095);
  --muted-foreground: oklch(0.4712 0 0);
  --accent: oklch(0.9195 0.0801 87.667);
  --accent-foreground: oklch(0.4712 0 0);
  --destructive: oklch(0.7091 0.1697 21.9551);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.6209 0.1801 348.139);
  --input: oklch(0.9189 0 0);
  --ring: oklch(0.7002 0.1597 350.753);

  --radius: 0.4rem;

  /* type stack lifted from the original */
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Lora", Georgia, serif;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, monospace;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.06);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --header-h: 64px;
}

html.dark {
  --background: oklch(0.2497 0.0305 234.163);
  --foreground: oklch(0.9306 0.0197 349.079);
  --card: oklch(0.2902 0.0299 233.535);
  --card-foreground: oklch(0.9306 0.0197 349.079);
  --popover: oklch(0.2902 0.0299 233.535);
  --popover-foreground: oklch(0.9306 0.0197 349.079);
  --primary: oklch(0.9195 0.0801 87.667);
  --primary-foreground: oklch(0.2497 0.0305 234.163);
  --secondary: oklch(0.7794 0.0803 4.133);
  --secondary-foreground: oklch(0.2497 0.0305 234.163);
  --muted: oklch(0.2713 0.0086 255.578);
  --muted-foreground: oklch(0.7794 0.0803 4.133);
  --accent: oklch(0.6699 0.0988 356.976);
  --accent-foreground: oklch(0.9306 0.0197 349.079);
  --destructive: oklch(0.6702 0.1806 350.36);
  --destructive-foreground: oklch(0.2497 0.0305 234.163);
  --border: oklch(0.3907 0.0399 242.218);
  --input: oklch(0.3093 0.0305 232.003);
  --ring: oklch(0.6998 0.0896 201.867);
}

/* ----- base ----- */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  background-image:
    radial-gradient(at 50% 50%, color-mix(in oklch, var(--primary) 6%, transparent) 0px, transparent 50%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--foreground);
}
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 4.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.75rem); line-height: 1.2; }
h3 { font-size: 1.25rem; line-height: 1.3; }
p  { margin: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
hr { border: 0; height: 1px; background: var(--border); opacity: 0.4; margin: 0; }
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: var(--primary-foreground); padding: 8px 14px;
  border-radius: var(--radius);
}
.skip:focus { left: 16px; top: 16px; z-index: 999; }

/* ----- layout ----- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}
.section-pad { padding-block: clamp(48px, 6vw, 96px); }

/* ----- buttons (shadcn primary) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  white-space: nowrap;
}
.btn--sm  { padding: 8px 14px; font-size: 0.875rem; }
.btn--lg  { padding: 14px 28px; font-size: 1rem; }
.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: color-mix(in oklch, var(--primary) 88%, transparent); }
.btn--ghost {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.btn--ghost:hover { background: color-mix(in oklch, var(--foreground) 6%, transparent); }
.btn--secondary {
  background: var(--card);
  color: var(--foreground);
  border-color: var(--border);
}
.btn--secondary:hover { background: color-mix(in oklch, var(--muted) 60%, var(--card)); }
.btn--secondary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--link {
  padding: 0;
  background: transparent;
  color: var(--primary);
  border: 0;
  text-underline-offset: 4px;
}
.btn--link:hover { text-decoration: underline; }
.btn:active { transform: translateY(1px); }

/* ----- topbar ----- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--background) 80%, transparent);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
}
.nav {
  display: none;
  gap: 28px;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}
@media (min-width: 768px) {
  .nav { display: flex; }
}
.nav a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav a:hover { color: var(--foreground); }
.topbar__tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  transition: background-color 0.2s, color 0.2s;
}
.icon-btn:hover {
  background: color-mix(in oklch, var(--foreground) 8%, transparent);
  color: var(--foreground);
}
.lang {
  font-size: 0.875rem;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--muted-foreground);
}
.lang:hover { background: color-mix(in oklch, var(--foreground) 6%, transparent); color: var(--foreground); }

/* ----- hero ----- */
.hero { padding-top: clamp(40px, 6vw, 96px); }
.hero__inner {
  display: grid;
  gap: 48px;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid color-mix(in oklch, var(--primary) 30%, transparent);
  margin: 0 auto;
}
.hero h1 .gradient {
  background: linear-gradient(to right, var(--primary), color-mix(in oklch, var(--primary) 80%, var(--accent)), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lede {
  font-size: clamp(1rem, 1vw + 0.875rem, 1.25rem);
  color: var(--muted-foreground);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}
.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 3-COLUMN EDITOR ============================================== */
.editor-cols {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: start;
  margin-top: 24px;
}
@media (min-width: 768px) {
  .editor-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .editor-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* card shell */
.ecard {
  background: var(--card);
  border: 1px solid color-mix(in oklch, var(--border) 45%, transparent);
  border-radius: calc(var(--radius) * 2);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 620px;
}
.ecard__head h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.ecard__head p {
  font-size: 0.92rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}
html.dark .ecard__head h3 { color: var(--foreground); }

/* tabs (gallery) */
.ecard__tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ecard__tabs button {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in oklch, var(--primary) 50%, transparent);
  background: transparent;
  color: var(--primary);
  transition: background 0.18s, color 0.18s;
}
.ecard__tabs button[aria-selected="true"] {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.ecard__tabs button:hover:not([aria-selected="true"]) {
  background: color-mix(in oklch, var(--primary) 12%, transparent);
}

/* scrollable region inside card */
.ecard__scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  min-height: 380px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  position: relative;
}
.ecard__scroll::-webkit-scrollbar { width: 8px; }
.ecard__scroll::-webkit-scrollbar-track {
  background: color-mix(in oklch, var(--muted) 30%, transparent);
  border-radius: 999px;
}
.ecard__scroll::-webkit-scrollbar-thumb {
  background: color-mix(in oklch, var(--muted-foreground) 40%, transparent);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.ecard__scroll::-webkit-scrollbar-thumb:hover {
  background: color-mix(in oklch, var(--muted-foreground) 55%, transparent);
  background-clip: padding-box;
}

/* Gallery sub-panel (independent scroll box) */
.gallery-panel {
  border: 1px solid color-mix(in oklch, var(--border) 35%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 320px;
}
.gallery-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: color-mix(in oklch, var(--background) 60%, var(--card));
  border-bottom: 1px solid color-mix(in oklch, var(--border) 25%, transparent);
}
.gallery-panel__head h4 {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}
.gallery-panel__head .count {
  font-size: 0.72rem;
  color: var(--muted-foreground);
}
.gallery-panel .ecard__scroll {
  min-height: auto;
  max-height: 260px;
  padding: 8px;
}

/* Color panel (independent scroll box) */
.palette-panel {
  border: 1px solid color-mix(in oklch, var(--border) 35%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 220px;
}
.palette-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: color-mix(in oklch, var(--background) 60%, var(--card));
  border-bottom: 1px solid color-mix(in oklch, var(--border) 25%, transparent);
}
.palette-panel__head h4 {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}
.palette-scrollbox {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.palette-scrollbox::-webkit-scrollbar { width: 6px; }
.palette-scrollbox::-webkit-scrollbar-track {
  background: color-mix(in oklch, var(--muted) 30%, transparent);
  border-radius: 999px;
}
.palette-scrollbox::-webkit-scrollbar-thumb {
  background: color-mix(in oklch, var(--muted-foreground) 40%, transparent);
  border-radius: 999px;
}

.scroll-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin: 4px 0 2px;
  letter-spacing: 0.02em;
  z-index: 2;
  position: relative;
}

/* gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.gtile {
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 4px;
  background: color-mix(in oklch, var(--background) 80%, var(--card));
  transition: border-color 0.15s, transform 0.15s;
}
.gtile:hover { transform: translateY(-1px); }
.gtile.is-active {
  border-color: var(--primary);
  background: color-mix(in oklch, var(--primary) 10%, var(--card));
}
.gtile__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 15%;
  border-radius: calc(var(--radius) * 0.65);
  background: var(--muted);
}
.gtile__cap {
  font-size: 0.66rem;
  font-weight: 500;
  text-align: center;
  color: var(--foreground);
  margin-top: 5px;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.6em;
}

/* dropzone (canvas) */
.dropzone-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 20px;
  border: 2.5px dashed color-mix(in oklch, var(--primary) 45%, transparent);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--background) 70%, var(--card));
  color: var(--muted-foreground);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.dropzone-big:hover {
  background: color-mix(in oklch, var(--primary) 7%, var(--card));
  border-color: var(--primary);
}
.dropzone-big.is-dragover {
  background: color-mix(in oklch, var(--primary) 12%, var(--card));
  border-color: var(--primary);
  border-style: solid;
}
.dropzone-big.is-loaded {
  border-style: solid;
  border-color: var(--primary);
  background: color-mix(in oklch, var(--primary) 8%, var(--card));
  color: var(--foreground);
}
.dropzone-big__icon {
  width: 36px;
  height: 36px;
  color: color-mix(in oklch, var(--primary) 70%, var(--foreground));
}
.dropzone-big__hint {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}
.dropzone-big__thumb {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: calc(var(--radius) * 0.6);
}
.dropzone-big__file {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-foreground);
  margin-top: 4px;
}

.dropzone-big__file {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-foreground);
  margin-top: 2px;
}

/* unleash button */
.unleash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 14px 22px;
  box-shadow: var(--shadow);
}
.unleash__icon {
  font-size: 1.05em;
  filter: drop-shadow(0 0 6px rgb(255 255 255 / 0.45));
}

/* color palette block (sits inside canvas card) */
.palette-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}
.palette-block__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.palette-block__head h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-foreground);
  margin: 0;
  font-weight: 500;
}
.palette-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted-foreground);
}
.palette-current__pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in oklch, var(--primary) 35%, transparent);
  letter-spacing: 0.02em;
}

.palette-scroll {
  flex: 1;
  min-height: 200px;
}

.palette-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 6px;
  background: linear-gradient(140deg, var(--pc), var(--pc2));
  border: 1.5px solid color-mix(in oklch, var(--border) 35%, transparent);
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  position: relative;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
}
.pill:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgb(0 0 0 / 0.15); }
.pill.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), 0 2px 6px rgb(0 0 0 / 0.15);
}
.pill__dot { display: none; }
.pill__name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* output preview */
.output-preview {
  position: relative;
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--muted);
  min-height: 280px;
  border: 1px solid color-mix(in oklch, var(--border) 40%, transparent);
}
.output-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.25s;
}
.output-preview.is-empty img {
  filter: blur(2px) brightness(0.95) saturate(0.85);
}
.output-preview__hint {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 16px;
  text-align: center;
  font-weight: 600;
  color: var(--card);
  background: linear-gradient(transparent, rgb(0 0 0 / 0.7));
  font-size: 0.9rem;
}
.output-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: center;
  color: var(--muted-foreground);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* mobile card stacking */
@media (max-width: 640px) {
  .ecard { padding: 18px; min-height: auto; }
  .ecard__scroll { min-height: 240px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .palette-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pill { padding: 6px 10px; font-size: 0.74rem; }
}

/* ----- showcase ----- */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) { .showcase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .showcase-grid { grid-template-columns: repeat(4, 1fr); } }

.showcase-card {
  background: var(--card);
  border: 1px solid color-mix(in oklch, var(--border) 35%, transparent);
  border-radius: calc(var(--radius) * 1.5);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.showcase-card__before,
.showcase-card__after {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.showcase-card__before img,
.showcase-card__after img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.showcase-card__label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: color-mix(in oklch, var(--background) 90%, transparent);
  backdrop-filter: blur(4px);
  color: var(--foreground);
}
.showcase-card__arrow {
  text-align: center;
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 700;
}
.showcase-card__caption {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--foreground);
}

/* ----- about ----- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .about-grid { grid-template-columns: repeat(3, 1fr); } }

.about-card {
  background: var(--card);
  border: 1px solid color-mix(in oklch, var(--border) 35%, transparent);
  border-radius: calc(var(--radius) * 1.5);
  padding: 28px;
  text-align: center;
}
.about-card__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-content: center;
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  color: var(--primary);
  margin: 0 auto 18px;
}
.about-card h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}
.about-card p {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ----- feature grid ----- */
.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 56px;
}
.section-head__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-head p { color: var(--muted-foreground); font-size: 1.05rem; }
.feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feat-grid { grid-template-columns: repeat(3, 1fr); } }
.feat {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklch, var(--border) 40%, transparent);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.feat:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.feat__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-content: center;
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  color: var(--primary);
  margin-bottom: 18px;
}
.feat h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.feat p {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ----- comments ----- */
.comments-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .comments-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .comments-grid { grid-template-columns: repeat(3, 1fr); } }

.comment-card {
  background: var(--card);
  border: 1px solid color-mix(in oklch, var(--border) 35%, transparent);
  border-radius: calc(var(--radius) * 1.5);
  padding: 24px;
}
.comment-card__stars {
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.comment-card__text {
  color: var(--foreground);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.comment-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.comment-card__avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: color-mix(in oklch, var(--primary) 15%, transparent);
  color: var(--primary);
}
.comment-card__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--foreground);
}
.comment-card__date {
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

/* ----- FAQ ----- */
.faq {
  background: var(--card);
  border-radius: calc(var(--radius) * 2);
  border: 1px solid color-mix(in oklch, var(--border) 40%, transparent);
  padding: clamp(28px, 4vw, 64px);
}
.faq__list { display: grid; gap: 8px; }
.faq__list details {
  border: 1px solid color-mix(in oklch, var(--border) 35%, transparent);
  border-radius: var(--radius);
  background: var(--background);
  overflow: hidden;
}
.faq__list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: 1rem;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__mark {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  position: relative;
  color: var(--muted-foreground);
}
.faq__mark::before,
.faq__mark::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 0.2s;
}
.faq__mark::before {
  top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%);
}
.faq__mark::after {
  left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%);
}
details[open] .faq__mark::after { transform: translateX(-50%) scaleY(0); }
details[open] summary { color: var(--primary); }
.faq__a {
  padding: 0 20px 20px;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ----- CTA ----- */
.cta {
  background: linear-gradient(135deg, var(--primary), color-mix(in oklch, var(--primary) 70%, var(--accent)));
  color: var(--primary-foreground);
  border-radius: calc(var(--radius) * 2);
  padding: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 56px);
  text-align: center;
}
.cta h2 { color: inherit; }
.cta p { color: color-mix(in oklch, var(--primary-foreground) 85%, transparent); max-width: 540px; margin: 0 auto 24px; }
.cta .btn--primary {
  background: var(--card);
  color: var(--primary);
  border-color: var(--card);
}
.cta .btn--primary:hover { background: color-mix(in oklch, var(--card) 90%, var(--primary-foreground)); }

/* ----- footer ----- */
.footer {
  padding: 56px 0;
  border-top: 1px solid color-mix(in oklch, var(--border) 40%, transparent);
}
.footer__grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 64px; } }
.footer__about {
  color: var(--muted-foreground);
  font-size: 0.92rem;
  margin-top: 14px;
  max-width: 36ch;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted-foreground);
  font-weight: 500;
  margin: 0 0 14px;
}
.footer__list { display: grid; gap: 8px; }
.footer__list a {
  font-size: 0.92rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.footer__list a:hover { color: var(--foreground); }
.footer__base {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid color-mix(in oklch, var(--border) 40%, transparent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ----- mobile tweaks ----- */
@media (max-width: 640px) {
  .ecard { padding: 18px; min-height: auto; }
  .ecard__scroll { min-height: 240px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-panel { max-height: 280px; }
  .gallery-panel .ecard__scroll { max-height: 220px; }
  .palette-panel { max-height: 180px; }
  .palette-pills { grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .pill { padding: 4px 6px; font-size: 0.68rem; }
  .gallery__count { font-size: 1rem; }
  .grid { grid-template-columns: repeat(3, 1fr); max-height: 360px; }
  .reveal__left--placeholder { margin: 12px; padding: 10px; }
  .placeholder-title { font-size: 0.95rem; }
  .frame__caption { font-size: 0.7rem; padding: 10px 12px; }
  .feat { padding: 22px 18px; }
}

/* ----- motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
