/* ============================================================
   vincenzomaiorana.it — Main Stylesheet
   ============================================================ */

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

:root {
  --orange: #f77a49;
  --orange-dim: rgba(247, 122, 73, 0.12);
  --orange-border: rgba(247, 122, 73, 0.3);
  --bg: #0c0c0e;
  --bg2: #111114;
  --bg3: #18181c;
  --text: #e8e8ed;
  --muted: #8a8a96;
  --border: rgba(255, 255, 255, 0.07);
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--orange);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 8px 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ── FOCUS ── */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  cursor: default;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 6%;
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  color: var(--orange);
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 6% 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(247, 122, 73, 0.12) 0%, transparent 70%);
  pointer-events: none;
  animation: blob-drift-a 18s ease-in-out infinite;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(247, 122, 73, 0.07) 0%, transparent 70%);
  pointer-events: none;
  animation: blob-drift-b 22s ease-in-out infinite;
}
@keyframes blob-drift-a {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-35px, 40px) scale(1.06);
  }
  66% {
    transform: translate(25px, -30px) scale(0.94);
  }
}
@keyframes blob-drift-b {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -25px) scale(0.96);
  }
  66% {
    transform: translate(-20px, 35px) scale(1.04);
  }
}
.hero-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--orange);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero-tag::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--orange);
}
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero h1 span {
  color: var(--orange);
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:hover {
  background: #e8693a;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--orange-border);
  transform: translateY(-1px);
}

.hero-stats {
  margin-top: 4rem;
  display: flex;
  gap: 2.2rem;
  flex-wrap: wrap;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}
.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ── HERO SOCIALS ── */
.hero-socials {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  animation: fadeUp 0.5s 0.35s ease both;
}
.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}
.hero-socials a:hover {
  border-color: var(--orange-border);
  color: var(--orange);
  transform: translateY(-2px);
}

/* ── SECTIONS ── */
section {
  padding: 6rem 6%;
}
.section-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--orange);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 3.5rem;
}

/* ── SPECIALIZATIONS ── */
#specializzazioni {
  background: var(--bg2);
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.spec-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition:
    border-color 0.25s,
    transform 0.25s;
  position: relative;
  overflow: hidden;
}
.spec-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.spec-card:hover {
  border-color: var(--orange-border);
  transform: translateY(-3px);
}
.spec-card:hover::before {
  opacity: 1;
}
.spec-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.spec-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.spec-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── STACK ── */
#stack {
  background: var(--bg);
}
.stack-categories {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.stack-cat-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  transition: all 0.2s;
}
.pill:hover {
  border-color: var(--orange-border);
  background: var(--orange-dim);
  color: var(--orange);
}
.pill.highlight {
  border-color: var(--orange-border);
  background: var(--orange-dim);
  color: var(--orange);
}

/* ── APPROACH ── */
#approccio {
  background: var(--bg2);
}
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.approach-text p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-size: 0.97rem;
}
.approach-text p strong {
  color: var(--text);
}
.approach-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.approach-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}
.approach-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.approach-card h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.approach-card p {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── CASE STUDIES ── */
#case-study {
  background: var(--bg);
}
.cs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.cs-card-wide {
  grid-column: 1 / -1;
}
.cs-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition:
    border-color 0.25s,
    transform 0.25s;
  position: relative;
  overflow: hidden;
}
.cs-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.cs-card:hover {
  border-color: var(--orange-border);
  transform: translateY(-3px);
}
.cs-card:hover::after {
  opacity: 1;
}
.cs-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}
.cs-sector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.cs-sector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}
.cs-metric {
  text-align: right;
}
.cs-metric-value {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}
.cs-metric-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cs-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}
.cs-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.4rem;
}
.cs-desc strong {
  color: var(--text);
}
.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cs-tag {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

/* ── CONTACT ── */
#contatti {
  background: var(--bg);
}
.contact-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.contact-wrapper .section-sub {
  margin: 0 auto 2.5rem;
}
.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}
.contact-item:hover {
  border-color: var(--orange-border);
  color: var(--text);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
}
footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover {
  color: var(--orange);
}
.footer-links {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}
.footer-links a svg {
  display: block;
}

/* ── DIVIDER ── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--bg3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-tag {
  animation: fadeUp 0.5s ease both;
}
.hero h1 {
  animation: fadeUp 0.5s 0.1s ease both;
}
.hero-desc {
  animation: fadeUp 0.5s 0.2s ease both;
}
.hero-cta {
  animation: fadeUp 0.5s 0.3s ease both;
}
.hero-stats {
  animation: fadeUp 0.5s 0.4s ease both;
}

/* ── GO TO TOP ── */
#go-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 998;
  width: 42px;
  height: 42px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.25s,
    border-color 0.2s,
    color 0.2s;
  transform: translateY(8px);
}
#go-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
#go-top:hover {
  border-color: var(--orange-border);
  color: var(--orange);
  transform: translateY(-2px);
}

/* ── COOKIE BANNER ── */
#cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: calc(100% - 4rem);
  max-width: 780px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
  transform: translateX(-50%) translateY(12px);
}
#cookie-banner.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.cookie-text {
  flex: 1;
  min-width: 220px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}
.cookie-text strong {
  color: var(--text);
}
.cookie-text a {
  color: var(--orange);
  text-decoration: none;
}
.cookie-text a:hover {
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: 0.7rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.btn-cookie-accept {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--orange-border);
  border-radius: 7px;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cookie-accept:hover {
  background: var(--orange-dim);
  border-color: var(--orange);
}
.btn-cookie-necessary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cookie-necessary:hover {
  border-color: var(--orange-border);
  color: var(--text);
}

/* ── PRIVACY PAGE ── */
.policy-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 8rem 6% 6rem;
}
.policy-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.policy-page .policy-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3rem;
}
.policy-page h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2.5rem 0 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.policy-page h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}
.policy-page p {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.policy-page p strong {
  color: var(--text);
}
.policy-page ul {
  margin: 0.5rem 0 1rem 1.2rem;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.8;
}
.policy-page a {
  color: var(--orange);
  text-decoration: none;
}
.policy-page a:hover {
  text-decoration: underline;
}
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.85rem;
}
.cookie-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  background: var(--bg3);
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.cookie-table td {
  padding: 0.6rem 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.cookie-table tr:last-child td {
  border-bottom: none;
}

/* ── TYPEWRITER CURSOR ── */
.hero-tag.typing::after {
  content: "|";
  color: var(--orange);
  margin-left: 2px;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  translate: 0 24px;
  transition:
    opacity 0.6s ease,
    translate 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  translate: 0;
}

/* ── UTILITIES ── */
.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}

.btn-lg {
  margin-bottom: 2rem;
  font-size: 1rem;
  padding: 0.85rem 2rem;
}

.cs-sector-dot--financial {
  background: #4fc3f7;
}

.cs-sector-dot--public {
  background: #a78bfa;
}

.project-pills {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-sm {
  font-size: 0.75rem;
}

.project-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--orange);
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

.section-center {
  text-align: center;
  margin-top: 2.5rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav {
    padding: 1rem 5%;
  }
  .nav-links {
    display: none;
  }
  section {
    padding: 4rem 5%;
  }
  .hero {
    padding: 7rem 5% 4rem;
  }
  .hero-stats {
    gap: 2rem;
  }
  .approach-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .cs-grid {
    grid-template-columns: 1fr;
  }
  .cs-card-wide {
    grid-column: auto;
  }
  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
