/* W11-cleaner-tool — Landing page
   Design system Arborae (the same as the other projects), HTML + CSS, no build step.
   Direction: a careful, plain-spoken check-up of a Windows 11 PC. Quiet ink-green chrome,
   one green accent; the color lives in the app window (the status of each check).
   Dark by default, light with prefers-color-scheme. Motion (optional) only fades sections in.
*/

:root {
  color-scheme: dark light;

  /* Ink-green neutral ramp (dark) */
  --bg: #070b0a;
  --bg-raised: #0b1110;
  --surface: #0f1614;
  --surface-2: #141c1a;
  --sunk: #050807;
  --hairline: rgba(238, 244, 242, 0.08);
  --hairline-strong: rgba(238, 244, 242, 0.15);
  --nav-bg: rgba(7, 11, 10, 0.92);

  --text: #eef4f2;
  --muted: #a3b5af;
  --dim: #7d8a85;
  --code-text: #c9ddd6;

  /* One accent: the Arborae green */
  --brand: #00b585;
  --brand-hover: #19c796;
  --brand-text: #3ecf9f;
  --on-brand: #04110d;

  /* Status of a check (only inside the app window and the roadmap) */
  --ok: #3ecf9f;
  --warn: #e5b454;
  --bad: #ef7d72;
  --win: #4cc2ff;

  --window-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7);

  --radius-control: 10px;
  --radius-card: 16px;
  --radius-inner: 8px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 160ms;

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8f7;
    --bg-raised: #ffffff;
    --surface: #ffffff;
    --surface-2: #eef2f0;
    --sunk: #eef2f0;
    --hairline: rgba(16, 24, 22, 0.10);
    --hairline-strong: rgba(16, 24, 22, 0.18);
    --nav-bg: rgba(246, 248, 247, 0.94);

    --text: #131a18;
    --muted: #4b5753;
    --dim: #5f6c67;
    --code-text: #1f2d29;

    --brand: #00b585;
    --brand-hover: #00a377;
    --brand-text: #007a59;
    --on-brand: #04110d;

    --ok: #08764f;
    --warn: #9a5800;
    --bad: #c23a2b;
    --win: #005fb8;

    --window-shadow: 0 16px 40px -20px rgba(16, 24, 22, 0.22);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(0, 181, 133, 0.3); }

img { max-width: 100%; border-radius: var(--radius-inner); }

b { font-weight: 600; }

/* --- Layout --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

h3 { font-size: 1.125rem; margin-bottom: 8px; }

p { margin: 0 0 16px; color: var(--muted); }

a { color: inherit; text-decoration: none; }

.accent-text { color: var(--brand-text); }

:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; border-radius: 4px; }

/* --- Icons (one set, one size, one stroke) --- */
.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--hairline);
}

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

.brand {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  min-width: 0;
}

.brand-main {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  min-width: 0;
}

.brand-mark { display: inline-grid; place-items: center; flex: none; }
.brand-mark .mark { width: 24px; height: 24px; display: block; }
.brand-mark .mark rect { fill: var(--brand); }
.brand-mark .mark path {
  fill: none;
  stroke: var(--on-brand);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-mark.small .mark { width: 16px; height: 16px; }

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--fast) var(--ease);
}

.nav-links a:hover { color: var(--text); }

.nav-cta { display: flex; gap: 8px; align-items: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-control);
  font-weight: 500;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease),
    color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.btn:active { transform: scale(0.98); }

.btn.primary {
  background: var(--brand);
  color: var(--on-brand);
}

.btn.primary:hover { background: var(--brand-hover); }

.btn.ghost {
  border-color: var(--hairline-strong);
  color: var(--text);
  background: transparent;
}

.btn.ghost:hover { background: var(--surface-2); }

.btn.small { height: 36px; padding: 0 16px; font-size: 0.86rem; border-radius: 8px; }

.lang-btn { font-family: var(--font-mono); min-width: 52px; padding: 0 12px; }

/* --- Hero --- */
.hero {
  min-height: min(100svh, 880px);
  padding: 128px 0 64px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.lead {
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.lead b { color: var(--text); font-weight: 500; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.status-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 32px;
  max-width: 520px;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

.status-icon { color: var(--warn); display: inline-flex; padding-top: 2px; }
.status-note b { color: var(--text); }

.topics { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }

.pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  color: var(--dim);
}

/* --- App window (the illustration in the hero: the one rich moment) --- */
.window {
  background: var(--bg-raised);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--window-shadow);
}

.hero .window {
  max-width: 500px;
  margin-left: auto;
}

.win-bar {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
}

.win-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--dim);
}

.app-body { display: grid; grid-template-columns: 0.9fr 1.1fr; min-height: 320px; }

