/* ═══════════════════════════════════════════
   TOKENS — LIGHT
═══════════════════════════════════════════ */
:root {
  --bg:          #e8ebed;
  --surface:     #ffffff;
  --surface2:    #f4f5f7;
  --border:      #cccccc;
  --text:        #333333;
  --text-dim:    #5b6370;
  --primary:     #b93d16;
  --primary-fg:  #ffffff;
  --primary-solid: #b93d16;
  --secondary:   #2f4b79;
  --secondary-fg:#ffffff;
  --accent:      #d6e4f0;
  --accent-fg:   #1e3a8a;
  --muted:       #f9fafb;
  --radius:      1.25rem;
  --radius-sm:   0.5rem;
  --font:        'Outfit', system-ui, sans-serif;
  --mono:        'FiraCode', 'Courier New', monospace;
  --serif:       'Merriweather', Georgia, serif;
  --shadow:      0 2px 16px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.12);
  --transition:  0.3s cubic-bezier(0.25,0.1,0.25,1);
  --header-h:    64px;
}

/* DARK */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #1a1a1a;
    --surface:   #202020;
    --surface2:  #2a2a2a;
    --border:    #353535;
    --text:      #e5e5e5;
    --text-dim:  #9a9a9a;
    --accent:    #2a3656;
    --accent-fg: #bfdbfe;
    --shadow:    0 2px 16px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.5);
  }
}
[data-theme="dark"] {
  --bg:        #1a1a1a;
  --surface:   #202020;
  --surface2:  #2a2a2a;
  --border:    #353535;
  --text:      #e5e5e5;
  --text-dim:  #9a9a9a;
  --accent:    #2a3656;
  --accent-fg: #bfdbfe;
  --shadow:    0 2px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.5);
}
[data-theme="light"] {
  --bg:        #e8ebed;
  --surface:   #ffffff;
  --surface2:  #f4f5f7;
  --border:    #cccccc;
  --text:      #333333;
  --text-dim:  #5b6370;
  --accent:    #d6e4f0;
  --accent-fg: #1e3a8a;
  --shadow:    0 2px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}
@media (hover: none) { body { cursor: auto; } }
a { color: inherit; text-decoration: none; cursor: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: none; }

/* ═══════════════════════════════════════════
   LOADER
═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════════════════ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  z-index: 9999;
  transition: transform .12s ease;
}
.cursor-ring {
  width: 40px; height: 40px;
  z-index: 9998;
  transition: width .28s ease, height .28s ease;
}
.cursor-ring::before,
.cursor-ring::after {
  content: '';
  position: absolute;
  top: 0; width: 10px; height: 100%;
  border-top: 1.5px solid var(--primary);
  border-bottom: 1.5px solid var(--primary);
  opacity: 0;
  transition: opacity .22s ease, transform .26s ease;
}
.cursor-ring::before {
  left: 0;
  border-left: 1.5px solid var(--primary);
  transform: translateX(5px);
}
.cursor-ring::after {
  right: 0;
  border-right: 1.5px solid var(--primary);
  transform: translateX(-5px);
}
body.cursor-hover .cursor-ring { width: 56px; height: 56px; }
body.cursor-hover .cursor-ring::before,
body.cursor-hover .cursor-ring::after { opacity: 1; transform: translateX(0); }
body.cursor-hover .cursor-dot { transform: translate(-50%,-50%) scale(2); }
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(232,235,237,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] #header {
  background: rgba(40,55,85,.80);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #header {
    background: rgba(40,55,85,.80);
  }
}
.header-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase;
}
.header-logo-img {
  height: 40px; width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
[data-theme="dark"] .header-logo-img {
  mix-blend-mode: screen;
  filter: brightness(1.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .header-logo-img {
    mix-blend-mode: screen;
    filter: brightness(1.4);
  }
}
.header-nav {
  display: flex; align-items: center; gap: 4px;
}
.nav-item {
  position: relative;
}
.nav-link {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: .83rem; font-weight: 500; color: var(--text-dim);
  transition: color var(--transition), background var(--transition);
  display: flex; align-items: center; gap: 6px;
  background: none; border: none;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface2); }
.nav-link svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Dropdown */
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s, visibility .2s, transform .2s;
  z-index: 100;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: .82rem; color: var(--text-dim);
  transition: background var(--transition), color var(--transition);
  cursor: none;
}
.dropdown-item:hover { background: var(--surface2); color: var(--text); }
.dropdown-item .app-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.dropdown-sep {
  height: 1px; background: var(--border); margin: 4px 0;
}

