/* ============================================================
   SITE.CSS — Demo 3: Costruzioni Maggi Brescia (v2 — natural editorial)
   Cross-skill cherry-pick:
   - marvellco (custom cursor sottile, italic display headings)
   - anri (warm surface hierarchy stratificata, polysans-IBMPlex pairing emulato con Cormorant + Inter)
   - prototypestudio (layered shadow tokens 3 strati, monospace work counter "01/13", baseline asymmetric grid)
   - marasrl (flat elevation, NO box-shadow colored)
   - workleads (border-divider, top-corners radius su CTA, zero gradient)
   - juanmora (opacity hover)
   - dentologie (focus ring puliti, hover scale minimal lento)
   - fromanother (inset border frame su signature project)
   ============================================================ */

@import url("../shared/styles/base.css");
@import url("../shared/styles/components.css");
@import url("../shared/styles/artigiano.css");
@import url("../shared/styles/animations.css");

@layer overrides {
  :root {
    /* Costruzioni Maggi — palette pietra naturale stratificata (anri-style hierarchy) */
    --color-primary: #9b926a;          /* warm tan accent */
    --color-primary-dark: #7d765a;
    --color-primary-light: #e8e3d3;
    --color-accent: #35311f;            /* cocoa */
    --color-bg: #f3efeb;                /* cream limestone */
    --color-surface: #faf7f2;           /* cream più chiaro */
    --color-surface-deep: #e8e3d3;      /* tan light */
    --color-text: #35311f;
    --color-text-muted: rgba(53, 49, 31, 0.6);
    --color-border: rgba(53, 49, 31, 0.14);
    --color-whatsapp: #25D366;
    --color-whatsapp-dark: #1DA851;

    --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
    --font-accent: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  }

  /* ---------- TYPOGRAPHY editorial discipline (le-lab — solo 400/500/700) ---------- */
  .hero__title,
  .section__title,
  .service-area__title,
  .works-gallery__title,
  .site-footer__title {
    text-transform: none;
    letter-spacing: -0.005em;
    font-weight: 500;
  }

  .hero__title {
    font-weight: 400;
    line-height: 1.05;
  }

  /* ---------- HERO BREATH animation RIMOSSA (era artificiale) ---------- */

  .site-header__logo {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-family: var(--font-display);
    font-style: italic;
  }

  body { background: var(--color-bg); }

  /* ---------- HEADER flat warm + border ---------- */
  .site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: none;
  }

  /* ---------- HERO surface stratificata, no gradient ---------- */
  .hero {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-3xl) 0;
  }

  .section--surface { background: var(--color-surface); }

  /* ---------- DEMO BADGE editorial monospace ---------- */
  .demo-badge {
    background: var(--color-accent);
    color: var(--color-bg);
    font-family: var(--font-accent);
    font-size: 0.625rem;
    letter-spacing: 0.15em;
    padding: 4px 10px;
    border-radius: 0 0 0 var(--radius-sm);
  }

  /* ---------- HERO URGENCY discreto, no shimmer ---------- */
  .hero__urgency {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.875rem;
  }

  /* ---------- BUTTONS — corners-top (workleads), opacity hover ---------- */
  .btn--primary {
    background: var(--color-accent);
    color: white;
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    box-shadow: none;
    transition:
      opacity 0.25s var(--ease-natural),
      background-color 0.4s var(--ease-natural);
  }

  .btn--primary:hover {
    opacity: 0.92;
    background: #1f1c10;
    color: white;
    transform: none;
  }

  .btn--outline {
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: transparent;
    transition:
      background-color 0.4s var(--ease-natural),
      color 0.4s var(--ease-natural);
  }

  .btn--outline:hover {
    background: var(--color-primary-light);
    color: var(--color-accent);
  }

  /* ---------- TRUST ROW editorial 4-col con divider verticali ---------- */
  .trust-row {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
  }

  .trust-row__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .trust-row__grid > .trust-item:not(:last-child) {
    border-right: 1px solid var(--color-border);
  }

  @media (max-width: 768px) {
    .trust-row__grid { grid-template-columns: 1fr 1fr; }
    .trust-row__grid > .trust-item:nth-child(2n) { border-right: none; }
    .trust-row__grid > .trust-item:not(:nth-last-child(-n+2)) { border-bottom: 1px solid var(--color-border); }
  }

  .trust-item {
    padding: var(--space-lg);
    transition: background-color 0.4s var(--ease-natural);
  }

  .trust-item:hover {
    background: var(--color-surface-deep);
    transform: none;
  }

  /* ---------- CREDITS ROW — flat, NO gradient/colored shadow ---------- */
  .credits-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-xl);
    padding: var(--space-2xl) var(--space-xl);
    background: var(--color-surface-deep);
    border-radius: var(--radius-md);
    margin-top: var(--space-lg);
    border: 1px solid var(--color-border);
    box-shadow: none;
  }

  .credits-row__item { font-size: 0.875rem; }

  .credits-row__label {
    font-family: var(--font-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.625rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
  }

  .credits-row__value {
    font-weight: 500;
    color: var(--color-text);
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-style: italic;
  }

  /* ---------- SERVICE CARDS — layered shadow sottili, no colored ---------- */
  .service-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: none;
    transition:
      border-color 0.6s var(--ease-natural),
      background-color 0.6s var(--ease-natural);
  }

  .service-card:hover {
    border-color: var(--color-primary);
    background: #faf7f2;
    transform: none;
  }

  .service-card__icon {
    background: var(--color-bg);
    color: var(--color-primary-dark);
    border: 1px solid var(--color-border);
  }

  /* ---------- WORK CARDS — work counter monospace "01/N" (prototypestudio) ---------- */
  .work-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: none;
    box-shadow: none;
    transition:
      border-color 0.6s var(--ease-natural),
      transform 0.8s var(--ease-natural);
  }

  @media not (hover: hover) and (pointer: fine) {
    .work-card { cursor: default; }
  }

  .work-card:hover {
    border-color: var(--color-primary);
    transform: none;
  }

  .work-card__images {
    position: relative;
    overflow: hidden;
  }

  .work-card__images img,
  .work-card__placeholder {
    transition: transform 1.2s var(--ease-natural);
  }

  .work-card:hover .work-card__images img,
  .work-card:hover .work-card__placeholder {
    transform: scale(1.02);
  }

  .work-card__type {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .work-card__type::before {
    content: "PROGETTO";
    font-family: var(--font-accent);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    text-transform: uppercase;
  }

  /* Counter "01 / 13" su gallery items via JS */
  .work-card[data-work-index]::after {
    content: attr(data-work-index) " / " attr(data-work-total);
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-family: var(--font-accent);
    font-size: 0.625rem;
    letter-spacing: 0.15em;
    color: var(--color-bg);
    background: rgb(53 49 31 / 0.6);
    padding: 3px 8px;
    border-radius: 2px;
    z-index: 2;
  }

  /* ---------- SIGNATURE PROJECT — fromanother inset frame ---------- */
  .signature-project {
    cursor: none;
    padding: var(--space-3xl) 0;
    background: var(--color-surface);
    box-shadow: inset 0 0 0 1px var(--color-primary);
    border: none;
  }

  @media not (hover: hover) and (pointer: fine) {
    .signature-project { cursor: default; }
  }

  .signature-project__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.1;
  }

  /* ---------- CUSTOM CURSOR Maggi — più sottile, no spinner ring ---------- */
  @media (hover: hover) and (pointer: fine) {
    .custom-cursor {
      background: var(--color-primary);
      mix-blend-mode: normal;
      width: 8px;
      height: 8px;
      opacity: 0.85;
    }

    body.cursor-hover-card .custom-cursor {
      background: var(--color-accent);
      width: 88px;
      height: 88px;
      opacity: 1;
    }

    body.cursor-hover-card .custom-cursor__label {
      color: var(--color-bg);
      font-family: var(--font-display);
      font-style: italic;
      font-size: 0.8125rem;
      letter-spacing: 0;
      text-transform: none;
      font-weight: 400;
    }

    /* RIMOSSO spinner ring — era artificiale */
    body.cursor-hover-card .custom-cursor::after { display: none; }
  }

  /* ---------- STATS warm hierarchy (cocoa surface, gold number — editorial) ---------- */
  .stats {
    background: var(--color-accent);
    border-top: 1px solid var(--color-accent);
    border-bottom: 1px solid var(--color-accent);
  }

  .stat-item__number {
    color: var(--color-primary);
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
  }

  .stat-item__label {
    color: rgb(232 227 211 / 0.7);
    font-family: var(--font-accent);
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  /* ---------- TESTIMONIALS editorial italic ---------- */
  .testimonial {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: none;
  }

  .testimonial__quote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.6;
    font-weight: 400;
  }

  /* ---------- FAQ flat (workleads) ---------- */
  .faq__item {
    border: 1px solid transparent;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .faq__item:hover { background: var(--color-surface); }

  /* ---------- HERO MEDIA editorial frame ---------- */
  .hero__media {
    position: relative;
    box-shadow: inset 0 0 0 1px var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
  }

  .hero__media img {
    transition: transform 1.5s var(--ease-natural);
  }

  .hero__media:hover img {
    transform: scale(1.02);
  }

  /* ---------- FOCUS RING pulito ---------- */
  .btn:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
  }

  /* ---------- FOOTER cocoa scuro flat ---------- */
  .site-footer {
    background: var(--color-accent);
    color: var(--color-bg);
  }

  /* ---------- REVEAL DEFAULT 1.2s slow editorial (no overshoot) ---------- */
  section.reveal,
  .reveal--auto {
    --reveal-duration: 1.2s;
    --reveal-easing: var(--ease-editorial);
  }
}
