/* ============================================================
   Claude AI per Professionisti - Companion Site
   Design system matching book cover aesthetic
   ============================================================ */

/* Fonts loaded via <link> in HTML for faster rendering (no @import blocking) */

:root {
  --bg:            #141829;
  --bg-2:          #1c2137;
  --bg-3:          #232845;
  --bg-card:       #1a1f35;
  --orange:        #FF6B35;
  --orange-bright: #FF8C5A;
  --orange-deep:   #E85A22;
  --orange-glow:   rgba(255, 107, 53, 0.15);
  --teal:          #00CED1;
  --teal-bright:   #2DD4BF;
  --teal-deep:     #00A8AB;
  --teal-glow:     rgba(0, 206, 209, 0.12);
  --text:          #F0F0F5;
  --text-2:        #C8C8D4;
  --text-muted:    #8B8FA8;
  --border:        rgba(255, 107, 53, 0.25);
  --border-teal:   rgba(0, 206, 209, 0.25);
  --line:          rgba(255, 255, 255, 0.06);
  --display:       'Outfit', 'Helvetica Neue', sans-serif;
  --body:          'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  --mono:          'JetBrains Mono', 'Courier New', monospace;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --max-w:         1120px;
  --gutter:        clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: var(--orange); color: var(--bg); }

/* Background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

/* Top glow */
body::after {
  content: '';
  position: fixed;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 60%;
  background: radial-gradient(ellipse, var(--orange-glow) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   Layout
   ============================================================ */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

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

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 24, 41, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 64px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--teal);
  border-radius: 1px;
}

/* The underline bar is for top-level nav; inside dropdown menus it would land
   on the next item and strike through it. Active menu items use teal text. */
.nav-menu a.active::after { display: none; }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(20, 24, 41, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem var(--gutter);
    gap: 1.2rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a.active::after { display: none; }
  .nav-mobile-toggle { display: flex; }
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

p {
  color: var(--text-2);
  max-width: 64ch;
}

p + p { margin-top: 1em; }

.text-orange { color: var(--orange); }
.text-teal   { color: var(--teal); }
.text-muted  { color: var(--text-muted); }

.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1;
}

.btn-primary {
  background: #C65218;
  color: #fff;
  box-shadow: 0 0 30px var(--orange-glow), 0 4px 15px rgba(0,0,0,0.3);
}

.btn-primary:hover {
  background: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(255,107,53,0.25), 0 8px 25px rgba(0,0,0,0.3);
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 0 20px var(--orange-glow), 0 2px 8px rgba(0,0,0,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--border-teal);
}

.btn-secondary:hover {
  background: var(--teal-glow);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.97);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 10px 18px;
  font-size: 0.85rem;
}

.btn-ghost:hover {
  color: var(--teal);
}

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.card:hover {
  border-color: var(--border);
  box-shadow: 0 0 40px var(--orange-glow);
  transform: translateY(-3px);
}

.card-teal:hover {
  border-color: var(--border-teal);
  box-shadow: 0 0 40px var(--teal-glow);
}

.card-flat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

/* ============================================================
   Role cards + icons
   ============================================================ */

.role-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  background: var(--orange-glow);
  border: 1px solid var(--border);
  color: var(--orange);
}

.role-icon.teal {
  background: var(--teal-glow);
  border-color: var(--border-teal);
  color: var(--teal);
}

/* ============================================================
   Grid layouts
   ============================================================ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 3vw, 1.5rem);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 1.5rem);
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Hero (Home)
   ============================================================ */

.hero {
  padding: clamp(3rem, 10vw, 7rem) 0 clamp(2rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 1.25rem;
}

.hero-text h1 .line-teal {
  display: block;
  color: var(--teal);
}

.hero-text .subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-2);
  margin-bottom: 2rem;
  max-width: 50ch;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-cover {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-cover img {
  max-width: 340px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow:
    0 25px 60px rgba(0,0,0,0.5),
    0 0 80px var(--orange-glow);
  transition: transform 0.4s ease;
}

.hero-cover img:hover {
  transform: scale(1.03);
}

.hero-cover::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-cover { order: -1; }
  .hero-cover img { max-width: 260px; }
  .hero-actions { justify-content: center; }
  .hero-text .subtitle { margin-left: auto; margin-right: auto; }
}

