/* Estetico Café — Design System */
:root {
  --bg: #f2f2f2;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f5f5f4;
  --text: #1c1917;
  --text-muted: #78716c;
  --text-subtle: #a8a29e;
  --accent: #1c1917;
  --accent-invert: #ffffff;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --radius: 2rem;
  --radius-md: 1rem;
  --radius-sm: 0.75rem;
  --shadow: 0 10px 40px rgba(28, 25, 23, 0.08);
  --nav-height: 64px;
  --bottom-nav-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.15);
  --toast-bg: #1c1917;
  --toast-text: #fff;
  --overlay: rgba(28, 25, 23, 0.55);
  --focus: #1c1917;
  --success: #166534;
  --danger: #991b1b;
}

[data-theme="dark"] {
  --bg: #0c0a09;
  --bg-elevated: #1c1917;
  --surface: #1c1917;
  --surface-muted: #292524;
  --text: #fafaf9;
  --text-muted: #a8a29e;
  --text-subtle: #78716c;
  --accent: #fafaf9;
  --accent-invert: #1c1917;
  --border: #292524;
  --border-strong: #44403c;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --toast-bg: #fafaf9;
  --toast-text: #1c1917;
  --overlay: rgba(0, 0, 0, 0.7);
  --focus: #fafaf9;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.page-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.5rem;
}

@media (min-width: 640px) {
  .page-shell {
    padding: 1rem;
  }
}

@media (min-width: 1024px) {
  .page-shell {
    padding: 1.5rem;
  }
}

/* Theme-aware helpers (use with Tailwind) */
.bg-app { background: var(--bg) !important; }
.bg-surface { background: var(--surface) !important; }
.bg-muted { background: var(--surface-muted) !important; }
.text-app { color: var(--text) !important; }
.text-muted { color: var(--text-muted) !important; }
.border-app { border-color: var(--border) !important; }
.card-surface {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Site header (inner pages) */
.site-header {
  position: sticky;
  top: 0.5rem;
  z-index: 40;
  margin-bottom: 1rem;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 9999px;
  box-shadow: var(--shadow);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  min-height: 44px;
}

.site-logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 0.6rem;
  background: var(--accent);
  color: var(--accent-invert);
  display: grid;
  place-items: center;
}

.site-nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--surface-muted);
  border-radius: 9999px;
}

@media (min-width: 768px) {
  .site-nav-desktop {
    display: flex;
  }
}

.site-nav-desktop a {
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--text-muted);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.site-nav-desktop a:hover,
.site-nav-desktop a.is-active {
  background: var(--surface);
  color: var(--text);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-invert);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-block {
  width: 100%;
}

.chip-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.chip {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
}

.chip.is-active,
.chip:hover {
  background: var(--accent);
  color: var(--accent-invert);
  border-color: var(--accent);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

.field .error {
  font-size: 0.75rem;
  color: var(--danger);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.5rem + var(--safe-bottom));
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.15rem;
  padding: 0.45rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav a,
.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: 0.9rem;
  cursor: pointer;
}

.bottom-nav a.is-active,
.bottom-nav button.is-active {
  color: var(--text);
  background: var(--surface-muted);
}

/* More sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  left: 0.5rem;
  right: 0.5rem;
  bottom: calc(0.5rem + var(--safe-bottom));
  z-index: 70;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.25rem;
  transform: translateY(110%);
  transition: transform 0.3s ease;
  max-height: 75vh;
  overflow: auto;
}

.sheet.is-open {
  transform: translateY(0);
}

.sheet__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.sheet__links {
  display: grid;
  gap: 0.35rem;
}

.sheet__links a,
.sheet__links button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  border-radius: 0.9rem;
  border: 0;
  background: var(--surface-muted);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  width: 100%;
}

/* Toast */
.toast-stack {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 0.9rem 1.1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stepper */
.stepper {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.stepper__dot {
  flex: 1;
  height: 4px;
  border-radius: 9999px;
  background: var(--border);
}

.stepper__dot.is-done,
.stepper__dot.is-current {
  background: var(--accent);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.is-open,
.apply-modal.is-open {
  display: flex;
}

.apply-modal {
  display: none;
  background: var(--overlay);
}

.lightbox img {
  max-height: 85vh;
  max-width: 95vw;
  border-radius: 1rem;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Accordion */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  min-height: 56px;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.accordion-panel {
  display: none;
  padding: 0 1.15rem 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.accordion-item.is-open .accordion-panel {
  display: block;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:active { transform: none; }
}

/* Page hero (inner) */
.page-hero {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.75rem 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .page-hero {
    padding: 2.5rem 2rem;
  }
}

.page-hero__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 36rem;
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 1.5rem;
}

.price {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--surface-muted);
  color: var(--text-muted);
}

.site-footer {
  margin-top: 3rem;
  padding: 2rem 1rem 1rem;
  border-top: 1px solid var(--border);
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

.site-footer h4 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

.site-footer__credit {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.site-footer__credit a {
  color: var(--text-muted);
  font-weight: 600;
}

/* Chips/pills sitting on photos — always light surface + dark text */
.overlay-chip {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  color: #1c1917;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.overlay-chip__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #78716c;
}

.overlay-chip__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1c1917;
}

.overlay-pill {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: #1c1917;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Dark mode: remap light utilities, but never touch photo overlays */
[data-theme="dark"] .page-shell > section .bg-white:not(.overlay-chip):not(.overlay-pill),
[data-theme="dark"] .page-shell > section .bg-stone-50,
[data-theme="dark"] .page-shell > section .bg-stone-100,
[data-theme="dark"] .card-surface .bg-white {
  background-color: var(--surface) !important;
}

[data-theme="dark"] .page-shell > section .text-stone-900:not(.overlay-chip):not(.overlay-chip *):not(.overlay-pill),
[data-theme="dark"] .page-shell > section .text-stone-800:not(.overlay-chip):not(.overlay-chip *):not(.overlay-pill) {
  color: var(--text) !important;
}

[data-theme="dark"] .page-shell > section .text-stone-500:not(.overlay-chip):not(.overlay-chip *),
[data-theme="dark"] .page-shell > section .text-stone-400:not(.overlay-chip):not(.overlay-chip *) {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .page-shell > section .border-stone-100,
[data-theme="dark"] .page-shell > section .border-stone-200 {
  border-color: var(--border) !important;
}

[data-theme="dark"] .overlay-chip,
[data-theme="dark"] .overlay-pill {
  background: rgba(255, 255, 255, 0.94) !important;
  color: #1c1917 !important;
}

[data-theme="dark"] .overlay-chip__label {
  color: #78716c !important;
}

[data-theme="dark"] .overlay-chip__title {
  color: #1c1917 !important;
}

.hero-nav-pill a.is-active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
