/*
Theme Name: Atma Salão de Beleza
Theme URI: https://www.instagram.com/atma_salaodebeleza/
Author: Atma Salão de Beleza
Description: Tema do site da Atma Salão de Beleza (Real Parque, São Paulo). Identidade visual do brand book Edition 01: Cormorant Garamond + Jost, verde profundo, linho e espresso.
Version: 1.2.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: atma
Language: pt-BR
*/

:root {
  --atma-green: #4F6357;
  --atma-green-brand: #6C8075;
  --atma-white: #F5FFF6;
  --atma-espresso: #332924;
  --atma-ink: #120D0D;
  --atma-gold: #CFA679;
  --atma-caramel: #BC7D4D;
  --atma-taupe: #796450;
  --atma-linen: #E3E1D3;
  --atma-sand: #D3C3B1;
  --atma-stone: #AEA79E;

  --color-bg: var(--atma-white);
  --color-bg-alt: var(--atma-linen);
  --color-bg-feature: var(--atma-green);
  --color-text: var(--atma-espresso);
  --color-text-muted: var(--atma-taupe);
  --color-cta-bg: var(--atma-espresso);
  --color-cta-text: var(--atma-white);
  --color-accent: var(--atma-gold);
  --color-border: var(--atma-sand);

  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Jost', 'Montserrat', 'Josefin Sans', system-ui, sans-serif;
  --tracking-label: 0.3em;
  --leading-body: 1.6;
  --gutter: 20px;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 640px) { body { font-weight: 400; font-size: 16px; } }
img, iframe, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-text); text-underline-offset: 3px; }
a:hover { color: var(--atma-taupe); }
:focus-visible { outline: 2px solid var(--atma-espresso); outline-offset: 3px; }
.on-green :focus-visible, .site-footer :focus-visible { outline-color: var(--atma-white); }

.screen-reader-text, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 200; background: var(--atma-espresso); color: var(--atma-white); padding: 10px 16px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-weight: 300; font-size: clamp(2.3rem, 5vw + .5rem, 4rem); }
h2 { font-size: clamp(1.75rem, 2.4vw + 1rem, 2.4rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.1em; }
em.accent, .accent { font-style: italic; }

.label {
  font-family: var(--font-body); font-weight: 400; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: var(--tracking-label); color: var(--atma-taupe); display: block; margin-bottom: 14px;
}
.on-green .label, .site-footer .label { color: var(--atma-white); opacity: .9; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--color-bg-alt); }
.section--green { background: var(--color-bg-feature); color: var(--atma-white); }
.section--green a { color: var(--atma-white); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.rule { width: 56px; height: 1px; background: var(--atma-gold); border: 0; margin: 0 0 22px; }
.center .rule { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--font-body); font-weight: 400; font-size: 13px; text-transform: uppercase;
  letter-spacing: .2em; text-decoration: none; padding: 16px 30px; border: 1px solid transparent;
  background: var(--color-cta-bg); color: var(--color-cta-text); cursor: pointer; transition: background .2s, color .2s;
  text-align: center;
}
.btn:hover { background: var(--atma-ink); color: var(--atma-white); }
.btn--outline { background: transparent; color: var(--atma-espresso); border-color: var(--atma-espresso); }
.btn--outline:hover { background: var(--atma-espresso); color: var(--atma-white); }
.on-green .btn, .section--green .btn { background: var(--atma-white); color: var(--atma-espresso); }
.on-green .btn:hover, .section--green .btn:hover { background: var(--atma-linen); color: var(--atma-espresso); }
.on-green .btn--outline, .section--green .btn--outline { background: transparent; color: var(--atma-white); border-color: var(--atma-white); }
.on-green .btn--outline:hover, .section--green .btn--outline:hover { background: var(--atma-white); color: var(--atma-espresso); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { background: var(--atma-white); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1; color: var(--atma-green); }
.brand-name { font-family: var(--font-body); font-weight: 300; font-size: 26px; letter-spacing: .42em; color: var(--atma-green); padding-left: .42em; }
.brand-sub { font-family: var(--font-body); font-weight: 400; font-size: 9.5px; letter-spacing: .38em; text-transform: uppercase; margin-top: 6px; color: var(--atma-taupe); padding-left: .38em; }
.custom-logo { max-height: 52px; width: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; align-items: center; }
.primary-nav a { text-decoration: none; font-weight: 400; font-size: 13px; text-transform: uppercase; letter-spacing: .16em; padding: 6px 0; border-bottom: 1px solid transparent; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { border-bottom-color: var(--atma-gold); color: var(--atma-espresso); }
.header-cta { margin-left: 8px; padding: 12px 22px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--atma-espresso); color: var(--atma-espresso); font: inherit; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; padding: 10px 14px; cursor: pointer; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--atma-white); border-bottom: 1px solid var(--color-border); padding: 12px var(--gutter) 24px; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .primary-nav a { display: block; padding: 12px 0; font-size: 14px; }
  .header-cta { display: none; }
}

