/*
 * landing.css
 * Pagina d'inici publica. El centre de tot es "Com funciona", pas a
 * pas: el text dels passos a l'esquerra i un mobil fix a la
 * dreta que va canviant de pantalla (landing.js). Al mobil de veritat
 * el telefon es queda a dalt i el text passa per sota.
 */

body.landing { background-color: var(--color-bg); }

.section-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-mid);
    margin-bottom: 0.6rem;
}

.section-head,
.story-intro {
    max-width: 640px;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-head h2,
.story-intro h2,
.trust-text h2,
.cta-inner h2 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-dark);
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.story-intro p:last-child {
    margin-top: 0.9rem;
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* aparicio suau (landing.js posa .is-visible; sense JS tot es veu) */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.2, 0, 0, 1), transform 0.7s cubic-bezier(0.2, 0, 0, 1);
}

.js .reveal.is-visible { opacity: 1; transform: none; }
/* la portada entra amb una animacio CSS: es veu encara que el JS falli */
.rise { animation: pk-rise 0.8s cubic-bezier(0.2, 0, 0, 1) both; }
.rise:nth-child(2) { animation-delay: 0.08s; }
.rise:nth-child(3) { animation-delay: 0.16s; }
.rise:nth-child(4) { animation-delay: 0.24s; }

@keyframes pk-rise { from { opacity: 0; transform: translateY(24px); } }
.more-card.reveal:nth-child(3n+2) { transition-delay: 0.08s; }
.more-card.reveal:nth-child(3n)   { transition-delay: 0.16s; }

/* ------------------------------------------------------------
   Barra de dalt
   ------------------------------------------------------------ */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid transparent;
    transition: background-color var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}

.landing-nav.is-scrolled {
    background-color: color-mix(in srgb, var(--color-bg) 82%, transparent);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--color-border);
}

.landing-nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-dark);
}

.landing-logo:hover { color: var(--color-dark); }

.landing-nav-links {
    display: flex;
    gap: 1.6rem;
    margin-right: auto;
}

.landing-nav-links a {
    font-size: 0.9rem;
    font-weight: 550;
    color: var(--color-text-muted);
}

.landing-nav-links a:hover { color: var(--color-text); }

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* ------------------------------------------------------------
   Portada
   ------------------------------------------------------------ */
.hero {
    position: relative;
    min-height: calc(100vh - 64px);
    min-height: calc(100svh - 64px);
    display: grid;
    place-items: center;
    padding: 4rem 2rem 6rem;
    overflow: hidden;
    isolation: isolate;
}

/* dues taques de llum calida al fons */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
}

.hero::before {
    width: 520px; height: 520px;
    top: -140px; left: -120px;
    background: color-mix(in srgb, var(--color-mid) 45%, transparent);
}

.hero::after {
    width: 460px; height: 460px;
    bottom: -160px; right: -100px;
    background: color-mix(in srgb, var(--color-success) 25%, transparent);
}

.hero-inner {
    max-width: 760px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-dark);
    background-color: color-mix(in srgb, var(--color-surface) 80%, transparent);
    border: 1px solid var(--color-border);
    border-radius: 99px;
    padding: 0.4rem 0.95rem;
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 8vw, 5.6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-dark);
    margin-bottom: 1.5rem;
}

.hero-title em {
    display: block;
    font-style: italic;
    color: var(--color-mid);
}

.hero-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--color-text-muted);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 2.2rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 52px;
    padding: 0.85rem 1.8rem;
    border-radius: 99px;
    background-color: var(--color-dark);
    color: var(--color-on-accent);
    font-size: 1rem;
    font-weight: 650;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--color-dark) 35%, transparent);
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.btn-hero-primary:hover {
    color: var(--color-on-accent);
    background-color: color-mix(in srgb, var(--color-dark) 86%, #000);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px color-mix(in srgb, var(--color-dark) 40%, transparent);
}

.btn-hero-primary i { transition: transform var(--transition); }
.btn-hero-primary:hover i { transform: translateX(3px); }

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 52px;
    padding: 0.85rem 1.4rem;
    border-radius: 99px;
    font-weight: 600;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    background-color: color-mix(in srgb, var(--color-surface) 70%, transparent);
}

