/* Niaco — bianco / beige, responsive */
:root {
  --bg-page: #faf8f4;
  --bg-card: #fffefb;
  --bg-muted: #f2ebe1;
  --text: #1f1f1f;
  --text-soft: #5c5854;
  --line: #e3dcd2;
  --accent: #6d8f6a;
  --accent-soft: rgba(109, 143, 106, 0.15);
  --shadow: 0 24px 60px rgba(45, 42, 38, 0.08);
  --radius: 4px;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --space-section: clamp(4rem, 10vw, 7rem);
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg-card);
  z-index: 9999;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.logo:hover {
  color: var(--text);
}

.logo span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  font-weight: 500;
  opacity: 0.72;
  margin-top: 0.15rem;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-main a {
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nav-main a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 1rem;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: block;
  }

  .nav-main {
    position: fixed;
    inset: 0 0 auto 0;
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    gap: 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav-main.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-main a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-main a:last-child {
    border-bottom: none;
  }
}

/* Hero banners */
.hero-banner {
  position: relative;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.hero-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72);
}

.hero-banner .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 18, 15, 0.72) 0%,
    transparent 55%
  );
}

.hero-banner .wrap {
  position: relative;
  padding-block: 4rem 3.5rem;
}

.hero-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.88;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 500;
  line-height: 1.08;
  max-width: 16ch;
  margin: 0 0 1rem;
}

.hero-lead {
  max-width: 36ch;
  font-size: 1.05rem;
  opacity: 0.92;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--bg-card);
}

.btn-primary:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

.btn-outline:hover {
  background: var(--text);
  color: var(--bg-card);
}

.btn-dark {
  background: var(--text);
  color: var(--bg-card);
  border-color: var(--text);
}

.btn-dark:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Sections */
.section {
  padding-block: var(--space-section);
}

.section-header {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.section-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 500;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.section-lead {
  margin: 0;
  color: var(--text-soft);
}

/* Split banner (mid-page) */
.banner-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
}

.banner-split__media {
  position: relative;
  min-height: 280px;
}

.banner-split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-split__body {
  background: var(--bg-muted);
  display: grid;
  align-content: center;
  padding: clamp(2rem, 5vw, 4rem);
}

.banner-split__body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 500;
  margin: 0 0 1rem;
  line-height: 1.12;
}

.banner-split__body p {
  margin: 0 0 1.5rem;
  color: var(--text-soft);
}

@media (max-width: 820px) {
  .banner-split {
    grid-template-columns: 1fr;
  }

  .banner-split__media {
    order: -1;
    min-height: 220px;
  }
}

/* Product section */
.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.gallery-main {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
  position: relative;
}

.gallery-frame {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(109, 143, 106, 0.45);
  transform: rotate(-8deg);
  right: 8%;
  top: 10%;
  pointer-events: none;
}

.gallery-main img#main-product-img {
  position: relative;
  z-index: 1;
  max-height: min(520px, 65vh);
  width: auto;
  margin-inline: auto;
  object-fit: contain;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.gallery-thumbs button {
  border: 1px solid var(--line);
  padding: 0.35rem;
  background: var(--bg-page);
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gallery-thumbs button:hover,
.gallery-thumbs button.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  border-radius: 1px;
  background: var(--bg-muted);
}

.product-detail h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.45rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

.product-detail .brand-line {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
}

.product-detail .brand-tagline {
  font-size: 1.05rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0 0 1.15rem;
}

.price-row {
  font-size: 1.65rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 2rem;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--bg-card);
}

.qty button {
  width: 2.5rem;
  height: 2.75rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.15rem;
  color: var(--text);
}

.qty span {
  min-width: 2.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.product-blocks {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.product-blocks h3 {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.65rem;
}

.product-blocks p,
.product-blocks ul {
  margin: 0 0 1.25rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.product-blocks ul {
  padding-left: 1.1rem;
}

@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .gallery-frame {
    display: none;
  }
}

@media (max-width: 520px) {
  .gallery-thumbs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
  }
}

/* Stories */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.story-card img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

.story-card .body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.story-card .name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
}

.story-card .meta {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.story-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
  flex: 1;
}

@media (max-width: 1024px) {
  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .stories-grid {
    grid-template-columns: 1fr;
  }
}

/* Articles preview */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.article-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.article-card .body {
  padding: 1.5rem 1.5rem 1.65rem;
}