/* Hero */
.hero { position: relative; color: var(--atma-white); background: var(--atma-green) center / cover no-repeat; padding: clamp(80px, 14vw, 170px) 0; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(51,41,36,.62), rgba(51,41,36,.15)); }
.hero:not(.has-image)::before { display: none; }
.hero .container { position: relative; }
.hero h1 { max-width: 14ch; color: var(--atma-white); }
.hero p.lead { font-size: 1.2rem; max-width: 46ch; margin-bottom: 32px; }

/* Manifesto */
.manifesto { text-align: center; }
.manifesto p.big { font-family: var(--font-display); font-size: clamp(1.4rem, 2vw + .8rem, 2rem); font-weight: 300; line-height: 1.4; max-width: 30ch; margin: 0 auto 28px; }

/* Cards */
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--atma-white); text-decoration: none; display: flex; flex-direction: column; border: 1px solid var(--color-border); transition: border-color .2s, transform .2s; color: var(--atma-espresso); }
.section--alt .card { background: var(--atma-white); }
.card:hover { border-color: var(--atma-taupe); transform: translateY(-2px); color: var(--atma-espresso); }
.card-media { aspect-ratio: 4 / 3; background: var(--atma-linen); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.portrait { aspect-ratio: 4 / 5; }
.card-media.is-empty { background: linear-gradient(135deg, var(--atma-linen), var(--atma-sand)); }
.card-body { padding: 22px 22px 26px; }
.card-body h3 { margin-bottom: .3em; }
.card-body p { margin: 0; font-size: .95rem; }
.card-meta { display: block; margin-top: 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--atma-taupe); font-weight: 400; }
.card--tile { padding: 30px 26px; border-color: rgba(245,255,246,.35); background: transparent; color: var(--atma-white); }
.section--green .card--tile:hover { border-color: var(--atma-white); color: var(--atma-white); }
.card--tile h3 { color: var(--atma-white); }
.card--tile .arrow { margin-top: 18px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 400; }

/* Local block */
.local { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .local { grid-template-columns: 1fr 1fr; align-items: start; } }
.local dl { margin: 0 0 28px; }
.local dt { font-weight: 400; font-size: 12.5px; text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--atma-taupe); margin-top: 18px; }
.local dd { margin: 4px 0 0; white-space: pre-line; }
.map-frame { aspect-ratio: 4 / 3; border: 1px solid var(--color-border); background: var(--atma-linen); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* Page content */
.page-hero { background: var(--atma-linen); padding: clamp(48px, 7vw, 88px) 0; }
.page-hero h1 { margin: 0; font-size: clamp(2rem, 4vw + .5rem, 3.2rem); }
.page-hero .intro { margin: 14px 0 0; font-size: 1.1rem; max-width: 56ch; }
.entry { padding: clamp(40px, 6vw, 72px) 0; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content img { margin: 1.5em 0; }
.entry-content details { border-bottom: 1px solid var(--color-border); padding: 16px 0; }
.entry-content summary { cursor: pointer; font-family: var(--font-display); font-size: 1.3rem; list-style: none; }
.entry-content summary::-webkit-details-marker { display: none; }
.entry-content summary::after { content: '+'; float: right; color: var(--atma-taupe); }
.entry-content details[open] summary::after { content: '–'; }
.entry-content details p { margin: 12px 0 0; }
.service-facts { display: flex; flex-wrap: wrap; gap: 28px; margin: 24px 0 0; padding: 0; list-style: none; }
.service-facts li span { display: block; }
.cta-band { text-align: center; }
.cta-band h2 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; }
.post-meta { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--atma-taupe); font-weight: 400; margin-bottom: 8px; }
.pagination { margin-top: 48px; display: flex; gap: 12px; justify-content: center; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--color-border); text-decoration: none; }
.pagination .current { background: var(--atma-espresso); color: var(--atma-white); border-color: var(--atma-espresso); }
.cat-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.cat-list a { font-size: 12.5px; text-transform: uppercase; letter-spacing: .2em; text-decoration: none; border: 1px solid var(--color-border); padding: 8px 14px; font-weight: 400; }
.cat-list a:hover { border-color: var(--atma-espresso); }
.breadcrumbs { font-size: 13px; margin-bottom: 18px; color: var(--atma-taupe); }
.breadcrumbs a { color: var(--atma-taupe); }

