/*
 * Flusso di Cassa - waitlist landing.
 * Mobile-first. Palette and type from the style references of 2026-09-26.
 * The signup form keeps Brevo's embed ids and classes: main.js relies on them.
 */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1a365d;
  --alice: #e2e8f0;
  --pine: #1e4d3a;
  --mint: #d1fae5;
  --iron: #a72608;
  --mustard: #ffdc5e;
  --mustard-soft: #fff7d6;
  --ink: #334155;
  --muted: #64748b;
  --field: #cbd5e1;
  --paper: #ffffff;
  --paper-soft: #f5f7fa;
  --error-bg: #fef2f2;
  --error-ink: #991b1b;
  --focus-ring: 0 0 0 4px rgba(26, 54, 93, 0.18);
  --shadow: 0 1px 2px rgba(26, 54, 93, 0.06), 0 18px 40px -14px rgba(26, 54, 93, 0.2);
  --radius: 14px;
  --radius-lg: 22px;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  --max: 1120px;
  color-scheme: light;
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--pine);
}

:focus-visible {
  outline: 3px solid rgba(26, 54, 93, 0.45);
  outline-offset: 3px;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Layout */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: 760px;
}

.section {
  padding-block: 64px;
}

.section--soft {
  background: var(--paper-soft);
}

.section__title {
  font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.5rem);
  line-height: 1.12;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
}

@media (min-width: 800px) {
  :root {
    --gutter: 32px;
  }

  .section {
    padding-block: 96px;
  }
}

/* Header and footer */

.site-header {
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--navy);
}

.brand__mark {
  width: 32px;
  height: 32px;
}

.site-footer {
  padding-block: 28px;
  border-top: 1px solid var(--alice);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  color: var(--pine);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 24px;
  border: 2px solid var(--navy);
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.btn:hover {
  background: var(--mint);
  color: var(--navy);
}

.btn:active {
  transform: translateY(1px);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--mint {
  border-color: var(--mint);
  background: var(--mint);
  color: var(--navy);
}

.btn--mint:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--navy);
}

