/* PETAL & POLISH — Premium Nail Studio Theme
   Standalone, FastSites-portable, WCAG AA compliant
*/

:root {
  /* Base neutrals */
  --cream: #fdf8f4;
  --cream-dark: #f5efe8;
  --white: #ffffff;
  --plum: #3d2b32;
  --plum-soft: #5c4048;
  --plum-deep: #2a1c22;

  /* Accent palettes (switchable) */
  --accent-candy: #e85a8c;
  --accent-lilac: #a78bfa;
  --accent-mint: #5eead4;
  --accent-butter: #fbbf24;
  --accent-peach: #fb923c;
  --accent-berry: #be185d;

  --accent: var(--accent-candy);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --accent-text: var(--plum);

  /* Spacing (8px scale) */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;
  --s8: 128px;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --text-base: 18px;
  --leading: 1.6;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.6s;
}

/* Dark mode */
[data-mode="dark"] {
  --cream: #1a1416;
  --cream-dark: #241c1f;
  --white: #2d2326;
  --plum: #f5e6e8;
  --plum-soft: #d4c0c4;
  --plum-deep: #ffffff;
  --accent-text: #f5e6e8;
}

/* Accent overrides */
[data-accent="candy"]   { --accent: var(--accent-candy); }
[data-accent="lilac"]   { --accent: var(--accent-lilac); }
[data-accent="mint"]    { --accent: var(--accent-mint); }
[data-accent="butter"]  { --accent: var(--accent-butter); }
[data-accent="peach"]   { --accent: var(--accent-peach); }
[data-accent="berry"]   { --accent: var(--accent-berry); }

/* Layouts */
[data-layout="boxed"]    .wrap { max-width: 1120px; margin-inline: auto; }
[data-layout="centered"] .wrap { max-width: 960px; margin-inline: auto; text-align: center; }
[data-layout="minimal"]  .wrap { max-width: 800px; }
[data-layout="edge"]     .wrap { max-width: 100%; padding-inline: var(--s4); }
[data-layout="full"]     .wrap { max-width: 100%; }
[data-layout="theme"]    .wrap { max-width: 1200px; margin-inline: auto; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--plum);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, .btn {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  transition: transform 0.2s var(--ease), background 0.2s;
  min-height: 44px;
}
button:hover, .btn:hover { transform: translateY(-2px); }
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--plum) 8%, transparent);
  transition: padding 0.3s;
}
.header.shrink { padding-block: 8px; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s2) var(--s4);
  max-width: 1400px;
  margin-inline: auto;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.4rem; color: var(--plum); font-weight: 600; }
.logo svg { width: 36px; height: 36px; }
.nav-links { display: flex; gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--plum); font-size: 17px; font-weight: 500; }
.hamburger { display: none; background: none; border: none; font-size: 28px; color: var(--plum); min-width: 44px; min-height: 44px; }

/* Hero */
.hero {
  min-height: 92vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--s7) var(--s4);
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--cream) 0%, color-mix(in srgb, var(--accent) 12%, var(--cream)) 100%);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 500;
  line-height: 1.05;
  margin: 0 0 var(--s3);
  color: var(--plum-deep);
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { max-width: 520px; margin: 0 auto var(--s4); font-size: 1.15rem; color: var(--plum-soft); }

/* Sections */
.section { padding: var(--s7) var(--s4); }
.section-sm { padding: var(--s5) var(--s4); }
.wrap { max-width: 1200px; margin-inline: auto; }

/* Cards / Gallery */
.grid { display: grid; gap: var(--s3); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--white);
  border-radius: 20px;
  padding: var(--s4);
  box-shadow: 0 8px 30px color-mix(in srgb, var(--plum) 6%, transparent);
}
.price { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); }

/* Theme Control Bar */
.theme-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--white);
  color: var(--plum);
  border: 1px solid color-mix(in srgb, var(--plum) 12%, transparent);
  border-radius: 999px;
  padding: 6px 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  max-width: calc(100vw - 32px);
  overflow-x: auto;
  font-size: 13px;
  height: 44px;
}
.theme-bar button, .theme-bar select {
  background: transparent;
  border: none;
  color: inherit;
  padding: 6px 10px;
  border-radius: 999px;
  min-height: 32px;
  font-size: 12px;
}
.theme-bar button:hover, .theme-bar select:hover { background: var(--accent-soft); }
.swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
}
.swatch.active { border-color: var(--plum); }

/* Preloader */
.preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--cream);
  display: grid; place-items: center;
  transition: opacity 0.5s;
}
.preloader.done { opacity: 0; pointer-events: none; }
.brush { width: 120px; height: 40px; }

/* Mobile */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .section { padding: var(--s5) var(--s3); }
  .hero { min-height: 80vh; padding: var(--s6) var(--s3); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