.btn-hero-secondary:hover { color: var(--color-dark); border-color: var(--color-mid); }

/* targetes flotants al voltant del titol */
.hero-floats {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    max-width: 250px;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    animation: pk-float 7s ease-in-out infinite;
}

.float-card small { display: block; color: var(--color-text-muted); font-size: 0.75rem; }
.float-card strong { font-weight: 650; }

.float-card--a { top: 16%;  left: 6%;  rotate: -4deg; }
.float-card--b { top: 22%;  right: 5%; rotate: 3deg; animation-delay: -2s; min-width: 220px; }
.float-card--c { bottom: 16%; left: 9%; rotate: 3deg; animation-delay: -4s; }
.float-card--d { bottom: 20%; right: 8%; rotate: -3deg; animation-delay: -1s; }

.float-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background-color: var(--color-accent-soft);
    color: var(--color-dark);
}

.float-icon--income { background-color: var(--color-success-soft); color: var(--color-success); }
.float-icon--save   { background-color: var(--color-warning-soft); color: var(--color-warning); }
.float-icon--magic  { background: linear-gradient(135deg, var(--color-mid), var(--color-dark)); color: var(--color-on-accent); }

.float-bar {
    flex-basis: 100%;
    height: 6px;
    border-radius: 99px;
    background-color: var(--color-surface-2);
    overflow: hidden;
}

.float-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-mid), var(--color-dark));
}

@keyframes pk-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* indicador "baixa" */
.scroll-cue {
    position: absolute;
    bottom: 1.8rem;
    left: 50%;
    translate: -50% 0;
    width: 26px;
    height: 42px;
    border: 2px solid var(--color-muted);
    border-radius: 99px;
    z-index: 2;
}

.scroll-cue span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background-color: var(--color-mid);
    animation: pk-cue 1.8s ease-in-out infinite;
}