.btn__label {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn__sub {
  font-size: 0.9375rem;
  font-weight: 500;
  opacity: 0.85;
}

@media (min-width: 600px) {
  .btn__label--row {
    flex-direction: row;
    gap: 0.3em;
  }

  .btn__label--row .btn__sub {
    font-size: inherit;
    font-weight: inherit;
    opacity: 1;
  }
}

/* Hero */

.hero {
  padding-block: 16px 64px;
  overflow-x: clip;
}

.hero__grid {
  display: grid;
  gap: 48px;
}

.hero__title {
  font-size: clamp(2.375rem, 1.6rem + 3.8vw, 3.875rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero__subtitle {
  margin-top: 14px;
  color: var(--pine);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hero__support {
  max-width: 36em;
  margin-top: 16px;
}

.hero__form {
  max-width: 520px;
  margin-top: 28px;
  scroll-margin-top: 16px;
}

.hero__visual {
  position: relative;
  isolation: isolate;
}

.hero__visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6% -12% 0;
  background: radial-gradient(closest-side, rgba(209, 250, 229, 0.95), rgba(209, 250, 229, 0));
}

@media (min-width: 960px) {
  .hero {
    padding-block: 32px 104px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 72px;
  }
}

/* Confirmation page (?iscrizione=confermata) */

.confirmed__title {
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.confirmed__share {
  max-width: 520px;
  margin-top: 32px;
  padding: 20px;
  border: 1px solid var(--alice);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.confirmed__share .btn {
  margin-top: 16px;
}

.confirmed__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 520px;
  margin-top: 20px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.confirmed__note .icon {
  margin-top: 1px;
  color: var(--pine);
}

/* Signup form (Brevo embed markup) */

.signup {
  padding: 20px;
  border: 1px solid var(--alice);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.sib-form-block + .sib-form-block {
  margin-top: 16px;
}

.entry__label {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
}

.entry__field .input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--field);
  border-radius: 12px;
  background: var(--paper);
  color: var(--navy);
  font: inherit;
  font-size: 1.0625rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.entry__field .input::placeholder {
  color: #94a3b8;
}

.entry__field .input:focus {
  border-color: var(--navy);
  outline: none;
  box-shadow: var(--focus-ring);
}

.entry__field select.input {
  padding-right: 32px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a365d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  cursor: pointer;
}

.phone-input {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px;
}

.entry__error {
  display: block;
  margin-top: 6px;
  color: var(--error-ink);
  font-size: 0.875rem;
}

.entry__error:empty {
  display: none;
}

.choice {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice__option {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice__option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice__option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  border: 1.5px solid var(--field);
  border-radius: 12px;
  background: var(--paper);
  color: var(--navy);
  font-weight: 600;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.choice__option .icon {
  display: none;
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.choice__option:hover span {
  border-color: var(--navy);
}

.choice__option input:checked + span {
  border-color: var(--pine);
  background: var(--mint);
  color: var(--pine);
}

.choice__option input:checked + span .icon {
  display: block;
}

.choice__option input:focus-visible + span {
  border-color: var(--navy);
  box-shadow: var(--focus-ring);
}

.signup .sib-form-block--submit {
  margin-top: 20px;
}

.input--hidden {
  display: none !important;
}

.sib-hide-loader-icon {
  display: none;
}

.progress-indicator__icon {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.sib-form-message-panel {
  display: none;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  line-height: 1.45;
}

.sib-form-message-panel--active {
  display: block;
}

.sib-form-message-panel__text {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sib-form-message-panel__text .icon {
  margin-top: 1px;
  stroke-width: 2.5;
}

#success-message {
  background: var(--mint);
  color: var(--pine);
}

#error-message {
  background: var(--error-bg);
  color: var(--error-ink);
}

/* Once subscribed, the success message replaces the form */
#success-message.sib-form-message-panel--active {
  margin-bottom: 0;
}

#success-message.sib-form-message-panel--active ~ #sib-container {
  display: none;
}

.signup__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.signup__note .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--pine);
  stroke-width: 2.5;
}

.signup__privacy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.signup__privacy a {
  color: inherit;
}

/* App mockup */

.device {
  width: min(100%, 340px);
  margin-inline: auto;
  padding: 10px;
  border-radius: 46px;
  background: var(--navy);
  box-shadow: 0 40px 80px -32px rgba(26, 54, 93, 0.5);
}

.device__screen {
  padding: 14px 16px 18px;
  border-radius: 36px;
  background: var(--paper);
}

.device__screen::before {
  content: "";
  display: block;
  width: 84px;
  height: 22px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: var(--navy);
}

.app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-head__title {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
}

.app-total-label {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.app-total {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 8px 1px 6px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.tag .icon {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.tag--auto {
  background: var(--mint);
  color: var(--pine);
}

.tag--receipt {
  background: var(--alice);
  color: var(--navy);
}

.tag--manual {
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--alice);
}

.tag--confirm {
  background: var(--mustard);
  color: var(--navy);
}

.tag--lg {
  padding: 3px 10px 3px 8px;
  font-size: 0.75rem;
}

.tx-list {
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--alice);
  list-style: none;
}

.tx {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 2px 11px 12px;
  border-bottom: 1px solid var(--alice);
}

.tx--auto::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--pine);
}

.tx__icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--paper-soft);
  color: var(--navy);
}

.tx__icon .icon {
  width: 18px;
  height: 18px;
}

.tx--auto .tx__icon {
  background: var(--mint);
  color: var(--pine);
}

.tx__name {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx__meta {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

/* Outflows in red, inflows in green */
.tx__amount {
  color: var(--iron);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.app-insight {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--mustard);
  border-radius: 14px;
  background: var(--mustard-soft);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.app-insight__icon {
  display: grid;
  flex: none;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--mustard);
  color: var(--navy);
}

.app-insight__icon .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.25;
}

.app-insight strong {
  display: block;
  color: var(--navy);
}

/* Problem */

.problem__grid {
  display: grid;
  align-items: center;
  gap: 40px;
}

.problem__title span {
  display: block;
  color: var(--pine);
}

.problem__text {
  max-width: 38em;
  margin-top: 20px;
}

@media (min-width: 900px) {
  .problem__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 72px;
  }
}

.sheet {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--alice);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.sheet__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--alice);
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 0.75rem;
}

