/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  --pf-bg: #ffffff;
  --pf-bg-soft: #f6f7fb;
  --pf-ink: #14171f;
  --pf-ink-soft: #5b6172;
  --pf-ink-faint: #9499a8;

  --pf-accent: #3b5bdb;
  --pf-accent-deep: #2a41a8;
  --pf-accent-soft: #eef1fd;

  --pf-console-bg: #14171f;
  --pf-console-text: #e7e9f1;

  --pf-tool-1: #0f9b8e; /* EventZone */
  --pf-tool-2: #3b5bdb; /* DateCalc */
  --pf-tool-3: #d9712f; /* SplitMyTip */
  --pf-tool-4: #7c3aed; /* WriteFormal */
  --pf-tool-5: #334155; /* SafeguardKey */

  --pf-border: #e7e9f1;
  --pf-radius-lg: 20px;
  --pf-radius: 14px;
  --pf-radius-sm: 8px;
  --pf-shadow: 0 16px 40px -16px rgba(20, 23, 31, 0.16);
  --pf-shadow-sm: 0 6px 18px -10px rgba(20, 23, 31, 0.18);

  --pf-font-display: "Manrope", sans-serif;
  --pf-font-body: "Inter", sans-serif;
  --pf-font-mono: "IBM Plex Mono", monospace;

  --pf-max: 1120px;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--pf-font-display); margin: 0; color: var(--pf-ink); }
p { margin: 0; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--pf-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.pf-eyebrow {
  font-family: var(--pf-font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pf-accent);
  margin: 0 0 14px;
}

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

/* =========================================================
   BUTTONS
   ========================================================= */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.pf-btn-primary {
  background: var(--pf-accent);
  color: #fff;
  box-shadow: var(--pf-shadow-sm);
}
.pf-btn-primary:hover { background: var(--pf-accent-deep); transform: translateY(-1px); }

.pf-btn-ghost {
  background: transparent;
  color: var(--pf-ink);
  border: 1.5px solid var(--pf-border);
}
.pf-btn-ghost:hover { border-color: var(--pf-accent); color: var(--pf-accent); }

.pf-btn-lg { padding: 16px 32px; font-size: 16px; }

/* =========================================================
   NAV
   ========================================================= */
.pf-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pf-border);
}