.app-side {
  padding: 12px;
  border-right: 1px solid var(--hairline);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-card {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--radius-inner);
  border: 1px solid transparent;
}

.app-card b { display: block; font-size: 0.82rem; color: var(--text); font-weight: 500; line-height: 1.4; }
.app-card span { display: block; font-size: 0.72rem; color: var(--dim); line-height: 1.4; }

/* Windows 11 navigation: a surface step and the short accent bar on the left */
.app-card.active { background: var(--surface-2); border-color: var(--hairline); }
.app-card.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: var(--win);
}

.app-main { padding: 16px; display: flex; flex-direction: column; gap: 8px; }

.app-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--muted);
}

.switch i {
  width: 28px;
  height: 16px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  position: relative;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.result {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-inner);
  background: var(--surface);
  border: 1px solid var(--hairline);
}

/* The status mark: a small square in the color of the result */
.result .g {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  background: color-mix(in srgb, currentColor 14%, transparent);
}

.result b { display: block; font-size: 0.8rem; color: var(--text); font-weight: 500; line-height: 1.4; }
.result span { display: block; font-size: 0.72rem; color: var(--muted); line-height: 1.5; }

.mock-caption {
  margin: 12px 0 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--dim);
}

/* --- Sections --- */
.section { padding-top: 96px; padding-bottom: 96px; }
.section-head { margin-bottom: 48px; max-width: 640px; }

/* Signature: the section labels are code comments */
.section-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--brand-text);
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: border-color var(--fast) var(--ease);
}

.card:hover { border-color: var(--hairline-strong); }

.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { font-size: 0.92rem; margin: 0; }

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: var(--radius-inner);
  border: 1px solid var(--hairline);
  color: var(--muted);
}

.card ul { margin: 12px 0 0; padding: 0; list-style: none; }
.card li {
  position: relative;
  padding-left: 16px;
  margin: 4px 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}
.card li::before { content: "›"; position: absolute; left: 2px; color: var(--dim); }

/* --- Code blocks --- */
pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--code-text);
  background: var(--sunk);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-inner);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 0;
  scrollbar-color: var(--hairline-strong) transparent;
  scrollbar-width: thin;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 0 4px;
}

pre code { background: none; border: none; padding: 0; font-size: inherit; }

/* --- Modes --- */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.mode {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px;
}

.mode .tag {
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.mode .tag::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--brand);
  vertical-align: 0.05em;
}

.mode.expert .tag::before { background: var(--win); }
.mode p { margin-bottom: 20px; }
.mode pre { font-size: 0.78rem; }

.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend span {
  font-size: 0.84rem;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: var(--radius-inner);
  border: 1px solid var(--hairline);
}

/* --- Steps (download) --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }

.step {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px;
}

.step-n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 16px;
  border-radius: var(--radius-inner);
  border: 1px solid var(--hairline-strong);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.step p { font-size: 0.9rem; margin: 0; }
.step code { white-space: nowrap; }

.quickstart {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px;
}

.quickstart .hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 16px 0 0;
}

/* --- CTA --- */
.cta-box {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-card);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-box h3 { font-size: 1.4rem; }
.cta-box p { margin: 8px 0 0; }

/* --- Roadmap --- */
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.roadmap li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
}

.roadmap .n {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--dim);
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.roadmap li.done .n { color: var(--ok); }
.roadmap b { color: var(--text); font-weight: 500; }
.roadmap p { margin: 4px 0 0; font-size: 0.9rem; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--hairline);
  margin-top: 40px;
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--dim);
  font-size: 0.88rem;
}

.footer-left { display: flex; align-items: center; gap: 8px; }
.footer-right { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--muted); transition: color var(--fast) var(--ease); }
.footer a:hover { color: var(--text); }

/* --- Entrance: hidden only while Motion is expected; removed on failure or after 1.5 s --- */
.motion-ready .reveal { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; }
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; min-height: 0; padding-top: 120px; }
  .hero .window { max-width: 560px; margin: 0 auto; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-cta .btn.primary { display: none; }
  .brand { font-size: 1rem; }
  .hero { padding-top: 104px; padding-bottom: 48px; }
  .cards-grid { grid-template-columns: 1fr; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .app-body { grid-template-columns: 1fr; min-height: 0; }
  .app-side { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .quickstart { padding: 20px; }
  .step, .mode, .card { padding: 20px; }
  .cta-box { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .roadmap li { grid-template-columns: 36px 1fr; gap: 12px; padding: 16px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* Legenda della modalità Base: pallini al posto delle emoji */
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.legend-ok { background: var(--ok); }
.legend-warn { background: var(--warn); }
.legend-bad { background: var(--bad); }
