/* CarusuLabs — carusulabs.com */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #0A0E17;
  --surface: #0F1422;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);
  --text: #E8ECF5;
  --text-muted: #A3ACC2;
  --text-dim: #7D879E;
  --accent: #85F6E5;
  --brand-blue: #004FC6;
  --radius-card: 22px;
  --radius-tile: 18px;
  --radius-btn: 10px;
  --radius-pill: 999px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-gap: clamp(80px, 12vw, 140px);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--text);
  text-decoration: none;
}
a:hover { color: var(--accent); }

ul { margin: 0; }

img { max-width: 100%; display: block; }

.mono {
  font-family: 'Geist Mono', ui-monospace, monospace;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.content-main {
  display: contents;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,14,23,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  position: relative;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-top: 12px;
  white-space: nowrap;
}

.logo-ears {
  position: absolute;
  left: 0;
  top: -15px;
  width: 15px;
  height: 17px;
}

.logo-accent { color: var(--accent); }

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--text-muted);
}
.site-nav a { color: var(--text-muted); }

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
}

.lang-btn {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  padding: 5px 10px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
}
.lang-btn[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

/* Hero */

.hero {
  padding-top: clamp(64px, 10vw, 120px);
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 900px;
}

.pill {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.03);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  display: block;
}

.hero-title {
  margin: 0;
  font-size: clamp(48px, 7.6vw, 104px);
  line-height: 0.96;
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero-title .accent { color: var(--accent); }

.hero-lead {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}

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

.btn {
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 15px;
  display: inline-block;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
}
.btn-outline {
  border: 1px solid var(--border-strong);
  font-weight: 500;
  color: var(--text);
}
.btn-outline:hover {
  background: rgba(255,255,255,.06);
  color: var(--text);
}

.btn-sm {
  padding: 10px 16px;
  border-radius: var(--radius-btn);
  font-size: 14px;
}

.hero-panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(60% 80% at 50% 100%, rgba(0,79,198,.35), transparent 70%),
    var(--surface);
  padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 48px) 0;
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 48px);
  overflow: hidden;
  height: clamp(360px, 46vw, 560px);
}

.hero-panel-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-shot {
  position: relative;
  width: min(40%, 280px);
  height: auto;
  align-self: flex-start;
  border-radius: 30px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.hero-shot--second { margin-top: 48px; }

/* Sections */

.section {
  display: flex;
  flex-direction: column;
  gap: 32px;
  scroll-margin-top: 90px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: clamp(36px, 4.8vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.section-count {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
}

/* Apps */

.apps-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.app {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 12px;
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.app-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: clamp(24px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: block;
  flex-shrink: 0;
}

.app-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.app-category {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.app-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.app-title .accent { color: var(--accent); }

.app-tagline {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.app-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: auto;
}

.app-links {
  display: flex;
  gap: 14px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
}
.app-links a { color: var(--text-dim); }

.app-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature {
  border: 1px solid var(--border);
  border-radius: var(--radius-tile);
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--accent);
  display: block;
  margin-bottom: 6px;
}

.feature-title {
  font-weight: 600;
  font-size: 15px;
}

.feature-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-dim);
}

.app-visual {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 56px);
  min-height: 460px;
  overflow: hidden;
}
.app-visual--genitore {
  background: radial-gradient(70% 60% at 50% 40%, rgba(0,79,198,.45), transparent 70%), var(--surface);
}
.app-visual--rappresentante {
  background: radial-gradient(70% 60% at 50% 40%, rgba(133,246,229,.22), transparent 70%), var(--surface);
  order: -1;
}

.app-shot {
  position: relative;
  width: min(100%, 290px);
  height: auto;
  display: block;
  border-radius: 30px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

/* Team */

.team-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 40px;
}

.team-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-label {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--accent);
}

.team-text {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.team-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  display: block;
}
.team-avatar img { width: 100%; height: 100%; display: block; }

.team-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.team-nick { font-weight: 600; font-size: 15px; }
.team-role { font-size: 13px; color: var(--text-dim); }

/* Legal accordion */

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-item {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
  scroll-margin-top: 90px;
}

.legal-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(20px, 3vw, 32px);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: inherit;
}
.legal-toggle:hover { background: rgba(255,255,255,.03); }

.legal-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-kicker {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.legal-title {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.legal-sign {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--accent);
}

.legal-body {
  padding: 0 clamp(20px, 3vw, 32px) 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 78ch;
}

.legal-intro {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

.legal-blocks {
  display: none;
  flex-direction: column;
  gap: 22px;
}
.legal-item.is-open .legal-blocks { display: flex; }

.legal-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-block h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.legal-block p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  text-wrap: pretty;
}

.legal-block ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
}
.legal-block li { text-wrap: pretty; }

/* Dedicated legal pages (always expanded, no accordion chrome) */

.legal-page {
  padding: clamp(64px, 10vw, 100px) 0 var(--section-gap);
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 78ch;
}

.legal-page .legal-kicker { font-size: 13px; }

.legal-page-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  scroll-margin-top: 90px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-label {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-email {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
}
.footer-links a { color: var(--text-muted); }

.footer-wordmark {
  font-weight: 700;
  font-size: clamp(44px, 12vw, 168px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  white-space: nowrap;
  padding-top: 0.5em;
  color: var(--text);
}
.footer-wordmark-inner {
  position: relative;
  display: inline-block;
}
.footer-wordmark-ears {
  position: absolute;
  left: 0.02em;
  top: -0.6em;
  width: 0.58em;
  height: 0.66em;
}

.footer-copy {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}
