/* ----------------------------------------
   :root — design tokens (DESIGN_SYSTEM.md)
   ---------------------------------------- */
:root {
  /* Superfici */
  --bg:         #181B25;
  --surface:    #1F2436;
  --surface-2:  #252A3D;
  --line:       rgba(255, 252, 245, 0.07);
  --line-mid:   rgba(255, 252, 245, 0.13);

  /* Testo */
  --text:       #FFFCF5;
  --text-mid:   rgba(255, 252, 245, 0.60);
  --text-muted: rgba(255, 252, 245, 0.35);

  /* Accent */
  --accent:     #C8A97E;
  --accent-dim: rgba(200, 169, 126, 0.15);
  --bordeaux:   #9B4D52;

  /* Tipografia */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;

  /* Easing */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout:  cubic-bezier(0.87, 0, 0.13, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Durate */
  --dur-fast:  0.25s;
  --dur-mid:   0.6s;
  --dur-slow:  1.2s;
  --dur-crawl: 2.5s;
}

/* ----------------------------------------
   Reset base
   ---------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* ----------------------------------------
   body
   ---------------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
}

/* ----------------------------------------
   nav
   ---------------------------------------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(2rem, 8vw, 8rem);
  transition: background var(--dur-mid), backdrop-filter var(--dur-mid);
}

nav.scrolled {
  background: rgba(24, 27, 37, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--line);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  cursor: none;
  transition: color var(--dur-fast);
}

.nav-links a:hover {
  color: var(--text);
}

/* ----------------------------------------
   #hero
   ---------------------------------------- */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}

#hero-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 clamp(2rem, 8vw, 8rem);
  max-width: 900px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 300;
  line-height: 0.95;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 0.05em;
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 40px;
}

.hero-cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ----------------------------------------
   .btn-primary / .btn-ghost
   ---------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  border-radius: 2px;
  cursor: none;
  text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast);
}

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

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  cursor: none;
  transition: color var(--dur-fast);
}

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

/* ----------------------------------------
   #about
   ---------------------------------------- */
.about-text {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 300;
  color: var(--text);
  line-height: 1.45;
  max-width: 760px;
}

.about-sub {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.75;
  max-width: 660px;
  margin-top: 28px;
}

/* ----------------------------------------
   #prodotti
   ---------------------------------------- */
.product-pin {
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(2rem, 8vw, 8rem);
  gap: 4rem;
  background: var(--bg);
  border-bottom: 0.5px solid var(--line);
}

.product-inner {
  flex: 1;
}

.product-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 20px;
}

.product-name {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  color: var(--text);
  margin: 0 0 20px;
  line-height: 1.0;
}

.product-desc {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 32px;
}

.product-visual {
  flex-shrink: 0;
  width: clamp(200px, 35vw, 460px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.15;
  color: var(--text);
}

.product-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
  cursor: none;
  transition: opacity var(--dur-fast);
}

.product-link:hover {
  opacity: 0.7;
}

/* ----------------------------------------
   #stack — marquee
   ---------------------------------------- */
#stack {
  padding: clamp(4rem, 8vh, 6rem) 0;
}

#stack .eyebrow {
  padding: 0 clamp(2rem, 8vw, 8rem);
  margin-bottom: 28px;
}

.marquee-wrap {
  overflow: hidden;
  mask-image: linear-gradient(
    to right, transparent 0%, black 10%, black 90%, transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right, transparent 0%, black 10%, black 90%, transparent 100%
  );
}

.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 28s linear infinite;
  padding: 8px 0;
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

.stack-item {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: color var(--dur-fast);
}

.stack-item:hover {
  color: var(--accent);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ----------------------------------------
   #news
   ---------------------------------------- */
.news-item {
  display: flex;
  gap: 32px;
  padding: 18px 0;
  border-bottom: 0.5px solid var(--line);
  text-decoration: none;
  transition: gap var(--dur-fast) var(--ease-out);
  cursor: none;
}

.news-item:hover {
  gap: 40px;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 56px;
  padding-top: 3px;
}

.news-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.5;
  transition: color var(--dur-fast);
}

