/* ============================================================
   Power Of Print - Landing "Lavori in Corso"
   Architettura CSS: Tokens / Base / Layout / Components / Utilities
   Nessuno stile inline. Design tokens centralizzati.
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Brand */
  --pop-magenta: #e91e63;
  --pop-magenta-dark: #c2185b;
  --pop-cyan: #00bcd4;
  --pop-lime: #8bc34a;
  --pop-black: #1a1a1a;
  --pop-grey: #f5f5f5;
  --pop-white: #ffffff;
  --pop-border: #e0e0e0;
  --pop-success: #2e7d32;
  --pop-success-bg: #e8f5e9;
  --pop-error: #c62828;
  --pop-error-bg: #ffebee;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 10px 30px rgba(233, 30, 99, 0.4);

  /* Layout */
  --max-width: 1100px;

  /* Typography */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;

  /* Transitions */
  --t-fast: 0.2s ease;
  --t-med: 0.3s ease;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--pop-white);
  color: var(--pop-black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--pop-magenta);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover,
a:focus-visible {
  color: var(--pop-magenta-dark);
}

:focus-visible {
  outline: 3px solid var(--pop-cyan);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: var(--space-sm) var(--space-md);
  background: var(--pop-magenta);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* --- Layout: Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background-color: var(--pop-black);
  color: #fff;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-img {
  height: 45px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-location {
  font-size: 0.7rem;
  color: #aaa;
}

.site-nav {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.nav-link {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: var(--pop-magenta);
}

.nav-link-whatsapp {
  background-color: var(--pop-lime);
  color: var(--pop-black);
  border-color: var(--pop-lime);
}

.nav-link-whatsapp:hover,
.nav-link-whatsapp:focus-visible {
  background-color: #7cb342;
  color: var(--pop-black);
}

/* --- Layout: Main / Sections --- */
main {
  display: block;
}

.info-section,
.subscribe-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* --- Components: Hero --- */
.hero {
  position: relative;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: linear-gradient(
    135deg,
    var(--pop-black) 0%,
    #2a2a2a 100%
  );
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    circle at 80% 20%,
    rgba(233, 30, 99, 0.18),
    transparent 50%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-pill);
  background-color: rgba(139, 195, 74, 0.15);
  border: 1px solid var(--pop-lime);
  color: var(--pop-lime);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-lg);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--pop-lime);
  box-shadow: 0 0 0 0 rgba(139, 195, 74, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 195, 74, 0.6);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(139, 195, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 195, 74, 0);
  }
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.9;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Components: Buttons --- */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast), background-color var(--t-fast),
    box-shadow var(--t-fast), color var(--t-fast);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px);
}

.btn-primary {
  background-color: var(--pop-magenta);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--pop-magenta-dark);
  color: #fff;
  box-shadow: 0 15px 40px rgba(233, 30, 99, 0.55);
}

.btn-secondary {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: #fff;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* --- Components: Cards --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.cards-grid-contact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  padding: var(--space-lg);
  background-color: var(--pop-grey);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med), box-shadow var(--t-med);
}

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

.card-accent {
  border-left: 5px solid var(--pop-lime);
}

.card h3 {
  color: var(--pop-magenta);
  margin-bottom: var(--space-sm);
  font-size: 1.3rem;
}

.card p {
  color: var(--pop-black);
  opacity: 0.85;
}

/* --- Components: Data cards --- */
.card-data {
  border-left: 5px solid var(--pop-cyan);
}

.card-title-accent {
  color: var(--pop-cyan);
  margin-bottom: var(--space-md);
  font-size: 1.2rem;
}

.address-block {
  font-style: normal;
  line-height: 1.8;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-list li {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.6;
}

.hours-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hours-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--pop-border);
}

.hours-row:last-child {
  border-bottom: none;
}

.hours-row dt {
  font-weight: 600;
}

.hours-row dd {
  text-align: right;
  opacity: 0.85;
}

.maps-link {
  display: inline-block;
  margin-top: var(--space-md);
  font-weight: 700;
  font-size: 0.9rem;
}

.map-container {
  margin-top: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--pop-border);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 350px;
  border: none;
}

/* --- Components: Subscribe --- */
.subscribe-section {
  background-color: var(--pop-grey);
  text-align: center;
}

.subscribe-inner {
  max-width: 560px;
  margin: 0 auto;
}

.subscribe-subtitle {
  margin-bottom: var(--space-lg);
  opacity: 0.8;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: stretch;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  text-align: left;
}

.form-field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-field input {
  width: 100%;
  height: 52px;
  padding: 0 var(--space-md);
  border: 2px solid var(--pop-border);
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--pop-white);
  color: var(--pop-black);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-field input:focus {
  border-color: var(--pop-magenta);
  outline: none;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15);
}

.subscribe-form .btn {
  align-self: center;
}

/* --- HTMX Indicator Styles (static, no inline injection) --- */
.htmx-indicator {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Honeypot: nascosto agli utenti, visibile ai bot */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Components: Feedback (HTMX partial) --- */
.form-feedback-area {
  margin-top: var(--space-md);
}

.feedback {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: left;
}

.feedback-success {
  background-color: var(--pop-success-bg);
  color: var(--pop-success);
  border: 1px solid var(--pop-success);
}

.feedback-error {
  background-color: var(--pop-error-bg);
  color: var(--pop-error);
  border: 1px solid var(--pop-error);
}

.feedback-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* --- Layout: Footer --- */
.site-footer {
  background-color: var(--pop-black);
  color: #fff;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.logo-img-footer {
  height: 36px;
}

.footer-brand .brand-name {
  font-size: 1.1rem;
  color: #fff;
}

.footer-meta {
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-meta a {
  color: var(--pop-magenta);
}

.footer-copy {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  opacity: 0.5;
}

.footer-legal {
  font-size: 0.75rem;
  opacity: 0.4;
}

.footer-credit {
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  opacity: 0.6;
}

.footer-credit-link {
  color: var(--pop-magenta);
  font-weight: 700;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .site-header {
    padding: var(--space-sm) var(--space-md);
  }

  .logo-img {
    height: 40px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .nav-link {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hours-row {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .hours-row dd {
    text-align: left;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .status-dot {
    animation: none;
  }

  .btn:hover,
  .card:hover {
    transform: none;
  }
}
