/* ==========================================================
   holdirc – foglio di stile
   Per cambiare il colore d'accento basta modificare --accent.
   ========================================================== */

:root {
  --bg: #151821;
  --bg-alt: #1B1F2A;
  --surface: #232937;
  --border: #2E3546;
  --line: #2A3040;
  --terminal: #10131A;
  --text: #F4F1EA;
  --text-soft: #C9CDD6;
  --text-muted: #A9AEBA;
  --accent: #F26A45;
  --accent-hover: #FF8A68;

  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1248px;
  --gutter: clamp(20px, 5vw, 96px);
  --section-y: clamp(64px, 9vw, 112px);
  --radius: 12px;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
}

h2 {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -1px;
}

h3 { font-size: 22px; line-height: 1.25; }

p { margin: 0; }

.mono { font-family: var(--font-mono); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 16px; }

/* ---------- Wordmark e bottoni ---------- */

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--text);
}
.wordmark span { color: var(--accent); }

.btn {
  display: inline-block;
  padding: 16px 26px;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); }
.btn-ghost { border: 1.5px solid #3A4152; color: var(--text); }
.btn-ghost:hover { border-color: var(--text-soft); color: var(--text); }
.btn-small { padding: 11px 18px; font-size: 16px; border-radius: 10px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(21, 24, 33, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 16px;
  font-weight: 500;
}
.main-nav a:not(.btn) { color: var(--text-soft); text-decoration: none; }
.main-nav a:not(.btn):hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero { padding: clamp(64px, 9vw, 112px) 0 clamp(72px, 10vw, 120px); }

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
}

.hero-text {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(44px, 6.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -2.5px;
}

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--text-soft);
  max-width: 600px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }

.hero-badge {
  width: clamp(240px, 28vw, 400px);
  flex-shrink: 0;
}

/* ---------- Sezioni ---------- */

.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-alt); }

.section-intro {
  margin-top: 12px;
  font-size: 19px;
  color: var(--text-soft);
}

/* Come connettersi */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 48px 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.step {
  counter-increment: step;
  padding: 32px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
}
.step .mono { font-size: 18px; overflow-wrap: anywhere; }

.terminal {
  margin: 0;
  padding: 28px 32px;
  border-radius: 16px;
  background: var(--terminal);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-soft);
  overflow-x: auto;
}
.terminal .prompt { color: var(--accent); }

code {
  font-family: var(--font-mono);
  font-size: .9em;
  color: var(--text);
}

/* Servizi */

.services {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.service {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 40px;
}

.service-name {
  width: 320px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
}

.service-body {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.service-body p { color: var(--text-soft); margin-bottom: 6px; }

.cmd {
  display: block;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--terminal);
  border: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-soft);
  overflow-x: auto;
  white-space: nowrap;
}

/* Canali */

.channels {
  margin: 40px 0 0;
  border-top: 1px solid var(--line);
}

.channel {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 40px;
}
.channel dt {
  width: 320px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--accent);
}
.channel dd { margin: 0; font-size: 19px; color: var(--text-soft); }

/* Layout a due colonne: titolo a sinistra, contenuto a destra
   (usato da "Chi siamo" e "Regole") */

.section-border { border-top: 1px solid var(--line); }

.split-layout { display: flex; gap: 96px; }
.split-layout h2 { width: 360px; flex-shrink: 0; }

/* Chi siamo */

.prose {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* Regole */

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  flex-grow: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 48px;
}
.rules li { display: flex; flex-direction: column; gap: 8px; }
.rules p { color: var(--text-soft); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 48px 0; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-footer .wordmark { font-size: 22px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  font-size: 16px;
  color: var(--text-muted);
}
.footer-links a { color: var(--text-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .main-nav a:not(.btn) { display: none; }
  .split-layout { flex-direction: column; gap: 32px; }
  .split-layout h2 { width: auto; }
}

@media (max-width: 860px) {
  .hero-inner { flex-direction: column-reverse; align-items: flex-start; gap: 40px; }
  .hero-badge { width: 180px; }
  .steps { grid-template-columns: 1fr; }
  .channel { flex-direction: column; gap: 6px; }
  .channel dt { width: auto; }
  .service { flex-direction: column; gap: 14px; }
  .service-name { width: auto; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .prose { font-size: 18px; }
  .wordmark { font-size: 22px; }
  .brand img { width: 32px; height: 32px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .rules { grid-template-columns: 1fr; gap: 28px; }
  .terminal { font-size: 15px; padding: 22px; }
  .step { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
