/* ==========================================================================
   Studio Pahh — Cílios · Design system
   Paleta: bege palha + preto, com acento dourado discreto.
   Tipografia: Cormorant Garamond (títulos) + Jost (texto).
   ========================================================================== */

:root {
  /* Cores — claro (palha) */
  --bg:        #f1e9d4;   /* fundo palha */
  --bg-2:      #ece2c8;   /* palha mais fechado */
  --surface:   #fbf6ea;   /* cartões */
  --surface-2: #f6efdd;
  --ink:       #1b1712;   /* preto quente (texto) */
  --ink-soft:  #4e453a;
  --muted:     #7a6f5d;   /* texto secundário */
  --line:      #e0d4b6;   /* linhas */
  --line-soft: #ebe1c9;
  --accent:    #171310;   /* preto — botões / destaques */
  --accent-ink:#f6efdd;   /* texto sobre preto */
  --gold:      #a9863f;   /* dourado discreto */
  --gold-soft: #c6a45e;
  --ok:        #3f7d53;
  --ok-bg:     #e6efe4;
  --warn:      #9a6b23;
  --warn-bg:   #f3e9d2;
  --danger:    #a6432f;
  --danger-bg: #f3e1da;
  --shadow:    0 1px 2px rgba(27,23,18,.05), 0 10px 34px -18px rgba(27,23,18,.35);
  --radius:    16px;
  --radius-sm: 11px;
  --maxw:      1120px;

  --font-display: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #15120c;
    --bg-2:      #1b1710;
    --surface:   #211c13;
    --surface-2: #272015;
    --ink:       #f2e9d4;
    --ink-soft:  #cfc3a6;
    --muted:     #a99a7d;
    --line:      #352c1d;
    --line-soft: #2b2417;
    --accent:    #e8d6a7;   /* no escuro, o acento vira palha clara */
    --accent-ink:#1a1610;
    --gold:      #d8b96a;
    --gold-soft: #e0c889;
    --ok:        #86c79a; --ok-bg:#1e2a20;
    --warn:      #e0b163; --warn-bg:#2b2413;
    --danger:    #e08c78; --danger-bg:#2e1b16;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 16px 40px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:#15120c; --bg-2:#1b1710; --surface:#211c13; --surface-2:#272015;
  --ink:#f2e9d4; --ink-soft:#cfc3a6; --muted:#a99a7d; --line:#352c1d; --line-soft:#2b2417;
  --accent:#e8d6a7; --accent-ink:#1a1610; --gold:#d8b96a; --gold-soft:#e0c889;
  --ok:#86c79a; --ok-bg:#1e2a20; --warn:#e0b163; --warn-bg:#2b2413;
  --danger:#e08c78; --danger-bg:#2e1b16;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 16px 40px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; margin: 0; line-height: 1.08; text-wrap: balance; letter-spacing: .005em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px)); }

.eyebrow { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .28em;
  font-size: .72rem; font-weight: 500; color: var(--gold); margin: 0 0 .7rem; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { max-width: 42ch; margin-bottom: 2.2rem; }
.section-head h2 { font-size: clamp(2rem, 5vw, 3rem); }
.section-head p { color: var(--muted); margin-top: .6rem; font-size: 1.02rem; }

/* Botões */
.btn { font-family: var(--font-body); font-weight: 500; font-size: 1rem;
  border: 1px solid transparent; border-radius: 999px; padding: .85rem 1.5rem;
  cursor: pointer; display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; transition: transform .15s ease, background .2s, color .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #000; }
:root[data-theme="dark"] .btn-primary:hover, :root:not([data-theme="light"]) .btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-wa { background: #1fa855; color: #fff; }
.btn-wa:hover { background: #178a45; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Header ===== */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  background: var(--bg); z-index: 21; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 1rem; }
.brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; }
.brand b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: .01em; }
.brand span { font-size: .68rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: .95rem; }
.nav-links a:hover { color: var(--gold); }
.nav-links .btn { color: var(--accent-ink); }
@media (max-width: 760px){ .nav-links a:not(.btn){ display:none; } }

/* ===== Hero (foto ao lado/topo, texto sempre na área palha) ===== */
.hero { position: relative; overflow: hidden; }
/* Foto: metade direita no desktop; o degradê funde a borda esquerda no palha */
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 54%;
  background-image: var(--hero-img, none);
  background-size: cover; background-position: center 22%; background-repeat: no-repeat; }
.hero-photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 22%,
    transparent 55%); }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center;
  min-height: clamp(440px, 62vh, 580px); padding-block: clamp(2.4rem, 6vw, 4rem); }
