:root {
  /* The Loyly palette (os projects/loyly/theme), as on www.loyly.com.br */
  --mist: #f4f2ed;
  --stone: #ece8e1;
  --ink: #171c1a;
  --ink-soft: #4a524e;
  --ink-faint: #8f9793;
  --rule: color-mix(in srgb, #171c1a 14%, transparent);
  --display: "Syne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(1rem, 3vw, 2rem);
  --header: 3.5rem;
}

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2 { font-family: var(--sans); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 1rem; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h2 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

/* Small uppercase labels, the shop's one typographic accent */
.rotulo {
  display: block; margin: 0 0 0.6rem;
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* Announcement, header, footer */
.aviso {
  margin: 0; padding: 0.5rem var(--gutter); text-align: center;
  background: var(--ink); color: var(--mist);
  font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase;
}

.topo {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--header); padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--mist) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topo__nav { display: flex; gap: 1.5rem; }
.topo__nav--fim { justify-content: flex-end; }
.topo__nav a {
  font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.topo__nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* The cut logo: the box ends 0.70em down a 0.82 line, so the bottom edge takes the y legs, as the footer does */
.topo__marca {
  display: inline-block; height: 0.7em; margin-block: 0.15em; clip-path: inset(-0.5em -0.5em 0 -0.5em);
  font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.06em; text-decoration: none; line-height: 0.82;
}

.rodape { margin-top: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--rule); overflow: hidden; }
.rodape__colunas {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem;
  padding: 2.5rem var(--gutter) 0; font-size: 0.8125rem; color: var(--ink-soft);
}
.rodape__colunas p { margin: 0 0 0.35rem; }
.rodape__colunas ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.rodape__colunas a { text-decoration: none; }
.rodape__colunas a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
/* The wordmark across the whole width, as the last thing on every page */
.rodape__marca {
  display: block; padding: 0 var(--gutter); margin: 2rem 0 -0.12em;
  font-family: var(--display); font-weight: 800; letter-spacing: -0.06em; line-height: 0.82;
  font-size: 31vw; text-align: center; text-decoration: none; color: var(--ink);
}

/* Buttons */
.botao {
  display: block; width: 100%; padding: 1.05rem 1.5rem; border: 0; border-radius: 0;
  background: var(--ink); color: var(--mist); font-family: inherit; font-weight: 500;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; text-align: center;
  text-decoration: none; cursor: pointer; transition: background 0.2s ease;
}
.botao:hover { background: #303733; }
.texto .botao { display: inline-block; width: auto; }

/* Home */
.abertura { padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(2rem, 4vw, 3rem); text-align: center; }
.abertura h1 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); max-width: 18ch; margin: 0 auto 1rem; }
.abertura p { max-width: 36rem; margin: 0 auto; color: var(--ink-soft); }

/* Edge-to-edge product grid with hairlines between the tiles */
.vitrine {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--rule); border-block: 1px solid var(--rule);
}
.vitrine--mais { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cartao { display: flex; flex-direction: column; background: var(--mist); text-decoration: none; padding-bottom: 1.25rem; }
.cartao__foto { position: relative; display: block; aspect-ratio: 1; background: var(--stone); overflow: hidden; }
.cartao__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease, transform 0.6s ease; }
.cartao__outra { opacity: 0; }
@media (hover: hover) {
  .cartao:hover .cartao__outra { opacity: 1; }
  .cartao:hover .cartao__foto img { transform: scale(1.02); }
}
.cartao__linha { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 1rem 0; font-size: 0.875rem; }
.cartao__nome { font-weight: 500; }
.cartao__preco { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cartao__nota { padding: 0.15rem 1rem 0; font-size: 0.8125rem; color: var(--ink-soft); }
.cartao__cores { display: flex; align-items: center; gap: 0.3rem; padding: 0.75rem 1rem 0; }
.cartao__cores img { width: 1rem; height: 1rem; border-radius: 50%; box-shadow: 0 0 0 1px var(--rule); }
.cartao__cores span { margin-left: 0.35rem; font-size: 0.75rem; color: var(--ink-soft); }

.destaque { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.destaque__foto { display: block; aspect-ratio: 1; background: var(--stone); overflow: hidden; }
.destaque__foto img { width: 100%; height: 100%; object-fit: cover; }
.destaque__texto { align-self: center; padding: clamp(2rem, 6vw, 5rem); }
.destaque__texto h2 { font-size: clamp(1.5rem, 2.8vw, 2.3rem); max-width: 16ch; }
.destaque__texto p { color: var(--ink-soft); max-width: 30rem; }
.paleta { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; margin: 2rem 0 0; padding: 0; }
.paleta a { display: grid; justify-items: center; gap: 0.45rem; text-decoration: none; font-size: 0.75rem; color: var(--ink-soft); }
.paleta img { width: 3.25rem; height: 3.25rem; border-radius: 50%; box-shadow: 0 0 0 1px var(--rule); transition: transform 0.2s ease; }
.paleta a:hover img { transform: scale(1.08); }

.promessas {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none;
  background: var(--rule); border-bottom: 1px solid var(--rule);
}
.promessas li { background: var(--mist); padding: 2rem var(--gutter); text-align: center; font-size: 0.875rem; }

/* The hat page link */
.leitura { padding: clamp(3rem, 7vw, 5rem) var(--gutter) 0; text-align: center; }
.leitura a { display: inline-grid; gap: 0.2rem; text-decoration: none; }
.leitura__titulo { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 500; letter-spacing: -0.02em; }
.leitura__titulo::after { content: " \2192"; display: inline-block; transition: transform 0.2s ease; }
.leitura a:hover .leitura__titulo::after { transform: translateX(0.25em); }
.leitura__texto { color: var(--ink-soft); }

/* Product */
.trilha { display: flex; gap: 0.5rem; padding: 0.9rem var(--gutter); font-size: 0.75rem; color: var(--ink-soft); }
.trilha a { text-decoration: none; }
.trilha a:hover { color: var(--ink); }

.produto { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border-top: 1px solid var(--rule); }
.galeria-caixa { position: relative; border-right: 1px solid var(--rule); }
.galeria { display: grid; gap: 1px; background: var(--rule); }
.galeria:focus { outline: none; }
.galeria__foto { margin: 0; aspect-ratio: 1; background: var(--stone); }
.galeria__foto img { width: 100%; height: 100%; object-fit: cover; }
.galeria__conta { display: none; }

.produto__painel {
  position: sticky; top: var(--header); align-self: start;
  max-height: calc(100vh - var(--header)); overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 4rem) 2rem;
  scrollbar-width: none;
}
.produto__painel::-webkit-scrollbar { display: none; }
.produto__painel h1 { margin-bottom: 0.4rem; }
.produto__preco { font-size: 1.05rem; font-variant-numeric: tabular-nums; margin-bottom: 1.25rem; }
.produto__preco span {
  margin-left: 0.6rem; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
}
.produto__lead { color: var(--ink-soft); }
.produto__nota { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 0.85rem; }

.cores { border: 0; padding: 1.25rem 0 0; margin: 1.5rem 0; border-top: 1px solid var(--rule); min-width: 0; }
.cores legend { float: left; width: 100%; padding: 0; margin-bottom: 0.85rem; font-size: 0.8125rem; color: var(--ink-soft); }
.cores legend strong { color: var(--ink); font-weight: 500; margin: 0 0.35rem; }
.cores__lista { clear: both; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cor { position: relative; cursor: pointer; }
.cor input { position: absolute; opacity: 0; pointer-events: none; }
.cor img { width: 2.75rem; height: 2.75rem; border-radius: 50%; box-shadow: 0 0 0 1px var(--rule); transition: box-shadow 0.15s ease; }
.cor:hover img { box-shadow: 0 0 0 1px var(--ink-faint); }
.cor:has(input:checked) img { box-shadow: 0 0 0 2px var(--mist), 0 0 0 3px var(--ink); }
.cor:has(input:focus-visible) img { outline: 2px solid var(--ink); outline-offset: 4px; }
.cor__nome { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.dobra { border-bottom: 1px solid var(--rule); }
.dobra:first-of-type { border-top: 1px solid var(--rule); margin-top: 2rem; }
.dobra summary {
  display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; cursor: pointer; list-style: none;
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.dobra summary::-webkit-details-marker { display: none; }
.dobra summary::after { content: "+"; font-size: 1rem; font-weight: 400; transition: transform 0.2s ease; }
.dobra[open] summary::after { transform: rotate(45deg); }
.dobra__corpo { padding-bottom: 1.25rem; font-size: 0.875rem; color: var(--ink-soft); }
.dobra__corpo ul { margin: 0; padding-left: 1.1rem; }
.ficha { margin: 0; }
.ficha div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px dashed var(--rule); }
.ficha div:last-child { border-bottom: 0; }
.ficha dd { margin: 0; text-align: right; color: var(--ink); }

.mais { margin-top: clamp(3rem, 7vw, 5rem); }
.mais .rotulo { padding: 0 var(--gutter); margin-bottom: 1rem; }

/* Order form while nothing is on sale */
.pedido { display: grid; gap: 0.85rem; }
.pedido[hidden], .esgotado[hidden], .pedido__erro[hidden], .botao[hidden] { display: none; }
.pedido__campo { display: grid; gap: 0.35rem; font-size: 0.8125rem; color: var(--ink-soft); }
.pedido__campo--curto { max-width: 8rem; }
.pedido__campo--cep { max-width: 14rem; }
.pedido__nota { opacity: 0.75; }
.pedido input, .pedido select {
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff; width: 100%;
  padding: 0.75rem 0.9rem; border: 1px solid var(--rule); border-radius: 0;
}
.pedido input:focus-visible, .pedido select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.pedido button[disabled] { opacity: 0.6; cursor: progress; }
.pedido__erro { margin: 0; font-size: 0.875rem; color: #9b2c1f; }
.esgotado { padding: 1.25rem 1.4rem; border: 1px solid var(--ink); }
.esgotado:focus { outline: none; }
.esgotado__titulo { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.5rem; }
.esgotado p:last-child { margin-bottom: 0; }

/* Text pages */
.texto { max-width: 40rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 0; }
.texto h2 { margin-top: 2rem; }
.texto--centro { text-align: center; padding-top: 5rem; }

@media (max-width: 900px) {
  .vitrine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vitrine--mais { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rodape__colunas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .topo__extra, .aviso__mais { display: none; }
  .topo__nav { gap: 1rem; }
  .produto, .destaque { grid-template-columns: 1fr; }
  .galeria-caixa { border-right: 0; }
  /* Photos swipe sideways on a phone */
  .galeria { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .galeria::-webkit-scrollbar { display: none; }
  .galeria__foto { flex: 0 0 100%; scroll-snap-align: start; }
  .galeria__conta {
    display: block; position: absolute; right: 0.75rem; bottom: 0.75rem; margin: 0;
    padding: 0.2rem 0.55rem; background: var(--mist); font-size: 0.6875rem; font-variant-numeric: tabular-nums;
  }
  .produto__painel { position: static; max-height: none; overflow: visible; }
  .vitrine--mais { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vitrine--mais .cartao:nth-child(3) { display: none; }
  .promessas { grid-template-columns: 1fr; }
  .promessas li { padding: 1.25rem var(--gutter); }
  .cartao__linha { flex-direction: column; gap: 0.1rem; padding: 0.75rem 0.75rem 0; }
  .cartao__nota, .cartao__cores { padding-inline: 0.75rem; }
}

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