/* ==========================================================================
   Pages · shared base (owner: pages agent)
   Loaded by every pages section (main-page, page-steps, page-contact,
   page-story, page-withdrawal, main-search, main-404) and the customer
   templates. Holds the page hero (.z-ph), the jump link, the identity card
   and the account shell. Section-specific styles live in their own file.
   Tokens only (zevyro.css §00); mobile first (390 px), then 750/990/1200.
   ========================================================================== */

/* -- Page hero ---------------------------------------------------------------
   <section class="z-section z-ph-section"><div class="z-container">
     <header class="z-ph z-ph--center"> eyebrow · h1.z-ph__title · .z-ph__lead
   A faint guilloché rosette and a breath of gold light sit behind the title. */
.z-ph-section {
  --z-guilloche-opacity: .045;
  --z-rosette-size: min(1180px, 190vw);
  position: relative;
  overflow: clip;
  padding-top: clamp(3.5rem, 2.6rem + 3.8vw, 7.5rem);
  padding-bottom: clamp(3rem, 2.4rem + 2.6vw, 5.5rem);
}
.z-ph-section.z-guilloche::before {
  -webkit-mask-position: center calc(-1 * min(590px, 95vw) + 9rem);
  mask-position: center calc(-1 * min(590px, 95vw) + 9rem);
  -webkit-mask-size: var(--z-rosette-size);
  mask-size: var(--z-rosette-size);
}
.z-ph-section::after {               /* light from above, like a lamp over a desk */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(620px, 120%);
  pointer-events: none;
  background: radial-gradient(56% 64% at 50% 0%, rgba(201, 166, 91, .085), rgba(201, 166, 91, .02) 55%, transparent 76%);
  z-index: 0;
}
.z-ph-section > .z-container { position: relative; z-index: 1; }
.z-ph-section--flush-bottom { padding-bottom: 0; }

.z-ph { display: grid; justify-items: start; gap: 22px; }
.z-ph--center { justify-items: center; text-align: center; }
.z-ph__title {
  font-size: var(--z-fs-display-l);
  line-height: .98;
  max-width: 15ch;
}
.z-ph__title em { white-space: nowrap; }    /* copy deck: the italic accent keeps its line (390 px breaks) */
.z-ph--wide .z-ph__title { max-width: 18ch; }
.z-ph__lead {
  max-width: 44ch;
  font-size: var(--z-fs-lead);
  line-height: 1.6;
  color: var(--z-fg-2);
}
.z-ph__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  margin-top: 4px;
}
.z-ph--center .z-ph__meta { justify-content: center; }
.z-ph__rule {
  width: min(260px, 60%);
  margin-top: clamp(1rem, .6rem + 1.6vw, 2rem);
}
@media (min-width: 990px) {
  .z-ph { gap: 26px; }
}

/* Jump list: Roman numerals as an index under a hero (Como aplicar). */
.z-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.z-jump a {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--z-rule-soft);
  color: var(--z-fg-2);
  font-family: var(--z-font-display);
  font-size: 1.125rem;
  font-weight: 400;
  text-decoration: none;
  transition: color var(--z-dur-base), border-color var(--z-dur-base), background-color var(--z-dur-base);
}
@media (hover: hover) {
  .z-jump a:hover { color: var(--z-accent-hi); border-color: var(--z-accent); background: rgba(201, 166, 91, .04); }
}

/* -- Small caps link list (suggestions, footers of sections) -------------- */
.z-pages-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.z-pages-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* -- Identity card: seller data from the theme settings, as a calling card --
   <dl class="z-idcard"> <div><dt>Email</dt><dd>…</dd></div> … */