.sheet__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--field);
}

.sheet__bar span {
  margin-left: 6px;
}

.sheet__grid {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 84px;
  color: var(--ink);
  font-size: 0.8125rem;
}

.sheet__grid span {
  min-height: 32px;
  padding: 6px 10px;
  border-right: 1px solid var(--alice);
  border-bottom: 1px solid var(--alice);
}

.sheet__grid span:nth-child(3n) {
  border-right: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sheet__grid .sheet__head {
  background: var(--paper-soft);
  color: var(--navy);
  font-weight: 600;
}

.sheet__grid span:nth-last-child(-n + 3) {
  border-bottom: 0;
}

/* Benefits */

.cards {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.card {
  padding: 24px;
  border: 1px solid var(--alice);
  border-radius: 18px;
  background: var(--paper);
}

.card__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--mint);
  color: var(--pine);
}

.card__icon .icon {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin-top: 16px;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.card p {
  margin-top: 8px;
}

@media (min-width: 800px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

/* How it works */

.steps {
  display: grid;
  gap: 28px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 16px;
}

.step__num {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.step h3 {
  margin-top: 10px;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.step p {
  margin-top: 6px;
}

.step .tag {
  margin-top: 12px;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }

  .step {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Founders offer */

.offer {
  padding-block: 64px;
}

.offer__card {
  padding: 40px 24px;
  border-radius: 28px;
  background: var(--navy);
  color: var(--alice);
  text-align: center;
}

.offer .eyebrow {
  color: var(--mint);
}

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 12px;
  margin-top: 14px;
  color: #fff;
  font-weight: 700;
  line-height: 1.1;
}

.price__old {
  color: #94a3b8;
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration-thickness: 2px;
}

.price__arrow {
  color: var(--mint);
  font-size: 1.5rem;
  font-weight: 500;
}

.price__new {
  font-size: clamp(3.25rem, 2.2rem + 5vw, 4.75rem);
  letter-spacing: -0.03em;
}

.price__once {
  flex-basis: 100%;
  font-size: 1.5rem;
  font-weight: 500;
}

.offer__text {
  max-width: 34em;
  margin: 18px auto 0;
}

.offer .btn {
  margin-top: 28px;
}

@media (min-width: 800px) {
  .offer {
    padding-block: 96px;
  }

  .offer__card {
    padding: 64px 48px;
  }

  .price__once {
    flex-basis: auto;
  }
}

/* FAQ */

.faq {
  margin-top: 24px;
  border-top: 1px solid var(--alice);
}

.faq__item {
  border-bottom: 1px solid var(--alice);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary .icon {
  color: var(--pine);
  transition: transform 0.2s;
}

.faq__item[open] summary .icon {
  transform: rotate(45deg);
}

.faq__answer {
  max-width: 60ch;
  padding-bottom: 20px;
}

/* Closing */

.closing {
  padding-block: 72px 88px;
  background: var(--paper-soft);
  text-align: center;
}

.closing__title {
  max-width: 22ch;
  margin-inline: auto;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  line-height: 1.15;
}

.closing__title span {
  display: block;
  color: var(--pine);
}

.closing .btn {
  margin-top: 28px;
}

/* Text pages (privacy) */

.page {
  padding-block: 24px 80px;
}

.page__title {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  line-height: 1.15;
}

.prose {
  margin-top: 24px;
}

.prose > * + * {
  margin-top: 1em;
}

.prose h2,
.prose h3 {
  margin-top: 2em;
  font-size: 1.25rem;
  line-height: 1.3;
}

.prose ul {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 0.35em;
}
