/* Manteco — Marketing site styles
 * Niente framework, niente build. Solo CSS pulito.
 */

* { box-sizing: border-box; }

:root {
  --bg: #ffffff;
  --bg-alt: #fafaf9;
  --bg-deep: #18181b;
  --fg: #18181b;
  --fg-muted: #71717a;
  --fg-soft: #a1a1aa;
  --border: #e4e4e7;
  --accent: #C23535;        /* Manteco brand red — coerente con simbolo iride */
  --accent-light: #f4cdcd;
  --radius: 8px;
  --radius-lg: 12px;
  --max-w: 1100px;
}

html, body { padding: 0; margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
    system-ui, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--accent); }

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

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

/* ------------------------------------------------------------------ */
/* Topbar */
/* ------------------------------------------------------------------ */

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-block;
  flex-shrink: 0;
}
.topnav {
  display: inline-flex;
  align-items: center;
  gap: 28px;
}
.topnav a {
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 500;
}
.topnav a:hover { color: var(--fg); }

/* ------------------------------------------------------------------ */
/* Buttons */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover {
  background: #27272a;
  color: var(--bg);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
}
.btn-ghost:hover { background: var(--bg-alt); color: var(--fg); }
.btn-lg {
  font-size: 15px;
  padding: 14px 26px;
}

/* ------------------------------------------------------------------ */
/* Hero */
/* ------------------------------------------------------------------ */

.hero {
  padding: 100px 0 80px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  text-align: center;
}
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 16px;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 28px;
  color: var(--fg);
}
.hero h1 br { display: none; }
@media (min-width: 600px) {
  .hero h1 br { display: inline; }
}
.lede {
  max-width: 680px;
  margin: 0 auto 36px;
  font-size: 18px;
  color: var(--fg-muted);
}
.cta-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ------------------------------------------------------------------ */
/* Sections */
/* ------------------------------------------------------------------ */

section {
  padding: 80px 0;
}
section h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.section-lede {
  max-width: 680px;
  font-size: 16px;
  color: var(--fg-muted);
  margin: 0 0 48px;
}

/* ------------------------------------------------------------------ */
/* Features */
/* ------------------------------------------------------------------ */

.features {
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--bg);
  transition: all 0.2s;
}
.feature:hover {
  border-color: var(--fg);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
}
.feature h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.feature p {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/* Extras */
/* ------------------------------------------------------------------ */

.extras {
  background: var(--bg-alt);
}
.extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.extra {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.extra strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}
.extra p {
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0;
  line-height: 1.55;
}

/* ------------------------------------------------------------------ */
/* Why */
/* ------------------------------------------------------------------ */

.why {
  background: var(--bg);
}
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 760px;
  display: grid;
  gap: 18px;
}
.bullet-list li {
  padding-left: 28px;
  position: relative;
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
}
.bullet-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}
.bullet-list strong {
  color: var(--fg);
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* CTA final */
/* ------------------------------------------------------------------ */

.cta-final {
  background: var(--fg);
  color: var(--bg);
  text-align: center;
  padding: 100px 0;
}
.cta-final h2 {
  color: var(--bg);
}
.cta-final p {
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  max-width: 540px;
  margin: 0 auto 32px;
}
.cta-final .btn-primary {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--bg);
}
.cta-final .btn-primary:hover {
  background: var(--bg-alt);
}

/* ------------------------------------------------------------------ */
/* Footer */
/* ------------------------------------------------------------------ */

.footer {
  background: #fafaf9;
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
  font-size: 14px;
  color: var(--fg-muted);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  padding-bottom: 48px;
}
@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
.footer-tagline {
  margin: 8px 0 0;
  color: var(--fg-soft);
  font-size: 13px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 540px) {
  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}
.footer h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  margin: 0 0 14px;
  font-weight: 600;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer ul li {
  margin-bottom: 8px;
}
.footer ul a {
  color: var(--fg-muted);
  font-size: 13px;
}
.footer ul a:hover {
  color: var(--fg);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 12px;
  color: var(--fg-soft);
}
.footer-bottom a {
  color: var(--fg-soft);
}
.footer-bottom a:hover {
  color: var(--fg);
}

/* ------------------------------------------------------------------ */
/* Legal pages (privacy, terms) — typography */
/* ------------------------------------------------------------------ */

.legal-page {
  padding: 80px 0;
  max-width: 760px;
  margin: 0 auto;
}
.legal-page h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.legal-page > p:first-of-type {
  color: var(--fg-muted);
  font-size: 14px;
  margin: 0 0 36px;
}
.legal-page h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 36px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.legal-page h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 10px;
}
.legal-page p, .legal-page li {
  color: var(--fg);
  font-size: 15px;
  line-height: 1.65;
}
.legal-page ul {
  padding-left: 22px;
}
.legal-page li {
  margin-bottom: 6px;
}
.legal-page table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 13px;
}
.legal-page th, .legal-page td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.legal-page th {
  background: var(--bg-alt);
  font-weight: 600;
}
.legal-page code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}
.legal-page a {
  color: var(--accent);
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Splash di apertura — replica SplashScreen.tsx dell'app.
 * Sequenza (totale ~2.2s prima del fade-out):
 *   0.00 - 0.70s  simbolo iride: fade-in + scale 0.86 → 1
 *   0.28 - 0.83s  wordmark "manteco"
 *   0.50 - 1.05s  payoff "Optimize your restaurant"
 *   1.80 - 2.30s  intero overlay: fade-out + scale 1.03
 *   2.30s+        pointer-events: none, non blocca più scroll
 * CSS-only (animation-fill-mode forwards) — funziona anche senza JS. */
/* ------------------------------------------------------------------ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  animation: splash-exit 0.5s cubic-bezier(0.16, 1, 0.3, 1) 1.8s forwards;
}
@keyframes splash-exit {
  to {
    opacity: 0;
    transform: scale(1.03);
    visibility: hidden;
    pointer-events: none;
  }
}

.splash-mark {
  opacity: 0;
  transform: scale(0.86) translateY(6px);
  animation: splash-mark-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0s forwards;
}
@keyframes splash-mark-in {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.splash-wordmark {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
  opacity: 0;
  transform: translateY(8px);
  animation: splash-fade-up 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.28s forwards;
}

.splash-payoff {
  margin: -12px 0 0;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 0;
  transform: translateY(8px);
  animation: splash-fade-up 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes splash-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Per chi ha "Riduci movimento" attivo (Mac / iOS / Windows):
 * niente animazione di scala, solo fade rapido. */
@media (prefers-reduced-motion: reduce) {
  .splash,
  .splash-mark,
  .splash-wordmark,
  .splash-payoff {
    animation-duration: 0.001s;
    animation-delay: 0s;
    transform: none;
    opacity: 1;
  }
  .splash {
    animation: splash-exit-instant 0.001s 0.4s forwards;
  }
  @keyframes splash-exit-instant {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
  }
}
