/* ————————————————————————————————————————————————
   Mia — Clinical Luxe design system (WordPress port)
   Same tokens as the Next.js build; plain CSS, no framework.
   ———————————————————————————————————————————————— */
:root {
  --paper: #f2f4f1;
  --paper-raised: #fafbfa;
  --ink: #0f1310;
  --ink-soft: #3d4540;
  --ink-faint: #6b736e;
  --petrol: #14403c;
  --petrol-deep: #0d2c29;
  --petrol-tint: #e3ebe9;
  --amber: #e2a32b;
  --amber-deep: #c78c1a;
  --blush: #e8d5ce;
  --line: #dde2df;
  --danger: #a33b2b;

  --font-display: "Bricolage Grotesque", ui-sans-serif, sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, sans-serif;
  --font-data: "Martian Mono", ui-monospace, monospace;

  --radius-xs: 2px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-bubble: 18px;

  --shadow-card: 0 1px 2px rgb(15 19 16 / 0.04), 0 4px 16px rgb(15 19 16 / 0.05);
  --shadow-sheet: 0 -8px 40px rgb(15 19 16 / 0.14);
  --shadow-pop: 0 12px 48px rgb(15 19 16 / 0.18);

  --duration-quick: 160ms;
  --duration-base: 260ms;
  --duration-slow: 420ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --gap: 0.75rem;
}
@media (min-width: 768px) {
  :root {
    --gap: 1.25rem;
  }
}

/* ————— reset (minimal) ————— */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body,
h1,
h2,
h3,
p,
ul,
figure,
blockquote {
  margin: 0;
}
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}
button,
input,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  padding: 0;
  list-style: none;
}

/* ————— base ————— */
html {
  scroll-behavior: smooth;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 4rem; /* room for mobile bottom nav */
}
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}
::selection {
  background: var(--petrol);
  color: var(--paper);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 700;
}
:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
.data {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 768px) {
  .wrap {
    padding-inline: 1.5rem;
  }
}
.section {
  margin-top: 3rem;
}
.section-title {
  font-size: 1.5rem;
  margin-top: 0.25rem;
}
@media (min-width: 768px) {
  .section-title {
    font-size: 1.875rem;
  }
}
.eyebrow {
  color: var(--petrol);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.see-all {
  font-size: 0.875rem;
  color: var(--petrol);
}
.see-all:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-title {
  font-size: 1.875rem;
  margin-top: 0.25rem;
}

/* ————— buttons & chips ————— */
.btn-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-quick);
}
.btn-amber:hover {
  background: var(--amber-deep);
}
.btn-petrol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--petrol);
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--duration-quick);
}
.btn-petrol:hover {
  background: var(--petrol-deep);
}
.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-size: 0.75rem;
  cursor: pointer;
  transition:
    border-color var(--duration-quick),
    background var(--duration-quick),
    color var(--duration-quick);
}
.chip:hover {
  border-color: var(--petrol);
}
.chip.is-active {
  border-color: var(--petrol);
  background: var(--petrol);
  color: var(--paper);
}
.chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-top: 1rem;
  padding-bottom: 0.25rem;
}
@media (min-width: 768px) {
  .chips {
    flex-wrap: wrap;
    overflow: visible;
  }
}
.tag-sponsored {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-xs);
  background: rgb(250 251 250 / 0.9);
  color: var(--ink-soft);
  font-size: 0.5625rem;
  backdrop-filter: blur(4px);
}