@keyframes pk-cue {
    0%   { transform: translateY(0); opacity: 1; }
    70%  { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* ------------------------------------------------------------
   La historia: passos + mobil fix
   ------------------------------------------------------------ */
.story {
    padding: 6rem 2rem 2rem;
    background:
        linear-gradient(to bottom, transparent, var(--color-surface) 18%, var(--color-surface) 82%, transparent);
}

.story-body {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
}

.story-steps { list-style: none; }

.story-step {
    min-height: 92vh;
    display: flex;
    align-items: center;
}

.story-step:first-child { min-height: 70vh; align-items: flex-start; padding-top: 12vh; }
.story-step:last-child  { min-height: 100vh; }

.story-step-card {
    max-width: 470px;
    opacity: 0.28;
    transform: translateX(-10px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0, 0, 1);
}

.story-step.is-active .story-step-card { opacity: 1; transform: none; }

.story-day {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    border-radius: 99px;
    background-color: var(--color-accent-soft);
    color: var(--color-dark);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.story-step h3 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.12;
    color: var(--color-text);
    margin-bottom: 0.9rem;
}

.story-step p {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--color-text-muted);
}

.story-tip {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.2rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px dashed color-mix(in srgb, var(--color-mid) 45%, transparent);
    font-size: 0.93rem !important;
    line-height: 1.55 !important;
}

.story-tip i { color: var(--color-warning); margin-top: 0.1rem; }

/* columna del mobil: es queda fixa mentre passen els passos */
.story-visual {
    position: sticky;
    top: 64px; /* per sota de la barra de dalt */
    height: calc(100vh - 64px);
    height: calc(100svh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.story-dots {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.story-dots span {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background-color: var(--color-border);
    transition: height 0.35s cubic-bezier(0.2, 0, 0, 1), background-color 0.35s ease;
}

.story-dots span.is-active {
    height: 28px;
    background-color: var(--color-dark);
}

/* el telefon */
.phone {
    position: relative;
    width: 300px;
    height: 620px;
    max-height: calc(100vh - 150px);
    padding: 12px;
    border-radius: 48px;
    background: linear-gradient(160deg, #3A2A20, #120C09);
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--color-mid) 35%, transparent),
        0 40px 80px -20px rgba(40, 20, 8, 0.45),
        0 18px 36px -18px rgba(40, 20, 8, 0.4);
}

.phone-island {
    position: absolute;
    top: 22px;
    left: 50%;
    translate: -50% 0;
    width: 92px;
    height: 26px;
    border-radius: 99px;
    background-color: #000;
    z-index: 5;
}

.phone-screen {
    position: relative;
    height: 100%;
    border-radius: 37px;
    overflow: hidden;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 12.5px;
    line-height: 1.4;
}

.phone-status {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 14px 24px 0 28px;
    font-size: 11px;
    font-weight: 700;
    z-index: 4;
}

.phone-status i { font-size: 11px; }

/* cada pantalla ocupa tot el telefon; nomes es veu l'activa */
.screen {
    position: absolute;
    inset: 0;
    padding: 52px 16px 76px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
}

.screen.is-past { transform: translateY(-40px) scale(0.97); }
.screen.is-active { opacity: 1; transform: none; }

/* els elements de dins entren un darrere l'altre (--d = retard) */
.screen .anim {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0, 0, 1);
}

.screen.is-active .anim {
    opacity: 1;
    transform: none;
    transition-delay: calc(0.15s + var(--d, 0s));
}

/* peces de la maqueta: una copia en petit de l'app de veritat */
.m-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 2px;
}

.m-hero,
.m-account,
.m-rec,
.m-budget,
.m-field,
.m-contrib,
.m-split,
.m-cats,
.m-import {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 10px 12px;
}

.m-hero small, .m-field small, .m-split small { display: block; color: var(--color-text-muted); font-size: 11px; }
.m-hero strong { display: block; font-size: 24px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.m-hero--split { display: flex; justify-content: space-between; }
.m-hero--split strong { font-size: 17px; }

.m-account, .m-rec, .m-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.m-grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-grow small { color: var(--color-text-muted); font-size: 10.5px; }
.m-account b, .m-rec b, .m-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }

.m-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 9px;
    background-color: var(--color-accent-soft);
    color: var(--color-dark);
    font-size: 13px;
}

.m-icon--income { background-color: var(--color-success-soft); color: var(--color-success); }

.m-pos { color: var(--color-success); }
.m-neg { color: var(--color-danger); }

.m-button {
    margin-top: auto;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    font-weight: 650;
    background-color: var(--color-dark);
    color: var(--color-on-accent);
}

/* pantalla del dia a dia: escriure i categoria suggerida */
.m-input {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    font-weight: 600;
}

.type-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: 2px solid var(--color-mid);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
}

.screen.is-active .type-text {
    animation: pk-type 0.9s steps(9, end) 0.5s forwards, pk-caret 0.8s step-end 6;
}

@keyframes pk-type  { to { width: 9ch; } }
@keyframes pk-caret { 50% { border-color: transparent; } }

.m-input--pick { justify-content: space-between; }