.hero-copy { max-width: 33rem; }
.hero h1 { font-size: clamp(2.7rem, 7.5vw, 4.8rem); font-weight: 600; letter-spacing: -0.01em; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lead { color: var(--ink-soft); font-size: 1.12rem; max-width: 40ch; margin-top: 1.1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-meta { display: flex; gap: 1.6rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-meta b { font-family: var(--font-display); font-size: 1.7rem; display: block; line-height: 1; }
.hero-meta span { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
@media (max-width: 860px){
  /* Empilha: foto em cima (rosto livre), texto embaixo no palha */
  .hero { display: flex; flex-direction: column; }
  .hero-photo { position: relative; width: 100%; height: 48vh; min-height: 300px; max-height: 440px;
    background-position: center 18%; }
  .hero-photo::after { background: linear-gradient(180deg, transparent 62%, var(--bg) 100%); }
  .hero-inner { min-height: 0; padding-top: 1.4rem; padding-bottom: .5rem; }
  .hero-meta { gap: 1.1rem; }
  .hero-meta b { font-size: 1.4rem; }
}

/* ===== Galeria ===== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.gallery .tile { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--line); position: relative; background: var(--surface-2); }
.gallery .tile img { width: 100%; height: 100%; object-fit: cover; }
.gallery .ph { position:absolute; inset:0; display:grid; place-items:center; text-align:center;
  color: var(--muted); font-size: .72rem; padding: .5rem;
  background: radial-gradient(90% 90% at 30% 20%, color-mix(in srgb,var(--gold) 16%, transparent), transparent 60%),
    linear-gradient(140deg, var(--surface), var(--bg-2)); }
.gallery .tile.big { grid-row: span 2; grid-column: span 2; aspect-ratio: auto; }
@media (max-width: 720px){ .gallery { grid-template-columns: repeat(2,1fr); } .gallery .tile.big{ grid-column: span 2; aspect-ratio: 16/10; grid-row:auto; } }

/* ===== Serviços / Preços ===== */
.svc-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.svc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.svc h3 { font-size: 1.5rem; }
.svc .desc { color: var(--muted); font-size: .92rem; margin-top: .25rem; }
.svc .dur { font-size: .78rem; color: var(--gold); letter-spacing: .04em; margin-top: .5rem; text-transform: uppercase; }
.svc .price { font-family: var(--font-display); font-size: 1.9rem; white-space: nowrap; }
.svc .price small { font-size: .8rem; color: var(--muted); font-family: var(--font-body); display:block; text-align:right; }
@media (max-width: 680px){ .svc-list { grid-template-columns: 1fr; } }
/* Galeria por embeds do Instagram */
.ig-embeds { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.ig-embeds .instagram-media { flex: 1 1 320px; max-width: 400px; }
/* Caixa de pagamento (Pix / cartão / link) */
.paybox { display: grid; gap: .8rem; }
.paybox-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.paybox-title { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); margin-bottom: .5rem; }
.paybox-item .row { display: flex; justify-content: space-between; gap: 1rem; padding: .22rem 0; }
.paybox-item .row span { color: var(--muted); }
.pixkey { font-family: var(--font-body); letter-spacing: .02em; word-break: break-all; text-align: right; }
/* Compacto no celular: 3 serviços + "Ver mais" (sem arrastar pro lado) */
.svc-toggle { display: none; }
@media (max-width: 680px){
  .svc-list .svc-extra { display: none; }
  .svc-list.show-all .svc-extra { display: flex; }
  .svc-toggle { display: block; width: 100%; max-width: 320px; margin: 1.1rem auto 0; }
}

.pay { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.pay span { border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: .45rem 1rem; font-size: .88rem; color: var(--ink-soft); }

/* ===== Agendamento ===== */
.book { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(1.4rem, 3vw, 2.2rem); }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 820px){ .book-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.field { margin-bottom: 1.05rem; }
.field label { display:block; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .4rem; }
.input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: .8rem .9rem; }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
.help { font-size: .82rem; color: var(--muted); margin-top: .35rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 10px;
  padding: .6rem .75rem; font-size: .92rem; cursor: pointer; min-width: 4.3rem; text-align: center;
  transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--gold-soft); }
.chip.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.off { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.chip.off:hover { border-color: var(--line); }

.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px,1fr)); gap: .45rem; }
.day { border: 1px solid var(--line); background: var(--bg); border-radius: 11px; padding: .5rem .2rem;
  text-align: center; cursor: pointer; transition: all .15s; }
.day .dow { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day .dnum { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; }
.day .dmon { font-size: .62rem; color: var(--muted); text-transform: uppercase; }
.day:hover { border-color: var(--gold-soft); }
.day.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day.sel .dow, .day.sel .dmon { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.day.off { opacity: .35; cursor: not-allowed; }

.summary { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px;
  padding: 1rem 1.1rem; font-size: .95rem; }
.summary .row { display:flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; }
.summary .row b { font-family: var(--font-display); font-size: 1.05rem; }
.summary .row b.pixkey { font-family: var(--font-body); font-size: .92rem; word-break: break-all; text-align: right; }
.agree { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0 .2rem; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.agree input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--gold); flex: none; }

/* Alertas / banners */
.notice { border-radius: 12px; padding: .85rem 1.1rem; font-size: .92rem; border: 1px solid var(--line); }
.notice b { font-weight: 500; }
.notice.info { background: var(--surface-2); }
.notice.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); color: var(--ok); }
.notice.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); color: var(--warn); }
.notice.danger { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); color: var(--danger); }

