/* ============================================================
   DANPETE — Sistema San Genic
   Palette: Navy #1B3A6B | Teal #0097B2 | Light #E8F5F9 | White #FFF
   ============================================================ */

:root {
  --navy:   #1B3A6B;
  --teal:   #0097B2;
  --teal-dark: #00788E;
  --light:  #E8F5F9;
  --white:  #FFFFFF;
  --gray:   #F5F7FA;
  --text:   #1A2233;
  --muted:  #5A6478;
  --border: #D8E4EF;
  --warn:   #E65C00;

  --radius: 12px;
  --shadow: 0 4px 24px rgba(27,58,107,.10);
  --shadow-lg: 0 8px 40px rgba(27,58,107,.16);
  --transition: .2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Typography ---- */
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { color: var(--muted); }

/* ---- Layout ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section--gray { background: var(--gray); }
.section--navy { background: var(--navy); }
.section--light { background: var(--light); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.75rem; border-radius: 8px;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--teal); color: var(--white); border-color: var(--teal);
}
.btn--primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn--outline {
  background: transparent; color: var(--white); border-color: var(--white);
}
.btn--outline:hover { background: var(--white); color: var(--navy); }
.btn--navy {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}
.btn--navy:hover { background: #142d56; }
.btn--lg { padding: 1rem 2.25rem; font-size: 1.05rem; }

/* ---- Pill / Badge ---- */
.pill {
  display: inline-block; padding: .3rem .9rem;
  background: var(--light); color: var(--teal); border-radius: 99px;
  font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.pill--warn { background: #FFF0E8; color: var(--warn); }

/* ---- Header / Nav ---- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(27,58,107,.06);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav__logo {
  display: flex; align-items: center; flex-shrink: 0;
}
.nav__logo img { height: 44px; width: auto; display: block; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: color var(--transition);
}
.nav__links a:hover, .nav__links a.active { color: var(--navy); }
.nav__cta { margin-left: 1rem; }
.nav__burger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav__burger span {
  display: block; width: 24px; height: 2px; background: var(--navy);
  margin: 5px 0; transition: var(--transition);
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0d2447 100%);
  color: var(--white); padding: 6rem 0 5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(0,151,178,.25) 0%, transparent 60%);
}
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; }
.hero__eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: 1rem; }
.hero__title { color: var(--white); margin-bottom: 1.25rem; }
.hero__title em { font-style: normal; color: var(--teal); }
.hero__sub { font-size: 1.1rem; color: rgba(255,255,255,.75); margin-bottom: 2rem; max-width: 480px; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__image { position: relative; }
.hero__image-placeholder {
  width: 100%; aspect-ratio: 4/3; border-radius: var(--radius);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255,255,255,.3);
}
.hero__badges {
  display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem;
}
.hero__badge {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: var(--white); border-radius: 99px; padding: .35rem .9rem;
  font-size: .8rem; font-weight: 600;
}

/* ---- Warning Banner ---- */
.warn-banner {
  background: #FFF3E8; border-left: 4px solid var(--warn);
  padding: 1.25rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0;
  display: flex; gap: 1rem; align-items: flex-start;
}
.warn-banner__icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.warn-banner__text strong { color: var(--warn); display: block; margin-bottom: .25rem; }
.warn-banner__text p { font-size: .9rem; color: #7A4020; margin: 0; }

/* ---- Steps (come funziona) ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step {
  text-align: center; padding: 2rem 1.5rem;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); position: relative;
}
.step__num {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--teal); color: var(--white);
  font-size: 1.3rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.step h3 { color: var(--navy); margin-bottom: .5rem; }

/* ---- Products Grid ---- */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.product-card {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: var(--white);
  display: flex; flex-direction: column; transition: box-shadow var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-lg); }
.product-card--featured { border: 2px solid var(--teal); }
.product-card__img {
  width: 100%; aspect-ratio: 4/3;
  background: var(--light); display: flex; align-items: center;
  justify-content: center; font-size: 3rem;
  position: relative;
}
.product-card__badge {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--teal); color: var(--white);
  padding: .3rem .75rem; border-radius: 99px; font-size: .75rem; font-weight: 700;
}
.product-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.product-card__title { color: var(--navy); margin-bottom: .5rem; }
.product-card__desc { font-size: .9rem; margin-bottom: 1.25rem; flex: 1; }
.product-card__price { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin-bottom: 1rem; }
.product-card__price small { font-size: .85rem; color: var(--muted); font-weight: 400; }

/* ---- Features Grid ---- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.feature { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.feature__icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--light); color: var(--teal);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.feature h3 { color: var(--navy); }

/* ---- Stats ---- */
.stats { display: flex; gap: 3rem; flex-wrap: wrap; justify-content: center; }
.stat { text-align: center; }
.stat__num { font-size: 2.8rem; font-weight: 800; color: var(--teal); line-height: 1; }
.stat__label { font-size: .9rem; color: rgba(255,255,255,.7); margin-top: .25rem; }

/* ---- Section Header ---- */
.section__header { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section__header h2 { color: var(--navy); margin-bottom: .75rem; }

/* ---- Testimonials ---- */
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.testimonial {
  background: var(--white); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow);
}
.testimonial__stars { color: #F5A623; font-size: 1rem; margin-bottom: .75rem; }
.testimonial__text { font-style: italic; margin-bottom: 1rem; }
.testimonial__author { font-size: .85rem; font-weight: 600; color: var(--navy); }

/* ---- CTA Block ---- */
.cta-block {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  border-radius: var(--radius); padding: 3.5rem 2.5rem; text-align: center; color: var(--white);
}
.cta-block h2 { color: var(--white); margin-bottom: 1rem; }
.cta-block p { color: rgba(255,255,255,.85); max-width: 540px; margin: 0 auto 2rem; }
.cta-block__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- Form ---- */
.form { display: grid; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--navy); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: .75rem 1rem; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: .95rem; color: var(--text);
  background: var(--white); transition: border-color var(--transition);
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,151,178,.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ---- Footer ---- */
.footer {
  background: var(--navy); color: rgba(255,255,255,.7);
  padding: 4rem 0 2rem;
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
  padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 2rem;
}
.footer__brand { margin-bottom: 1rem; }
.footer__brand a {
  display: inline-block;
  background: white;
  border-radius: 8px;
  padding: 8px 14px;
}
.footer__brand img { height: 36px; width: auto; display: block; }
.footer__desc { font-size: .9rem; max-width: 280px; color: rgba(255,255,255,.8); }
.footer__col h4 { color: var(--white); margin-bottom: 1rem; font-size: .9rem; }
.footer__col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer__col ul a { font-size: .88rem; transition: color var(--transition); color: rgba(255,255,255,.7); }
.footer__col ul a:hover { color: var(--white); }
.footer__social { display: flex; gap: .75rem; margin-top: 1.25rem; }
.footer__social a {
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(255,255,255,.18); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800; transition: background var(--transition);
  text-decoration: none; letter-spacing: -.5px;
}
.footer__social a:hover { background: var(--teal); }

.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; flex-wrap: wrap; gap: 1rem;
}
.footer__bottom a { color: rgba(255,255,255,.5); }
.footer__bottom a:hover { color: var(--white); }

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0d2447 100%);
  padding: 4rem 0; color: var(--white); text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: .75rem; }