/* Theme toggle */
.theme-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); transition: all var(--transition);
  flex-shrink: 0;
}
.theme-btn:hover { background: var(--surface); color: var(--text); }
.theme-btn svg { width: 16px; height: 16px; }

/* Lang selector */
.lang-btn {
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
  font-family: var(--mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .08em; color: var(--text-dim);
  display: flex; align-items: center; gap: 4px;
  transition: all var(--transition);
}
.lang-btn:hover { color: var(--text); background: var(--surface); }
.lang-dropdown { min-width: 120px; }
.lang-opt { font-family: var(--mono); font-size: .75rem; }
.lang-opt.active { color: var(--primary); font-weight: 600; }

/* ── Hamburger button ── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px;
  background: none; border: none; padding: 4px;
  cursor: none; z-index: 1001; position: relative;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav overlay ── */
.mobile-nav {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.77,0,.18,1);
  overflow-y: auto;
  padding: var(--header-h) 0 40px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-inner {
  display: flex; flex-direction: column;
  padding: 24px 32px 40px;
  gap: 4px;
}
.mobile-nav-close {
  align-self: flex-end;
  background: none; border: 1px solid var(--border);
  border-radius: 50%; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); cursor: none;
  margin-bottom: 16px;
  transition: border-color .2s, color .2s;
}
.mobile-nav-close:hover { border-color: var(--primary); color: var(--primary); }
.mobile-nav-link {
  font-size: 2rem; font-weight: 700;
  letter-spacing: -.02em; color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s ease;
}
.mobile-nav-link:hover { color: var(--primary); }
.mobile-nav-sep {
  height: 1px; background: var(--border);
  margin: 24px 0 20px;
}
.mobile-nav-langs {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 24px;
}
.mobile-lang-opt {
  font-size: .8rem; font-weight: 600; letter-spacing: .1em;
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid var(--border); color: var(--text-dim);
  cursor: none; transition: all .2s;
}
.mobile-lang-opt.active,
.mobile-lang-opt:hover {
  border-color: var(--primary); color: var(--primary);
}
.mobile-theme-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 1px solid var(--border);
  color: var(--text-dim); font-size: .9rem;
  padding: 10px 20px; border-radius: 100px;
  cursor: none; width: fit-content;
  transition: all .2s;
}
.mobile-theme-btn:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 768px) {
  #header { padding: 0 20px; }
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .header-logo span { font-size: .85rem; }
}