.pf-nav-inner {
  max-width: var(--pf-max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pf-nav-logo {
  font-family: var(--pf-font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.pf-nav-dot { color: var(--pf-accent); }

.pf-nav-links { display: flex; align-items: center; gap: 30px; }
.pf-nav-links a:not(.pf-nav-cta) {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--pf-ink-soft);
  transition: color 0.15s ease;
}
.pf-nav-links a:not(.pf-nav-cta):hover { color: var(--pf-ink); }

.pf-nav-cta {
  background: var(--pf-accent-soft);
  color: var(--pf-accent-deep);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease;
}
.pf-nav-cta:hover { background: var(--pf-accent); color: #fff; }

.pf-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.pf-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--pf-ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.pf-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pf-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pf-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.pf-nav-mobile {
  display: none;
  flex-direction: column;
  padding: 6px 24px 18px;
  gap: 4px;
  border-top: 1px solid var(--pf-border);
}
.pf-nav-mobile.is-open { display: flex; }
.pf-nav-mobile a {
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--pf-ink-soft);
  border-bottom: 1px solid var(--pf-border);
}
.pf-nav-mobile a:last-child { border-bottom: none; }

/* =========================================================
   HERO
   ========================================================= */
.pf-hero {
  padding: 88px 0 96px;
  background:
    radial-gradient(560px 360px at 88% 8%, var(--pf-accent-soft) 0%, transparent 70%);
}

.pf-hero-inner {
  max-width: var(--pf-max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.pf-hero-title {
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.pf-hero-tagline {
  font-family: var(--pf-font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: var(--pf-ink);
  margin-top: 22px;
}

.pf-hero-sub {
  font-size: 16px;
  color: var(--pf-ink-soft);
  max-width: 46ch;
  margin-top: 16px;
}

.pf-hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.pf-hero-visual {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 360px;
}

.pf-photo-frame {
  width: 280px;
  height: 280px;
  margin: 0 auto;
  border-radius: var(--pf-radius-lg);
  overflow: hidden;
  box-shadow: var(--pf-shadow);
  border: 1px solid var(--pf-border);
}
.pf-photo { width: 100%; height: 100%; object-fit: cover; }

.pf-console {
  position: relative;
  margin: -56px 0 0 auto;
  width: 268px;
  max-width: 86%;
  background: var(--pf-console-bg);
  border-radius: var(--pf-radius);
  box-shadow: var(--pf-shadow);
  overflow: hidden;
}

.pf-console-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
}
.pf-console-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.pf-console-dot:nth-child(1) { background: #e2625b; }
.pf-console-dot:nth-child(2) { background: #e3b341; }
.pf-console-dot:nth-child(3) { background: #57c278; }
.pf-console-title {
  margin-left: 6px;
  font-family: var(--pf-font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.pf-console-body {
  margin: 0;
  padding: 14px 14px 18px;
  font-family: var(--pf-font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--pf-console-text);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 132px;
}
.pf-console-cursor {
  color: var(--pf-accent-soft);
  animation: pf-blink 1s step-end infinite;
}
@keyframes pf-blink { 50% { opacity: 0; } }

/* =========================================================
   SECTIONS (generic)
   ========================================================= */
.pf-section { padding: 96px 0; }
.pf-section--soft { background: var(--pf-bg-soft); }

.pf-section-title {
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.pf-section-sub {
  margin-top: 16px;
  color: var(--pf-ink-soft);
  font-size: 16.5px;
  max-width: 58ch;
}

/* =========================================================
   CASE STUDY (progetto cliente)
   ========================================================= */
.pf-case {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  margin-top: 48px;
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-lg);
  overflow: hidden;
  box-shadow: var(--pf-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.pf-case:hover { box-shadow: var(--pf-shadow); transform: translateY(-2px); }

.pf-case-visual { position: relative; background: #0e1f30; }
.pf-browser-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
}
.pf-browser-chrome span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.pf-browser-url {
  margin-left: 8px;
  font-family: var(--pf-font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 5px;
}

.pf-case-mock {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(420px 220px at 20% 0%, rgba(184, 146, 42, 0.18), transparent 60%),
    linear-gradient(160deg, #163351 0%, #0e1f30 100%);
}
.pf-case-mock-label {
  font-family: "Georgia", serif;
  font-size: 21px;
  line-height: 1.4;
  text-align: center;
  color: #d4a93a;
  letter-spacing: 0.01em;
  padding: 0 30px;
}

.pf-case-content {
  padding: 38px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--pf-bg);
}

.pf-tag {
  display: inline-block;
  width: fit-content;
  font-family: var(--pf-font-mono);
  font-size: 12px;
  color: var(--pf-accent-deep);
  background: var(--pf-accent-soft);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.pf-case-content h3 { font-size: 23px; font-weight: 800; margin-bottom: 12px; }
.pf-case-content p { color: var(--pf-ink-soft); font-size: 15px; }

.pf-case-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 4px;
}
.pf-case-stack li {
  font-size: 12.5px;
  color: var(--pf-ink-soft);
  border: 1px solid var(--pf-border);
  padding: 5px 11px;
  border-radius: 999px;
}

.pf-case-link {
  margin-top: 20px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--pf-accent);
}

/* =========================================================
   TOOLS GRID
   ========================================================= */
.pf-tools-head {
  margin-top: 88px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pf-tools-head h3 { font-size: 24px; font-weight: 800; }

.pf-tools-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pf-tool-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  background: var(--pf-bg);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.pf-tool-card:hover {
  box-shadow: var(--pf-shadow-sm);
  transform: translateY(-2px);
  border-color: transparent;
}

.pf-tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 16px;
}
.pf-tool-icon--1 { background: color-mix(in srgb, var(--pf-tool-1) 14%, white); color: var(--pf-tool-1); }
.pf-tool-icon--2 { background: color-mix(in srgb, var(--pf-tool-2) 14%, white); color: var(--pf-tool-2); }
.pf-tool-icon--3 { background: color-mix(in srgb, var(--pf-tool-3) 14%, white); color: var(--pf-tool-3); }
.pf-tool-icon--4 { background: color-mix(in srgb, var(--pf-tool-4) 14%, white); color: var(--pf-tool-4); }
.pf-tool-icon--5 { background: color-mix(in srgb, var(--pf-tool-5) 14%, white); color: var(--pf-tool-5); }
.pf-tool-icon--next { background: var(--pf-bg-soft); color: var(--pf-ink-faint); }

.pf-tool-card h4 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.pf-tool-card p { font-size: 14px; color: var(--pf-ink-soft); flex: 1; }

.pf-tool-link {
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pf-accent);
}

.pf-tool-card--next {
  border-style: dashed;
  align-items: flex-start;
  justify-content: center;
}
.pf-tool-card--next h4 { color: var(--pf-ink-faint); }
.pf-tool-card--next p { color: var(--pf-ink-faint); }

/* =========================================================
   SERVIZI
   ========================================================= */
.pf-services-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}

.pf-service { padding-top: 4px; }
.pf-service-num {
  display: block;
  font-family: var(--pf-font-mono);
  font-size: 13px;
  color: var(--pf-ink-faint);
  margin-bottom: 10px;
}
.pf-service h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.pf-service p { color: var(--pf-ink-soft); font-size: 15px; max-width: 42ch; }

/* =========================================================
   CONTATTI
   ========================================================= */
.pf-contact { text-align: center; max-width: 640px; }
.pf-contact .pf-eyebrow,
.pf-contact .pf-section-title,
.pf-contact .pf-section-sub { margin-left: auto; margin-right: auto; }
.pf-contact .pf-btn { margin-top: 34px; }

/* =========================================================
   FOOTER
   ========================================================= */
.pf-footer { padding: 30px 0 40px; border-top: 1px solid var(--pf-border); }
.pf-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  color: var(--pf-ink-faint);
}
.pf-footer-meta { font-family: var(--pf-font-mono); font-size: 12.5px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .pf-case { grid-template-columns: 1fr; }
  .pf-case-mock { height: 220px; }
  .pf-tools-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .pf-nav-links { display: none; }
  .pf-nav-toggle { display: flex; }

  .pf-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .pf-hero-sub { margin-left: auto; margin-right: auto; }
  .pf-hero-actions { justify-content: center; }
  .pf-hero-visual { margin-top: 16px; max-width: 320px; }
  .pf-console { margin: -48px auto 0; }
}

@media (max-width: 560px) {
  .pf-section { padding: 72px 0; }
  .pf-hero { padding: 64px 0 72px; }
  .pf-tools-grid { grid-template-columns: 1fr; }
  .pf-case-content { padding: 30px 24px; }
}
