/* =========================================================================
   Reset + primitives shared by the public site and the admin.
   ========================================================================= */

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

/* The hidden attribute must win over any display value an element carries.
   Without this, `<div hidden style="display:grid">` stays visible — and every
   panel in the admin that toggles with `hidden` would be permanently open. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets clear the fixed header instead of hiding beneath it. */
  scroll-padding-top: calc(var(--header-h-scrolled) + 1rem);
  -moz-tab-size: 2;
  tab-size: 2;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: var(--lh-base);
  font-weight: 400;
  color: var(--text-on-light);
  background: var(--bone-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Semibold headings at normal tracking — the live site's voice. */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--heading-color, inherit);
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  margin: 0;
}

button { background: none; border: 0; cursor: pointer; }

ul, ol { margin: 0; padding: 0; list-style: none; }

hr { border: 0; border-top: 1px solid currentColor; opacity: 0.12; margin: var(--s-8) 0; }

strong, b { font-weight: 700; }

::selection { background: var(--gold-500); color: var(--ink-900); }

/* A visible, consistent focus ring. It is never removed — only shaped. */
:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

/* ------------------------------------------------------------------------ */
/* Utility primitives                                                        */
/* ------------------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: 96rem; }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * 0.55); }

.section--dark  { background: var(--ink-900); color: var(--text-on-dark); --heading-color: var(--text-on-dark); }
/* Headings inherit the text colour unless a light surface asks for the live
   site's #333 — so a dark context can never end up with dark headings. */
.section--cream { background: var(--bone-100); color: var(--text-on-light); --heading-color: var(--heading-on-light); }
.section--bone  { background: var(--bone-200); color: var(--text-on-light); --heading-color: var(--heading-on-light); }

/* Screen-reader-only, but focusable (used by the skip link). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  z-index: var(--z-toast);
  padding: var(--s-3) var(--s-5);
  background: var(--gold-500);
  color: var(--ink-900);
  font-weight: 600;
  border-radius: var(--r-md);
  transition: top var(--d-fast) var(--ease-out);
}
.skip-link:focus { top: var(--s-4); }

/* ------------------------------------------------------------------------ */
/* Type utilities                                                            */
/* ------------------------------------------------------------------------ */

.eyebrow {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0 0 var(--s-4);
  display: block;
}
.section--cream .eyebrow,
.section--bone .eyebrow { color: var(--gold-700); }

.display {
  font-size: var(--t-3xl);
  font-weight: 600;
  line-height: var(--lh-tight);
}

.title {
  font-size: var(--t-2xl);
  font-weight: 600;
}

.subtitle {
  font-size: var(--t-md);
  color: var(--text-on-light-muted);
  font-weight: 400;
  line-height: var(--lh-base);
}
.section--dark .subtitle { color: var(--text-on-dark-muted); }

/* The decorative handwritten-feel accents from the mockup. Source Sans is the
   only family in the product, so the effect comes from a light italic at a
   generous size with open tracking — not from a second typeface. */
.script {
  font-style: italic;
  font-weight: 200;
  font-size: var(--t-xl);
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--gold-400);
  white-space: pre-line;
}

.lede {
  font-size: var(--t-md);
  line-height: var(--lh-loose);
  color: var(--text-on-light-muted);
  max-width: 44ch;
}
.section--dark .lede { color: var(--text-on-dark-muted); }

.muted { color: var(--text-on-light-muted); }
.section--dark .muted { color: var(--text-on-dark-muted); }