/* ═══════════════════════════════════════════
   SECTION BASE
═══════════════════════════════════════════ */
.section {
  position: relative;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════
   SECTION 1 — HERO
═══════════════════════════════════════════ */
#hero {
  height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
#particles-js {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #edf1f8 50%, #dde6f4 100%);
  transition: background .5s ease;
}
[data-theme="dark"] #particles-js {
  background: linear-gradient(to top right, #000814 0%, #003566 50%, #0077b6 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #particles-js {
    background: linear-gradient(to top right, #000814 0%, #003566 50%, #0077b6 100%);
  }
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center; width: 100%;
  padding: 0 24px;
  max-width: 800px;
}
.hero-brand {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -.04em; text-transform: uppercase; text-align: center;
  color: var(--text);
  margin-bottom: 20px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp .8s .2s forwards;
}
.hero-tagline {
  font-family: var(--sans);
  font-size: clamp(.85rem, 1.8vw, 1.05rem);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center; gap: .5em;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp .8s .4s forwards;
}
.tagline-roller {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  height: 1.6em;
  position: relative;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-dim); line-height: 1.6;
  margin-bottom: 40px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp .8s .6s forwards;
}
.hero-ctas {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp .8s .8s forwards;
}
.btn-primary {
  padding: 14px 32px; border-radius: 100px;
  background: var(--primary-solid); color: var(--primary-fg);
  font-weight: 600; font-size: .9rem; letter-spacing: .02em;
  border: 2px solid var(--primary-solid);
  transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover {
  background: transparent; color: var(--primary);
  transform: translateY(-2px); box-shadow: var(--shadow-lg);
}
.btn-secondary {
  padding: 14px 32px; border-radius: 100px;
  background: transparent; color: #f59e0b;
  font-weight: 600; font-size: .9rem; letter-spacing: .02em;
  border: 2px solid #f59e0b;
  transition: all var(--transition);
}
.btn-secondary:hover {
  background: #f59e0b; color: #1a1000;
  transform: translateY(-2px);
}
[data-theme="dark"] #hero .btn-secondary,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #hero .btn-secondary {
    color: #fbbf24;
    border-color: #fbbf24;
  }
}
[data-theme="dark"] #hero .btn-secondary:hover {
  background: #fbbf24; color: #1a1000;
  border-color: #fbbf24;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #hero .btn-secondary:hover {
    background: #fbbf24; color: #1a1000;
    border-color: #fbbf24;
  }
}
.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; animation: fadeUp .8s 1.2s forwards;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: .4; transform: scaleY(1); }
  50%      { opacity: 1;  transform: scaleY(1.2); }
}
.scroll-label {
  font-family: var(--mono); font-size: .75rem;
  letter-spacing: .2em; color: var(--text-dim); text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   SECTION 2 — APPS (horizontal scroll)
═══════════════════════════════════════════ */
#apps {
  overflow: hidden;
}
#apps [data-flow-inner] {
  background: var(--bg);
}
.apps-header {
  padding: calc(var(--header-h) + 60px) 40px 40px;
  max-width: 600px;
}
.section-eyebrow {
  font-family: var(--mono);
  font-size: .88rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -.02em;
}
.section-sub {
  font-size: 1rem; color: var(--text-dim);
  line-height: 1.6; margin-top: 12px;
}
.apps-track-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 40px 80px;
  cursor: none;
}
.apps-track-wrap::-webkit-scrollbar { display: none; }
.apps-track {
  display: flex; gap: 24px;
  width: max-content;
}