/* ————— header ————— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(242 244 241 / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.wordmark-dot {
  color: var(--amber);
}
.primary-nav ul {
  display: none;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .primary-nav ul {
    display: flex;
  }
}
.primary-nav a {
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.primary-nav a:hover {
  color: var(--ink);
}
.btn-ask {
  min-height: 2.25rem;
  padding: 0 1.125rem;
}

/* ————— hero ————— */
.hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper-raised), var(--paper));
}
.hero-grid {
  display: grid;
  gap: 2rem;
  padding-block: 2rem 2.5rem;
}
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr minmax(360px, 420px);
    align-items: start;
    padding-block: 3rem 3.5rem;
  }
}
.hero-id {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}
.hero-tag {
  color: var(--ink-faint);
}
.hero-headline {
  margin-top: 1.25rem;
  font-size: 2rem;
  line-height: 1.1;
}
@media (min-width: 768px) {
  .hero-headline {
    font-size: 2.75rem;
  }
}
.hero-sub {
  margin-top: 0.75rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.hero-portrait {
  display: none;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px) {
  .hero-portrait {
    display: block;
  }
}
.hero-portrait img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}
.hero-portrait figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1rem;
  background: linear-gradient(0deg, rgb(15 19 16 / 0.65), transparent);
  color: var(--paper);
}
.hero-portrait-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}
.avatar {
  display: inline-flex;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid var(--petrol);
  flex-shrink: 0;
}
.avatar img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.avatar-lg {
  width: 3rem;
  height: 3rem;
}
.avatar-sm {
  width: 2.25rem;
  height: 2.25rem;
  border-width: 1px;
}

/* ————— chat panel ————— */
.chat-panel {
  margin-top: 1.5rem;
  scroll-margin-top: 4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1rem;
  min-height: 14rem;
  max-height: 26rem;
  overflow-y: auto;
}
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 0.625rem;
}
.chat-row-user {
  justify-content: flex-end;
}
.chat-bubble {
  max-width: 85%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-bubble);
  font-size: 0.9375rem;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.chat-bubble-assistant {
  background: var(--petrol);
  color: var(--paper);
  border-bottom-left-radius: var(--radius-xs);
}
.chat-bubble-user {
  background: var(--blush);
  color: var(--ink);
  border-bottom-right-radius: var(--radius-xs);
}
.chat-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 999px;
  background: rgb(250 251 250 / 0.7);
  animation: chat-blink 1.2s infinite both;
}
.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes chat-blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}
.chat-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 0.75rem;
}
.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  padding: 0.75rem;
}
.chat-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  max-height: 120px;
}
.chat-input:focus {
  outline: none;
  border-color: var(--petrol);
}
.chat-send {
  min-height: 2.625rem;
}
.chat-send:disabled {
  opacity: 0.5;
  cursor: default;
}
.chat-disclaimer {
  padding: 0 1rem 0.75rem;
  color: var(--ink-faint);
  font-size: 0.5625rem;
}
.chat-noscript {
  padding: 1rem;
  color: var(--ink-soft);
}

/* product card inside a chat bubble */
.chat-product-card {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.625rem;
  margin: 0.625rem 0;
  padding: 0.625rem;
  border-radius: var(--radius-md);
  background: var(--paper-raised);
  color: var(--ink);
  white-space: normal;
  box-shadow: var(--shadow-card);
}
.chat-product-media img {
  width: 4.5rem;
  height: 5.5rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--petrol-tint);
}
.chat-product-body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.chat-product-brand {
  color: var(--ink-faint);
}
.chat-product-name {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
}
.chat-product-strip {
  color: var(--petrol);
  font-size: 0.5625rem;
}
.chat-product-price {
  color: var(--ink-soft);
}
.chat-product-cta {
  grid-column: 1 / -1;
  min-height: 2.25rem;
  font-size: 0.8125rem;
}

