/* ============================================================
   JD-Design — jd-design.it
   Clean corporate / minimal engineering identity
   Palette: refined navy + steel, single warm signal accent
   Type: Archivo (display) · IBM Plex Sans (body) · IBM Plex Mono (labels)
   ============================================================ */

:root {
  --navy-900: #0e2233;
  --navy-800: #123049;
  --navy-700: #16324f;
  --navy-600: #1e4a72;
  --navy-500: #2e6094;
  --steel-400: #6f8ba6;
  --steel-200: #c3d2e0;
  --gray-50:  #f6f8fa;
  --gray-100: #eef2f6;
  --gray-200: #e2e9f0;
  --border:   #dce4ec;
  --text:     #1a2b3a;
  --text-mut: #566676;
  --white:    #ffffff;
  --accent:   #e07a1f;   /* warm signal — used sparingly */
  --accent-soft: #fbf1e6;

  --maxw: 1160px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 12px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(16,40,64,.04), 0 2px 8px rgba(16,40,64,.05);
  --shadow-md: 0 6px 24px rgba(16,40,64,.08);

  --ff-display: "Archivo", system-ui, sans-serif;
  --ff-body: "IBM Plex Sans", system-ui, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.bg-gray { background: var(--gray-50); }
.bg-navy { background: var(--navy-800); color: #eaf1f8; }
.center { text-align: center; }
.narrow { max-width: 720px; margin-inline: auto; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; color: var(--navy-900); }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
p { color: var(--text-mut); }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: #3a4b5a; line-height: 1.55; }
.bg-navy .lead { color: #cddbea; }

.eyebrow {
  font-family: var(--ff-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
}
.bg-navy .eyebrow { color: #f0a860; }
.bg-navy .eyebrow::before { background: #f0a860; }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; }
.section-head p { margin-top: 14px; font-size: 1.05rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--ff-body); font-weight: 600; font-size: .98rem;
  padding: 13px 24px; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-700); color: #fff; }
.btn-primary:hover { background: var(--navy-600); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #c76a15; }
.btn-ghost { background: transparent; color: var(--navy-700); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--navy-500); color: var(--navy-600); }
.bg-navy .btn-ghost { color: #fff; border-color: rgba(255,255,255,.28); }
.bg-navy .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn .arw { transition: transform .18s ease; }
.btn:hover .arw { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 70px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--navy-700); color: #fff;
  display: grid; place-items: center;
  font-family: var(--ff-display); font-weight: 800; font-size: .95rem;
  letter-spacing: -.02em;
}
.brand .mark span { color: var(--accent); }
.brand .name { font-family: var(--ff-display); font-weight: 800; font-size: 1.12rem; color: var(--navy-900); letter-spacing: -.02em; }
.brand .name b { color: var(--navy-500); font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: .95rem; font-weight: 500; color: var(--text);
  padding: 9px 13px; border-radius: 6px; transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--gray-100); color: var(--navy-700); }
.nav-links a.active { color: var(--navy-700); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; font-family: var(--ff-mono); font-size: .82rem; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.lang-switch a { padding: 6px 11px; color: var(--text-mut); font-weight: 500; }
.lang-switch a.on { background: var(--navy-700); color: #fff; }
.nav-cta { display: inline-flex; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy-800); margin: 4px 0; transition: .25s; border-radius: 2px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, #1b4165 0%, transparent 55%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 60%, #0c1f30 100%);
  color: #eaf1f8;
}
.hero::before {   /* subtle technical grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 100% at 70% 20%, #000 40%, transparent 92%);
}
.hero .container { position: relative; z-index: 1; padding-block: clamp(64px, 10vw, 116px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { color: #fff; }
.hero h1 .hl { color: #f0a860; }
.hero .lead { margin-top: 22px; max-width: 34ch; color: #cddbea; }
.hero .btn-row { margin-top: 34px; }
.hero-meta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 28px; }
.hero-meta .stat .n { font-family: var(--ff-display); font-weight: 800; font-size: 1.9rem; color: #fff; line-height: 1; }
.hero-meta .stat .l { font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #8fa9c2; margin-top: 8px; }

/* strip layout signature panel */
.strip-panel {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; padding: 22px;
}
.strip-panel .cap { font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #8fa9c2; display: flex; justify-content: space-between; margin-bottom: 16px; }
.strip-svg { width: 100%; height: auto; }

/* ---------- generic page hero (interior) ---------- */
.pagehero { background: var(--navy-800); color: #eaf1f8; position: relative; overflow: hidden; }
.pagehero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(130% 120% at 90% 0%, #000 30%, transparent 85%);
}
.pagehero .container { position: relative; z-index: 1; padding-block: clamp(52px, 8vw, 88px); }
.pagehero h1 { color: #fff; max-width: 16ch; }
.pagehero p { color: #cddbea; margin-top: 16px; max-width: 60ch; }
.breadcrumb { font-family: var(--ff-mono); font-size: .76rem; letter-spacing: .06em; color: #8fa9c2; margin-bottom: 18px; }
.breadcrumb a:hover { color: #fff; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--steel-200); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card .ic {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--gray-100); color: var(--navy-600);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card .ic svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 9px; }
.card p { font-size: .97rem; }
.card .tag { font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .06em; color: var(--accent); text-transform: uppercase; margin-bottom: 12px; display: block; }

/* feature list */
.flist li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.flist li:last-child { border-bottom: none; }
.flist .ck { flex-shrink: 0; width: 22px; height: 22px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-top: 2px; }
.flist .ck svg { width: 13px; height: 13px; }
.flist strong { color: var(--navy-900); font-weight: 600; }
.flist span { color: var(--text-mut); }

/* two-col text/media */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.rev > *:first-child { order: 2; }

/* process ribbon (signature) */
.ribbon { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.ribbon .step { padding: 26px 20px; border-right: 1px solid var(--border); position: relative; }
.ribbon .step:last-child { border-right: none; }
.ribbon .step .num { font-family: var(--ff-mono); font-size: .78rem; color: var(--accent); letter-spacing: .08em; }
.ribbon .step h4 { font-family: var(--ff-display); font-size: 1.02rem; margin: 12px 0 8px; color: var(--navy-900); }
.ribbon .step p { font-size: .9rem; }
.ribbon .step .dot { position: absolute; top: 26px; right: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--steel-200); border: 2px solid var(--white); z-index: 2; }
.ribbon .step:last-child .dot { display: none; }

/* stat band */
.statband { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.statband .s .n { font-family: var(--ff-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--navy-700); line-height: 1; }
.bg-navy .statband .s .n { color: #fff; }
.statband .s .l { font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); margin-top: 10px; }
.bg-navy .statband .s .l { color: #9fb6cc; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.contact-list li { display: flex; gap: 15px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--border); }
.contact-list li:last-child { border-bottom: none; }
.contact-list .ic { flex-shrink: 0; width: 42px; height: 42px; border-radius: 9px; background: var(--gray-100); color: var(--navy-600); display: grid; place-items: center; }
.contact-list .ic svg { width: 20px; height: 20px; }
.contact-list .k { font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mut); }
.contact-list .v { font-size: 1.05rem; font-weight: 600; color: var(--navy-900); }
.contact-list a.v:hover { color: var(--accent); }

.form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(24px, 4vw, 34px); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--navy-900); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; font-family: var(--ff-body); font-size: 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--gray-50); color: var(--text);
  transition: border-color .15s, background .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--navy-500); background: #fff; }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .82rem; color: var(--text-mut); margin-top: 6px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); color: #fff; border-radius: var(--radius); padding: clamp(36px, 6vw, 60px); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(224,122,31,.14); }
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: #cddbea; position: relative; margin: 14px 0 26px; max-width: 52ch; }
.cta-band .btn-row { position: relative; }

/* logos / software strip */
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.trust .item { font-family: var(--ff-mono); font-size: .82rem; letter-spacing: .04em; color: var(--text-mut); display: flex; align-items: center; gap: 8px; }
.trust .item svg { width: 16px; height: 16px; color: var(--navy-500); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-900); color: #b7c7d7; padding-block: clamp(48px, 7vw, 72px) 28px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer h4 { color: #fff; font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; margin-bottom: 16px; }
.site-footer a { color: #b7c7d7; }
.site-footer a:hover { color: #fff; }
.site-footer .fbrand { font-family: var(--ff-display); font-weight: 800; font-size: 1.3rem; color: #fff; margin-bottom: 12px; }
.site-footer .fbrand span { color: var(--accent); }
.footer-links li { margin-bottom: 10px; }
.footer-contact li { margin-bottom: 10px; display: flex; gap: 9px; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .84rem; color: #7f95aa; font-family: var(--ff-mono); letter-spacing: .03em; }

/* ---------- misc ---------- */
.pill { display: inline-flex; align-items: center; gap: 7px; font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-600); background: var(--gray-100); border: 1px solid var(--border); padding: 6px 12px; border-radius: 100px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { font-family: var(--ff-mono); font-size: .8rem; padding: 7px 13px; border-radius: 7px; background: var(--gray-100); color: var(--navy-700); border: 1px solid var(--border); }

.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .strip-panel { order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ribbon { grid-template-columns: repeat(2, 1fr); }
  .ribbon .step:nth-child(2n) { border-right: none; }
  .ribbon .step .dot { display: none; }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .site-header.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 12px var(--pad);
    box-shadow: var(--shadow-md);
  }
  .site-header.open .nav-links a { padding: 13px 10px; border-radius: 6px; }
  .grid-2, .grid-3, .split, .contact-grid, .statband { grid-template-columns: 1fr; }
  .split.rev > *:first-child { order: 0; }
  .statband { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .ribbon { grid-template-columns: 1fr; }
  .ribbon .step { border-right: none; border-bottom: 1px solid var(--border); }
  .ribbon .step:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal, .reveal { opacity: 1 !important; transform: none !important; }
}
