/* ============================================================
   Paulista Beauty Salon — shared design system
   Palette + type sourced from research/brand-system.md
   ============================================================ */

:root {
  --bg: #FFF7F5;
  --surface: #FFFFFF;
  --panel: #2F3A35;        /* deep secondary */
  --panel-deep: #232c28;
  --text: #2A2426;
  --muted: #786A6D;
  --primary: #B66A7A;      /* rose */
  --primary-deep: #9c5566;
  --secondary: #2F3A35;
  --accent: #D9B56F;       /* gold */
  --accent-deep: #c39a4d;
  --border: #EADDE0;
  --photo-soft: #C6B4A2;
  --focus: #B66A7A;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --radius-lg: 10px;

  --ff-display: "Playfair Display", Georgia, serif;
  --ff-body: "Manrope", system-ui, -apple-system, sans-serif;
  --ff-num: "Inter", system-ui, sans-serif;

  --shadow-sm: 0 1px 2px rgba(42,36,38,.05), 0 6px 16px rgba(42,36,38,.05);
  --shadow-md: 0 18px 50px -18px rgba(72,54,36,.32);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--primary); color: #fff; }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 600; line-height: 1.08; margin: 0; color: var(--text); letter-spacing: -.01em; }
.display { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; line-height: 1.02; letter-spacing: -.02em; }
h2.section-title { font-size: clamp(2rem, 4.6vw, 3.2rem); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); line-height: 1.6; }

.eyebrow {
  font-family: var(--ff-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: .7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow.center::after {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.serif-em { font-style: italic; color: var(--primary); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 130px); }
.section.tight { padding-block: clamp(48px, 6vw, 80px); }
.center { text-align: center; }
.measure { max-width: 60ch; }
.measure-narrow { max-width: 46ch; }
.center.measure, .center .measure { margin-inline: auto; }

.bg-panel { background: var(--panel); color: #f3efe8; }
.bg-panel h1, .bg-panel h2, .bg-panel h3 { color: #fbf6ef; }
.bg-surface { background: var(--surface); }

.hairline { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  --bg-btn: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: .98rem;
  letter-spacing: .01em;
  padding: .95em 1.7em;
  border-radius: 100px;
  background: var(--bg-btn);
  color: #fff;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), background .25s, box-shadow .25s, color .2s;
  line-height: 1;
}
.btn:hover { background: var(--primary-deep); transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(156,85,102,.7); }
.btn:active { transform: translateY(0); }
.btn .ico { width: 1.05em; height: 1.05em; }

.btn-accent { --bg-btn: var(--accent); color: var(--secondary); }
.btn-accent:hover { background: var(--accent-deep); box-shadow: 0 12px 26px -12px rgba(195,154,77,.7); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: transparent; border-color: var(--primary); color: var(--primary); box-shadow: none; }

.btn-ghost-light {
  background: transparent;
  color: #fbf6ef;
  border: 1px solid rgba(255,255,255,.32);
}
.btn-ghost-light:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.7); color: #fff; box-shadow: none; }

.btn-lg { padding: 1.1em 2.1em; font-size: 1.05rem; }

.text-link {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 600; color: var(--primary);
  border-bottom: 1px solid transparent;
  transition: gap .25s, border-color .25s;
}
.text-link:hover { gap: .8em; border-color: var(--primary); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--border); box-shadow: 0 6px 24px -18px rgba(42,36,38,.4); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { height: 52px; width: auto; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand .brand-name { font-family: var(--ff-display); font-weight: 700; font-size: 1.32rem; letter-spacing: .01em; color: var(--text); }
.brand .brand-sub { font-family: var(--ff-body); font-size: .56rem; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--primary); margin-top: .35em; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; align-items: center; gap: 1.9rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: .92rem; font-weight: 600; color: var(--text);
  position: relative; padding-block: .4em;
  transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1.5px; background: var(--primary);
  transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--primary); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.header-cta { display: flex; align-items: center; gap: .8rem; }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: 100px;
  cursor: pointer;
}
.nav-toggle span { width: 18px; height: 1.6px; background: var(--text); transition: transform .3s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* mobile nav panel */
.mobile-nav {
  position: fixed; inset: 78px 0 0 0; z-index: 55;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
  display: flex; flex-direction: column;
  padding: 2rem var(--gutter) 3rem;
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a.m-link {
  font-family: var(--ff-display); font-size: 2rem; font-weight: 600;
  padding: .55em 0; border-bottom: 1px solid var(--border); color: var(--text);
}
.mobile-nav a.m-link:hover { color: var(--primary); }
.mobile-nav .m-actions { margin-top: 2rem; display: grid; gap: .8rem; }
.mobile-nav .m-contact { margin-top: 2rem; color: var(--muted); font-size: .95rem; }
.mobile-nav .m-contact strong { color: var(--text); }
body.nav-open { overflow: hidden; }

/* ---------- Rating chip ---------- */
.rating {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--ff-num);
  font-size: .9rem; color: var(--muted);
}
.rating .stars { color: var(--accent); letter-spacing: .08em; font-size: 1rem; }
.rating .score { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.site-footer { background: var(--panel-deep); color: #d7d2c9; padding-block: clamp(56px, 7vw, 88px) 0; }
.site-footer a { color: #d7d2c9; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
.footer-brand img { height: 96px; width: auto; filter: brightness(0) invert(1); opacity: .92; }
.footer-brand p { color: #a9a39a; max-width: 34ch; margin-top: 1.2rem; }
.footer-col h4 { font-family: var(--ff-body); font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.footer-col .muted-line { color: #a9a39a; }
.footer-bottom {
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid rgba(255,255,255,.1);
  padding-block: 1.6rem 1.6rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .82rem; color: #8e887f;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s, border-color .35s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }

/* service card */
.service-card { display: flex; flex-direction: column; height: 100%; }
.service-card .sc-media { aspect-ratio: 4/3; overflow: hidden; background: var(--photo-soft); }
.service-card .sc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.3,1); }
.service-card:hover .sc-media img { transform: scale(1.06); }
.service-card .sc-body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.service-card .sc-num { font-family: var(--ff-num); font-size: .8rem; color: var(--accent-deep); font-weight: 700; letter-spacing: .12em; }
.service-card h3 { font-size: 1.5rem; margin: .35rem 0 .55rem; }
.service-card p { color: var(--muted); font-size: .96rem; margin-bottom: 1.1rem; }
.service-card .sc-tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: .45rem; }
.tag {
  font-size: .76rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 100px;
  padding: .38em .85em; background: var(--bg);
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: clamp(1.1rem, 2vw, 1.8rem); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Mobile bottom action bar ---------- */
.action-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px -16px rgba(42,36,38,.4);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.action-bar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: .7rem 0 .75rem;
  font-size: .72rem; font-weight: 600; color: var(--text);
}
.action-bar a + a { border-left: 1px solid var(--border); }
.action-bar a .ico { width: 21px; height: 21px; color: var(--primary); }
.action-bar a.primary { background: var(--primary); color: #fff; }
.action-bar a.primary .ico { color: #fff; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-links, .header-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { padding-bottom: 64px; } /* room for action bar */
  .action-bar { display: grid; }
  .brand .brand-text { display: none; }
}

@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .footer-bottom { flex-direction: column; }
}