.news-item:hover .news-title {
  color: var(--text);
}

/* ----------------------------------------
   #contatti — sezione contatti
   ---------------------------------------- */
.contacts-headline {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 20px;
}

.contacts-sub {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.75;
  max-width: 540px;
  margin-bottom: 28px;
}

.contacts-meta {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.contacts-location,
.contacts-availability {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.contacts-availability::before {
  content: '\2022';
  color: var(--accent);
  margin-right: 8px;
}

/* ----------------------------------------
   footer
   ---------------------------------------- */
footer {
  padding: 28px clamp(2rem, 8vw, 8rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 0.5px solid var(--line);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: none;
  transition: color var(--dur-fast);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 252, 245, 0.18);
  letter-spacing: 0.06em;
}

/* ----------------------------------------
   #cursor-dot / #cursor-ring
   ---------------------------------------- */
#cursor-dot,
#cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity var(--dur-fast);
}

#cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
}

#cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(200, 169, 126, 0.5);
  transition: width var(--dur-fast) var(--ease-spring),
              height var(--dur-fast) var(--ease-spring),
              border-color var(--dur-fast);
}

body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
  width: 48px;
  height: 48px;
  border-color: var(--accent);
}

@media (hover: none) {
  #cursor-dot,
  #cursor-ring {
    display: none;
  }
}

/* ----------------------------------------
   .section-reveal
   ---------------------------------------- */
.section-reveal {
  padding: clamp(4rem, 10vh, 8rem) clamp(2rem, 8vw, 8rem);
  opacity: 0;
  transform: translateY(30px);
}

/* ----------------------------------------
   Modal
   ---------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease-out),
              visibility var(--dur-fast);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 27, 37, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 0.5px solid var(--line-mid);
  border-radius: 4px;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  padding: clamp(2rem, 5vw, 3rem);
  transform: translateY(20px);
  transition: transform var(--dur-mid) var(--ease-out);
}

.modal.is-open .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 22px;
  line-height: 1;
  cursor: none;
  padding: 4px 8px;
  transition: color var(--dur-fast);
}

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

.modal-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 12px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 300;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 24px;
}

.modal-text {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.75;
  white-space: pre-line;
}

.modal-media {
  margin-top: 24px;
}

.modal-media img {
  width: 100%;
  border-radius: 2px;
  display: block;
}

.modal-media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 2px;
  display: block;
}

/* ----------------------------------------
   Form
   ---------------------------------------- */
.form-field {
  margin-bottom: 20px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 0.5px solid var(--line-mid);
  border-radius: 2px;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  outline: none;
  transition: border-color var(--dur-fast);
  resize: vertical;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
}

.form-textarea {
  min-height: 120px;
}

.form-submit {
  margin-top: 8px;
}

.form-submit:disabled {
  opacity: 0.5;
}

.form-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 14px;
  min-height: 1.4em;
  display: block;
}

.form-status[data-state="success"] {
  color: var(--accent);
}

.form-status[data-state="error"] {
  color: var(--bordeaux);
}

/* ----------------------------------------
   @media (max-width: 768px)
   ---------------------------------------- */
@media (max-width: 768px) {
  nav {
    padding: 16px clamp(1.5rem, 5vw, 3rem);
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 10px;
  }

  .product-pin {
    flex-direction: column;
    height: auto;
    min-height: 100svh;
    padding: clamp(6rem, 14vh, 9rem) clamp(2rem, 8vw, 8rem) clamp(4rem, 8vh, 6rem);
    justify-content: center;
    gap: 2rem;
  }

  .product-visual {
    width: 100%;
    max-width: 280px;
    align-self: center;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .contacts-meta {
    flex-direction: column;
    gap: 12px;
  }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}

/* ----------------------------------------
   @media (prefers-reduced-motion: reduce)
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  #hero-mesh {
    display: none;
  }
}