.m-suggest {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.m-magic {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-mid);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.is-active .m-suggest { opacity: 1; transform: none; transition-delay: 1.5s; }
.screen.is-active .m-magic   { opacity: 1; transition-delay: 1.7s; }

.m-import { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.m-import-head { display: flex; gap: 6px; align-items: center; font-weight: 650; color: var(--color-dark); }
.m-import-row  {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-top: 1px solid var(--color-border);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.2, 0, 0, 1);
}

.screen.is-active .m-import-row { opacity: 1; transform: none; transition-delay: calc(2.1s + var(--r) * 0.18s); }

.m-import-ok {
    display: flex;
    gap: 5px;
    align-items: center;
    font-size: 11px;
    font-weight: 650;
    color: var(--color-success);
    opacity: 0;
    transition: opacity 0.4s ease 2.8s;
}

.screen.is-active .m-import-ok { opacity: 1; }

/* pantalla de categories: paraules clau, i una de nova que apareix */
.m-catrow {
    display: flex;
    flex-direction: column;
    gap: 7px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 10px 12px;
}

.m-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.m-chips span {
    padding: 2px 8px;
    border-radius: 99px;
    background-color: var(--color-surface-2);
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 600;
}

.m-chips .m-chip-new {
    background-color: var(--color-accent-soft);
    color: var(--color-dark);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.screen.is-active .m-chip-new { opacity: 1; transform: none; transition-delay: 1.2s; }

/* pantalla de recurrents */
.screen.is-active .m-rec .m-icon i { animation: pk-spin-once 0.8s cubic-bezier(0.2, 0, 0, 1) 1.1s; }

@keyframes pk-spin-once { to { rotate: 360deg; } }

.m-auto {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    padding: 8px;
    border-radius: 12px;
    background-color: var(--color-success-soft);
    color: var(--color-success);
    font-weight: 650;
}

/* pantalla de pressupostos i l'avis */
.m-bar {
    position: relative;
    height: 7px;
    margin: 9px 0 5px;
    border-radius: 99px;
    background-color: var(--color-surface-2);
}

.m-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-mid), var(--color-dark));
    transition: width 1.1s cubic-bezier(0.2, 0, 0, 1);
}

.m-fill--warn { background: linear-gradient(90deg, var(--color-mid), var(--color-warning)); }
.screen.is-active .m-fill { width: var(--w); transition-delay: 0.45s; }

.m-today {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background-color: var(--color-text);
    opacity: 0.45;
}

.m-note { color: var(--color-text-muted); font-size: 10.5px; }

.m-toast {
    position: absolute;
    top: 40px;
    left: 10px;
    right: 10px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background-color: color-mix(in srgb, var(--color-surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-140%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.3, 1.3, 0.5, 1), opacity 0.3s ease;
}

.m-toast i { color: var(--color-warning); font-size: 16px; }
.m-toast span { display: flex; flex-direction: column; }
.m-toast small { color: var(--color-text-muted); font-size: 10.5px; }
.screen.is-active .m-toast { transform: none; opacity: 1; transition-delay: 1.6s; }

/* pantalla de l'estalvi: l'anell de l'objectiu */
.m-goal {
    position: relative;
    align-self: center;
    width: 170px;
    height: 170px;
    padding: 0;
    border: none;
    background: none;
    margin: 6px 0;
}

.m-ring { width: 100%; height: 100%; rotate: -90deg; }

.m-ring-track,
.m-ring-fill {
    fill: none;
    stroke-width: 11;
}

.m-ring-track { stroke: var(--color-surface-2); }

.m-ring-fill {
    stroke: var(--color-dark);
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: 327;
    transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0, 0, 1);
}

.screen.is-active .m-ring-fill { stroke-dashoffset: calc(327 * (1 - var(--p))); transition-delay: 0.35s; }

.m-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.m-ring-label strong { font-size: 30px; font-weight: 750; font-variant-numeric: tabular-nums; }
.m-ring-label small { font-size: 10.5px; color: var(--color-text-muted); }

.m-goal-name { text-align: center; font-weight: 700; font-size: 14px; }

.m-pill {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 99px;
    background-color: var(--color-success-soft);
    color: var(--color-success);
    font-weight: 700;
    font-size: 11px;
}

.m-contrib { display: flex; justify-content: space-between; }

/* pantalla del resum */
.m-delta { display: inline-flex; align-items: center; font-size: 11px; font-weight: 650; color: var(--color-success); }
.m-split { display: flex; justify-content: space-between; }
.m-split b { font-size: 14px; font-variant-numeric: tabular-nums; }
.m-cats  { display: flex; flex-direction: column; gap: 8px; }

.m-cat {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 8px;
}