/* ============================================================
   Badge
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--teal-glow);
  color: var(--teal);
  border: 1px solid var(--border-teal);
  margin-bottom: 1.25rem;
}

.badge-orange {
  background: var(--orange-glow);
  color: var(--orange);
  border-color: var(--border);
}

/* ============================================================
   Chapter index
   ============================================================ */

.chapter-list {
  list-style: none;
  counter-reset: chapter;
}

.chapter-part {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.chapter-part:first-child { margin-top: 0; }

.chapter-item {
  padding: 0.6rem 0;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  color: var(--text-2);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.chapter-item:last-child { border-bottom: none; }

.chapter-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 2.5em;
}

.chapter-title { font-weight: 500; }

/* ============================================================
   Prompt template blocks
   ============================================================ */

.template-block {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  border: none;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
}

.template-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-title .chapter-ref {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
}

.template-title .bonus-ref {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--bg-dark);
  background: var(--orange);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.template-expand {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: transform 0.25s;
  user-select: none;
}

.template-block.open .template-expand {
  transform: rotate(180deg);
}

.template-body {
  display: none;
  padding: 1.25rem;
}

.template-block.open .template-body {
  display: block;
}

.template-pre {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 10px 16px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
}

.copy-btn:hover {
  background: var(--orange-glow);
  border-color: var(--border);
  color: var(--orange);
}

.copy-btn.copied {
  background: var(--teal-glow);
  border-color: var(--border-teal);
  color: var(--teal);
}

.template-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

/* ============================================================
   Role tabs (Resources page)
   ============================================================ */

.role-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.role-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s;
}

.role-tab:hover {
  border-color: var(--border);
  color: var(--text);
  background: var(--orange-glow);
}

.role-tab.active {
  background: #C65218;
  color: #fff;
  border-color: #C65218;
  box-shadow: 0 0 20px var(--orange-glow);
}

.role-tab .tab-icon { font-size: 1.1em; }

.role-panel { display: none; }
.role-panel.active { display: block; }

.role-panel-header {
  margin-bottom: 2rem;
}

.role-panel-header .persona-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.subsection-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.subsection-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-teal);
}

/* ============================================================
   Email form
   ============================================================ */

.email-gate {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.email-gate::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 120%, var(--orange-glow) 0%, transparent 50%);
  pointer-events: none;
}

.email-gate > * { position: relative; }

.email-gate h2 {
  margin-bottom: 0.75rem;
}

.email-gate p {
  margin: 0 auto 1.5rem;
  text-align: center;
}

.email-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.email-form .form-field { min-width: 0; }

.email-form input[type="email"],
.email-form input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.email-form input[type="email"]::placeholder,
.email-form input[type="text"]::placeholder { color: var(--text-muted); }
.email-form input[type="email"]:focus,
.email-form input[type="text"]:focus { border-color: var(--orange); }

.email-form .btn {
  grid-column: 1 / -1;
  justify-self: center;
  white-space: nowrap;
  padding: 14px 28px;
  line-height: normal;
  border: 1.5px solid transparent;
}

@media (max-width: 500px) {
  .email-form {
    grid-template-columns: 1fr;
  }
}

.field-error {
  font-size: 0.78rem;
  color: #f87171;
  margin-top: 0.25rem;
  min-height: 1.2em;
}

.email-form input.input-error {
  border-color: #f87171;
}

.email-form-status {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.4em;
}

.email-form-status.status-ok { color: var(--teal); }
.email-form-status.status-err { color: #f87171; }

.email-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.email-privacy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ============================================================
   Steps (Installation guide)
   ============================================================ */

.steps { counter-reset: step; }

.step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.step:last-child { border-bottom: none; }

.step-num {
  counter-increment: step;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--orange-glow);
  border: 2px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--orange);
}

.step-content h3 {
  margin-bottom: 0.75rem;
}