.page-hero p { color: rgba(255,255,255,.75); max-width: 560px; margin: 0 auto; font-size: 1.1rem; }

/* ---- Accordion (FAQ) ---- */
.accordion { display: flex; flex-direction: column; gap: .75rem; }
.accordion-item {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.accordion-item__toggle {
  width: 100%; text-align: left; padding: 1.1rem 1.5rem;
  background: var(--white); border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1rem; font-weight: 600; color: var(--navy);
  transition: background var(--transition);
}
.accordion-item__toggle:hover { background: var(--gray); }
.accordion-item__toggle .arrow { transition: transform var(--transition); font-size: .8rem; }
.accordion-item.open .accordion-item__toggle .arrow { transform: rotate(180deg); }
.accordion-item__body {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  background: var(--white);
}
.accordion-item.open .accordion-item__body { max-height: 400px; }
.accordion-item__body p { padding: 0 1.5rem 1.25rem; font-size: .95rem; }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { background: var(--navy); color: var(--white); padding: .9rem 1rem; text-align: left; }
td { padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--gray); }
td:first-child { font-weight: 600; color: var(--navy); }

/* ---- Sticky refill bar ---- */
.refill-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: var(--warn); color: var(--white);
  padding: .85rem 1.5rem;
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  flex-wrap: wrap; font-size: .9rem; font-weight: 600;
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  transform: translateY(100%); transition: transform .4s ease;
}
.refill-bar.visible { transform: translateY(0); }
.refill-bar a { color: var(--white); text-decoration: underline; }
.refill-bar__close {
  background: none; border: none; color: var(--white);
  cursor: pointer; font-size: 1.2rem; margin-left: 1rem; opacity: .7;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__image { display: none; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .nav__links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--white); padding: 1.5rem;
    box-shadow: var(--shadow); gap: 1.25rem;
    border-bottom: 1px solid var(--border);
  }
  .nav__links.open + .nav__cta { display: block; padding: 0 1.5rem 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats { gap: 2rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .section { padding: 3.5rem 0; }
}