.m-cat-bar { height: 6px; border-radius: 99px; background-color: var(--color-surface-2); }

.m-cat-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-mid), var(--color-dark));
    transition: width 1s cubic-bezier(0.2, 0, 0, 1);
}

.screen.is-active .m-cat-bar span { width: var(--w); transition-delay: 0.5s; }
.m-cat b { font-variant-numeric: tabular-nums; }

/* barra de pestanyes de la maqueta */
.m-tabbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 14px 18px;
    background-color: color-mix(in srgb, var(--color-surface) 94%, transparent);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 16px;
}

.m-plus {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-top: -18px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--color-mid), var(--color-dark));
    color: var(--color-on-accent);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--color-dark) 40%, transparent);
}

/* ------------------------------------------------------------
   I molt mes
   ------------------------------------------------------------ */
.more { padding: 7rem 2rem 5rem; }

.more-inner { max-width: 1180px; margin: 0 auto; }

.more-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.more-card {
    padding: 1.6rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.more-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--color-mid) 40%, var(--color-border));
}

.more-card > i {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background-color: var(--color-accent-soft);
    color: var(--color-dark);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.more-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.more-card p  { font-size: 0.93rem; color: var(--color-text-muted); line-height: 1.65; }

/* ------------------------------------------------------------
   Privacitat
   ------------------------------------------------------------ */
.trust { padding: 2rem 2rem 6rem; }

.trust-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem;
    border-radius: 28px;
    border: 1px solid var(--color-border);
    background:
        radial-gradient(90% 120% at 0% 0%, var(--color-accent-soft), transparent 70%),
        var(--color-surface);
}

.trust-text p:last-child { margin-top: 0.9rem; color: var(--color-text-muted); line-height: 1.7; font-size: 1.02rem; }

.trust-list { list-style: none; display: grid; gap: 0.8rem; }

.trust-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
    font-weight: 550;
}

.trust-list i {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background-color: var(--color-accent-soft);
    color: var(--color-dark);
}

/* ------------------------------------------------------------
   Crida final i guardiola
   ------------------------------------------------------------ */
