
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #003F73;
  --blue:        #0077CC;
  --sky:         #00A3FF;
  --blue-light:  #E6F1FB;
  --slate:       #1A2E44;
  --muted:       #5A7A99;
  --bg:          #F0F2F5;
  --surface:     #FFFFFF;
  --border:      rgba(0,0,0,.08);
  --text:        #1A1A1A;
  --text-muted:  #7A8A99;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   20px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.06);
  --shadow-md:   0 4px 20px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── App Shell ── */
.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px 100px;
}

/* ── Hero Banner ── */
.hero {
  background: linear-gradient(135deg, #001F3F 0%, #003F73 50%, #0077CC 100%);
  border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(0,163,255,.12);
}
.hero::after {
  content: '';
  position: absolute;
  right: 40px; bottom: -60px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(0,163,255,.07);
}

.hero-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 6px;
}
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(24px, 6vw, 34px);
  color: #fff;
  line-height: 1.05;
  margin-bottom: 4px;
}
.hero-sub {
  font-size: 12px;
  color: rgba(255,255,255,.5);
}

/* ── Desktop Tab Navigation ── */
.tab-nav-desktop {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-nav-desktop::-webkit-scrollbar { display: none; }

.tab-btn-d {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none;
}
.tab-btn-d.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.tab-btn-d .tab-icon { font-size: 16px; }

/* Link tab — stile distinto */
.tab-btn-d.tab-link {
  border-style: dashed;
  border-color: #B0C4D8;
  color: var(--navy);
  background: var(--blue-light);
}
.tab-btn-d.tab-link:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ── Mobile Tab Navigation ── */
.tab-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 0.5px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  gap: 2px;
}
.tab-btn-m {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px 5px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.tab-btn-m .ti { font-size: 19px; line-height: 1; transition: transform .2s; }
.tab-btn-m .tl { font-size: 9px; font-weight: 500; color: var(--text-muted); }
.tab-btn-m.active .ti { transform: translateY(-2px); }
.tab-btn-m.active .tl { color: var(--navy); font-weight: 700; }

/* Mobile link tab */
.tab-btn-m.tab-link-m .tl { color: var(--blue); }
.tab-btn-m.tab-link-m .ti { filter: saturate(1.3); }

/* ── Tab Panels ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .25s ease; }

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

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

/* ─────────────────────────────────────
   TAB 1 — IDENTITÀ BRAND
───────────────────────────────────── */

.mission-block {
  background: linear-gradient(135deg, #E6F1FB 0%, #F0F6FF 100%);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 10px;
  border-left: 3px solid var(--blue);
}
.mission-block h3 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}
.mission-block p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--slate);
}

.kw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.kw-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.kw-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.kw-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 20px;
  background: var(--bg);
  color: var(--slate);
  border: 0.5px solid var(--border);
}
.kw-chip.brand {
  background: #001F3F;
  color: #fff;
  border-color: transparent;
}

/* Sliders */
.sliders-grid { display: grid; gap: 10px; margin-top: 4px; }
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.slider-track {
  height: 6px;
  border-radius: 3px;
  background: #E8ECF0;
  position: relative;
}
.slider-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--navy), var(--sky));
  transition: width .6s ease;
}
.slider-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* ─────────────────────────────────────
   TAB 2 — PALETTE COLORI
───────────────────────────────────── */

.palette-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 18px 0 10px;
  padding-left: 2px;
}
.palette-section-title:first-child { margin-top: 0; }

.palette-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.palette-gradient {
  height: 120px;
  width: 100%;
}
.palette-colors-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-top: 0.5px solid var(--border);
}
.color-chip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.color-swatch {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 0.5px solid rgba(0,0,0,.08);
}
.color-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 2px;
}
.color-vals {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─────────────────────────────────────
   TAB 3 — REFERENCE SOCIAL
───────────────────────────────────── */

.ref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.ref-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.ref-card:active { transform: scale(.98); }
.ref-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.ref-card-body { padding: 12px 13px; }
.ref-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 5px;
}
.ref-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.55;
}
.ref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.ref-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}
.tag-dinamico    { background: #E6F1FB; color: #003F73; }
.tag-accogliente { background: #EAF3DE; color: #1D5C1A; }
.tag-moderno     { background: #F0EEFF; color: #3C3489; }
.tag-professionale { background: #F4F6F9; color: #5A7A99; }
.tag-visivo      { background: #FAEEDA; color: #633806; }
.tag-forte       { background: #FCEBEB; color: #7A1A1A; }

.ref-full-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.ref-full-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  object-position: top;
  display: block;
}
.ref-full-body { padding: 14px 16px; }
.ref-full-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 6px;
}
.ref-full-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─────────────────────────────────────
   TAB 4 — LINK STRATEGIA INSTAGRAM
───────────────────────────────────── */

.link-hero {
  background: linear-gradient(135deg, #003F73 0%, #0077CC 60%, #00A3FF 100%);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.link-hero::before {
  content: '';
  position: absolute;
  left: -60px; bottom: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(0,163,255,.1);
}
.link-hero-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}
.link-hero h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(22px, 5vw, 30px);
  color: #fff;
  line-height: 1.1;
  margin-bottom: 6px;
}
.link-hero p {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto 20px;
}
.link-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.link-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.link-cta-btn:active { transform: scale(.97); }
.link-cta-btn .btn-icon { font-size: 18px; }

.link-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.link-kpi {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.link-kpi-icon { font-size: 24px; margin-bottom: 6px; display: block; }
.link-kpi-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 3px;
}
.link-kpi-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
}

.link-preview-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.link-preview-header {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.link-preview-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.link-preview-title { font-size: 14px; font-weight: 700; color: #fff; }
.link-preview-sub { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 1px; }
.link-preview-body { padding: 14px 16px; }
.link-feature-list { list-style: none; }
.link-feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
  color: var(--slate);
}
.link-feature-list li:last-child { border-bottom: none; }
.link-feature-list li .fi { font-size: 16px; flex-shrink: 0; }

/* ── Responsive — Desktop ── */
@media (min-width: 600px) {
  .app { padding: 18px 18px 24px; }
  .tab-nav { display: none; }
  .ref-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
}

/* ── Responsive — Small mobile ── */
@media (max-width: 400px) {
  .kw-grid         { grid-template-columns: 1fr; }
  .ref-grid        { grid-template-columns: 1fr; }
  .link-kpi-row    { grid-template-columns: 1fr 1fr; }
}