.step-content p {
  margin-bottom: 1rem;
}

.screenshot {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-top: 1rem;
}

.screenshot-placeholder {
  background: var(--bg-2);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.screenshot-placeholder .icon { font-size: 2rem; margin-bottom: 0.5rem; }

@media (max-width: 600px) {
  .step {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ============================================================
   Download cards
   ============================================================ */

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s;
}

.download-card:hover {
  border-color: var(--border);
  box-shadow: 0 0 30px var(--orange-glow);
  transform: translateY(-2px);
}

.download-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--orange-glow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.download-info { flex: 1; }

.download-info h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.download-info .file-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.download-card .btn {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* ============================================================
   Feature list (Home page benefits)
   ============================================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.feature-item:hover { background: rgba(255,255,255,0.02); }

.feature-check {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--teal-glow);
  border: 1px solid var(--border-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--teal);
  font-size: 0.85rem;
  margin-top: 1px;
}

.feature-item span {
  font-size: 0.92rem;
  color: var(--text-2);
  font-weight: 500;
}

@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   About (Prompt Press)
   ============================================================ */

.about-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
}

.about-logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-logo img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  object-fit: contain;
}

@media (max-width: 600px) {
  .about-block {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-logo { margin: 0 auto; }
}

/* Book covers on the About page: cover image, title below, links to the book. */
.about-books {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}
.about-book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: 160px;
  text-decoration: none;
  transition: transform 0.2s;
}
.about-book-card:hover { transform: translateY(-4px); }
.about-book-card img {
  width: 160px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.about-book-card span {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.25;
}
.about-book-card:hover span { color: var(--teal); }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-brand img {
  height: 32px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--teal); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* ============================================================
   Animations
   ============================================================ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.6s ease both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================================
   Scroll reveal
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Breadcrumb
   ============================================================ */

.breadcrumb {
  padding: 0.75rem 0 0;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--teal);
}

.breadcrumb li + li::before {
  content: '›';
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.breadcrumb [aria-current="page"] {
  color: var(--text-2);
}

/* ============================================================
   Misc utilities
   ============================================================ */

.text-body-sm { font-size: 0.88rem; }
.text-body-xs { font-size: 0.82rem; }

.faq-heading {
  color: var(--orange);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.download-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.download-desc-sm {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.h1-page { font-size: clamp(1.8rem, 5vw, 3rem); }
.h2-section { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }
.step-number { font-size: 1.8rem; margin-bottom: 0.75rem; }

.card-role {
  text-align: center;
  padding: 1.5rem 1rem;
}

.card-role h3 {
  font-size: 0.85rem;
}

.card-role .role-icon {
  margin: 0 auto 0.75rem;
}

.card-role .text-orange {
  font-size: 0.9rem;
}

.card-role .text-body-xs {
  margin-top: 0.4rem;
}

.pattern-heading {
  color: var(--orange);
  font-size: 0.9rem;
}

.pattern-desc {
  font-size: 0.82rem;
  margin-top: 0.4rem;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ============================================================
   Skip to content (a11y)
   ============================================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 12px 24px;
  background: var(--orange);
  color: #fff;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

/* ============================================================
   Focus-visible (a11y)
   ============================================================ */

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

.btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--teal-glow);
}

.nav-links a:focus-visible,
.footer-links a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

.role-tab:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.template-header:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

/* ============================================================
   Reduced motion (a11y)
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-cover img:hover {
    transform: none;
  }
}

/* ============================================================
   Mobile nav toggle (improved touch target)
   ============================================================ */

@media (max-width: 768px) {
  .nav-mobile-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ============================================================
   Blog: Listing page
   ============================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.blog-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  overflow: hidden;
}

a.blog-card:hover {
  border-color: var(--border-teal);
  box-shadow: 0 0 40px var(--teal-glow);
  transform: translateY(-3px);
}

.blog-card-soon {
  opacity: 0.55;
  cursor: default;
}

.blog-card-body {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-card-reading {
  color: var(--text-muted);
}

.blog-card-badge-soon {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-3);
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.blog-card-title {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.blog-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-2);
  max-width: 64ch;
  line-height: 1.65;
}

.blog-card-cta {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  transition: color 0.2s;
}

a.blog-card:hover .blog-card-cta {
  color: var(--teal-bright);
}

/* ============================================================
   Blog: Article page
   ============================================================ */

.blog-article {
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 4rem);
}

.blog-article-header {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.blog-article-separator {
  color: var(--text-muted);
}

.blog-article-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

.blog-article-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-2);
  line-height: 1.7;
  max-width: 60ch;
}