.cta-section {
    padding: 6rem 2rem;
    background: linear-gradient(160deg, #5A3520 0%, #8A5A36 100%);
    color: #fff;
    overflow: hidden;
}

.cta-inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.cta-inner h2 { color: #fff; }
.cta-inner p  { font-size: 1.08rem; color: rgba(255, 255, 255, 0.82); line-height: 1.65; }

.cta-section .btn-hero-primary {
    background-color: #fff;
    color: #5A3520;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.cta-section .btn-hero-primary:hover { background-color: #FBF3EA; color: #5A3520; }

/* guardiola de donacions (nomes si hi ha SUPPORT_URL) */
.cta-support-box {
    max-width: 560px;
    margin: 4rem auto 0;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.07);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cta-support-box h3 { color: #fff; font-size: 1.3rem; margin: 0; }
.cta-support-box p  { color: rgba(255, 255, 255, 0.82); line-height: 1.65; margin: 0; }

.cta-pig { width: 110px; height: 110px; }
.cta-pig svg { width: 100%; height: 100%; overflow: visible; }
.cta-pig-line { fill: none; stroke: #fff; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.cta-pig-fill { fill: #F2C66D; transform: translateY(60px); transition: transform 0.15s linear; }

/* moneda que cau per la ranura una vegada i una altra */
.cta-pig-coin {
    fill: #F2C66D;
    stroke: #fff;
    stroke-width: 2.5;
    animation: pk-coin 2.6s ease-in infinite;
}

@keyframes pk-coin {
    0%        { transform: translateY(-6px); opacity: 0; }
    20%       { opacity: 1; }
    60%       { transform: translateY(22px); opacity: 1; }
    75%, 100% { transform: translateY(26px); opacity: 0; }
}

.cta-support-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.6rem;
    border: 2px solid #F2C66D;
    border-radius: 99px;
    color: #fff;
    font-weight: 650;
    transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.cta-support-btn:hover { background-color: #F2C66D; color: #5A3520; transform: translateY(-2px); }

/* ------------------------------------------------------------
   Peu
   ------------------------------------------------------------ */
.landing-footer {
    border-top: 1px solid var(--color-border);
    padding: 2rem;
    background-color: var(--color-surface);
}

.landing-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.landing-footer-inner p { font-size: 0.82rem; color: var(--color-text-muted); }
.landing-footer .landing-logo { font-size: 1.05rem; }
.landing-legal a { color: inherit; }
.landing-legal a:hover { color: var(--color-dark); }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1100px) {
    .float-card--b, .float-card--d { right: 2%; }
    .float-card--a, .float-card--c { left: 2%; }
}

@media (max-width: 900px) {
    .landing-nav-links { display: none; }
    .landing-nav-actions { margin-left: auto; }

    /* a la portada, les targetes queden a sota del text i quietes */
    .hero { padding: 3rem 1.25rem 7rem; min-height: auto; }
    .hero-floats { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 2.5rem; }
    .float-card { position: static; rotate: 0deg; max-width: none; translate: none !important; }
    .float-card--b, .float-card--d { display: none; }
    .hero { display: flex; flex-direction: column; }

    /* la historia: el telefon, mes petit, a dalt i quiet; el text passa per sota */
    .story { padding: 4rem 1rem 1rem; }
    .story-body { grid-template-columns: 1fr; gap: 0; }
    .story-visual {
        order: -1;
        top: 64px;
        height: auto;
        margin: 0 -1rem;
        padding: 0.5rem 1rem 1rem;
        z-index: 2;
        background-color: var(--color-surface);
        box-shadow: 0 18px 18px -6px var(--color-surface); /* fosa suau per sota */
    }

    .story-dots { display: none; }

    /* el mateix telefon, escalat: aixi la maqueta no es desquadra */
    .phone { zoom: 0.6; max-height: none; }

    .story-step,
    .story-step:first-child,
    .story-step:last-child { min-height: 75vh; align-items: flex-end; padding: 0 0 12vh; }

    .story-step-card {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
        border: 1px solid var(--color-border);
        background-color: var(--color-surface);
        box-shadow: var(--shadow-md);
        transform: none;
    }

    .story-step p { font-size: 1rem; }

    .more { padding: 5rem 1.25rem 3rem; }
    .more-grid { grid-template-columns: 1fr 1fr; }
    .trust { padding: 1rem 1.25rem 4rem; }
    .trust-inner { grid-template-columns: 1fr; padding: 1.75rem; gap: 1.5rem; }
}

@media (max-width: 600px) {
    .landing-nav-inner { padding: 0.75rem 1rem; }
    /* els dos botons sempre: qui ja te compte ha de poder entrar */
    .landing-nav-inner { gap: 0.75rem; }
    .landing-nav-actions { gap: 0.4rem; }
    .landing-nav-actions a { padding: 0.5rem 0.8rem; font-size: 0.82rem; white-space: nowrap; }
    .hero-floats { grid-template-columns: 1fr; }
    .more-grid { grid-template-columns: 1fr; }
    .cta-section { padding: 4.5rem 1.25rem; }
    .cta-support-box { padding: 2rem 1.25rem; margin-top: 3rem; }
    .landing-footer-inner { flex-direction: column; text-align: center; }
}

/* mobils estrets: nomes la moneda del logo, perque hi capiguin els botons */
@media (max-width: 480px) {
    .landing-nav .landing-logo span:last-child { display: none; }
}

@media (max-width: 360px) {
    .landing-nav-actions a { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
}

/* sense moviment: res no sura ni rebota, i tot es veu d'entrada */
@media (prefers-reduced-motion: reduce) {
    .float-card, .scroll-cue span { animation: none; }
    .cta-pig-coin { animation: none; opacity: 0; }
    .type-text { width: 9ch; border-right: none; }
    .cta-pig-fill { transform: none !important; }
}
