/* clearskinlabs — pharmaceutical minimalism */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,300;1,6..72,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg: #ffffff;
  --bg-warm: #f7f6f3;
  --bg-card: #ffffff;
  --fg: #1a1a1a;
  --fg-body: #2f3437;
  --fg-muted: #787774;
  --fg-faint: #a3a09c;
  --border: #eaeaea;
  --border-soft: rgba(0,0,0,0.06);
  --accent: #2f3437;
  --accent-warm: #c9b99a;
  --radius: 8px;
  --radius-sm: 4px;
  --gutter: 1rem;
  --max-w: 1200px;
  --font-body: 'DM Sans', 'Helvetica Neue', system-ui, sans-serif;
  --font-display: 'Newsreader', 'Georgia', serif;
  --font-mono: 'SF Mono', 'Menlo', monospace;
  --nav-h: 64px;
  --section-py: clamp(80px, 10vw, 140px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--fg-body);
  background: var(--bg);
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol { list-style: none; }

/* ─── Reveal animation ─── */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Navigation ─── */

.nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-text {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--fg);
}
.brand-text strong {
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--fg);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-muted);
  transition: color 0.2s;
  position: relative;
}
.cart-btn:hover { color: var(--fg); }

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: var(--fg);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  border-radius: 9999px;
  padding: 0 5px;
}

/* ─── Hero ─── */

.hero {
  padding: calc(var(--nav-h) + 60px) var(--gutter) 0;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 85vh;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 20px;
}

.hero-line {
  width: 32px;
  height: 1px;
  background: var(--fg-faint);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: italic;
  font-weight: 300;
}

.hero-sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-muted);
  max-width: 420px;
  margin-bottom: 32px;
}

.hero-img {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-img img {
  max-height: 520px;
  width: auto;
  object-fit: contain;
}

.trust-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.trust-row li {
  font-size: 12px;
  font-weight: 400;
  color: var(--fg-faint);
  letter-spacing: 0.02em;
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--fg);
  color: #fff;
}
.btn-primary:hover {
  background: #333;
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--fg-muted);
}
.btn-block {
  width: 100%;
  justify-content: center;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-ico {
  display: inline-flex;
}

/* ─── Sections ─── */

.section {
  padding: var(--section-py) var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-border {
  border-top: 1px solid var(--border);
}

.section-head {
  text-align: center;
  margin-bottom: 60px;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 12px;
}

.section-lead {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ─── Product Grid ─── */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.grid-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--fg-faint);
  font-size: 14px;
  background: var(--bg);
}

.product-card {
  background: var(--bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: background 0.3s;
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  background: var(--bg-warm);
}

.product-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--bg-warm);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin-bottom: 20px;
}
.product-card-img img {
  max-height: 200px;
  width: auto;
  object-fit: contain;
  transition: transform 0.4s var(--ease-out);
}
.product-card:hover .product-card-img img {
  transform: scale(1.03);
}

.product-card-divider {
  width: 24px;
  height: 1px;
  background: var(--fg-faint);
  margin-bottom: 12px;
}

.product-card-name {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.product-card-subtitle {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
}

.product-card-price {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.product-card-add {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: var(--bg);
  flex-shrink: 0;
}
.product-card-add:hover {
  background: var(--fg);
  border-color: var(--fg);
  color: #fff;
}
.product-card-add svg {
  width: 14px;
  height: 14px;
}

/* ─── Product Detail (Overlay) ─── */

.product-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.product-detail-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.product-detail {
  background: var(--bg);
  border-radius: var(--radius);
  max-width: 820px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateY(16px);
  transition: transform 0.4s var(--ease-out);
}
.product-detail-overlay.open .product-detail {
  transform: translateY(0);
}

.product-detail-img {
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-warm);
  border-radius: var(--radius) 0 0 var(--radius);
}
.product-detail-img img {
  max-height: 320px;
  width: auto;
}

.product-detail-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.product-detail-close {
  align-self: flex-end;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  transition: background 0.2s;
}
.product-detail-close:hover {
  background: var(--bg-warm);
}

.product-detail-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 4px;
}

.product-detail-subtitle {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.product-detail-tagline {
  font-size: 12px;
  color: var(--fg-faint);
  margin-bottom: 20px;
}

.product-detail-line {
  width: 24px;
  height: 1px;
  background: var(--fg-faint);
  margin-bottom: 20px;
}

.product-detail-specs {
  margin-bottom: 24px;
}
.product-detail-specs li {
  font-size: 13px;
  color: var(--fg-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
  padding-left: 12px;
  position: relative;
}
.product-detail-specs li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--fg-faint);
  transform: translateY(-50%);
}