/* ===== Instagram ===== */
.ig-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: .7rem; margin-top: 1.5rem; }
.ig-grid a { aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted);
  background: radial-gradient(90% 90% at 70% 10%, color-mix(in srgb,var(--gold) 18%, transparent), transparent 60%),
    linear-gradient(150deg, var(--surface), var(--bg-2)); }
.ig-grid a:hover { border-color: var(--gold); }
@media (max-width: 720px){ .ig-grid { grid-template-columns: repeat(3,1fr); } }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-2); padding-block: 2.6rem; margin-top: 2rem; }
.foot-grid { display:flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.foot-grid a { color: var(--ink-soft); text-decoration: none; }
.foot-grid a:hover { color: var(--gold); }
.foot-col h4 { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--muted); margin-bottom: .6rem; }
.foot-col div { display: flex; flex-direction: column; gap: .35rem; font-size: .96rem; }
.copy { color: var(--muted); font-size: .82rem; margin-top: 1.8rem; }

/* ===== Painel (admin) ===== */
.admin-shell { min-height: 100%; }
.admin-top { position: sticky; top: env(safe-area-inset-top,0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft); }
.admin-top .nav { height: 60px; }
.tabbar { display:flex; gap: .3rem; overflow-x: auto; padding-bottom: .4rem; }
.tabbar button { border: 1px solid transparent; background: transparent; color: var(--muted);
  font-family: var(--font-body); font-size: .95rem; padding: .5rem .9rem; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tabbar button.active { background: var(--accent); color: var(--accent-ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px){ .grid-2 { grid-template-columns: 1fr; } }

.booking-item { display:flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: .9rem 0; border-bottom: 1px solid var(--line-soft); }
.booking-item:last-child { border-bottom: none; }
.booking-item .when { text-align:center; min-width: 58px; }
.booking-item .when .d { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.booking-item .when .t { font-size: .78rem; color: var(--gold); }
.booking-item .who b { display:block; }
.booking-item .who span { color: var(--muted); font-size: .88rem; }
.pill { font-size: .72rem; padding: .2rem .6rem; border-radius: 999px; border:1px solid var(--line); text-transform: uppercase; letter-spacing: .05em; }
.pill.pending { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.confirmed { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.done { background: var(--surface-2); color: var(--muted); }
.pill.cancelled { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 2rem 0; }
.login-card { width: 100%; max-width: 380px; }

.row-flex { display:flex; gap:.5rem; flex-wrap: wrap; align-items:center; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.hidden, [hidden] { display: none !important; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--gold);
  border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ * { animation: none !important; transition: none !important; } }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom,0px)); transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink); padding: .8rem 1.2rem; border-radius: 999px;
  box-shadow: var(--shadow); z-index: 50; font-size: .95rem; max-width: 90vw; }

/* escolha: pagar o sinal ou o valor total */
.paychoice { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .6rem 0 .2rem; }
.paych { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left;
  padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
  cursor: pointer; font: inherit; color: var(--ink); }
.paych span { font-size: .85rem; color: var(--ink-soft); }
.paych b { color: var(--gold); font-size: 1.05rem; }
.paych.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; background: #fff; }
@media (max-width: 520px) { .paychoice { grid-template-columns: 1fr; } }