/* ————— feed & product cards ————— */
.feed-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  margin-top: 1.25rem;
}
@media (min-width: 768px) {
  .feed-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.post-card,
.product-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper-raised);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--duration-base);
}
.post-card:hover,
.product-card:hover {
  box-shadow: var(--shadow-pop);
}
.post-card-media,
.product-card-media {
  position: relative;
  display: block;
  background: var(--blush);
}
.product-card-media {
  background: var(--petrol-tint);
}
.post-card-media img,
.product-card-media img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}
.post-card:hover img,
.product-card:hover img {
  transform: scale(1.02);
}
.post-card-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(15 19 16 / 0.5);
  color: var(--paper);
  backdrop-filter: blur(4px);
  font-size: 0.875rem;
}
.post-card-body,
.product-card-body {
  display: block;
  padding: 0.75rem;
}
.post-card-caption {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.post-card-shop {
  display: block;
  margin-top: 0.5rem;
  color: var(--petrol);
}
.post-card-ig {
  display: block;
  margin-top: 0.5rem;
  color: var(--ink-faint);
}
.formulation-strip {
  display: block;
  padding: 0.375rem 0.75rem;
  background: var(--petrol-tint);
  color: var(--petrol);
  font-size: 0.5625rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card-brand {
  color: var(--ink-faint);
}
.product-card-name {
  display: block;
  margin-top: 0.125rem;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
}
.product-card-price {
  display: block;
  margin-top: 0.375rem;
  color: var(--petrol);
}

/* ————— carousel ————— */
.carousel {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  margin-top: 1.25rem;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.25rem;
}
.carousel-item {
  flex: 0 0 62vw;
  max-width: 240px;
  scroll-snap-align: start;
}

/* ————— PDP ————— */
.breadcrumb {
  color: var(--ink-faint);
}
.breadcrumb a:hover {
  color: var(--ink);
}
.pdp-grid {
  display: grid;
  gap: 2rem;
  margin-top: 1rem;
}
@media (min-width: 768px) {
  .pdp-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.pdp-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--petrol-tint);
}
.pdp-media img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
}
.pdp-brand {
  color: var(--ink-faint);
}
.pdp-name {
  margin-top: 0.25rem;
  font-size: 1.875rem;
  line-height: 1.15;
}
.pdp-price {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  color: var(--petrol);
  text-transform: none;
}
.pdp-rating {
  margin-top: 0.25rem;
  color: var(--ink-faint);
}
.pdp-strip {
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.pdp-strip .formulation-strip {
  white-space: normal;
  font-size: 0.6875rem;
  padding: 0.625rem 0.875rem;
}
.pdp-description {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.pdp-why {
  margin-top: 1.25rem;
  padding: 1rem;
  border-left: 4px solid var(--petrol);
  border-radius: var(--radius-md);
  background: rgb(227 235 233 / 0.5);
}
.pdp-why .data {
  color: var(--petrol);
}
.pdp-why p + p {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
}
.pdp-proscons {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}
@media (min-width: 640px) {
  .pdp-proscons {
    grid-template-columns: 1fr 1fr;
  }
}
.pdp-proscons .data {
  color: var(--ink-faint);
}
.pdp-proscons ul {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.pdp-proscons li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.pdp-proscons li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}
.pdp-proscons li.pro::before {
  content: "✓";
  color: var(--petrol);
}
.pdp-proscons li.con::before {
  content: "—";
  color: var(--amber-deep);
}
.pdp-cta {
  margin-top: 1.75rem;
  width: 100%;
}
@media (min-width: 640px) {
  .pdp-cta {
    width: auto;
  }
}
.pdp-affiliate-note {
  margin-top: 0.5rem;
  font-size: 0.625rem;
  color: var(--ink-faint);
}

/* ————— discover ————— */
.discover-search {
  display: flex;
  gap: 0.5rem;
  max-width: 28rem;
  margin-top: 1.25rem;
}
.discover-search input {
  flex: 1;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-raised);
  font-size: 0.875rem;
}
.discover-search input:focus {
  outline: none;
  border-color: var(--petrol);
}
.empty-state {
  max-width: 28rem;
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-raised);
  text-align: center;
}
.empty-title {
  font-family: var(--font-display);
  font-weight: 600;
}
.empty-state p + p {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.empty-state a {
  color: var(--petrol);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ————— footer & bottom nav ————— */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: var(--paper-raised);
  padding-block: 2rem 2.5rem;
}
.footer-note {
  margin-top: 0.75rem;
  max-width: 40rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--ink-faint);
}
.footer-meta {
  margin-top: 1.25rem;
  color: var(--ink-faint);
}
.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  border-top: 1px solid var(--line);
  background: rgb(250 251 250 / 0.95);
  backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}
.bottom-nav a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  font-size: 0.6875rem;
  color: var(--ink-faint);
}
.bottom-nav a[aria-current="page"] {
  color: var(--petrol);
  font-weight: 600;
}
.bottom-nav-chat {
  color: var(--paper) !important;
  background: var(--petrol);
  font-weight: 600;
}

/* ————— animations & a11y ————— */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.anim-enter {
  animation: fade-up var(--duration-slow) var(--ease-out) both;
}
.anim-enter-2 {
  animation: fade-up var(--duration-slow) var(--ease-out) 80ms both;
}
.anim-enter-3 {
  animation: fade-up var(--duration-slow) var(--ease-out) 160ms both;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
