/* =====================================================================
   Antica Corderia Marra — Gruppo Ropex
   Palette: mare, navy, sabbia/corda
   ===================================================================== */

:root {
  --navy:       #0D2B45;   /* blu notte — primario */
  --ocean:      #1A5F8A;   /* blu oceano */
  --sky:        #2E86C1;   /* blu cielo/acqua */
  --rope:       #C4A882;   /* sabbia/corda — accento caldo */
  --rope-dark:  #A8855A;
  --sea-light:  #EBF5FB;   /* sfondo pagine */
  --sea-pale:   #F4FAFD;   /* sfondo alternato */
  --white:      #FFFFFF;
  --ink:        #0F2537;   /* testo principale */
  --muted:      #4A7090;   /* testo secondario */
  --border:     #C0D8EC;
  --shadow:     0 8px 28px rgba(13,43,69,.13);
  --radius:     14px;
  --maxw:       1180px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }
a { color: var(--sky); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ocean); }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--sky);
  margin-bottom: .8rem;
  display: inline-block;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy);
  color: #B8D4E8;
  font-size: .82rem;
  letter-spacing: .03em;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 12px;
}
.topbar a { color: #D8EAF5; }
.topbar .group-tag { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.topbar .group-tag b { color: var(--rope); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 12px rgba(13,43,69,.07);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand .logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}
.brand .brand-text strong {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.1;
  display: block;
  color: var(--navy);
}
.brand .brand-text span {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center; }
.menu a {
  color: var(--ink);
  font-weight: 500;
  font-size: .97rem;
  padding: 6px 2px;
  position: relative;
}
.menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  height: 2px; width: 0;
  background: var(--sky);
  transition: width .25s;
}
.menu a:hover::after,
.menu a.active::after { width: 100%; }
.menu a.active { color: var(--navy); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; font-size: 1.7rem; color: var(--navy); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--sky);
  color: var(--white);
  padding: 13px 30px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .03em;
  border: 2px solid var(--sky);
  cursor: pointer;
  transition: all .2s;
  font-size: .96rem;
}
.btn:hover { background: var(--ocean); border-color: var(--ocean); color: var(--white); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,95,138,.3); }
.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); border-color: var(--navy); }
.btn-navy:hover { background: #091e2e; border-color: #091e2e; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: clamp(90px, 15vw, 170px) 0;
}
.hero .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .45;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow { color: var(--rope); }
.hero h1 { color: var(--white); max-width: 18ch; margin-inline: auto; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.hero p { color: #D0E8F5; max-width: 54ch; margin: 1.2rem auto 2rem; font-size: 1.12rem; }
.hero .hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .tagline { margin-top: 2.4rem; font-family: var(--serif); font-style: italic; letter-spacing: .08em; color: #B8D8F0; font-size: 1.05rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 100px) 0; }
.section.alt { background: var(--sea-light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head p { color: var(--muted); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(13,43,69,.18); }
.card .icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--ocean), var(--navy));
  display: grid; place-items: center;
  color: var(--white); font-size: 1.6rem; margin-bottom: 18px;
}
.card h3 { color: var(--navy); margin-bottom: .3em; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.split .media img {
  width: 100%; height: 380px;
  object-fit: cover;
  display: block;
}

/* ---------- Prodotti ---------- */
.cat-bar { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 48px; }
.cat-bar button {
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 500;
  transition: all .2s;
}
.cat-bar button.active,
.cat-bar button:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.product {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.product:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(13,43,69,.16); }
.product .thumb {
  aspect-ratio: 4/3;
  background: var(--sea-light);
  display: grid;
  place-items: center;
  color: var(--muted);
  position: relative;
  overflow: hidden;
}
.product .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.product .thumb .tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--navy);
  color: var(--white);
  font-size: .72rem;
  letter-spacing: .05em;
  padding: 4px 12px;
  border-radius: 999px;
  z-index: 1;
}
.product .body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.product .body h3 { font-size: 1.12rem; margin-bottom: .25em; color: var(--navy); }
.product .specs { list-style: none; padding: 0; margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.product .specs li { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.product .body .btn { margin-top: auto; text-align: center; }

/* ---------- Photo banner ---------- */
.photo-banner {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy), var(--ocean));
  color: var(--white);
  text-align: center;
  padding: clamp(56px, 9vw, 90px) 0;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #C0DDEF; max-width: 52ch; margin: 0 auto 1.8rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats .num { font-family: var(--serif); font-size: 2.6rem; color: var(--ocean); line-height: 1; }
.stats .lbl { color: var(--muted); font-size: .9rem; letter-spacing: .04em; margin-top: 6px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ocean); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit; font-size: 1rem;
  background: var(--white); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(46,134,193,.15);
}
.form-field textarea { min-height: 130px; resize: vertical; }

.info-line { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.info-line .ic {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  background: var(--sea-light);
  border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 1.2rem;
}
.info-line strong { display: block; color: var(--navy); }
.info-line span { color: var(--muted); }
.map-embed { margin-top: 12px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.map-embed iframe { width: 100%; height: 260px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #A8C8E0; padding: 64px 0 28px; }
.site-footer a { color: #C8E0F0; }
.site-footer a:hover { color: var(--rope); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer h4 { color: var(--white); font-family: var(--sans); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 9px; }
.foot-brand .logo-img { height: 44px; width: auto; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: .85; }
.foot-brand p { font-size: .95rem; line-height: 1.6; }
.ropex-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(196,168,130,.15);
  border: 1px solid rgba(196,168,130,.4);
  padding: 6px 14px; border-radius: 999px;
  color: var(--rope); font-size: .8rem; letter-spacing: .06em;
  margin-top: 14px;
}
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 22px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .82rem; color: #6A9AB8;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .topbar-shipping { display: none; }
  body.page-prodotti .topbar-shipping { display: inline; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split .media img { height: 280px; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column; gap: 0;
    padding: 8px 24px 18px;
    border-bottom: 2px solid var(--border);
    display: none;
    box-shadow: 0 8px 20px rgba(13,43,69,.1);
  }
  .menu.open { display: flex; }
  .menu li { width: 100%; border-bottom: 1px solid var(--border); }
  .menu li:last-child { border-bottom: 0; }
  .menu a { display: block; padding: 12px 0; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