.product-detail-price {
  font-size: 20px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 20px;
}

.product-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* ─── Features (Bento) ─── */

.feature-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feat {
  background: var(--bg);
  padding: 40px 32px;
}
.feat h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 8px;
}
.feat p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}
.feat-wide {
  grid-column: span 2;
}
.feat-full {
  grid-column: 1 / -1;
}

/* ─── Cart Drawer ─── */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.drawer-scrim.open {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 151;
  width: 400px;
  max-width: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
}
.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.drawer-head h2 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: background 0.2s;
}
.icon-btn:hover {
  background: var(--bg-warm);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-empty {
  text-align: center;
  color: var(--fg-faint);
  font-size: 14px;
  padding: 40px 0;
}

.cart-lines {
  display: flex;
  flex-direction: column;
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.cart-line-img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.cart-line-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-line-info {
  flex: 1;
  min-width: 0;
}
.cart-line-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-line-meta {
  font-size: 12px;
  color: var(--fg-faint);
}

.cart-line-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cart-line-qty button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--fg-muted);
  transition: all 0.15s;
}
.cart-line-qty button:hover {
  background: var(--fg);
  color: #fff;
  border-color: var(--fg);
}
.cart-line-qty span {
  font-size: 13px;
  font-weight: 500;
  min-width: 16px;
  text-align: center;
}

.drawer-foot {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cart-total span {
  font-size: 13px;
  color: var(--fg-muted);
}
.cart-total strong {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
}

.cart-note {
  font-size: 11px;
  color: var(--fg-faint);
  margin-bottom: 16px;
  line-height: 1.5;
}

.cart-error {
  font-size: 12px;
  color: #9f2f2d;
  background: #fdebec;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* ─── Footer ─── */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px var(--gutter);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  color: var(--fg-muted);
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--fg);
}

.footer-fine {
  font-size: 12px;
  color: var(--fg-faint);
  line-height: 1.5;
}

/* ─── Page templates (about, contact, faq) ─── */

.page-hero {
  padding: calc(var(--nav-h) + 60px) var(--gutter) 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}
.page-hero .hero-title {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 16px;
}

.page-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section-py);
}
.page-content p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-muted);
  margin-bottom: 20px;
}
.page-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--fg);
  margin: 40px 0 12px;
}

/* ─── Contact form ─── */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.form-grid .form-field-full {
  grid-column: 1 / -1;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.2s;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--fg-muted);
}
.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

/* ─── FAQ accordion ─── */

.faq-list {
  max-width: 680px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
}
.faq-toggle {
  font-size: 18px;
  color: var(--fg-faint);
  transition: transform 0.2s;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-out);
}
.faq-answer-inner {
  padding: 0 0 20px;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* ─── Success / Cancel pages ─── */

.result-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter);
  text-align: center;
}
.result-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.result-icon-success {
  background: #edf3ec;
  color: #346538;
}
.result-icon-cancel {
  background: #fdebec;
  color: #9f2f2d;
}
.result-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  color: var(--fg);
  margin-bottom: 8px;
}
.result-text {
  font-size: 14px;
  color: var(--fg-muted);
  max-width: 400px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.result-ref {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 4px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.result-redirect {
  font-size: 13px;
  color: var(--fg-faint);
  margin-bottom: 24px;
}
.result-actions {
  margin-top: 8px;
}
.result-page .hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 300;
  color: var(--fg);
  margin-bottom: 12px;
}

/* ─── Mobile ─── */

@media (max-width: 768px) {
  :root {
    --gutter: 16px;
    --nav-h: 56px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 40px);
    gap: 32px;
    text-align: center;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-img { order: -1; }
  .hero-img img { max-height: 320px; }
  .hero .hero-cta { justify-content: center; }
  .hero-line { margin-left: auto; margin-right: auto; }

  .trust-row {
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-bento {
    grid-template-columns: 1fr;
  }
  .feat-wide {
    grid-column: span 1;
  }

  .product-detail {
    grid-template-columns: 1fr;
  }
  .product-detail-img {
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 32px;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .drawer {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .product-card {
    padding: 24px;
  }
}