.article-card .tag {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.article-card h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.article-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

@media (max-width: 720px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* Full-width banner strip */
.banner-strip {
  position: relative;
  min-height: 340px;
  display: grid;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.banner-strip img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68);
}

.banner-strip .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(25, 22, 18, 0.78), transparent 62%);
}

.banner-strip .wrap {
  position: relative;
  padding-block: 3rem;
  max-width: 520px;
}

.banner-strip h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.banner-strip p {
  margin: 0 0 1.35rem;
  opacity: 0.92;
}

/* Article page */
.article-hero {
  margin-bottom: 2rem;
}

.article-hero img {
  width: 100%;
  max-height: min(420px, 55vh);
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--line);
}

.article-page .meta {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.article-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  margin: 0 0 1rem;
  line-height: 1.12;
}

.article-page .lead {
  font-size: 1.12rem;
  color: var(--text-soft);
  margin-bottom: 2rem;
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  margin: 2.25rem 0 0.85rem;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.prose strong {
  color: var(--text);
}

.disclaimer {
  margin-top: 2.5rem;
  padding: 1rem 1.15rem;
  background: var(--bg-muted);
  border-left: 3px solid var(--accent);
  font-size: 0.88rem;
  color: var(--text-soft);
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
}

.back-link:hover {
  color: var(--text);
}

/* Footer */
.site-footer {
  background: #1c1b19;
  color: #e8e4dc;
  padding: 3rem 0 2rem;
  margin-top: var(--space-section);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 1.1rem;
}

.footer-brand small {
  display: block;
  letter-spacing: 0.24em;
  opacity: 0.65;
  margin-top: 0.35rem;
  font-size: 0.65rem;
}

.footer-col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
  opacity: 0.75;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.45rem;
}

.footer-col a {
  color: #e8e4dc;
  opacity: 0.82;
  text-decoration: none;
}

.footer-col a:hover {
  opacity: 1;
  color: #fff;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  opacity: 0.55;
}

/* Contact & legal utility pages */
.contact-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.contact-teaser .copy {
  flex: 1;
  min-width: min(100%, 280px);
}

.contact-teaser .copy p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.contact-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-card {
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 1.35rem 1.5rem;
  border-radius: 2px;
}

.contact-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 0.65rem;
  line-height: 1.15;
}

.contact-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.contact-card a {
  color: var(--accent);
  font-weight: 500;
}

.contact-card a:hover {
  color: var(--text);
}

@media (max-width: 880px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--text);
  color: var(--bg-card);
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal ordine */
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: min(5vh, 2rem) 1rem 2rem;
  overflow-y: auto;
}

.order-modal[hidden] {
  display: none;
}

.order-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(28, 27, 25, 0.45);
  backdrop-filter: blur(4px);
}

.order-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  margin-top: auto;
  margin-bottom: auto;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
  padding: clamp(1.35rem, 4vw, 2rem);
}

.order-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  background: var(--bg-page);
  border-radius: var(--radius);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.order-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.order-modal__title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
  padding-right: 2rem;
  line-height: 1.15;
}

.order-modal__intro {
  margin: 0 0 1.35rem;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.order-field span abbr {
  text-decoration: none;
  color: var(--accent);
}

.order-field input,
.order-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-page);
  color: var(--text);
}

.order-field input:focus,
.order-field textarea:focus {
  outline: 2px solid var(--accent-soft);
  outline-offset: 1px;
  border-color: var(--accent);
}

.order-field textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.order-form__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.order-form__hint a {
  color: var(--accent);
}

.order-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.order-form__actions .btn {
  flex: 1;
  min-width: 6rem;
}

.order-success {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

.order-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 600;
}

.order-success__title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.order-success__text {
  margin: 0 0 1.5rem;
  color: var(--text-soft);
  line-height: 1.6;
}

body.order-modal-open {
  overflow: hidden;
}

/* Legal page hero — intestazione scura (stile footer Niaco) */
.legal-page-hero {
  background: #1c1b19;
  color: #e8e4dc;
  padding: clamp(2.25rem, 5vw, 3.25rem) 0;
  margin-bottom: 0;
}

.legal-page-hero h1 {
  font-family: var(--font-body);
  font-size: clamp(0.78rem, 2vw, 0.88rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0;
  color: #e8e4dc;
  opacity: 0.95;
}

.article-page .section .legal-page-hero + .wrap.prose {
  padding-top: clamp(2rem, 4vw, 2.75rem);
}