.label {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

/* The short solid underline the live site puts under form headings
   ("Disponibilità:"). */
.rule {
  width: 3.5rem;
  height: 2px;
  background: currentColor;
  border: 0;
  margin: var(--s-3) 0 var(--s-6);
  opacity: 0.9;
}

/* ------------------------------------------------------------------------ */
/* Buttons                                                                   */
/* Flat, square and bold, as on goldsuitespa.it: gold with black text, or    */
/* black with white text. No gradients, no sheen, no lift.                  */
/* ------------------------------------------------------------------------ */

.btn {
  --btn-bg: var(--gold-500);
  --btn-fg: #000;
  --btn-bd: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.875rem 1.25rem;
  min-height: 3.25rem;
  font-size: var(--t-base);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: 0;
  cursor: pointer;
  transition: background-color var(--d-fast) var(--ease-out),
              color var(--d-fast) var(--ease-out),
              border-color var(--d-fast) var(--ease-out),
              box-shadow var(--d-base) var(--ease-out);
  white-space: nowrap;
}

.btn svg { width: 1.125em; height: 1.125em; flex: none; }
.btn:hover { --btn-bg: var(--gold-400); }
.btn:active { --btn-bg: var(--gold-600); }

.btn--primary { --btn-bg: var(--gold-500); --btn-fg: #000; }

/* Black button, white text — "Scopri tutti i servizi", "Invia richiesta". */
.btn--dark { --btn-bg: #000; --btn-fg: #fff; }
.btn--dark:hover { --btn-bg: var(--gold-500); --btn-fg: #000; }
.btn--dark:active { --btn-bg: var(--gold-600); }

/* On a photograph or a dark band. */
.btn--ghost { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, 0.7); }
.btn--ghost:hover { --btn-bg: #fff; --btn-fg: #000; --btn-bd: #fff; }

.btn--outline { --btn-bg: transparent; --btn-fg: #000; --btn-bd: #000; }
.btn--outline:hover { --btn-bg: #000; --btn-fg: #fff; }
.section--dark .btn--outline { --btn-fg: #fff; --btn-bd: #fff; }
.section--dark .btn--outline:hover { --btn-bg: #fff; --btn-fg: #000; }

.btn--sm { padding: 0.5rem 1rem; min-height: 2.5rem; font-size: var(--t-sm); }
.btn--lg { padding: 1rem 1.75rem; min-height: 3.5rem; }
.btn--block { display: flex; width: 100%; }
.btn--caps { text-transform: uppercase; letter-spacing: 0.02em; }

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* A text link with an arrow that slides on hover — the mockup's "Tutte le
   suite →" treatment. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: 700;
  padding-bottom: var(--s-1);
  border-bottom: 2px solid currentColor;
  transition: gap var(--d-base) var(--ease-out), color var(--d-fast) var(--ease-out);
}
.link-arrow:hover { gap: var(--s-4); color: var(--gold-500); }
.link-arrow svg { width: 1rem; height: 1rem; }

/* ------------------------------------------------------------------------ */
/* Badges & pills                                                            */
/* ------------------------------------------------------------------------ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.3125rem 0.75rem;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  border-radius: var(--r-full);
  background: var(--gold-300);
  color: var(--ink-900);
  white-space: nowrap;
}
.badge svg { width: 0.875rem; height: 0.875rem; }

.badge--success { background: var(--success-bg); color: var(--success-ink); }
.badge--warning { background: var(--warning-bg); color: var(--warning-ink); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger-ink); }
.badge--info    { background: var(--info-bg);    color: var(--info-ink); }
.badge--neutral { background: var(--bone-300);   color: var(--text-on-light-muted); }
.badge--outline { background: transparent; border: 1px solid currentColor; color: var(--gold-500); }

/* ------------------------------------------------------------------------ */
/* Star rating                                                               */
/* ------------------------------------------------------------------------ */

.stars { display: inline-flex; gap: 0.1875rem; color: var(--gold-500); }
.stars svg { width: 0.875rem; height: 0.875rem; fill: currentColor; stroke: none; }
.stars svg.is-empty { fill: none; stroke: currentColor; opacity: 0.35; }
.stars--lg svg { width: 1.125rem; height: 1.125rem; }

/* ------------------------------------------------------------------------ */
/* Reveal on scroll — progressive enhancement                                */
/* Elements are visible by default; the script opts them in, so a visitor     */
/* without JavaScript sees the full page rather than a blank one.             */
/* ------------------------------------------------------------------------ */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity var(--d-slow) var(--ease-out), transform var(--d-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
}