/* APP CARD */
.app-card {
  width: 380px; height: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative; overflow: hidden;
  flex-shrink: 0;
  display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
  cursor: none;
  text-decoration: none; color: inherit;
}
.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 32px; position: relative; z-index: 1;
}
.card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; background: var(--surface2);
}
.card-icon img { width: 100%; height: 100%; object-fit: cover; }
.card-status {
  font-family: var(--mono); font-size: .75rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
  font-weight: 600;
}
.status-live  { background: rgba(16,185,129,.12); color: #047857; }
[data-theme="dark"] .status-live { color: #34d399; }
[data-theme="dark"] .status-dev { color: #a5b4fc; }
[data-theme="dark"] .status-beta { color: #fbbf24; }
[data-theme="dark"] { --primary: #df6035; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --primary: #df6035; }
  :root:not([data-theme="light"]) .status-live { color: #34d399; }
  :root:not([data-theme="light"]) .status-dev { color: #a5b4fc; }
  :root:not([data-theme="light"]) .status-beta { color: #fbbf24; }
}
.status-beta  { background: rgba(245,158,11,.12);  color: #b45309; }
.status-dev   { background: rgba(99,102,241,.12);  color: #4f46e5; }
.status-wip   { background: rgba(107,114,128,.12); color: #6b7280; }

.card-body { flex: 1; position: relative; z-index: 1; }
.card-name {
  font-size: 1.5rem; font-weight: 700; line-height: 1.2;
  letter-spacing: -.02em; margin-bottom: 12px;
}
.card-tagline {
  font-size: .9rem; color: var(--text-dim);
  line-height: 1.5; margin-bottom: 20px;
}
.card-tech {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tech-tag {
  font-family: var(--mono); font-size: .75rem;
  padding: 3px 8px; border-radius: 4px;
  background: var(--surface2); color: var(--text-dim);
  border: 1px solid var(--border);
}

.card-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 20px;
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
.card-explore {
  font-size: .82rem; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; gap: 6px;
  transition: gap var(--transition);
}
.app-card:hover .card-explore { gap: 10px; }

/* Decorative SVG corner element */
.card-deco {
  position: absolute; bottom: 0; right: 0;
  width: 160px; height: 160px;
  opacity: .12;
  pointer-events: none;
}
[data-theme="dark"] .card-deco { opacity: .18; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card-deco { opacity: .18; }
}

/* ═══════════════════════════════════════════
   SECTION 3 — ABOUT
═══════════════════════════════════════════ */
#about {
  /* background on flow-inner: ruota col contenuto, gap trasparente → mostra sezione precedente */
}
#about [data-flow-inner] {
  padding: 120px 40px;
  background: var(--surface);
}
.about-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.about-visual {
  display: flex; align-items: center; justify-content: center;
}
.about-orb-wrap {
  width: 380px; height: 380px;
  border-radius: 20px; overflow: hidden;
  background: rgb(4,8,20);
  border: 1px solid rgba(255,255,255,.07);
  position: relative;
  cursor: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; touch-action: pan-y;
}
.about-orb-wrap canvas {
  display: block; width: 100% !important; height: 100% !important;
}

.about-text .section-eyebrow { margin-bottom: 8px; }
.about-text h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 32px;
}
.about-paragraphs { display: flex; flex-direction: column; gap: 20px; }
.about-paragraphs p {
  font-size: 1rem; line-height: 1.75;
  color: var(--text-dim);
}
.about-paragraphs p:last-child {
  font-style: italic; color: var(--text);
  font-size: 1.05rem;
}

@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { order: -1; }
  .about-orb-wrap { width: 100%; height: 260px; }
}

/* ═══════════════════════════════════════════
   SECTION 4 — CONTACT + FOOTER
═══════════════════════════════════════════ */
#contact {
  height: 100vh;
}
#contact [data-flow-inner] {
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.contact-inner {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  max-width: 640px; margin: 0 auto;
  width: 100%; text-align: center;
  padding: 40px;
}
.contact-inner .section-eyebrow { margin-bottom: 16px; }
.contact-inner h2 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 20px; line-height: 1.15;
}
.contact-desc {
  font-size: 1.05rem; color: var(--text-dim);
  line-height: 1.7; margin-bottom: 40px;
}
.btn-email {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; border-radius: 100px;
  background: var(--primary-solid); color: var(--primary-fg);
  font-weight: 700; font-size: 1rem; letter-spacing: .02em;
  border: 2px solid var(--primary-solid);
  transition: all var(--transition);
}
.btn-email:hover {
  background: transparent; color: var(--primary);
  transform: translateY(-3px); box-shadow: 0 12px 40px rgba(223,96,53,.3);
}
.btn-email svg { width: 18px; height: 18px; }

footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-copy {
  font-size: .82rem; color: var(--text-dim);
}
.footer-links {
  display: flex; align-items: center; gap: 20px;
}
.footer-links a {
  font-size: .82rem; color: var(--text-dim);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }

@media (max-width: 600px) {
  footer { flex-direction: column; text-align: center; }
  #contact { padding: 80px 20px 0; }
  #about { padding: 80px 20px; }
  .apps-header { padding: calc(var(--header-h) + 40px) 20px 24px; }
  .apps-track-wrap { padding: 0 20px 60px; }
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════
   APP PAGE (app.php)
═══════════════════════════════════════════ */
.app-page-hero {
  min-height: 100vh;
  padding: calc(var(--header-h) + 60px) 40px 80px;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative;
}
.app-page-bg {
  position: absolute; inset: 0; z-index: 0;
  background: var(--app-color, var(--primary));
  transition: background .4s;
}
.app-page-content {
  position: relative; z-index: 1;
  max-width: 800px;
}
.app-page-icon {
  width: 88px; height: 88px; border-radius: 22px;
  overflow: hidden; margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.app-page-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-page-name {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700; line-height: 1; letter-spacing: -.03em;
  color: #fff; margin-bottom: 16px;
}
.app-page-tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(255,255,255,.8); margin-bottom: 40px;
  line-height: 1.5; max-width: 560px;
}
.app-store-links { display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn {
  padding: 12px 24px; border-radius: 100px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-weight: 600; font-size: .9rem;
  display: flex; align-items: center; gap: 8px;
  transition: all var(--transition);
}
.store-btn:hover { background: rgba(255,255,255,.25); }
.app-page-body {
  padding: 80px 40px;
  max-width: 900px; margin: 0 auto;
}
.app-detail-grid {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 60px; align-items: start;
}
.app-desc { font-size: 1.05rem; line-height: 1.8; color: var(--text-dim); }
.app-meta { display: flex; flex-direction: column; gap: 24px; }
.meta-block {}
.meta-label {
  font-family: var(--mono); font-size: .75rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 8px;
}
.meta-value { font-size: .9rem; color: var(--text); font-weight: 500; }
.meta-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--text-dim);
  margin-top: 60px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--primary); }

/* Screenshots gallery */
.screenshots-section {
  padding: 80px 40px;
  max-width: 900px; margin: 0 auto;
  border-top: 1px solid var(--border);
}
.screenshots-title {
  font-family: var(--mono); font-size: .75rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 32px;
}
.screenshots-track {
  display: flex; gap: 20px; overflow-x: auto;
  padding-bottom: 16px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.screenshots-track::-webkit-scrollbar { height: 4px; }
.screenshots-track::-webkit-scrollbar-track { background: transparent; }
.screenshots-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.screenshot-frame {
  flex-shrink: 0; scroll-snap-align: start;
  width: 220px; border-radius: 32px;
  overflow: hidden;
  border: 6px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  transition: transform var(--transition), box-shadow var(--transition);
}
.screenshot-frame:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.screenshot-frame img {
  width: 100%; height: auto; display: block; object-fit: cover;
}

.store-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: .9rem;
  transition: all var(--transition); color: var(--text);
}
.store-card:hover {
  border-color: var(--primary); transform: translateY(-2px);
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .app-detail-grid { grid-template-columns: 1fr; }
  .app-page-hero { padding: calc(var(--header-h) + 40px) 20px 60px; }
  .app-page-body { padding: 60px 20px; }
  .screenshots-section { padding: 60px 20px; }
  .screenshot-frame { width: 180px; }
}

/* ═══════════════════════════════════════════
   STORY-SCROLL — sezioni che ruotano da bottom-left
═══════════════════════════════════════════ */
.gsap-section {
  overflow: hidden;
}
[data-flow-inner] {
  position: relative;
  width: 100%;
  min-height: 100%;
  will-change: transform;
  transform-origin: bottom left;
}
@media (prefers-reduced-motion: reduce) {
  [data-flow-inner] { will-change: auto; }
}

/* ═══════════════════════════════════════════
   MOBILE — ≤ 768px
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Sezioni: no rotazione GSAP → flow normale */
  [data-flow-inner] { transform: none !important; }
  .section { min-height: auto; }
  #hero { height: 100svh; }
  #apps, #about, #contact { height: auto; }

  /* Hero */
  .hero-content { padding: 0 24px; }
  .hero-tagline { flex-wrap: wrap; gap: .3em .5em; }
  .hero-ctas {
    flex-direction: column; align-items: center; gap: 12px;
    margin-top: 24px;
  }
  .btn-primary, .btn-secondary {
    width: 100%; max-width: 300px;
    justify-content: center; text-align: center;
  }
  .hero-scroll-hint { display: none; }

  /* Nav dropdown: non uscire dallo schermo */
  .nav-dropdown { right: 0; left: auto; max-width: calc(100vw - 32px); }

  /* Apps */
  .apps-header { padding: calc(var(--header-h) + 40px) 20px 24px; }
  .apps-track-wrap { overflow-x: hidden; padding: 20px 20px 60px; cursor: auto; }
  .apps-track { flex-direction: column; width: 100%; gap: 16px; }
  .app-card { width: 100%; height: auto; min-height: 260px; padding: 24px; flex-shrink: 1; }

  /* About */
  #about [data-flow-inner] { padding: 60px 24px; }
  .about-orb-wrap { width: 100%; max-width: 320px; height: 240px; margin: 0 auto; }
  .about-text h2 { margin-bottom: 20px; }
  .about-paragraphs p { font-size: .95rem; }

  /* Contact */
  .contact-inner { padding: 60px 24px 40px; }
  .contact-inner h2 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .contact-desc { font-size: .95rem; margin-bottom: 28px; }
  .btn-email { padding: 14px 28px; }

  /* Footer */
  footer { padding: 24px 20px; flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-brand { letter-spacing: -.02em; }
}

/* ═══════════════════════════════════════════
   SUGGERIMENTO LINGUA
═══════════════════════════════════════════ */
.lang-suggest {
  position: fixed; right: 24px; bottom: 24px; z-index: 1200;
  width: min(340px, calc(100vw - 32px));
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: center;
  padding: 16px 14px 16px 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(16px) scale(.98);
  transition: opacity .35s ease, transform .35s cubic-bezier(.2,.8,.2,1);
}
.lang-suggest.show { opacity: 1; transform: none; }
.ls-badge {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  color: var(--primary-fg);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.ls-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ls-text strong { font-size: .95rem; font-weight: 700; line-height: 1.25; }
.ls-text span { font-size: .78rem; line-height: 1.4; color: var(--text-dim); }
.ls-close {
  align-self: start; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--text-dim);
  transition: background var(--transition), color var(--transition);
}
.ls-close:hover, .ls-close:focus-visible { background: var(--surface2); color: var(--text); }
.ls-go {
  grid-column: 1 / -1; margin-top: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 100px; border: none;
  font-size: .85rem; font-weight: 600;
  background: var(--primary-solid); color: var(--primary-fg);
  transition: filter var(--transition), transform var(--transition);
}
.ls-go:hover, .ls-go:focus-visible { filter: brightness(1.1); transform: translateY(-1px); }
.ls-arrow { transition: transform var(--transition); }
.ls-go:hover .ls-arrow { transform: translateX(3px); }
@media (max-width: 600px) {
  .lang-suggest { right: 16px; left: 16px; bottom: 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .lang-suggest { transition: opacity .2s ease; transform: none; }
}

/* ═══════════════════════════════════════════
   ACCESSIBILITÀ
═══════════════════════════════════════════ */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
button.dropdown-item {
  width: 100%; background: none; border: 0; text-align: left; font: inherit;
  font-family: var(--mono); font-size: .75rem;
}
button.mobile-lang-opt { background: none; font-family: inherit; }
.footer-lang {
  background: none; border: 0; padding: 0; font: inherit; font-size: .82rem;
  color: var(--text-dim); transition: color var(--transition);
}
.footer-lang:hover { color: var(--primary); }
.footer-lang.active { color: var(--primary); font-weight: 700; }

/* Badge "commissionato" */
.card-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.meta-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.commissioned {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 8px; border-radius: 100px;
  font-family: var(--mono); font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.4;
  color: #047857; background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.28);
}
.commissioned svg { flex-shrink: 0; }
[data-theme="dark"] .commissioned { color: #34d399; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .commissioned { color: #34d399; }
}

/* Link nel testo riconoscibili senza dipendere dal colore */
.privacy-wrap p a, .privacy-wrap li a { text-decoration: underline; text-underline-offset: 2px; }
