/* ============================================================
   Enrico Romano — Portfolio
   Palette: bianco #FFFFFF · nero #101112 · oro #B08D3E
   ============================================================ */

:root {
  --white: #ffffff;
  --black: #101112;
  --ink: #1c1d1f;
  --gray: #6b6f76;
  --line: #e6e6e3;
  --paper: #f7f6f3;
  --gold: #b08d3e;
  --gold-soft: rgba(176, 141, 62, 0.12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--black); }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
  font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.3px;
  color: var(--black); text-decoration: none;
}
.nav__logo span { color: var(--gold); }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  color: var(--ink); text-decoration: none; font-size: 0.92rem; letter-spacing: 0.2px;
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.nav__links a:hover { color: var(--gold); border-color: var(--gold); }
.nav__cta {
  padding: 8px 18px; border: 1px solid var(--black); border-radius: 2px;
}
.nav__cta:hover { background: var(--black); color: var(--white) !important; border-color: var(--black) !important; }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--black); margin: 5px 0; transition: .25s; }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--line); background: var(--white); }
.hero__grid {
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 64px;
  align-items: center; min-height: calc(100vh - 68px); padding-top: 48px; padding-bottom: 48px;
}
.eyebrow {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--gold); margin-bottom: 14px; font-weight: 600;
}
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.12; margin-bottom: 22px; }
.hero__sub { font-size: 1.12rem; color: var(--gray); max-width: 54ch; margin-bottom: 34px; }
.hero__sub strong { color: var(--ink); font-weight: 600; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 28px; font-size: 0.95rem; letter-spacing: 0.4px;
  text-decoration: none; border-radius: 2px; transition: .22s; cursor: pointer;
  font-family: var(--sans); border: 1px solid var(--black);
}
.btn--solid { background: var(--black); color: var(--white); }
.btn--solid:hover { background: var(--gold); border-color: var(--gold); }
.btn--ghost { background: transparent; color: var(--black); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--full { width: 100%; text-align: center; }

.hero__panel {
  border: 1px solid var(--line); border-top: 3px solid var(--gold);
  padding: 34px 30px; background: var(--paper);
}
.panel-line { height: 60px; margin-bottom: 26px; background:
  linear-gradient(to top right, transparent 49.6%, var(--gold) 49.6%, var(--gold) 50.4%, transparent 50.4%); opacity: .55; }
.panel-stats div { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.panel-stats em { font-family: var(--serif); font-style: normal; font-size: 1.7rem; color: var(--black); min-width: 74px; }
.panel-stats span { color: var(--gray); font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 18px; }
.section__lead { color: var(--gray); max-width: 62ch; margin-bottom: 48px; font-size: 1.06rem; }
.section--gray { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section--dark { background: var(--black); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p, .section--dark li { color: #b9bcc2; }
.section--dark .section__lead { color: #9a9ea6; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 100%; }
.split p { color: var(--gray); }
.split strong { color: var(--ink); }

/* ---------- Cards (mercati) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 42px; }
.card {
  border: 1px solid #2a2c2f; padding: 30px 26px; background: #17181a;
  border-top: 3px solid var(--gold); transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); }
.card h3 { font-size: 1.18rem; margin-bottom: 12px; }
.card p { font-size: 0.94rem; margin-bottom: 16px; }
.card ul { list-style: none; }
.card li {
  font-size: 0.9rem; padding: 7px 0 7px 18px; position: relative;
  border-top: 1px solid #232527;
}
.card li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }

.strip { display: flex; flex-wrap: wrap; gap: 10px; }
.strip span {
  font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase;
  color: #9a9ea6; border: 1px solid #2a2c2f; padding: 7px 14px; border-radius: 2px;
}

/* ---------- Works (informatica) ---------- */
.works { display: flex; flex-direction: column; }
.work {
  display: grid; grid-template-columns: 90px 1fr; gap: 28px;
  padding: 38px 0; border-top: 1px solid var(--line);
}
.work:last-child { border-bottom: 1px solid var(--line); }
.work__index { font-family: var(--serif); font-size: 2rem; color: var(--gold); }
.work__body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.work__tag { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.6px; color: var(--gold); margin-bottom: 12px; font-weight: 600; }
.work__body p { color: var(--gray); max-width: 70ch; }
.work__link {
  display: inline-block; margin-top: 12px; color: var(--black); text-decoration: none;
  border-bottom: 1px solid var(--gold); font-size: 0.94rem; transition: color .2s;
}
.work__link:hover { color: var(--gold); }

/* ---------- Timeline ---------- */
.timeline { border-left: 2px solid var(--line); margin-left: 6px; }
.timeline__item { position: relative; padding: 0 0 40px 34px; }
.timeline__item:last-child { padding-bottom: 6px; }
.timeline__item::before {
  content: ""; position: absolute; left: -7px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--gold);
}
.timeline__when { font-size: 0.8rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 6px; }
.timeline__what h3 { font-size: 1.2rem; margin-bottom: 6px; }
.timeline__what p { color: var(--gray); max-width: 72ch; }

.langs { display: flex; gap: 48px; margin-top: 42px; flex-wrap: wrap; }
.langs div { display: flex; flex-direction: column; }
.langs strong { font-family: var(--serif); font-size: 1.05rem; }
.langs span { color: var(--gray); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact__info h2 { margin-bottom: 16px; }
.contact__list { list-style: none; margin-top: 26px; }
.contact__list li { padding: 12px 0; border-top: 1px solid #2a2c2f; color: #b9bcc2; }
.contact__list a { color: var(--white); text-decoration: none; border-bottom: 1px solid var(--gold); transition: color .2s; }
.contact__list a:hover { color: var(--gold); }

.contact__form { background: #17181a; border: 1px solid #2a2c2f; border-top: 3px solid var(--gold); padding: 36px 32px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.82rem; letter-spacing: 1.4px; text-transform: uppercase; color: #9a9ea6; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: var(--black); border: 1px solid #2a2c2f; color: var(--white);
  padding: 13px 14px; font-size: 0.98rem; font-family: var(--sans); border-radius: 2px;
  transition: border-color .2s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field input::placeholder, .field textarea::placeholder { color: #55585e; }

.hp { position: absolute; left: -9999px; height: 0; opacity: 0; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: #9a9ea6; margin-bottom: 22px; cursor: pointer; }
.consent input { margin-top: 4px; accent-color: var(--gold); }
.consent a { color: var(--white); border-bottom: 1px solid var(--gold); text-decoration: none; }

.form-status { margin-top: 14px; font-size: 0.92rem; min-height: 1.4em; }
.form-status.ok { color: #7fc98f; }
.form-status.err { color: #e08585; }

/* ---------- Footer ---------- */
.footer { background: var(--black); border-top: 1px solid #2a2c2f; padding: 34px 0 26px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer__inner p { color: #9a9ea6; font-size: 0.88rem; }
.footer__inner nav { display: flex; gap: 22px; }
.footer__inner a { color: #b9bcc2; text-decoration: none; font-size: 0.88rem; border-bottom: 1px solid transparent; transition: .2s; }
.footer__inner a:hover { color: var(--gold); border-color: var(--gold); }
.footer__note { color: #55585e; font-size: 0.78rem; margin-top: 18px; max-width: var(--maxw); }

/* ---------- Legal pages ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: 72px 24px 96px; }
.legal h1 { font-size: 2.1rem; margin-bottom: 8px; }
.legal .updated { color: var(--gray); font-size: 0.88rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--gray); font-size: 0.97rem; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal a { color: var(--black); border-bottom: 1px solid var(--gold); text-decoration: none; }
.legal .back { display: inline-block; margin-top: 46px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; min-height: 0; gap: 40px; }
  .hero__panel { display: none; }
  .cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 18px; }
  .contact { grid-template-columns: 1fr; gap: 44px; }
  .section { padding: 68px 0; }

  .nav__burger { display: block; }
  .nav__links {
    position: fixed; inset: 68px 0 auto 0; background: var(--white);
    flex-direction: column; gap: 0; padding: 12px 0 18px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform .3s ease;
  }
  .nav__links.open { transform: none; }
  .nav__links a { padding: 13px 26px; width: 100%; }
  .nav__cta { border: 0; }
  .work { grid-template-columns: 1fr; gap: 6px; }
}