.blog-article-author {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-article-author-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
}

/* Article body typography */
.blog-article-body {
  max-width: 720px;
}

.blog-article-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

.blog-article-body h2 {
  font-family: var(--display);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.blog-article-body h3 {
  font-family: var(--display);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-article-body ul,
.blog-article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-2);
}

.blog-article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.blog-article-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--teal);
  background: var(--bg-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2);
  font-style: italic;
}

.blog-article-body .template-pre {
  margin: 1.25rem 0;
}

.blog-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 1.5rem 0;
}

/* Inline CTA box in article */
.blog-cta-inline {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2.5rem 0;
}

.blog-cta-inline p {
  font-size: 0.95rem;
  color: var(--text-2);
  margin-bottom: 0;
}

/* Share links */
.blog-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  max-width: 720px;
}

.blog-share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.blog-share-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.25s;
}

.blog-share-link:hover {
  background: var(--teal-glow);
  border-color: var(--border-teal);
  color: var(--teal);
}

/* Related posts */
.blog-related {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  max-width: 720px;
}

.blog-related-title {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.blog-related-item {
  display: block;
  padding: 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.blog-related-item:hover {
  border-color: var(--border-teal);
  background: var(--bg-3);
}

.blog-related-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.blog-related-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   Blog: Responsive
   ============================================================ */

@media (max-width: 600px) {
  .blog-share {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

/* ============================================================
   Role landing cards (Risorse index)
   ============================================================ */

.role-landing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 1.5rem);
}

.role-landing-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  text-decoration: none;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.role-landing-card:hover {
  border-color: var(--border-teal);
  box-shadow: 0 0 40px var(--teal-glow);
  transform: translateY(-3px);
}

.role-landing-card .role-icon {
  margin-bottom: 1rem;
}

.role-landing-card h3 {
  color: var(--text);
  margin-bottom: 0.4rem;
}

.role-landing-card .role-landing-desc {
  font-size: 0.88rem;
  color: var(--text-2);
  margin-bottom: 0.75rem;
  max-width: 40ch;
}

.role-landing-card .role-landing-count {
  display: block;
  font-size: 0.78rem;
  font-family: var(--mono);
  color: var(--text-muted);
}

.role-landing-card .role-landing-cta {
  display: block;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  transition: color 0.2s;
}

.role-landing-card:hover .role-landing-cta {
  color: var(--teal-bright);
}

@media (max-width: 900px) {
  .role-landing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .role-landing-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   Hub nav: book/Risorse dropdowns (native <details>) + language selector
   ============================================================ */
.nav-dropdown { position: relative; }
.nav-dropdown > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after { content: "\25BE"; font-size: 0.7em; opacity: 0.8; }
.nav-dropdown > summary:hover,
.nav-dropdown[open] > summary { color: var(--teal); }
.nav-menu {
  list-style: none; position: absolute; top: calc(100% + 14px); left: 0; margin: 0; padding: 6px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  min-width: 240px; box-shadow: 0 12px 30px rgba(0,0,0,0.4); z-index: 200;
}
.nav-menu li a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; color: var(--text-2); }
.nav-menu li a:hover { background: var(--bg-2); color: var(--teal); }
.nav-menu .nav-menu-sep { border-top: 1px solid var(--line); margin: 4px 0; }
.nav-lang .nav-menu { min-width: 170px; }
.nav-lang .nav-menu a[aria-current="true"] { color: var(--teal); font-weight: 600; }
@media (max-width: 768px) {
  .nav-menu { position: static; box-shadow: none; margin-top: 6px; background: transparent; border: none; min-width: 0; }
  .nav-dropdown { width: 100%; }
  .nav-lang { padding: 6px 0; }
}


/* ============================================================
   Hub (brand catalogue) — edition landing at /<ed>/
   ============================================================ */
.hub-hero { max-width: var(--max-w); margin: 0 auto; padding: clamp(3rem,8vw,6rem) var(--gutter) 1.5rem; text-align: center; }
.hub-hero .kicker { color: var(--teal); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.hub-hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem,5vw,3.4rem); line-height: 1.05; margin: .6rem 0; }
.hub-hero p { color: var(--text-2); max-width: 48ch; margin: 0 auto; font-size: 1.05rem; }
.hub-grid { max-width: var(--max-w); margin: 0 auto; padding: 1.5rem var(--gutter) 5rem; display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.hub-card { display: flex; gap: 1.25rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; transition: border-color .2s, transform .2s; }
.hub-card:hover { border-color: var(--border-teal); transform: translateY(-3px); }
.hub-card img { width: 132px; height: auto; align-self: flex-start; border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.hub-card-body { display: flex; flex-direction: column; }
.hub-card .badge { align-self: flex-start; font-size: .64rem; font-weight: 700; letter-spacing: .05em; padding: 4px 10px; border-radius: 99px; margin-bottom: .6rem; }
.hub-card .badge.novita { background: var(--orange); color: #fff; }
.hub-card .badge.amazon { background: var(--teal-glow); color: var(--teal); border: 1px solid var(--border-teal); }
.hub-card h2 { font-family: var(--display); font-size: 1.3rem; line-height: 1.1; margin-bottom: .4rem; }
.hub-card > .hub-card-body > p { color: var(--text-2); font-size: .9rem; margin-bottom: 1rem; flex: 1; }
.hub-card-cta { display: flex; gap: .6rem; flex-wrap: wrap; }
.hub-card-cta .btn { padding: 10px 18px; font-size: .85rem; }
@media (max-width: 768px) { .hub-grid { grid-template-columns: 1fr; } .hub-card img { width: 104px; } }

.hub-grid:has(> .hub-card:only-child) { grid-template-columns: minmax(0, 640px); justify-content: center; }


/* ============================================================
   Book scope: insegnanti — swap the teal accent for the cover's lime-yellow
   ============================================================ */
.book-insegnanti {
  --teal:        #B4D900;
  --teal-bright: #C9F02A;
  --teal-deep:   #97B800;
  --teal-glow:   rgba(180, 217, 0, 0.14);
  --border-teal: rgba(180, 217, 0, 0.34);
}
.fondamenta-box {
  background: var(--bg-2); border: 1px solid var(--border-teal);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem); margin-top: 1.5rem;
}
.fondamenta-box ol { margin: 1rem 0 0 1.2rem; color: var(--text); }
.fondamenta-box li { margin-bottom: .5rem; }
.fondamenta-box .filo { color: var(--teal); font-weight: 600; margin-top: 1rem; }
.outcome-list { list-style: none; display: grid; gap: .75rem; margin-top: 1rem; }
.outcome-list li { padding-left: 1.8rem; position: relative; color: var(--text-2); }
.outcome-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }

/* Buy link inside a book dropdown reads as the purchase CTA */
.nav-menu .nav-menu-buy { color: var(--orange); font-weight: 700; }
.nav-menu .nav-menu-buy:hover { color: var(--orange); }

/* Hub publisher band */
.hub-about { max-width: 640px; margin: 3.5rem auto 0; padding-top: 2.5rem; border-top: 1px solid var(--line); text-align: center; }
.hub-about p { color: var(--text-2); margin: 0.75rem auto 1.25rem; max-width: 56ch; }
.hub-chips { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.hub-chips span { font-size: 0.8rem; font-weight: 600; color: var(--teal); background: var(--teal-glow); border: 1px solid var(--border-teal); border-radius: 999px; padding: 4px 14px; }
.hub-about-link { color: var(--teal); font-weight: 600; text-decoration: none; }
.hub-about-link:hover { text-decoration: underline; }