.z-idcard {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--z-rule);
}
.z-idcard > div {
  display: grid;
  gap: 4px;
  padding: 16px 0 17px;
  border-bottom: 1px solid var(--z-rule-soft);
}
.z-idcard dt {
  font-family: var(--z-font-caps);
  font-size: var(--z-fs-micro);
  letter-spacing: var(--z-track-caps);
  text-transform: uppercase;
  color: var(--z-accent);
}
.z-idcard dd {
  margin: 0;
  color: var(--z-fg);
  font-size: var(--z-fs-base);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.z-idcard dd a { color: inherit; text-decoration: none; background: linear-gradient(var(--z-rule), var(--z-rule)) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: background-size var(--z-dur-slow) var(--z-ease-out), color var(--z-dur-base); }
@media (hover: hover) { .z-idcard dd a:hover { color: var(--z-accent-hi); background-image: linear-gradient(var(--z-accent), var(--z-accent)); } }
.z-idcard__note { display: block; margin-top: 2px; font-size: var(--z-fs-xs); color: var(--z-fg-2); }
@media (min-width: 750px) {
  .z-idcard > div { grid-template-columns: 9.5rem minmax(0, 1fr); gap: 18px; align-items: baseline; }
}

/* -- Form kit (shared by contact, withdrawal, password, accounts) -----------
   Uses the core .z-field/.z-input; adds the error summary, the success seal
   and the panel that frames a form. */
.z-formpanel {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2.4vw, 3rem) clamp(1.25rem, .8rem + 2.2vw, 3rem);
  background:
    linear-gradient(180deg, rgba(201, 166, 91, .035), transparent 38%),
    var(--z-onyx);
  border: 1px solid var(--z-rule-soft);
}
.z-formpanel.z-frame { border-color: var(--z-rule); }
.z-formpanel__title {
  margin-bottom: clamp(1.25rem, 1rem + 1vw, 2rem);
  font-family: var(--z-font-display);
  font-size: var(--z-fs-display-s);
  font-weight: 400;
  line-height: var(--z-lh-heading);
}
.z-formpanel__title em { font-style: italic; color: var(--z-accent-hi); }
.z-form-grid { display: grid; gap: var(--z-space-m); }
.z-form-grid > .z-field + .z-field { margin-top: 0; }
.z-form-grid > .z-field { align-content: start; }
@media (min-width: 750px) {
  .z-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--z-space-m); }
  .z-form-grid--2 > .z-field--full { grid-column: 1 / -1; }
}
.z-field .z-label { display: flex; flex-wrap: wrap; gap: 0 .6em; align-items: baseline; }
.z-label__req { color: var(--z-accent); letter-spacing: 0; }
.z-field .z-error[hidden] { display: none; }
.z-field .z-error { animation: z-pages-fade var(--z-dur-base) var(--z-ease-out); }
.z-input[type="date"] { min-height: 52px; color-scheme: dark; }
.z-input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.78) sepia(.5) saturate(2.4) hue-rotate(2deg); opacity: .8; cursor: pointer; }

/* Chips: a radio group drawn as hairline lozenge-tipped tags. */
.z-chips { border: 0; margin: 0; padding: 0; min-width: 0; }
.z-chips legend { padding: 0; margin-bottom: 10px; }
.z-chips__list { display: flex; flex-wrap: wrap; gap: 8px; }
.z-chip { position: relative; display: inline-flex; }
.z-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.z-chip span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--z-rule);
  border-radius: var(--z-radius-ui);
  color: var(--z-fg-2);
  font-size: var(--z-fs-sm);
  line-height: 1.25;
  transition: color var(--z-dur-base), border-color var(--z-dur-base), background-color var(--z-dur-base);
}
.z-chip span::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--z-rule);
  -webkit-mask: var(--z-lozenge) center / contain no-repeat;
  mask: var(--z-lozenge) center / contain no-repeat;
  transition: background-color var(--z-dur-base), transform var(--z-dur-slow) var(--z-ease-out);
}
@media (hover: hover) { .z-chip:hover span { color: var(--z-fg); border-color: color-mix(in srgb, var(--z-accent) 60%, transparent); } }
.z-chip input:checked + span { color: var(--z-fg); border-color: var(--z-accent); background: rgba(201, 166, 91, .06); }
.z-chip input:checked + span::before { background: var(--z-accent-hi); transform: rotate(90deg) scale(1.15); }
.z-chip input:focus-visible + span { outline: 2px solid var(--z-gold); outline-offset: 3px; }

/* Error summary at the top of a form (links to each field). */
.z-errsum {
  padding: 16px 18px 16px 20px;
  margin-bottom: var(--z-space-m);
  border: 1px solid var(--z-error);
  border-left-width: 3px;
  background: rgba(226, 164, 147, .05);
  color: var(--z-fg);
  font-size: var(--z-fs-sm);
}
.z-errsum:focus, .z-done:focus { outline: none; }
.z-errsum__title { font-weight: 600; color: var(--z-error); }
.z-errsum ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.z-errsum a { color: var(--z-fg); text-decoration-color: var(--z-error); }