/* Footer */
.site-footer { background: var(--atma-espresso); color: var(--atma-white); padding: 72px 0 28px; }
.site-footer a { color: var(--atma-white); }
.site-footer a:hover { color: var(--atma-gold); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-bottom: 48px; border-bottom: 1px solid rgba(207,166,121,.45); }
.site-footer .brand-name { color: var(--atma-white); }
.site-footer .brand-sub { color: var(--atma-sand); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer address { font-style: normal; white-space: pre-line; }
.footer-bottom { padding-top: 24px; font-size: 14px; color: var(--atma-sand); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* Mobile action bar */
.mobile-bar { display: none; }
@media (max-width: 720px) {
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--atma-white); border-top: 1px solid var(--color-border); }
  .mobile-bar a { flex: 1; text-align: center; padding: 16px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .18em; text-decoration: none; font-weight: 400; }
  .mobile-bar a:first-child { background: var(--atma-espresso); color: var(--atma-white); }
  body { padding-bottom: 54px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== v1.1 — layout de salão + loja: faixa de aviso, hero alto, botões pílula, tiles ===== */
.announcement { background: var(--atma-espresso); color: var(--atma-white); font-size: 12px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; text-align: center; padding: 10px var(--gutter); }

.btn, .header-cta, .cat-list a, .pill, .nav-toggle { border-radius: 999px; }
.btn { font-weight: 500; letter-spacing: .14em; padding: 15px 32px; }

/* Cabeçalho: logo à esquerda, menu centralizado, CTA à direita */
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 84px; }
.brand { justify-self: start; }
.primary-nav { justify-self: center; }
.header-cta { justify-self: end; margin-left: 0; }
@media (max-width: 960px) {
  .header-inner { display: flex; }
}

/* Hero em altura quase total, texto embaixo à esquerda */
.hero { min-height: min(88vh, 860px); display: flex; align-items: flex-end; padding: 0 0 clamp(40px, 7vw, 96px); }
.hero:not(.has-image)::before { display: block; background: linear-gradient(0deg, rgba(51,41,36,.45), rgba(51,41,36,0) 65%); }
.hero.has-image::before { background: linear-gradient(0deg, rgba(51,41,36,.65), rgba(51,41,36,0) 70%); }
.hero h1 { max-width: 16ch; font-size: clamp(2.7rem, 6vw, 5.2rem); }

/* Cartões arredondados */
.card { border-radius: 20px; overflow: hidden; }
.card--tile { border-radius: 20px; }
.map-frame { border-radius: 20px; overflow: hidden; }

/* Serviços como tiles altos com texto sobre a imagem */
.card--tall { position: relative; min-height: 440px; border: 0; background: var(--atma-linen); }
.card--tall .card-media { position: absolute; inset: 0; aspect-ratio: auto; }
.card--tall .card-media.is-empty { background: linear-gradient(160deg, var(--atma-green), var(--atma-espresso)); }
.card--tall .card-body { position: relative; margin-top: auto; padding: 72px 26px 26px; color: var(--atma-white); background: linear-gradient(0deg, rgba(51,41,36,.82), rgba(51,41,36,0)); }
.card--tall h3 { color: var(--atma-white); font-size: 1.7rem; }
.card--tall p { color: var(--atma-white); }
.card--tall:hover { color: var(--atma-white); transform: translateY(-3px); }
.pill { display: inline-block; margin-top: 18px; padding: 10px 20px; border: 1px solid var(--atma-white); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.card--tall:hover .pill { background: var(--atma-white); color: var(--atma-espresso); }

/* Equipe em carrossel horizontal */
.team-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; }
.team-row > * { scroll-snap-align: start; }

/* Títulos de seção maiores e com mais respiro */
.section-head h2 { font-size: clamp(2rem, 3vw + 1rem, 3rem); }

/* ===== v1.2 — legibilidade do hero com foto, barra do admin, grid do Instagram ===== */
.hero.has-image::before {
  background:
    linear-gradient(0deg, rgba(51,41,36,.86) 0%, rgba(51,41,36,.6) 42%, rgba(51,41,36,.3) 100%),
    linear-gradient(90deg, rgba(51,41,36,.45), rgba(51,41,36,0) 70%);
}
.hero.has-image h1 { font-weight: 400; text-shadow: 0 2px 18px rgba(18,13,13,.45); }
.hero.has-image p.lead, .hero.has-image .label { text-shadow: 0 1px 10px rgba(18,13,13,.5); }

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.ig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 56px; }
.ig-grid a { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 14px; background: var(--atma-linen); }
.ig-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ig-grid a:hover img { transform: scale(1.04); }
@media (max-width: 720px) { .ig-grid { grid-template-columns: repeat(2, 1fr); } }
