/* =========================
   SUBVERSAR — styles.css (baseline coerente)
   ========================= */

/* ---- Reset leve / base ---- */
:root{
  /* Vinho intelectual (marca) */
  --accent: #7A1420;          /* vinho institucional */
  --accent-soft: #93202B;     /* hover */
  --accent-strong: #5B0D14;   /* Fundação mais densa */

  --bg: #ffffff;
  --bg-alt: #f6f6f6;
  --text: #111111;
  --muted: rgba(17,17,17,.68);
  --line: rgba(17,17,17,.12);
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(0,0,0,.08);

  --radius: 16px;
  --radius-sm: 12px;

  --container: 1120px;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 84px;
}

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

html { -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); text-decoration: none; }

.hidden { display: none; }

.container{
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

/* ---- Acessibilidade ---- */
.skip{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus{
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  z-index: 9999;
}

/* ---- Tipografia utilitária ---- */
.h2{
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: -0.02em;
}
.h3{
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}
.h3--sm{ font-size: .98rem; }

.text{ margin: 0; color: var(--text); }
.muted{ margin: 0; color: var(--muted); }
.note{
  margin: var(--space-4) 0 0;
  color: var(--muted);
  font-size: .98rem;
}

/* ---- Header / Nav ---- */
.header{
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);

  /* assinatura cromática sutil (vinho) */
  box-shadow: inset 0 -2px 0 rgba(122,20,32,.15);
}

.header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 14px 0;
}

.brand__name{
  font-weight: 700;
  letter-spacing: .12em;
  font-size: .98rem;
  color: var(--accent);
}

.nav{
  display: flex;
  gap: 14px;
  align-items: center;
}
.nav a{
  font-size: .95rem;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
}
.nav a[aria-current="page"]{
  color: var(--text);
  background: rgba(0,0,0,.06);
}
.nav a:hover{
  background: rgba(0,0,0,.05);
  text-decoration: none;
  color: var(--text); /* mantém legibilidade no pill */
}

.navtoggle{
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
}
.navtoggle span{
  display: block;
  width: 18px;
  height: 2px;
  background: #111;
  margin: 3px 0;
}

.navpanel{
  border-top: 1px solid var(--line);
  background: #fff;
}
.navpanel__inner{
  display: grid;
  gap: 6px;
  padding: 14px 0;
}
.navpanel__inner a{
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
}
.navpanel__inner a[aria-current="page"]{
  color: var(--text);
  background: rgba(0,0,0,.06);
}
.navpanel__inner a:hover{
  background: rgba(0,0,0,.05);
  color: var(--text);
}

/* Mobile */
@media (max-width: 980px){
  .nav{ display: none; }
  .navtoggle{ display: inline-flex; }
}

/* ---- Botões ---- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover{
  text-decoration: none;
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  opacity: 1;
}

.btn--ghost{
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover{ background: rgba(0,0,0,.04); border-color: var(--line); color: var(--text); }

.btn--sm{
  padding: 10px 14px;
  font-size: .95rem;
}

/* ---- Seções / Hero ---- */
.section{
  padding: var(--space-8) 0;
}
.section--alt{
  background: var(--bg-alt);
}

.section__head{
  display: grid;
  gap: 10px;
  margin-bottom: var(--space-5);
}

.hero{
  padding: var(--space-8) 0 var(--space-6);
}
.hero--compact{
  padding: var(--space-7) 0 var(--space-6);
}
.eyebrow{
  margin: 0 0 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .82rem;
  color: var(--accent);
}
.hero__title{
  margin: 0 0 var(--space-4);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.reading-lite{
  display: grid;
  gap: 12px;
  max-width: 72ch;
}
.hero__actions{
  display: flex;
  gap: 12px;
  margin-top: var(--space-5);
  flex-wrap: wrap;
}

/* ---- Product grid (Coleções) ---- */
.product-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

@media (max-width: 980px){
  .product-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .product-grid{ grid-template-columns: 1fr; }
}

.product{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product__media{
  background: #f2f2f2;
}

/* IMPORTANTÍSSIMO: isso impede imagem gigante */
.product__figure{
  margin: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;     /* quadrado editorial */
  max-height: 420px;       /* trava extra */
  overflow: hidden;
}

.product__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .2s ease;
}
.product__img.is-active{ opacity: 1; }

.product__toggle{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}
.product__toggle button{
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(6px);
  font-weight: 600;
}
.product__toggle button.is-active{
  background: rgba(255,255,255,.95);
}

.product__body{
  padding: 18px 18px 20px;
  display: grid;
  gap: 10px;
}
.tagline{
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

/* ---- Specs ---- */
.specs{
  margin-top: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 8px;
  background: #fff;
}
.specs__list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.specs__list li{ margin: 8px 0; }

/* ---- Pedido / Form ---- */
.order{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 980px){
  .order{ grid-template-columns: 1fr; }
}

.form{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.form__grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 640px){
  .form__grid{ grid-template-columns: 1fr; }
}

.field{
  display: grid;
  gap: 8px;
}
.field--full{
  grid-column: 1 / -1;
}

.field__label{
  font-size: .92rem;
  color: var(--muted);
  font-weight: 600;
}

.field__input{
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  font: inherit;
  background: #fff;
}
.field__input:focus{
  outline: none;
  border-color: rgba(17,17,17,.35);
  box-shadow: 0 0 0 4px rgba(17,17,17,.08);
}

textarea.field__input{ resize: vertical; min-height: 110px; }

.form__actions{
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.form__actions .note{ margin: 0; }

.callout{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.steps{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.steps li{ margin: 8px 0; }

/* ---- Política ---- */
.policy{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
@media (max-width: 980px){
  .policy{ grid-template-columns: 1fr; }
}
.policy__block{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* ---- Footer ---- */
.footer{
  border-top: 1px solid var(--line);
  padding: 26px 0;
  background: #fff;
}
.footer__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand__name--sm{ font-size: .9rem; }
.footer .link{
  color: var(--muted);
  text-decoration: none;
  margin-left: 12px;
}
.footer .link:hover{ color: var(--accent); text-decoration: none; }

/* =========================
   Fundação — versão mais densa (usar: <body class="fundacao">)
   ========================= */

.fundacao .hero{
  background: linear-gradient(
    to bottom,
    rgba(91,13,20,.06),
    transparent
  );
}

.fundacao .hero__title,
.fundacao .section__head .h2{
  color: var(--accent-strong);
}

.fundacao .eyebrow{
  color: var(--accent-strong);
}

/* Botão principal na Fundação mais grave */
.fundacao .btn{
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.fundacao .btn:hover{
  background: var(--accent);
  border-color: var(--accent);
}