/* Success state: a struck seal and a quiet sentence. */
.z-done {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem) 0;
  text-align: center;
  animation: z-pages-rise var(--z-dur-reveal) var(--z-ease-out) both;
}
.z-done__seal {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid var(--z-accent);
  border-radius: 50%;
  color: var(--z-accent-hi);
  box-shadow: inset 0 0 0 5px var(--z-onyx), inset 0 0 0 6px var(--z-rule);
}
.z-done__seal svg { width: 30px; height: 30px; }
.z-done__title { font-family: var(--z-font-display); font-size: var(--z-fs-display-s); font-weight: 400; line-height: 1.15; max-width: 22ch; }
.z-done__text { max-width: 44ch; color: var(--z-fg-2); }
.z-form-legal { font-size: var(--z-fs-xs); line-height: 1.6; color: var(--z-fg-2); }
.z-form-legal a { color: var(--z-fg); text-decoration-color: var(--z-rule); }
.z-form-actions { display: grid; gap: 14px; margin-top: var(--z-space-l); }
@media (min-width: 750px) {
  .z-form-actions { grid-template-columns: auto 1fr; align-items: center; column-gap: 24px; }
}
.z-sendnote { font-size: var(--z-fs-xs); color: var(--z-fg-2); }

@keyframes z-pages-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes z-pages-rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

/* -- main-page: editorial prose (non-legal pages using the generic template) */
.z-page--prose .rte { margin-inline: auto; font-size: var(--z-fs-base); }
.z-page--prose .rte > p:first-child { font-size: var(--z-fs-lead); color: var(--z-fg); }

/* -- Account templates (customers/*) ----------------------------------------- */
.z-account { padding-top: clamp(3rem, 2.4rem + 3vw, 6rem); }
.z-account__wrap { display: grid; gap: var(--z-space-xl); }
.z-account__head { display: grid; gap: 16px; }
.z-account__nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.z-account__table { width: 100%; font-size: var(--z-fs-sm); border-collapse: collapse; }
.z-account__table :is(th, td) { padding: 14px 12px 14px 0; text-align: left; border-bottom: 1px solid var(--z-rule-soft); vertical-align: top; }
.z-account__table th { font-family: var(--z-font-caps); font-size: var(--z-fs-micro); font-weight: 400; letter-spacing: var(--z-track-caps); text-transform: uppercase; color: var(--z-accent); }
.z-account__table td { color: var(--z-fg-2); }
.z-account__table td:first-child a { color: var(--z-fg); }
.z-account__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.z-account__empty { padding: 24px 0; border-block: 1px solid var(--z-rule-soft); color: var(--z-fg-2); }
.z-account__addr { font-style: normal; color: var(--z-fg-2); line-height: 1.7; }
.z-account__cards { display: grid; gap: var(--z-gap); }
@media (min-width: 750px) { .z-account__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 990px) {
  .z-account__wrap--split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(3rem, 1rem + 5vw, 7rem); align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  .z-done { animation: z-pages-fade var(--z-dur-slow) both; }
}

/* Title-only hero followed by a content section (e.g. the FAQ on /pages/ajuda) */
.z-ph-section--hero-only { padding-bottom: clamp(.5rem, 0rem + 1.5vw, 1.5rem); }

/* -- The three, as small cards (404, search): card face + name + price ----- */
.z-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, .4rem + 1.4vw, 2rem); margin: 0; padding: 0; list-style: none; }
.z-trio__link { display: grid; gap: 14px; justify-items: center; text-align: center; color: inherit; text-decoration: none; }
.z-trio__face {                 /* the product render on its own obsidian ground (blends into the page) */
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--z-obsidian);
  transform: translateZ(0);
  transition: transform var(--z-dur-slow) var(--z-ease-out);
}
.z-trio__face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.z-trio__name { font-family: var(--z-font-caps); font-size: var(--z-fs-micro); letter-spacing: .26em; text-transform: uppercase; color: var(--z-fg); transition: color var(--z-dur-base); }
.z-trio__price { font-size: var(--z-fs-xs); color: var(--z-fg-2); }
.z-trio__price .z-price { color: inherit; font-weight: 400; }
@media (hover: hover) {
  .z-trio__link:hover .z-trio__face { transform: translateY(-6px); }
  .z-trio__link:hover .z-trio__name { color: var(--z-accent-hi); }
}
.z-trio__link:focus-visible { outline-offset: 6px; }
@media (max-width: 749px) {
  .z-trio__name { letter-spacing: .16em; font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) { .z-trio__face { transition: none; } }
